Skip to content

Commit

Permalink
LB: Remove need for +LBCommOff (#3586)
Browse files Browse the repository at this point in the history
Co-authored-by: Ronak Buch <rabuch2@illinois.edu>
  • Loading branch information
kavithachandrasekar and rbuch committed Mar 31, 2022
1 parent 230391d commit 8dd1c2d
Show file tree
Hide file tree
Showing 8 changed files with 20 additions and 6 deletions.
17 changes: 12 additions & 5 deletions src/ck-ldb/LBManager.C
Original file line number Diff line number Diff line change
Expand Up @@ -397,9 +397,15 @@ void _loadbalancerInit()
_lb_args.statsOn() =
!CmiGetArgFlagDesc(argv, "+LBOff", "Turn load balancer instrumentation off");

// turn instrumentation of communicatin off at startup
_lb_args.traceComm() = !CmiGetArgFlagDesc(
argv, "+LBCommOff", "Turn load balancer instrumentation of communication off");
// turn instrumentation of communication on at startup
_lb_args.traceComm() = CmiGetArgFlagDesc(
argv, "+LBCommOn", "Turn load balancer instrumentation of communication on");

// +LBCommOff is deprecated as instrumentation of communication is off by default
bool lbcommOff = CmiGetArgFlagDesc(
argv, "+LBCommOff", "(No-op) Turn load balancer instrumentation of communication off");
if(CkMyPe()==0 && lbcommOff)
CmiPrintf("Warning: Ignoring the deprecated +LBCommOff option as communication is off by default.\n");

// set alpha and beta
_lb_args.alpha() = PER_MESSAGE_SEND_OVERHEAD_DEFAULT;
Expand Down Expand Up @@ -433,8 +439,6 @@ void _loadbalancerInit()
LBSimulation::dumpFile, _lb_args.lbversion());
if (_lb_args.statsOn() == 0)
CkPrintf("CharmLB> Load balancing instrumentation is off.\n");
if (_lb_args.traceComm() == 0)
CkPrintf("CharmLB> Load balancing instrumentation for communication is off.\n");
if (_lb_args.migObjOnly())
CkPrintf("LB> Load balancing strategy ignores non-migratable objects.\n");
}
Expand Down Expand Up @@ -484,6 +488,7 @@ void LBManager::initnodeFn()
_registerCommandLineOpt("+LBSameCpus");
_registerCommandLineOpt("+LBUseCpuTime");
_registerCommandLineOpt("+LBOff");
_registerCommandLineOpt("+LBCommOn");
_registerCommandLineOpt("+LBCommOff");
_registerCommandLineOpt("+MetaLB");
_registerCommandLineOpt("+LBAlpha");
Expand Down Expand Up @@ -540,6 +545,8 @@ void LBManager::init(void)
#if CMK_LBDB_ON
if (manualOn) TurnManualLBOn();
#endif
if (CkMyPe()==0 && _lb_args.traceComm() == 0)
CkPrintf("CharmLB> Load balancing instrumentation for communication is off.\n");

if (_lb_args.lbperiod() > 0.0)
{
Expand Down
3 changes: 2 additions & 1 deletion src/ck-ldb/LBManager.h
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,8 @@ class CkLBArgs
_lb_debug = 0;
_lb_ignoreBgLoad = _lb_syncResume = _lb_useCpuTime = false;
_lb_printsummary = _lb_migObjOnly = false;
_lb_statson = _lb_traceComm = true;
_lb_statson = true;
_lb_traceComm = false;
_lb_loop = false;
_lb_central_pe = 0;
_lb_maxDistPhases = 10;
Expand Down
1 change: 1 addition & 0 deletions src/ck-ldb/MetisLB.C
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ extern int quietModeRequested;
static void lbinit()
{
LBRegisterBalancer<MetisLB>("MetisLB", "Use Metis(tm) to partition object graph");
LBTurnCommOn();
}

MetisLB::MetisLB(const CkLBOptions& opt) : CBase_MetisLB(opt)
Expand Down
1 change: 1 addition & 0 deletions src/ck-ldb/RecBipartLB.C
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,7 @@ static void lbinit()
LBRegisterBalancer<RecBipartLB>(
"RecBipartLB",
"Algorithm for load balacing based on recursive bipartitioning of object graph");
LBTurnCommOn();
}

// removes from BQueue but not from boundaryline
Expand Down
1 change: 1 addition & 0 deletions src/ck-ldb/ScotchLB.C
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ extern int quietModeRequested;
static void lbinit()
{
LBRegisterBalancer<ScotchLB>("ScotchLB", "Load balancing using the Scotch graph partitioning library");
LBTurnCommOn();
}

ScotchLB::ScotchLB(const CkLBOptions &opt) : CBase_ScotchLB(opt) {
Expand Down
1 change: 1 addition & 0 deletions src/ck-ldb/ScotchRefineLB.C
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ extern int quietModeRequested;
static void lbinit()
{
LBRegisterBalancer<ScotchRefineLB>("ScotchRefineLB", "Load balancing using the Scotch graph partitioning library");
LBTurnCommOn();
}

ScotchRefineLB::ScotchRefineLB(const CkLBOptions &opt) : CBase_ScotchRefineLB(opt) {
Expand Down
1 change: 1 addition & 0 deletions src/ck-ldb/ScotchTopoLB.C
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ static void lbinit()
{
LBRegisterBalancer<ScotchTopoLB>(
"ScotchTopoLB", "Load balancing using the Scotch graph partitioning library");
LBTurnCommOn();
}

ScotchTopoLB::ScotchTopoLB(const CkLBOptions &opt) : CBase_ScotchTopoLB(opt) {
Expand Down
1 change: 1 addition & 0 deletions src/ck-ldb/ZoltanLB.C
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ extern int quietModeRequested;
static void lbinit()
{
LBRegisterBalancer<ZoltanLB>("ZoltanLB", "Use Zoltan(tm) to partition object graph");
LBTurnCommOn();
}

ZoltanLB::ZoltanLB(const CkLBOptions &opt): CBase_ZoltanLB(opt)
Expand Down

0 comments on commit 8dd1c2d

Please sign in to comment.