From 82c8968ae3e5e90895354ecf6d13c0563883c6c9 Mon Sep 17 00:00:00 2001 From: Tor Harald Sandve Date: Wed, 27 Jan 2021 09:56:03 +0100 Subject: [PATCH] only warn about empty regions when none of the partitions contains the region --- ebos/equil/initstateequil.hh | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/ebos/equil/initstateequil.hh b/ebos/equil/initstateequil.hh index 42e469bb5..c5eca90cb 100644 --- a/ebos/equil/initstateequil.hh +++ b/ebos/equil/initstateequil.hh @@ -1819,14 +1819,14 @@ private: auto psat = PhaseSat { materialLawManager, this->swatInit_ }; auto vspan = std::array{}; + std::vector regionIsEmpty(rec.size(), 0); for (size_t r = 0; r < rec.size(); ++r) { const auto& cells = reg.cells(r); Details::verticalExtent(cells, cellZMinMax_, comm, vspan); if (cells.empty()) { - Opm::OpmLog::warning("Equilibration region " + std::to_string(r + 1) - + " has no active cells"); + regionIsEmpty[r] = 1; continue; } @@ -1852,6 +1852,14 @@ private: ptable, psat); } } + comm.min(regionIsEmpty.data(),regionIsEmpty.size()); + if (comm.rank() == 0) { + for (size_t r = 0; r < rec.size(); ++r) { + if (regionIsEmpty[r]) //region is empty on all partitions + Opm::OpmLog::warning("Equilibration region " + std::to_string(r + 1) + + " has no active cells"); + } + } } template