NetCDF 3.5 memory limitation (?) w/ ifc and pgf90

From: Benjamin (snowkid_23_at_yahoo.com)
Date: 01/31/04


Date: 30 Jan 2004 16:23:50 -0800

Hi,

I'm allocating (either through ALLOCATE or the traditional method) two
integer arrays of size (4, 9200000) named IPOS and TEMPNLEGS. Whee.
The fortran side works fine, and the array is allocated and all is
good. However, when I try to use netcdf to drop a chunk of data into
that array:

     file2_stat = NF90_OPEN(coeffile, NF90_SHARE, ncid3)
     status = NF90_INQ_VARID(ncid3, "position" , positionid)
     status = NF90_INQ_VARID(ncid3, "nlegen" , nlegenid)
     status = NF90_GET_VAR(ncid3, positionid, IPOS)
     IF (status /= NF90_NOERR) CALL handle_err(status,
'nf90_get_var1')
     status = NF90_GET_VAR(ncid3, nlegenid, TEMPNLEGS)
     IF (status /= NF90_NOERR) CALL handle_err(status,
'nf90_get_var2')

Okay, the resulting error from netcdf is error -57, nf90_eedge. I'm
unable to find documentation on the meaning of this error, but I found
if I reduce the size of my arrays to approximately (4,8000000), then
the error no longer appears. Me: Doctor, my arm hurts when I do this.
Doctor: Don't do that.

However, the kicker is that sometimes I don't get the error message
when reading in certain datasets using the same executable. The arrays
are the same size between datasets, and the data being dumped into
them are the same size i.e., same number of values being pushed into
them.

The same datasets fail consistently as well as the working datasets
work consistently (i.e., it's not a random error from run to run).

Something that may help me get around this is how to determine the
size of the UNLIMITED dimension in netcdf. That would allow me to
specify a smaller upper bound on the size of the array, however, it
doesn't address why it sometimes works and sometimes doesn't.

Comments, questions, and suggestions are appreciated.

-Ben



Relevant Pages

  • Re: Basic ASCII File Reading
    ... critical first step to almost anything like this - defining the problem. ... FJ appears to have guessed that the header is always exactly 7 lines. ... His involves allocating and deallocating, ... time consuming than resizing arrays. ...
    (comp.lang.fortran)
  • Re: ALLOCATABLE arrays
    ... > If try to create a very large array on the stack and you do not have enough ... > Allocating on the heap gives you access to a hell of a lot more memory (well ... Allocatable arrays are allocated on the heap. ... Automatic arrays are always allocated on the stack. ...
    (comp.lang.fortran)
  • Re: ALLOCATABLE arrays
    ... || If try to create a very large array on the stack and you do not have enough ... || Allocating on the heap gives you access to a hell of a lot more memory (well ... and "heap" (and there probably are/were some computers which don't/didn't ... | Automatic arrays are always allocated on the stack. ...
    (comp.lang.fortran)
  • Re: ordering integer array
    ... though it is a fair amount of work. ... the implementation of allocatable arrays is usually ... And the extra runtime work done by the application is going to be ... Allocating an array for the seed of a random number ...
    (comp.lang.fortran)
  • Re: heap allocation of arrays
    ... I like at least having the option of allocating automatic arrays on the ... Those codes used automatic arrays, ... But the ones we didn't port don't fit on the stack. ...
    (comp.lang.fortran)