- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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
Link Copied
7 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
You could try making it an allocatable.
Les
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
That is correct.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Use:
WRITE (*,*) SIZE (ISORT,KIND=8), i
instead.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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.

Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page