To report a non-security related issue, please provide:
-
version (all installed using conda from channel conda-forge):
- libnetcdf: 4.8.0 mpi_openmpi_h13b1d62_1
- netcdf4: 1.5.6 mpi_openmpi_py38hc4e43b6_3
- hdf5: 1.10.6 mpi_openmpi_hd9270da_1014
- mpi4py: 3.0.3 py38h3e8e7aa_7
- openmpi: 4.1.1 hbfc84c5_0
-
environmental information:
- Arch Linux
- Anaconda environment
- Python 3.8.8 hdb3f193_5
-
a description of the issue with the steps needed to reproduce it
The API documentation says:
You can write compressed data in parallel only with netcdf-c >= 4.7.4 and hdf5 >= 1.10.3 (although you can read in parallel with earlier versions).
However, with required library versions, I still wasn't able to do parallel write with compression if the dataset is opened in a mode (append mode). The code throws RuntimeError: NetCDF: HDF error.
Here's the code to reproduce:
#! /usr/bin/env python3
from mpi4py import MPI
from netCDF4 import Dataset
dset = Dataset("./parallel_test.nc", "w", parallel=True, comm=MPI.COMM_WORLD)
dset.createDimension("nx", 100)
dset.createVariable("x", "f8", ("nx",), True)
dset.close()
dset = Dataset("./parallel_test.nc", "a", parallel=True, comm=MPI.COMM_WORLD)
dset["x"][...] = 1.0
dset.close()
Tested with mpiexec -n 1 python test.py
To report a non-security related issue, please provide:
version (all installed using
condafrom channelconda-forge):environmental information:
a description of the issue with the steps needed to reproduce it
The API documentation says:
However, with required library versions, I still wasn't able to do parallel write with compression if the dataset is opened in
amode (append mode). The code throwsRuntimeError: NetCDF: HDF error.Here's the code to reproduce:
Tested with
mpiexec -n 1 python test.py