mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-02-25 18:55:30 -06:00
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:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user