Merge pull request #3564 from totto82/moveCom

communicate before usage not after
This commit is contained in:
Tor Harald Sandve
2021-09-30 14:34:15 +02:00
committed by GitHub

View File

@@ -1598,13 +1598,13 @@ forceShutWellByNameIfPredictionMode(const std::string& wellname,
}
}
// Communicate across processes if a well was shut.
well_was_shut = comm_.max(well_was_shut);
// the wellTesteState is updated between timesteps and we also need to update the privous WGstate
if(well_was_shut)
this->commitWGState();
// Communicate across processes if a well was shut.
well_was_shut = comm_.max(well_was_shut);
// Only log a message on the output rank.
if (terminal_output_ && well_was_shut) {
const std::string msg = "Well " + wellname