Fix to sync groupinfo in parallel

This commit is contained in:
Tor Harald Sandve 2024-11-05 11:08:47 +01:00
parent 6a30966500
commit 577229d38d
2 changed files with 3 additions and 6 deletions

View File

@ -700,7 +700,9 @@ initializeWell2GroupMapRecursive_(const Group& group,
// TODO: can the same well be memember of two different groups
// (on the same recursion level) ?
assert(this->well_group_map_.count(well_name) == 0);
if (checkDoGasLiftOptimization_(well_name)) {
bool checkDoGasLift = checkDoGasLiftOptimization_(well_name);
checkDoGasLift = this->comm_.max(checkDoGasLift);
if (checkDoGasLift) {
const auto &well = this->schedule_.getWell(
well_name, this->report_step_idx_);
Scalar wfac = well.getEfficiencyFactor();

View File

@ -117,11 +117,6 @@ addOrRemoveALQincrement_(GradMap &grad_map,
well_name, (add ? "adding" : "subtracting"), old_alq, new_alq);
this->displayDebugMessage_(msg);
}
state.update(gi.new_oil_rate, gi.oil_is_limited,
gi.new_gas_rate, gi.gas_is_limited,
gi.alq, gi.alq_is_limited,
gi.new_water_rate, gi.water_is_limited, add);
this->well_state_.setALQ(well_name, gi.alq);
const auto& pu = this->well_state_.phaseUsage();
std::vector<Scalar> well_pot(pu.num_phases, 0.0);