CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   Main CFD Forum (https://www.cfd-online.com/Forums/main/)
-   -   Fortran Warning and error (https://www.cfd-online.com/Forums/main/13113-fortran-warning-error.html)

M.M March 9, 2007 15:54

Fortran Warning and error
 
Hello All,

I've got this warning when I ran my code in Fortran: "warning LNK4084: total image size 377360384 exceeds max (268435456); image may not run" What is this warning and how it could be fixed.

Thanks M.M


buch March 10, 2007 09:19

Re: Fortran Warning and error
 
Hi,

I guess you are using visual fortran under windows. I think this message comes from the limitations of old operating systems (i.e. windows 98 ...) that did not accept executables bigger than 256Mb. "image may not run" => if it runs, do not pay to much attention to it ;)

Regards


Renato. March 10, 2007 18:28

Re: Fortran Warning and error
 
Your warning is due to lack of memory to load your program due to the size of the memory fixed allocated. You can work out it by using dynamic memory allocation (it's a Fortran 9X feature, so, don't try to do it with old F77 compilers). You can do it according to the following example.

! fixed allocated real*8 :: HugeArray(1000000000)

! dynamica array real*8, allocatable :: HugeArray(:) n = 10000000 allocate(HugeArray(n))

! use your HugeArray

! Freeing the memory previously allocated

deallocate(HugeArray)

Cheers

Renato.


jojo March 12, 2007 10:24

Re: Fortran Warning and error
 
You must have a stack size option somewhere in your compiler. Simply increase with respect to the default value (usually 2MB).

snow-white July 28, 2009 13:57

Fortran warning
 
Hi

I have this warning when I compile my code:
A jump into a block from outside the block may have occurred"

How could I fix it?

Thanks,
snow


All times are GMT -4. The time now is 18:33.