CFD Online Discussion Forums

CFD Online Discussion Forums (
-   Main CFD Forum (
-   -   A problem about the image size (

alex September 8, 2005 23:41

A problem about the image size
Recently, I had to run a large code(3D), and open several big arrays, which results in the warning saying "total image size ***exceeds max (268435456); image may not run". Perhaps there is someplace to reset the upper limit of the image size. I'm really worry about that. Are there any friends offering ideas and operations? BTW: I use Fortran Powerstation.

Thank you very much.

buch September 9, 2005 05:36

Re: A problem about the image size

These messages appear because some versions of operating systems (such as windows 98) do not support executables bigger than 256Mb.

Not a big deal ... ;)

alex September 9, 2005 06:06

Re: A problem about the image size
but some guys said that we can reset the parameters in the powerstation complier. I'm really worry about this problem because I can hardly do anything about this.

buch September 9, 2005 08:47

Re: A problem about the image size
Well, if you use W98, you can still upgrade your OS to W2K or XP ...

You may also switch off this kind of warnings in your compiler.

Anyway, the message is that the image MAY not run. And I promise you, if the executable is really that big for the OS, it would not iterate at all ...

So if it runs smoothly, I would not care that much about that !

Good luck

Renato N. Elias September 9, 2005 11:17

Re: A problem about the image size
Change the static memory allocation of your code by dynamic allocation in order to allow your program define the memory requirements at run time.

STATIC ALLOCATION: (F77 limitation)

real*8, dimension(10000000000) :: a ! huge vector


real*8, allocatable :: a(:)



the problem certainly will disapear.


Renato N. Elias

Guillaume September 9, 2005 11:59

Re: A problem about the image size
You should have a flag to change the stack size like /stack:20000000 (you may have to supress some journal files from the previous compilation).

alex September 9, 2005 22:28

Re: A problem about the image size
Thanks a lot! But there are many arrays appear in the "common" zone. Can this type of defination also be used in the "common" defination?

alex September 9, 2005 22:31

Re: A problem about the image size
thanks a lot! Could you explain more about this operation? I'm just a fortran learner. Does this only need to change the set of static allocation other than dynamic allocation?

alex September 9, 2005 22:32

Re: A problem about the image size
I use W2K, and it still cannot run. Anyway, thank you very much.

Renato N. Elias September 10, 2005 12:58

Re: A problem about the image size
Good question... I have checked in the Compaq's Visual Fortran manual where is written:

"An allocatable array cannot be specified in a COMMON, EQUIVALENCE, DATA, or NAMELIST statement"

I'm used to write allocatable arrays inside modules. The module is a new feature of F90 that substitutes the use of commom blocks, for example:


module MyParameters

real*8, allocatable :: myarray(:,:)

end module


Program Foo

use MyParameters



end program

You should consider the possibility of changing your common blocks and static arrays by modules and dynamic arrays because they are very flexible to use and they could speedup the implementation, modification as well as maintenance of your code.


Renato N. Elias

Guillaume September 14, 2005 14:56

Re: A problem about the image size
You have to take a look on the documentation of your compiler. You will find the syntax for the stack. If you compiler has a UGI, you have to input this option in a dialogue box. If it is a command line, this option is passed on the line when you ask for the compilation.

All times are GMT -4. The time now is 00:10.