CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   Main CFD Forum (https://www.cfd-online.com/Forums/main/)
-   -   Cannot allocate memory for arrays (1400,1000) (https://www.cfd-online.com/Forums/main/14676-cannot-allocate-memory-arrays-1400-1000-a.html)

Quarkz January 21, 2008 09:13

Cannot allocate memory for arrays (1400,1000)
 
Hi,

I hope someone who uses compaq visual fortran can give me some help, although this may not be the proper forum. I'm trying to do dynamic allocation for several arrays (1400,1000) in size. When I try to allocate memory for these arrays, the 1st 2 have no problem. However after that it complains cannot allocate memory.

Have I ran out of ram or memory? I've 2gb of ram and I'm using double precision. I thot each real value takes up 8bytes, so 1400x1000 values only uses around 11 Mb. How could my mmemory be insufficient?

Is there anyway around this, like using the hdd as memory? It's ok if it's slow though.

Thanks.

Ertan Karaismail CFD&AMP January 21, 2008 11:14

Re: Cannot allocate memory for arrays (1400,1000)
 
Try increasing stack size in fortran.

HTP

Ertan

Quarkz January 21, 2008 20:15

Re: Cannot allocate memory for arrays (1400,1000)
 
Well, I've already increased the stack size to the max of ~4290000000 but it still can't work... :(

Ertan Karaismail CFD&AMP January 22, 2008 01:46

Re: Cannot allocate memory for arrays (1400,1000)
 
If you send the code, or post it here, I can try running on my computer. Normally, I can allocate those arrays without a problem. Maybe it's with your code, I don't know. Are you opening too many files and reading from them? If you don't close them that can take much of your memory.

Ertan

Quarkz January 23, 2008 21:59

Re: Cannot allocate memory for arrays (1400,1000)
 
Thanks Ertan. I can send u the .exe file to test. of cos, u may be worried that it might be a trojan or virus. anyway, i've send the job over to a linux server and it really seems that the memory requirement is more than 2gb. in fact, it's around 3gb. i guess tt's why.

thanks anyway.

Steve January 27, 2008 06:38

Re: Cannot allocate memory for arrays (1400,1000)
 
Are your arrays local (stack) variables? If so, try allocating them on the heap instead (COMMON).


All times are GMT -4. The time now is 06:55.