diff --git a/opm/simulators/wells/MultisegmentWell_impl.hpp b/opm/simulators/wells/MultisegmentWell_impl.hpp index 8f53efce5..450075af4 100644 --- a/opm/simulators/wells/MultisegmentWell_impl.hpp +++ b/opm/simulators/wells/MultisegmentWell_impl.hpp @@ -807,6 +807,12 @@ namespace Opm connPI += np; } + // Sum with communication in case of distributed well. + const auto& comm = this->parallel_well_info_.communication(); + if (comm.size() > 1) { + comm.sum(wellPI, np); + } + assert (static_cast(subsetPerfID) == this->number_of_perforations_ && "Internal logic error in processing connections for PI/II"); } @@ -1331,6 +1337,8 @@ namespace Opm } } } + this->parallel_well_info_.communication().sum(this->ipr_a_.data(), this->ipr_a_.size()); + this->parallel_well_info_.communication().sum(this->ipr_b_.data(), this->ipr_b_.size()); } template @@ -1951,6 +1959,7 @@ namespace Opm } } + this->parallel_well_info_.communication().sum(this->ipr_a_.data(), this->ipr_a_.size()); this->linSys_.createSolver(); } @@ -2006,6 +2015,12 @@ namespace Opm } } } + const auto& comm = this->parallel_well_info_.communication(); + if (comm.size() > 1) + { + all_drawdown_wrong_direction = + (comm.min(all_drawdown_wrong_direction ? 1 : 0) == 1); + } return all_drawdown_wrong_direction; } @@ -2240,6 +2255,11 @@ namespace Opm } } } + const auto& comm = this->parallel_well_info_.communication(); + if (comm.size() > 1) + { + comm.sum(well_q_s.data(), well_q_s.size()); + } return well_q_s; }