- Marcar como nuevo
- Favorito
- Suscribir
- Silenciar
- Suscribirse a un feed RSS
- Resaltar
- Imprimir
- Informe de contenido inapropiado
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
- Etiquetas:
- Intel® Fortran Compiler
Enlace copiado
5 Respuestas
- Marcar como nuevo
- Favorito
- Suscribir
- Silenciar
- Suscribirse a un feed RSS
- Resaltar
- Imprimir
- Informe de contenido inapropiado
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.
- Marcar como nuevo
- Favorito
- Suscribir
- Silenciar
- Suscribirse a un feed RSS
- Resaltar
- Imprimir
- Informe de contenido inapropiado
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,
- Marcar como nuevo
- Favorito
- Suscribir
- Silenciar
- Suscribirse a un feed RSS
- Resaltar
- Imprimir
- Informe de contenido inapropiado
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.
- Marcar como nuevo
- Favorito
- Suscribir
- Silenciar
- Suscribirse a un feed RSS
- Resaltar
- Imprimir
- Informe de contenido inapropiado
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.
- Marcar como nuevo
- Favorito
- Suscribir
- Silenciar
- Suscribirse a un feed RSS
- Resaltar
- Imprimir
- Informe de contenido inapropiado
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
Responder
Opciones de temas
- Suscribirse a un feed RSS
- Marcar tema como nuevo
- Marcar tema como leído
- Flotar este Tema para el usuario actual
- Favorito
- Suscribir
- Página de impresión sencilla