This function is a variant of nc_create, nc_create_par allows users to open a file on a MPI/IO or MPI/Posix parallel file system.
The parallel parameters are not written to the data file, they are only used for so long as the file remains open after an nc_create_par.
This function creates a new netCDF dataset, returning a netCDF ID that can subsequently be used to refer to the netCDF dataset in other netCDF function calls. The new netCDF dataset opened for write access and placed in define mode, ready for you to add dimensions, variables, and attributes.
If the NC_NETCDF4 flag is used, the HDF5 library is used for parallel I/O. If not, the parallel-netcdf library is used.
When a file is created for parallel access, collective operations are the default. To use independent access on a variable, See nc_var_par_access.
int nc_create_par(const char *path, int cmode, MPI_Comm comm, MPI_Info info, int ncidp);
path
cmode
The NC_SHARE flag is ignored.
comm
info
ncidp
NC_NOERR
NC_EPARINIT
NC_EFILEMETA
NC_EEXIST
NC_EINVAL
NC_EHDFERR
#include <netcdf.h> ... int status; int ncid; ... *bufrsize = 1024; status = nc__create("foo.nc", NC_NOCLOBBER, initialsz, bufrsize, &ncid); if (status != NC_NOERR) handle_error(status);