Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.
29382 Discussions

Fortran limit on array size on Linux?

James_S_
Beginner
960 Views
I'm helping a researcher who's trying to creat a 4-dimensional array of double precision numbers, with a total of ~200 million elements.

dimension vstore(1:4,0:4,5000000,2),fstore(0:4,5000000,2)

When he tries to compile this code with 'ifort adaptnew2.for', he gets this error:

compilation aborted for adaptnew2.for (code 1)

He's using ifort 11.0.074. This same error occurs on ia32 and intel64 systems, running on rebuild of RHEL 5.4.

Is this a limitation of the Intel Fortran compiler or a bug? When we decrease the dimensions of the array so that it's less than ~200 million, the code compiles.

--
Prentice


0 Kudos
2 Replies
TimP
Honored Contributor III
960 Views
The limit for statically allocated data with default memory model is 2GB, as you found. ALLOCATABLE arrays for Intel64 may be much larger.
0 Kudos
rreis
New Contributor I
960 Views
Check the option "-mcmodel" of the compiler (man ifort?)
0 Kudos
Reply