Skip to content

Commit

Permalink
#1359: LB: make it only print on rank 0
Browse files Browse the repository at this point in the history
  • Loading branch information
lifflander authored and nlslatt committed Sep 30, 2021
1 parent ebf395c commit ed5f6cb
Showing 1 changed file with 12 additions and 5 deletions.
17 changes: 12 additions & 5 deletions src/vt/runtime/runtime.cc
Original file line number Diff line number Diff line change
Expand Up @@ -157,11 +157,18 @@ Runtime::Runtime(
int exit_code = std::get<0>(result);

if (getAppConfig()->vt_help_lb_args) {
// Help requested
vrt::collection::balance::LBManager::printLBArgsHelp(getAppConfig()->vt_lb_name);
if (exit_code == -1) {
exit_code = 0;
}
// Help requested or invalid argument(s).
int rank = 0;
MPI_Comm_rank(initial_communicator_, &rank);

if (rank == 0) {
// Help requested
vt::debug::preConfigRef()->colorize_output = true;
vrt::collection::balance::LBManager::printLBArgsHelp(getAppConfig()->vt_lb_name);
}
if (exit_code == -1) {
exit_code = 0;
}
}

if (exit_code not_eq -1) {
Expand Down

0 comments on commit ed5f6cb

Please sign in to comment.