Deepan wrote:
Hi,
My fortran code compiles fine if i use arrays of size less that 4 GB.
When i increase the array size to more that 4 GB, the compilation fails
with the following error. I am running this on 32GB RAM machine.
$ g77 -O3 MAIN.o write_output.o read_population.o write_population.o
collide.o initial_conditions.o stream.o communicate.o -o lbm.x
-I/usr/local/include -L/usr/local/lib -lmpich -lpthread -lrt
MAIN.o(.text+0x7a): In function `MAIN__':
: relocation truncated to fit: R_X86_64_PC32 directions_
read_population.o(.text+0x252): In function `read_population__':
I guess there must me some option to g77, that will let the program
use more than 4 GB of memory.
x86_64 binutils don't support larger static objects. You should have no
trouble using more memory, just not in a single static object. As g77
doesn't support allocatable arrays nor Cray pointers, you would have to
change compilers (e.g. to gfortran) to use either of those methods.
Remember that g77 support had dwindled before x86_64 was released.