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

Re: 970512: netcdf



>To: address@hidden
>From: address@hidden (Barry McInnes)
>Subject: netcdf
>Organization: Climate Diagnostics Center
>Keywords: 199705122047.OAA29145

Hi Barry,

> An easy question I hope -
> what is the easiest way to increase the number of open files to
> be greater than 32, globally
> 
> ncopen: maximum number of open cdfs 32 exceeded
> 
> (even when I used unlimited descriptors) and
> the compile command was
> 
> f77 -C -o add.mm.surf.g1 add.mm.surf.g1.f -lnetopen -lnetwrite -lnetcdf 
> -ludunits -luduerr
> 
> and my include files are:
> 
>       include '/usr/local/include/netcdf.inc'
>       include '/usr/local/include/udunits.inc'

You will have to change the defined value of the constant MAX_NC_OPEN in
netcdf.h to a larger value:

/*
 * This can be as large as the maximum number of stdio streams
 * you can have open on your system.
 */
#define MAX_NC_OPEN 32

and then recompile the netCDF library.  You will also have to relink
your application with the new version of the library when it is
installed.

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).

--Russ