CFD Online Discussion Forums

CFD Online Discussion Forums (
-   Main CFD Forum (
-   -   Not enought memory?!* (

steve podleski June 6, 2000 13:32

Not enought memory?!*
We're trying to run a Fortran CFD job (NPARC)on a PC with Win98. If the memory requirement is small enough, the job runs ok but if we go beyond a limit,the Fortran program complains about not enough memory. This code has dynamic memory allocation. The Dell computer originally came with 128MB, we added two more 128MB success. We added two 256MB cards (to the original 128MB), still no success!. I know that this Fortran job does not require 640 MB! I can run two of these Fortran jobs on another PC with Win NT4 which has 896MB. There should be no problem with disk space since the PC has over 1GB of freespace.

Do I have to change some setting on the Win 98 machines?

Is there anyone out there that has experience running large CFD jobs on a PC with Windows 98?

John C. Chien June 6, 2000 15:23

Re: Not enought memory?!*
(1). I am not running large CFD jobs on a PC with Windows98. (2). But you sure can write a very simple Fortran program to simulate a large program (Dimension or Common), through several large dimensioned arrays to find out whether there is a limitation on the variable size or program size. (3). Check the Fortran compiler to see whether there is a limit on the variable size or program size. Are you running under Windows? or under DOS?

Bernard Parent June 6, 2000 17:07

Re: Not enought memory?!*
Do yourself a favour: install linux.

It will solve all your strange problems...


steve podleski June 6, 2000 17:29

Re: Not enought memory?!*

I open a command window to run the job as follows:


Or I run a .bat file.

This job runs ok under WinNT (as I said I can run 2 jobs simultaneously under NT)

When I compiled this code in a command window, I saw no error regarding variable size or program size. BTW, this program uses dynamic memory allocation (I'm not quite sure what that means but I assume that the program will use as much memory as required by my input file).

How can I run this job under Windows?

steve podleski June 6, 2000 17:31

Re: Not enought memory?!*
That is my plan in the near future. I have had enough being jerked around by MS software that is as stable as plutonium . But I need to get results this week!

Jaret June 6, 2000 18:20

Re: Not enought memory?!*

How about checking your virtual memory setting in Win98? (Setting -> Control Panel -> System -> Virtual memory) Windows usually use a lot of virtual memory(actually some portion of your hardisk) if a system has low in physical memory.

Or you may need to turn on 'out-of-core' memory option in your compiler/software.


steve podleski June 6, 2000 18:45

Re: Not enought memory?!*

I have about 1.4GB of free disk space. Eventhough Win98 seems to allow the user to set virtual memory, my computer does not keep the user settings but resets virtual memory setting to computer control.

What is the 'out of core' setting?

Jaret June 6, 2000 20:16

Re: Not enought memory?!*

I can summarize the 'out-of-core' like this.

When your data files are too big to fit into your in-core (physical)memory, compiler/softwares can use out-of-core technique. By that, some portion of your data is put into the in-core memory and the other is stored into your hard disk as files. After the in-core memory data is processed, the stored files now move to the in-core memory and the previous in-core memory data is saved as files. Computers keep doing that until your simulation is finished.

If you turn on the option, your simulation will be slow due to frequent data transfer from/to your hard disk. However, it is the only option you can use when your computer is low in memory by some reasons.

John C. Chien June 6, 2000 22:24

Re: Not enought memory?!*
(1). Can you print the exact error message here so that some other experts in this field can help you? (2). Also, What was the Fortran compiler used in compiling the code? Were there special flags used? (3). Was the version running on NT also compiled by the same compiler? (4). Are you solving the identical problems? on Windows98 and NT. I mean what's the difference between the two jobs? Any changes in mesh structure, mesh topology? What is the mesh size?

mahesh prakash June 7, 2000 02:56

Re: Not enought memory?!*
Why don't you give the exact error message here so that people can help you better. In my opinion this has nothing to do with your Win98 system but has something to do with the program itself. Are you sure that the maximum array size permissible in the code has not been exceeded?

If that is the case you will have to go to the source code and change the maximum array size. Probably this is not your problem but I just thought that I should remind you about it.

Vladimir A.Prokofiev June 7, 2000 04:10

Re: Not enought memory?!*
What is your Fortran-compiller ? I usually use MS Visual (Digital) Fortran 6, and I do not have problems with lack of memory of the large hydrodynamical tasks. This compiler very economically spends operative memory, even if you do not use dynamic allocations of arrays. But you have to check Fortran options. (My OS: Win 2000, Win NT4 or Win98).

steve podleski June 7, 2000 16:41

Re: Not enought memory?!*
Jaret, the NPARC code has an option to have the whole CFD model in memory. I use this option since the other alternative, swapping each block of grid in and out of memory increases the solution time by at least a factor of 5.

steve podleski June 7, 2000 16:46

Re: Not enought memory?!*
Vladimir, I use MS Developer Studio 97. My CFD case has about 2.5M grid points which runs fine with the NT machine but not the Win98 machine.

Which options do you use in your compiler?

steve podleski June 7, 2000 17:59

Re: Not enought memory?!*

The error message written by the CFD code is:


The code has dynamic memory allocation. I've run two simulataneous jobs on the Window NT machine which has 896MB of memory. The Win98 machine has over 600MB.

Joern Beilke June 7, 2000 18:19

Re: Not enought memory?!*
So just put NT on that machine.

Jim Park June 7, 2000 18:21

Re: Not enought memory?!*
Just to double-check.

The error occurs during execution, not during compilation or linking?

Reason I ask is that both of my compilers (SVS and Absoft) give a stack violation during compilation if too much memory is requested. This has nothing to do with the system's RAM. The error vanishes if I twiddle with a compiler parameter that increases the size of the stack. Whatever that means ...

Hope this leads to something useful.


John C. Chien June 7, 2000 18:26

Re: Not enought memory?!*
(1). It is likely that you are out of memory. (2). Somehow you need to check the actual memory used by the program (total memory). Try to find out the free memory available before you run the code. (3). Also try to estimate memory required per grid point. That is the number of variables stored per grid point. (4). Anyway, 2.5Mega grid points is a large number.

steve podleski June 8, 2000 08:00

Re: Not enought memory?!*
Thanks for you help...not!

steve podleski June 8, 2000 08:02

Re: Not enought memory?!*
Jim, the error occurs during execution.

steve podleski June 8, 2000 12:08

Re: Not enought memory?!*
I may have found a partial answer.

I have one machine with a Win98/Win NT dual boot, with 384MB of RAM. As I said before, I could not get my CFD job to run with Win98. On the WinNT side of the machine, I set the upper and lower limits of virtual memory, and lo and behold, I got the job running!!!!!

Although, Win98 has, supposedly, the option of user control of virtual memory, our Win98 machines will always reset the virtual memory settings. Has anyone else this problem?

All times are GMT -4. The time now is 14:15.