Skip to content

Commit

Permalink
#2266: lbmanager: print lb time only on rank 0
Browse files Browse the repository at this point in the history
  • Loading branch information
nlslatt committed Apr 9, 2024
1 parent e3f0eb9 commit 046d597
Showing 1 changed file with 16 additions and 12 deletions.
28 changes: 16 additions & 12 deletions src/vt/vrt/collection/balance/lb_invoke/lb_manager.cc
Original file line number Diff line number Diff line change
Expand Up @@ -206,12 +206,14 @@ void LBManager::defaultPostLBWork(ReassignmentMsg* msg) {

auto const start_time = timing::getCurrentTime();
applyReassignment(reassignment);
auto const mig_time = timing::getCurrentTime() - start_time;
vt_debug_print(
terse, phase,
"phase={}: mig_time={}\n",
phase, mig_time
);
if (theContext()->getNode() == 0) {
auto const mig_time = timing::getCurrentTime() - start_time;
vt_debug_print(
terse, phase,
"phase={}: mig_time={}\n",
phase, mig_time
);
}

// Inform the collection manager to rebuild spanning trees if needed
if (reassignment->global_migration_count != 0) {
Expand Down Expand Up @@ -270,12 +272,14 @@ LBManager::runLB(PhaseType phase, vt::Callback<ReassignmentMsg> cb) {
phase, base_proxy, model_.get(), stats, *comm, total_load_from_model,
*data_map
);
auto const lb_time = timing::getCurrentTime() - start_time;
vt_debug_print(
terse, phase,
"phase={}: lb_time={}\n",
phase, lb_time
);
if (theContext()->getNode() == 0) {
auto const lb_time = timing::getCurrentTime() - start_time;
vt_debug_print(
terse, phase,
"phase={}: lb_time={}\n",
phase, lb_time
);
}
cb.send(reassignment, phase);
}

Expand Down

0 comments on commit 046d597

Please sign in to comment.