- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I have a small code for initializing the static array and writing it to file. The size of array is 5000000 of reals. I have the Visual Fortran Compiler XE 13.1.0 and my Win 10 x64 show “This app can’t run on this PC”. If I made the size array of 490000000 the program runs fine and file for001 have a 1861 Mb size on HDD. If I make the static array allocatable the size my be more large then 490000000. Unfortunately I can make array only static.
program MemoryTest
! allocatable f(:)
dimension f(490000000)
real f
! Body of MemoryTest
i=490000000
! allocate (f(i))
open (1,file='for001',status='unknown',form='unformatted')
do j = 1, i
f(j)=j*1.0d0
end do
write (1) f
end program MemoryTest
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
There is a limitation on Windows where the Linker cannot construct a segment (code or data section) that exceeds the 2GB limit (or 3GB in a special setup).
Why is it that you have to keep the array static?
Jim Dempsey
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2GB is the limit. See https://software.intel.com/en-us/articles/memory-limits-applications-windows
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thank you very much for the advice. You are working wary fast like Intel Compilers!
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page