From mboxrd@z Thu Jan 1 00:00:00 1970 Received: (qmail 11423 invoked from network); 10 Mar 1999 17:38:32 -0000 Received: from mail.redhat.com (199.183.24.239) by lists.redhat.com with SMTP; 10 Mar 1999 17:38:32 -0000 Received: from paralleldata.com (smtp.paralleldata.com [38.153.145.2]) by mail.redhat.com (8.8.7/8.8.7) with ESMTP id MAA28669 for ; Wed, 10 Mar 1999 12:31:31 -0500 Received: by paralleldata.com from localhost (router,SLMail V2.5); Wed, 10 Mar 1999 11:34:07 -0600 Received: by paralleldata.com from paralleldata.com (209.196.65.86::mail daemon; unverified,SLMail V2.5); Wed, 10 Mar 1999 11:33:59 -0600 Sender: "Wsb" Message-ID: <36E6AC14.1BF14E9D@paralleldata.com> Date: Wed, 10 Mar 1999 11:29:56 -0600 From: "Wes Bauske" Organization: Parallel Data Systems X-Mailer: Mozilla 4.07 [en] (X11; I; Linux 2.0.36 i686) MIME-Version: 1.0 To: axp-list@redhat.com Subject: Re: Fortran: Large static arrays = unal trap + core References: Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Matt Nelson wrote: > > On 10 Mar 1999, Harvey J. Stein wrote: > > Matt Nelson writes: > > > everybody around here uses Fortran (egcs/g77). i have some users that > > > need very large arrays, i.e., several hundreds of megabytes. here's how > > > they set it up (don't ask... there is an evolutionary reason for this > > > convoluted way to do it...): > > > > > > - declare some dummy arrays: real dummy1(60000000) (three of em) > > > - save an I*8 pointer to the array: pointer=%loc(dummy1(1)) > > > - pass the pointer to subroutines that do the meat of the work via > > > %val(pointer) > > > > > > here's the problem. sometimes the code works fine, and other times it > > > core dumps immediately when executed, triggering an unaligned trap message > > > in /var/log/messages. > > > > > > system: LX164, 512M + 512M swap, Red Hat 5.2 + 2.2.1 kernel > > > > > > does anybody have any idea what's going on? > > > > The unaligned traps are a little weird, but can it be that the other > > processes are sucking up enough memory that the program is running out > > of memory? I've found core dumping immediately to often indicate > > using too much memory. > > well, the thing is asking for something like 750M of memory on a 1G > system (physical+swap). it is the only active user job when it core > dumps. > How about writing a 20 line C program as your main and convert your FORTRAN main to a subroutine with those dummy arrays as args. That way you make the allocate dynamic. Only issue is you have to add a '_' to the end of the FORTRAN name when you call it from C. This gives you a bit of room to look at what's really failing. Wes