Re: 20020313: ncendef error

>From: "V. Lakshmanan" <lakshman@xxxxxxxxxxxxx>
>Subject: ncendef error ...
>Organization: National Severe Storms Laboratory
>Keywords: 200203131925.g2DJPSa00726 netCDF ncendef

Hi Lak,

> Sometimes, after my program has been running for a while
> (~8 hrs) writing netcdf files, it crashes while writing
> with the error message:
> 
>   ncendef: ncid 8: Resource temporarily unavailable 
> 
> It is not a disk-space problem and I can immediately
> restart the program and get it to work.  I am using
> netcdf library version 3.5.0 of Aug 31 2001 14:52:03 
> on Red Hat Linux 7.1.
> 
> (a) what does the error message mean?
> (b) am I missing something? Can I trap this error
> and retry the operation?
> (c) is there a workaround?

It may be referring to the number of open file descriptors.  One
possible cause is not calling ncclose() on netCDF files that you
are done with.  There is typically a per-process limit on the number
of files that a process may have open.  You may be able to tell how
many files a process has open with the "lsof" command ("list open
files").  Use this periodically on your program to see if the number
of open files is climbing.

See getrlimit(2) for other possible resources that may be limited.

If you need to have more resources than the system is permitting, you
might be able to call setrlimit(2) to change the default limit.

--Russ

_____________________________________________________________________

Russ Rew                                         UCAR Unidata Program
russ@xxxxxxxxxxxxxxxx                     http://www.unidata.ucar.edu

  • 2002 messages navigation, sorted by:
    1. Thread
    2. Subject
    3. Author
    4. Date
    5. ↑ Table Of Contents
  • Search the netcdfgroup archives: