Distribute SummaryConfig Objects With eclBroadcast

Suggested by [at]akva2.

While here, also switch to using type deduction instead of explicit
template arguments for the eclBroadcast overloads.
This commit is contained in:
Bård Skaflestad
2024-03-22 14:59:10 +01:00
parent 8e9cb4b249
commit 785b96f6f3
3 changed files with 8 additions and 21 deletions

View File

@@ -36,11 +36,6 @@
#include <opm/output/eclipse/RestartValue.hpp>
#if HAVE_MPI
#include <mpi.h>
#include <opm/simulators/utils/MPISerializer.hpp>
#endif
#include <opm/simulators/flow/CollectDataOnIORank.hpp>
#include <opm/simulators/flow/countGlobalCells.hpp>
#include <opm/simulators/flow/EclGenericWriter.hpp>
@@ -49,6 +44,7 @@
#include <opm/simulators/timestepping/SimulatorTimer.hpp>
#include <opm/simulators/utils/DeferredLoggingErrorHelpers.hpp>
#include <opm/simulators/utils/ParallelRestart.hpp>
#include <opm/simulators/utils/ParallelSerialization.hpp>
#include <limits>
#include <stdexcept>
@@ -162,11 +158,7 @@ public:
? this->eclIO_->finalSummaryConfig()
: SummaryConfig{};
auto serialiser = Parallel::MpiSerializer {
this->simulator_.vanguard().grid().comm()
};
serialiser.broadcast(0, smryCfg);
eclBroadcast(this->simulator_.vanguard().grid().comm(), smryCfg);
this->outputModule_ = std::make_unique<OutputBlackOilModule<TypeTag>>
(simulator, smryCfg, this->collectOnIORank_);