Red Hat axp-list: Linux on Alpha (1995-2022)
 help / color / mirror / Atom feed
From: "Wes Bauske" <wsb@paralleldata.com>
To: axp-list@redhat.com
Subject: Re: Fortran: Large static arrays = unal trap + core
Date: Wed, 10 Mar 1999 11:29:56 -0600	[thread overview]
Message-ID: <36E6AC14.1BF14E9D@paralleldata.com> (raw)
In-Reply-To: Pine.LNX.4.05.9903100702020.24394-100000@gumby.dynatec.com

Matt Nelson wrote:
> 
> On 10 Mar 1999, Harvey J. Stein wrote:
> > Matt Nelson <mnelson@dynatec.com> 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


      parent reply	other threads:[~1999-03-10 17:38 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1999-03-09 16:10 Fortran: Large static arrays = unal trap + core Matt Nelson
1999-03-10 11:53 ` Harvey J. Stein
1999-03-10 15:05   ` Matt Nelson
1999-03-10 15:14     ` Greg Lindahl
1999-03-10 15:44     ` Phillip Ezolt
1999-03-10 17:29     ` Wes Bauske [this message]
read-only archive

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox