Skip to content

Commit

Permalink
mpi: don't use parallel HDF5 when on single-process communicator
Browse files Browse the repository at this point in the history
fixes MPI_init-less bpls of HDF5 files
  • Loading branch information
germasch committed May 31, 2019
1 parent 457d6b4 commit 52715f3
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions source/adios2/toolkit/interop/hdf5/HDF5Common.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -117,9 +117,12 @@ void HDF5Common::Init(const std::string &name, MPI_Comm comm, bool toWrite)
m_PropertyListId = H5Pcreate(H5P_FILE_ACCESS);

#ifdef ADIOS2_HAVE_MPI
H5Pset_fapl_mpio(m_PropertyListId, comm, MPI_INFO_NULL);
MPI_Comm_rank(comm, &m_CommRank);
MPI_Comm_size(comm, &m_CommSize);
mpi::MPI_Comm_rank(comm, &m_CommRank);
mpi::MPI_Comm_size(comm, &m_CommSize);
if (m_CommSize != 1)
{
H5Pset_fapl_mpio(m_PropertyListId, comm, MPI_INFO_NULL);
}
#endif

// std::string ts0 = "/AdiosStep0";
Expand Down

0 comments on commit 52715f3

Please sign in to comment.