[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: 20000202: Is it possible to open > 32 files

This archive contains answers to questions sent to Unidata support through mid-2025. Note that the archive is no longer being updated. We provide the archive for reference; many of the answers presented here remain technically correct, even if somewhat outdated. For the most up-to-date information on the use of NSF Unidata software and data services, please consult the Software Documentation first.


  • Subject: Re: 20000202: Is it possible to open > 32 files
  • Date: Wed, 02 Feb 2000 11:03:51 -0700

>To: address@hidden
>From: "Catherine E. Cormack" <address@hidden>
>Subject: Is it possible to open > 32 files 
>Organization: .
>Keywords: 200002021717.KAA07666

Hi Cathy!

> I have a customer who is reporting that he can't open more than
> 32 netcdf files simultaneously without receiving an error.  Is this
> a limitation of the netcdf library, or is this being caused by some
> other error?

NetCDF 2.4.3 and earlier versions had a limit of 32 on the number of
files you could open, but I don't think any version released since
1996 has any limit other than what the underlying operating system
allows.  There is backward compatibility in netcdf.h provided by

 /*
  * Avoid use of this meaningless macro
  * Use sysconf(_SC_OPEN_MAX).
  */
 #ifndef MAX_NC_OPEN
 #define MAX_NC_OPEN 32
 #endif

but as the comments say, this macro is not used in the code to limit
the number of files that can be opened simultaneously.

So the limit is probably the result of using an old version ...

--Russ