Skip to content

Commit

Permalink
#1659: lb: remove redundant argument
Browse files Browse the repository at this point in the history
  • Loading branch information
cz4rs committed Oct 13, 2022
1 parent 4998fa0 commit 25a6bd8
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 12 deletions.
11 changes: 4 additions & 7 deletions src/vt/vrt/collection/balance/lb_invoke/lb_manager.cc
Original file line number Diff line number Diff line change
Expand Up @@ -215,19 +215,17 @@ void LBManager::defaultPostLBWork(ReassignmentMsg* msg) {
}

void
LBManager::runLB(
LBProxyType base_proxy, PhaseType phase, vt::Callback<ReassignmentMsg> cb
) {
LBManager::runLB(PhaseType phase, vt::Callback<ReassignmentMsg> cb) {
runInEpochCollective("LBManager::runLB -> updateLoads", [=] {
model_->updateLoads(phase);
});

auto base_proxy = lb_instances_["chosen"];
lb::BaseLB* strat = base_proxy.get();
auto proxy = lb_instances_["chosen"];
if (strat->isCommAware()) {
runInEpochCollective(
"LBManager::runLB -> makeGraphSymmetric",
[phase, proxy] { makeGraphSymmetric(phase, proxy); }
[phase, base_proxy] { makeGraphSymmetric(phase, base_proxy); }
);
}

Expand Down Expand Up @@ -342,8 +340,7 @@ void LBManager::startLB(
break;
}

LBProxyType base_proxy = lb_instances_["chosen"];
runLB(base_proxy, phase, cb);
runLB(phase, cb);
}

/*static*/
Expand Down
7 changes: 2 additions & 5 deletions src/vt/vrt/collection/balance/lb_invoke/lb_manager.h
Original file line number Diff line number Diff line change
Expand Up @@ -235,15 +235,12 @@ struct LBManager : runtime::component::Component<LBManager> {
protected:
/**
* \internal
* \brief Run the load balancer
* \brief Run the currently chosen load balancer
*
* \param[in] base_proxy the base proxy for the LB
* \param[in] phase the phase
* \param[in] cb the callback for delivering the reassignment
*/
void runLB(
LBProxyType base_proxy, PhaseType phase, vt::Callback<ReassignmentMsg> cb
);
void runLB(PhaseType phase, vt::Callback<ReassignmentMsg> cb);

void defaultPostLBWork(ReassignmentMsg* r);

Expand Down

0 comments on commit 25a6bd8

Please sign in to comment.