When to use MPI barrier when using parallel HDF5?

Should I use an MPI barrier before or after every file close? dataset close? What about when deleting or when creating a new dataset? What about after each process writes to a different dataset? same dataset but different parts of it?