Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.
Announcements
FPGA community forums and blogs on community.intel.com are migrating to the new Altera Community and are read-only. For urgent support needs during this transition, please visit the FPGA Design Resources page or contact an Altera Authorized Distributor.
29282 Discussions

Is there a way to beat the 2 GB 32-bit data size limit?

Gerald_K_
Beginner
487 Views
I am compiling with the 32-bit Visual Fortran under Windows XP on a 32-bit machine with 8 GB of RAM to build a console application. I have used ALLOCATE to dynamically allocate memory for a very large array. It tries to allocate about 3.5 GB of memory for the array and fails with the error message: "forrtl: severe (41): insufficient virtual memory". I have set the Virtual Memory range under the Windows XP Performance Options at 4092 MB (Initial size) to 8184 (Maximum size), and it doesn't work. I have also tried setting the compiler switch /SUBSYSTEM:CONSOLE /LARGEADDRESSAWARE, and that also doesn't work. I am aware of the 2 GB limit imposed by the 32-bit addressing, but there must be some way around it, no?
0 Kudos
2 Replies
Steven_L_Intel1
Employee
487 Views
No (mostly). You can use a boot.ini file to specify a /3GB option - this will increase the process user address space to 3GB, but you may find that you can't get a contiguous allocation anywhere near that size, and you have to use /LARGEADDRESSAWARE (a linker option) when building the application. 3.5GB? Forget it.

The amount of RAM you have is not relevant. It's time to move to a 64-bit system.
0 Kudos
jimdempseyatthecove
Honored Contributor III
487 Views
Migrating to 64-bit system would be the easiest route. If you are willing to invest some/a lot of time programming, you could divide/partition your problem such that different processes (multiple programs) work on different parts of the same data at the same time. The division of work can be performed by using OpenMPI (MPI not MP), or you can use pipes or memory mapped files. Most problems can be partitioned in this manner. Migration to 64-bit system may be as "easy" as

Installing 64-bitO/S
Installing 64-bit Service Packs
Installing 64-bit Visual Studio
Installing 65-bit Visual Studio Service Packs
Installing Intel Visual Fortran
Installing 3rd party stuff if necessary
Loading your VS Solution (may require a once only automatic conversion)
Adding to Solution the x64 configuration (~30 seconds to do this)
Build

You may find that you have no programming change in the Fortran code. A solution I have here with 13 projects and ~750 source files is fully portable between 32 and 64 bit platforms with no conditional code. 64-bit will accomodate larger data sets.

Jim Dempsey
0 Kudos
Reply