Skip to content

Commit

Permalink
#1672: lb: add alpha, beta and gamma parameters to TemperedLB
Browse files Browse the repository at this point in the history
  • Loading branch information
cz4rs committed Mar 11, 2022
1 parent b02bd38 commit ab02e9a
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 0 deletions.
31 changes: 31 additions & 0 deletions src/vt/vrt/collection/balance/temperedlb/temperedlb.cc
Original file line number Diff line number Diff line change
Expand Up @@ -250,6 +250,33 @@ Default: false
When an object load exceeds the processor-average load (i.e., we have a "long
pole"), adjust the target load to be the maximum object load ("longest pole")
instead of the processor-average load.
)"
},
{
"alpha",
R"(
Values: <double>
Default: 1.0
Description:
Load part coefficient in affine combination of load and communication.
)"
},
{
"beta",
R"(
Values: <double>
Default: 0.0
Description:
Communication part coefficient in affine combination of load and communication.
)"
},
{
"gamma",
R"(
Values: <double>
Default: 0.0
Description:
...
)"
},
};
Expand Down Expand Up @@ -353,6 +380,10 @@ void TemperedLB::inputParams(balance::SpecEntry* spec) {
num_iters_ = spec->getOrDefault<int32_t>("iters", num_iters_);
num_trials_ = spec->getOrDefault<int32_t>("trials", num_trials_);

alpha_ = spec->getOrDefault<double>("alpha", alpha_);
beta_ = spec->getOrDefault<double>("alpha", beta_);
gamma_ = spec->getOrDefault<double>("alpha", gamma_);

deterministic_ = spec->getOrDefault<bool>("deterministic", deterministic_);
rollback_ = spec->getOrDefault<bool>("rollback", rollback_);
target_pole_ = spec->getOrDefault<bool>("targetpole", target_pole_);
Expand Down
3 changes: 3 additions & 0 deletions src/vt/vrt/collection/balance/temperedlb/temperedlb.h
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,9 @@ struct TemperedLB : BaseLB {
uint8_t k_cur_ = 0;
uint16_t iter_ = 0;
uint16_t trial_ = 0;
double alpha_ = 1.0;
double beta_ = 0.0;
double gamma_ = 0.0;
uint16_t num_iters_ = 4;
/**
* \brief Number of trials
Expand Down

0 comments on commit ab02e9a

Please sign in to comment.