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

heap question

tropfen
New Contributor I
717 Views

hello,

i do need an array with the following description:

integer(2) :: iSort(50000000,4,11)

i get the error: catastrophic error: Variable ...iSort too large for NTCOFF. Bigger then 2GB. Use heap instead.

The system is an Win 7 Prof 64bit, the project in an win64-project

In the configuration i have changed:

- fortran/optimisation: heap arrays --> 0
- linker/system: heap reserve size --> 500000000
- alternativly linker/system: heap commit size --> 500000000

The error remains.

What have i done false? What have i missed?

Thanks in advance

Frank

0 Kudos
7 Replies
Les_Neilson
Valued Contributor II
717 Views
You could try making it an allocatable. Les
0 Kudos
tropfen
New Contributor I
717 Views
Hello Les, it works. This means that i can adress an array larger then 2GB just by an allocatable array but not with an 'static' array. Is this correct? Even on an 64bit system? Frank
0 Kudos
Steven_L_Intel1
Employee
717 Views
That is correct.
0 Kudos
John_Campbell
New Contributor II
717 Views
Well it mostly works, as demonstrated in the example below: integer(2), allocatable, dimension(:,:,:) :: iSort INTEGER(4) :: I ! ALLOCATE (iSort(50000000,4,11), stat=i) WRITE (*,*) SIZE (ISORT), i write (*,*) 'Expected SIZE = ', 50000000_8 * 4_8 * 11_8 write (*,*) 'GB = ', (50000000.0 * 4.0 * 11.0) * 2. / (2.**30) END
0 Kudos
Steven_L_Intel1
Employee
717 Views
Use: WRITE (*,*) SIZE (ISORT,KIND=8), i instead.
0 Kudos
John_Campbell
New Contributor II
717 Views
Steve, Thanks for the advice. It's good to see a solution is readily available. I should have adopted RTFM. I was expecting SIZE to behave in a similar way to LOC for 64-bit, automatically changing to kind=8. John
0 Kudos
Steven_L_Intel1
Employee
717 Views
SIZE is a standard intrinsic, so its behavior is specified by the standard. LOC is an extension, and we're free to make it do something different.
0 Kudos
Reply