From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 31361 invoked by alias); 9 Nov 2006 13:32:14 -0000 Received: (qmail 31352 invoked by uid 22791); 9 Nov 2006 13:32:12 -0000 X-Spam-Check-By: sourceware.org Received: from smtp107.sbc.mail.mud.yahoo.com (HELO smtp107.sbc.mail.mud.yahoo.com) (68.142.198.206) by sourceware.org (qpsmtpd/0.31) with SMTP; Thu, 09 Nov 2006 13:32:07 +0000 Received: (qmail 36509 invoked from network); 9 Nov 2006 13:32:05 -0000 Received: from unknown (HELO ?68.122.9.103?) (timothyprince@sbcglobal.net@68.122.9.103 with plain) by smtp107.sbc.mail.mud.yahoo.com with SMTP; 9 Nov 2006 13:32:04 -0000 Message-ID: <45532DD3.2030806@sbcglobal.net> Date: Thu, 09 Nov 2006 13:32:00 -0000 From: Tim Prince Reply-To: tprince@myrealbox.com User-Agent: Thunderbird 1.5.0.7 (Windows/20060909) MIME-Version: 1.0 To: deepan@novaglobal.com.sg CC: gcc-help@gcc.gnu.org Subject: Re: memory problem References: <1163048394.2744.7.camel@localhost.localdomain> In-Reply-To: <1163048394.2744.7.camel@localhost.localdomain> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Mailing-List: contact gcc-help-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-help-owner@gcc.gnu.org X-SW-Source: 2006-11/txt/msg00148.txt.bz2 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.