Information related to using parallel I/O with Unidata NetCDF may be found here:
https://www.unidata.ucar.edu/software/netcdf/docs/parallel_io.html
The --enable-parallel
flag is no longer necessary when configuring netCDF; It will check the documentation and update it if need be. The flag is necessary when building the hdf5
library, however.
In order to use parallel I/O with netCDF-4, you need to make sure that it was built against an hdf5 library with parallel I/O enabled. At configure time, netCDF will query the hdf5
library to see whether or not the parallel I/O symbols are present.
- If they are, parallel I/O for netCDF-4 is assumed.
- If they are not, parallel I/O for netCDF-4 files is turned off.
If you are installing the netCDF library yourself, you can specify the --enable-parallel-tests
flag when configuring; when you run make check
, parallel tests will be run. You can also scan the output in config.log to see if parallel I/O functionality was found in the hdf5 library; there should be a message notifying you whether or not it was enabled.
Note that there are some limitations to Parallel I/O with netCDF-4, specifically:
NetCDF-4 provides access to HDF5 parallel I/O features for netCDF-4/HDF5 files. NetCDF classic and 64-bit offset format may not be opened or created for use with parallel I/O. (They may be opened and created, but parallel I/O is not available.)
Assuming that the underlying netCDF library has parallel I/O enabled, and you are operating on the correct type of file, the standard API call invoked by ncdf4 should leverage parallel I/O automatically.