Defer GPMAINT throw to parallel sync point

Wrap the updateGpMaintTargetForGroups() call in a try/catch using
OPM_PARALLEL_CATCH_CLAUSE so that the GPMAINT-unsupported error
is catched before any collective operation in case the throw
were ever to fire on only some ranks.
This commit is contained in:
Håkon Hægland committed 2026-02-12 17:37:33 +01:00
1 parent c72dc16ece
commit b955b5bc8f
1 file changed
+6 -3
@@ -484,9 +484,12 @@ namespace Opm {
}
const double dt = simulator_.timeStepSize();
const Group& fieldGroup = this->schedule().getGroup("FIELD", reportStepIdx);
this->groupStateHelper().updateGpMaintTargetForGroups(fieldGroup,
regionalAveragePressureCalculator_,
dt);
try {
this->groupStateHelper().updateGpMaintTargetForGroups(fieldGroup,
regionalAveragePressureCalculator_,
dt);
}
OPM_PARALLEL_CATCH_CLAUSE(exc_type, exc_msg);
}
this->updateAndCommunicateGroupData(reportStepIdx,