Skip to content

Commit

Permalink
Output to localize deadlock
Browse files Browse the repository at this point in the history
  • Loading branch information
lisajulia committed Sep 17, 2024
1 parent 5f7694a commit 11658c8
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions opm/simulators/wells/MultisegmentWell_impl.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -1726,9 +1726,11 @@ namespace Opm
final_check = false;
}
}
std::cout << "iterateWellEqWithSwitching - will assembleWellEqWithoutIteration" << std::endl;

assembleWellEqWithoutIteration(simulator, dt, inj_controls, prod_controls, well_state, group_state, deferred_logger);

std::cout << "iterateWellEqWithSwitching - assembleWellEqWithoutIteration done" << std::endl;
const BVectorWell dx_well = this->linSys_.solve();

if (it > this->param_.strict_inner_iter_wells_) {
Expand Down Expand Up @@ -1854,6 +1856,7 @@ namespace Opm
const GroupState<Scalar>& group_state,
DeferredLogger& deferred_logger)
{
std::cout << "assembleWellEqWithoutIteration - well " << this->name() << std::endl;
if (!this->isOperableAndSolvable() && !this->wellIsStopped()) return;

// update the upwinding segments
Expand Down Expand Up @@ -1996,18 +1999,24 @@ namespace Opm
}
}

std::cout << "done, will communicate now" << std::endl;
this->parallel_well_info_.communication().barrier();
this->parallel_well_info_.communication().sum(this->ipr_a_.data(), this->ipr_a_.size());
std::cout << "communication 0" << std::endl;
auto flatB = makeFlat(this->linSys_.duneB_);
auto flatC = makeFlat(this->linSys_.duneC_);
auto flatD = makeFlat(this->linSys_.duneD_);
std::cout << "communication 1" << std::endl;
this->parallel_well_info_.communication().sum(flatB.data(), flatB.size());
this->parallel_well_info_.communication().sum(flatC.data(), flatC.size());
this->parallel_well_info_.communication().sum(flatD.data(), flatD.size());
std::cout << "communication 2" << std::endl;
refill(this->linSys_.duneB_, flatB);
refill(this->linSys_.duneC_, flatC);
refill(this->linSys_.duneD_, flatD);
std::cout << "communication done" << std::endl;
this->linSys_.createSolver();
std::cout << "solver created" << std::endl;
}


Expand Down

0 comments on commit 11658c8

Please sign in to comment.