mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-02-25 18:55:30 -06:00
Broadcast schedule another time after filtering connection on rank 0
Only after rank zero does the filtering the schedule the well definitions in there are guarateed to have no perforations to inactive cells. Therefore we broadcast the schedule another time to publish this to all processes. Previously, we did the filtering locally on these processes bit that did also remove perforations to cells that are active globally but not locally. That seems very hard to work with when allowing distributed wells.
This commit is contained in:
@@ -35,6 +35,7 @@
|
||||
#include <opm/grid/cpgrid/GridHelpers.hpp>
|
||||
#include <opm/simulators/utils/ParallelEclipseState.hpp>
|
||||
#include <opm/simulators/utils/PropsCentroidsDataHandle.hpp>
|
||||
#include <opm/simulators/utils/ParallelSerialization.hpp>
|
||||
|
||||
#include <dune/grid/common/mcmgmapper.hh>
|
||||
|
||||
@@ -346,6 +347,21 @@ protected:
|
||||
equilGrid().size(0));
|
||||
this->schedule().filterConnections(activeCells);
|
||||
}
|
||||
#if HAVE_MPI
|
||||
try
|
||||
{
|
||||
// Broadcast another time to remove inactive peforations on
|
||||
// slave processors.
|
||||
Opm::eclScheduleBroadcast(this->schedule());
|
||||
}
|
||||
catch(const std::exception& broadcast_error)
|
||||
{
|
||||
OpmLog::error(fmt::format("Distributing properties to all processes failed\n"
|
||||
"Internal error message: {}", broadcast_error.what()));
|
||||
MPI_Finalize();
|
||||
std::exit(EXIT_FAILURE);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
std::unique_ptr<Grid> grid_;
|
||||
|
||||
Reference in New Issue
Block a user