Skip to content

Commit

Permalink
#1570: LB: fix mixup with P_c and O_l
Browse files Browse the repository at this point in the history
  • Loading branch information
lifflander committed Oct 13, 2021
1 parent 79b6736 commit 04e4335
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/vt/vrt/collection/balance/lb_invoke/lb_manager.cc
Original file line number Diff line number Diff line change
Expand Up @@ -432,12 +432,12 @@ void LBManager::computeStatistics(bool comm_collectives, PhaseType phase) {
>(proxy_);

total_load = 0.;
std::vector<balance::LoadData> P_c;
std::vector<balance::LoadData> O_l;
for (auto elm : *model_) {
auto work = model_->getWork(
elm, {balance::PhaseOffset::NEXT_PHASE, balance::PhaseOffset::WHOLE_PHASE}
);
P_c.emplace_back(LoadData{lb::Statistic::O_l, work});
O_l.emplace_back(LoadData{lb::Statistic::O_l, work});
total_load += work;
}

Expand All @@ -450,7 +450,7 @@ void LBManager::computeStatistics(bool comm_collectives, PhaseType phase) {

std::vector<LoadData> lstats;
lstats.emplace_back(LoadData{lb::Statistic::P_l, total_load});
lstats.emplace_back(reduceVec(lb::Statistic::P_c, std::move(P_c)));
lstats.emplace_back(reduceVec(lb::Statistic::O_l, std::move(O_l)));

double comm_load = 0.0;
for (auto&& elm : *comm_data) {
Expand Down

0 comments on commit 04e4335

Please sign in to comment.