When should MPI barrier be used when using Parallel HDF5?

Should it be after every close? Should it be after every delete_object? What about creation of files/datasets? What about after different processes writing to different datasets that have already been collectively created?

My question is - in general, when should I use an MPI barrier when using Parallel HDF5?

There’s no such requirement from the HDF5 side. Have a look at


What is important w/ parallel HDF5 are collective calling requirements. See


1 Like

You may need MPI barriers if you want to achieve a certain consistency semantics, i.e., if your MPI processes “communicate” through an HDF5 file. Take a look at Enabling a Strict Consistency Semantics Model in Parallel HDF5!