mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-02-16 20:24:48 -06:00
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:
parent
8e9cb4b249
commit
785b96f6f3
@ -36,9 +36,6 @@
|
||||
|
||||
#include <opm/common/OpmLog/OpmLog.hpp>
|
||||
|
||||
#include <mpi.h>
|
||||
#include <opm/simulators/utils/MPISerializer.hpp>
|
||||
|
||||
#include <opm/simulators/flow/countGlobalCells.hpp>
|
||||
#include <opm/simulators/flow/DamarisProperties.hpp>
|
||||
#include <opm/simulators/flow/EclGenericWriter.hpp>
|
||||
@ -47,6 +44,7 @@
|
||||
#include <opm/simulators/utils/DamarisVar.hpp>
|
||||
#include <opm/simulators/utils/DeferredLoggingErrorHelpers.hpp>
|
||||
#include <opm/simulators/utils/GridDataOutput.hpp>
|
||||
#include <opm/simulators/utils/ParallelSerialization.hpp>
|
||||
|
||||
#include <fmt/format.h>
|
||||
|
||||
@ -189,11 +187,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->damarisOutputModule_ = std::make_unique<OutputBlackOilModule<TypeTag>>
|
||||
(simulator, smryCfg, this->collectOnIORank_);
|
||||
|
@ -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_);
|
||||
|
@ -82,11 +82,12 @@ void eclStateBroadcast(Parallel::Communication comm, EclipseState& eclState, Sch
|
||||
template <class T>
|
||||
void eclBroadcast(Parallel::Communication comm, T& data)
|
||||
{
|
||||
Opm::Parallel::MpiSerializer ser(comm);
|
||||
::Opm::Parallel::MpiSerializer ser(comm);
|
||||
ser.broadcast(data);
|
||||
}
|
||||
|
||||
template void eclBroadcast<TransMult>(Parallel::Communication, TransMult&);
|
||||
template void eclBroadcast<Schedule>(Parallel::Communication, Schedule&);
|
||||
template void eclBroadcast(Parallel::Communication, TransMult&);
|
||||
template void eclBroadcast(Parallel::Communication, Schedule&);
|
||||
template void eclBroadcast(Parallel::Communication, SummaryConfig&);
|
||||
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user