allocate_hdf5_dataset#
- caput.util.mpitools.allocate_hdf5_dataset(fname: str, dsetname: str, shape: tuple[int, Ellipsis], dtype: numpy.typing.DTypeLike, comm: mpi4py.MPI.Comm | None = _comm) tuple[int, int][source]#
Create a hdf5 dataset and return its offset and size.
The dataset will be created contiguously and immediately allocated, however it will not be filled.
- Parameters:
- Returns:
- dset_state
tuple Two integers:
Offset into the file at which the dataset starts (in bytes).
Size of the dataset in bytes.
- dset_state