NetCDF  4.9.2
Parallel I/O with NetCDF-4

NetCDF-4 provides parallel file access to both classic and netCDF-4/HDF5 files.

The parallel I/O to netCDF-4 files is achieved through the HDF5 library while the parallel I/O to classic files is through PnetCDF. A few functions have been added to the netCDF C API to handle parallel I/O. You must build netCDF-4 properly to take advantage of parallel features (see Building with Parallel I/O Support).

The nc_open_par() and nc_create_par() functions are used to create/open a netCDF file with parallel access.

Note
The parallel access associated with these functions is not a characteristic of the data file, but the way it was opened.

Collective/Independent Access

Parallel file access is either collective (all processors must participate) or independent (any processor may access the data without waiting for others). All netCDF metadata writing operations are collective. That is, all creation of groups, types, variables, dimensions, or attributes. Data reads and writes (e.g. calls to nc_put_vara_int() and nc_get_vara_int()) may be independent, the default) or collective. To change from collective to independent mode or vis versa, call nc_var_par_access() with argument 'access' set to either NC_INDEPENDENT or NC_COLLECTIVE. Note when using PnetCDF, the argument 'varid' is ignored, as PnetCDF does not support per-variable collective/independent mode change.