Added missing parallel try-catch clause for updatePrimaryIntensities.

As Problem::updatePrimaryIntensities might throw we need to do this
to prevent dealocks in parallel run in case problem occurs.
This commit is contained in:
Markus Blatt
2021-09-20 11:12:27 +02:00
parent a927f8e23b
commit 3cda8a2fdb
10 changed files with 58 additions and 2 deletions

View File

@@ -26,6 +26,7 @@
#include <opm/grid/utility/RegionMapping.hpp>
#include <opm/simulators/linalg/ParallelIstlInformation.hpp>
#include <opm/simulators/wells/RegionAttributeHelpers.hpp>
#include <opm/simulators/utils/DeferredLoggingErrorHelpers.hpp>
#include <dune/grid/common/gridenums.hh>
#include <algorithm>
#include <cmath>
@@ -121,6 +122,7 @@ namespace Opm {
ElementContext elemCtx( simulator );
const auto& gridView = simulator.gridView();
const auto& comm = gridView.comm();
OPM_BEGIN_PARALLEL_TRY_CATCH();
const auto& elemEndIt = gridView.template end</*codim=*/0>();
for (auto elemIt = gridView.template begin</*codim=*/0>();
@@ -194,6 +196,8 @@ namespace Opm {
}
}
OPM_END_PARALLEL_TRY_CATCH("SurfaceToReservoirVoidage::defineState() failed: ");
for (const auto& reg : rmap_.activeRegions()) {
auto& ra = attr_.attributes(reg);
const double hpv_sum = comm.sum(attributes_hpv[reg].pv);