Fix another parallel bug.

A WellSwitchingLogger was created in a local context (meaning not
all processes might be there), but since its destructor does
communication it must be called in a global context (guaranteeing
that all processes create it).
This commit is contained in:
Atgeirr Flø Rasmussen
2018-11-23 23:46:56 +01:00
parent 09405ce6f5
commit 7e91381cd8
7 changed files with 27 additions and 23 deletions

View File

@@ -318,6 +318,7 @@ namespace Opm {
// no wells needing testing, otherwise we will have locking.
std::vector< Scalar > B_avg(numComponents(), Scalar() );
computeAverageFormationFactor(B_avg);
wellhelpers::WellSwitchingLogger logger;
const auto& wellsForTesting = wellTestState_.updateWell(wtest_config, simulationTime);
for (const auto& testWell : wellsForTesting) {
@@ -336,7 +337,7 @@ namespace Opm {
const WellTestConfig::Reason testing_reason = testWell.second;
well->wellTesting(ebosSimulator_, B_avg, simulationTime, timeStepIdx, terminal_output_,
testing_reason, well_state_, wellTestState_);
testing_reason, well_state_, wellTestState_, logger);
}
}