mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-02-25 18:55:30 -06:00
Fix buggy interplay of parallel exceptions and communication.
There cannot happen any collective blocking communication within a parallel try-catch clause if exceptions might be thrown before the communication. The communication has to either be reached by all processes or no processes.
This commit is contained in:
parent
f64230e462
commit
5be027348a
@ -811,14 +811,23 @@ namespace Opm {
|
||||
|
||||
updatePerforationIntensiveQuantities();
|
||||
|
||||
OPM_BEGIN_PARALLEL_TRY_CATCH();
|
||||
{
|
||||
if (iterationIdx == 0) {
|
||||
if (iterationIdx == 0) {
|
||||
// try-catch is needed here as updateWellControls
|
||||
// contains global communication and has either to
|
||||
// be reached by all processes or all need to abort
|
||||
// before.
|
||||
OPM_BEGIN_PARALLEL_TRY_CATCH();
|
||||
{
|
||||
calculateExplicitQuantities(local_deferredLogger);
|
||||
prepareTimeStep(local_deferredLogger);
|
||||
}
|
||||
updateWellControls(local_deferredLogger, /* check group controls */ true);
|
||||
OPM_END_PARALLEL_TRY_CATCH_LOG(local_deferredLogger, "assemble() failed (It=0): ",
|
||||
terminal_output_);
|
||||
}
|
||||
updateWellControls(local_deferredLogger, /* check group controls */ true);
|
||||
|
||||
OPM_BEGIN_PARALLEL_TRY_CATCH();
|
||||
{
|
||||
// Set the well primary variables based on the value of well solutions
|
||||
initPrimaryVariablesEvaluation();
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user