From: Steve Lionel on
On 2/18/2010 10:53 PM, Hifi-Comp wrote:

> Any idea or suggestion of how to persuade a Fortran code to use
> virtual memory in windows system will be greatly appreciated. Thanks a
> lot in advance!

If you have modified the Windows boot.ini to specify the /3gb option,
you will also need to add the Microsoft linker option
/LARGEADDRESSAWARE, otherwise Windows will restrict the image to 2GB. I
don't know if gfortran uses the Microsoft linker - if it uses a
different linker, see its documentation to see if there is something
equivalent. One can also use the editbin utility to set the
/LARGEADDRESSAWARE flag.

Note that this helps only for dynamic allocation, and even so, there may
not be a contiguous block as big as you want. You will very likely need
to switch to a 64-bit version of Windows on a 64-bit capable processor.

I'll take this opportunity to point out that even on 64-bit Windows,
static code and data is limited to 2GB no matter what you do. This
affects COMMONs and non-allocatable/pointer arrays and is due to a
limitation in the Windows object and executable file format.

--
Steve Lionel
Developer Products Division
Intel Corporation
Nashua, NH

For email address, replace "invalid" with "com"

User communities for Intel Software Development Products
http://software.intel.com/en-us/forums/
Intel Software Development Products Support
http://software.intel.com/sites/support/
My Fortran blog
http://www.intel.com/software/drfortran
From: Richard Maine on
Hifi-Comp <wenbinyu.heaven(a)gmail.com> wrote:

> I just find out that my system has PAE enabled. So now what is the
> solution of my original problem.

Read the cited web page. Or see Steve's post here, which gives pretty
much the same information. If those don't answer your question, then
you'll need to elaborate more, because they sure seem to do so in pretty
explicit detail.

Of course, if the remaining problem is just that you don't like the part
of the answer that says you just can't go over 3GB, even with tweaks,
and 2 GB without, then there isn't much that can be done about that.

--
Richard Maine | Good judgment comes from experience;
email: last name at domain . net | experience comes from bad judgment.
domain: summertriangle | -- Mark Twain