added: parallel support to HDF5File / HDF5Serializer

This commit is contained in:
Arne Morten Kvarving
2023-02-09 23:30:02 +01:00
parent 0255bcebb1
commit 8c3400f562
10 changed files with 518 additions and 68 deletions

View File

@@ -22,6 +22,7 @@
#include <ebos/hdf5serializer.hh>
#include <opm/simulators/timestepping/SimulatorTimer.hpp>
#include <opm/simulators/utils/ParallelCommunication.hpp>
#include <boost/date_time.hpp>
@@ -38,7 +39,14 @@ int main(int argc, char** argv)
return 1;
}
Opm::HDF5Serializer ser(argv[1], Opm::HDF5File::OpenMode::READ);
#if HAVE_MPI
Opm::Parallel::Communication comm(MPI_COMM_SELF);
#else
Opm::Parallel::Communication comm();
#endif
Dune::MPIHelper::instance(argc, argv);
Opm::HDF5Serializer ser(argv[1], Opm::HDF5File::OpenMode::READ, comm);
std::tuple<std::array<std::string,5>,int> header;
try {