- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I am using the intel Fortran compiler on a quad core Mac OS 10.4.11 with 8GB of memory and 64 bit cores. When I increase my array size above a certain point I get the following error:
ld: /tmp/ifort9IeJKr.o r_value (0x9b640d2f) field of relocation entry 318 in section (__TEXT,__text) out of range
Is there a way to allow array dimensions to be increased to take advantage of having so much memory? I can run the code on a Linux machine that has 2GB of physical memory and the same thing happens with the intel compiler at the same point. So it isn't a question of a physical memory limitation. That is, despite having 4 times the memory on the Mac I can still only use the same array sizes as on the Linux machine with 2GB.
Thanks
ld: /tmp/ifort9IeJKr.o r_value (0x9b640d2f) field of relocation entry 318 in section (__TEXT,__text) out of range
Is there a way to allow array dimensions to be increased to take advantage of having so much memory? I can run the code on a Linux machine that has 2GB of physical memory and the same thing happens with the intel compiler at the same point. So it isn't a question of a physical memory limitation. That is, despite having 4 times the memory on the Mac I can still only use the same array sizes as on the Linux machine with 2GB.
Thanks
Link Copied
5 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
In order to use 8GB effectively, you need a 64-bit OS and the 64-bit ifort. Even then, the easiest way to make arrays >2GB would be with ALLOCATABLE. The software doesn't do any magic mode switching simply because you have large physical memory.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thanks - I have the 64 bit set up. I don't follow what you mean by 'the easiest way to make arrays >2GB would be with ALLOCATABLE.' Please could you explain what this involves doing? I can't find a compiler option to do this. Or does this only apply to itanium based systems?
Best,
Best,
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
ALLOCATABLE is a Fortran standard way to declare dynamic arrays, since 15 years ago. There are examples in the documentation of every f90 or newer compiler, including ifort. I don't know of a compiler with an option to disable it.
Are you thinking of -mc-model, which changes x86-64 linkage to allow larger static objects?
Itanium compilers have larger default limits for static arrays, 4GB or more, depending on the compiler.
Are you thinking of -mc-model, which changes x86-64 linkage to allow larger static objects?
Itanium compilers have larger default limits for static arrays, 4GB or more, depending on the compiler.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
This has to do with the way MacOS lays out memory. Try building with -static-intel (I think that's the one). This will allow some increase in static allocation. Or, as Tim suggests, use dynamic allocation.
MacOS does not have the -mc-model option that Linux does.
MacOS does not have the -mc-model option that Linux does.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
module YourModule
real, allocatable :: BigArray(:,:)
end module YourModule
program YourProgram
allocate(BigArray(1000,1000000))! 4GB array
...
deallocate(BigArray)
end program YourProgram
Check the documentation regarding allocateable arrays
Jim Dempsey
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