This is the mail archive of the
mailing list for the GCC project.
Re: memory problem
- From: Tim Prince <timothyprince at sbcglobal dot net>
- To: deepan at novaglobal dot com dot sg
- Cc: gcc-help at gcc dot gnu dot org
- Date: Thu, 09 Nov 2006 05:32:03 -0800
- Subject: Re: memory problem
- References: <firstname.lastname@example.org>
- Reply-to: tprince at myrealbox dot com
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 programx86_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.
use more than 4 GB of memory.