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.
> Buz- > > I suspect this is a question only Bernie can answer... > > I am trying to find out how many files netCDF can have open on the T3E. > When I built the latest version, it set the limit at 32. Supposedly, > netCDF sets this number based on the system's limit. (The following is, > admittedly, from some old mail, but it's the only mention I've found:) > > "In the netcdf-3 version we will be announcing soon, the limit on open > netCDF files is no longer constrained by MAX_NC_OPEN. Instead, it is > the same as the system limit on open files returned as the value of > sysconf(_SC_OPEN_MAX)." > > Is our "sysconf(_SC_OPEN_MAX)" set to 32? Can I reset netCDF's limit > higher, as Unidata suggests in their support archives? > (see http://www.unidata.ucar.edu/glimpse/netcdf/2256) > > Thanks- > John The macro MAX_NC_OPEN is still in the netcdf include file (netcdf.h) in the "netcdf 2 compatibility section". If you #define NO_NETCDF_2, to turn off netcdf 2 compatibility, it goes away. It is set to 32 as it was in netcdf-2 by default. The commentary in the include file says: /* * Avoid use of this meaningless macro * Use sysconf(_SC_OPEN_MAX). */ You can set the number to whatever you want, the netcdf code doesn't care. In netcdf-3, you can open netcdf files until the operating system won't let you open files anymore (or you run out of memory). BTW, we have the parallel T3E netcdf from NERSC ready for testing by other people. Interested? -glenn