Skip to content

Commit

Permalink
#2201: added transfer type key to getInputKeysWithHelp()
Browse files Browse the repository at this point in the history
  • Loading branch information
ppebay committed Oct 19, 2023
1 parent 8f29250 commit fa249e6
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 9 deletions.
27 changes: 24 additions & 3 deletions src/vt/vrt/collection/balance/temperedlb/temperedlb.cc
Original file line number Diff line number Diff line change
Expand Up @@ -166,6 +166,27 @@ Default: AsyncInform
loads when the first message for a round is received, avoiding the
synchronization cost but delaying the propagation of some information
until the following round.
)"
},
{
"transfer",
R"(
Values: {Original, Recursive, SwapClusters}
Default: Original
Description:
Transfer strategy to be used in transfer stage. Options are:
Original: transfer one object per transfer as in original Grapevine approach. Recursive: original strategy improved by recursion.
When single object transfer is rejected, attempt to recurse in order to
pull more objects into the transfer and hereby minimize work added by
said transfer.
This is especially useful when communication is taken into account, as
object transfers typically disrupt local vs. global communication edges.
SwapClusters: form object clusters and attempt to perform swaps.
Object can be clustered according to arbitrary definition, and swaps
of entire clusters, according the nullset, between ranks are attempted.
This is especially useful when shared memory constraints are present,
as breaking shared memory clusters results in higher overall memory
footprint, in constrast with whole cluster swaps.
)"
},
{
Expand Down Expand Up @@ -375,9 +396,9 @@ void TemperedLB::inputParams(balance::ConfigEntry* config) {

balance::LBArgsEnumConverter<TransferTypeEnum> transfer_type_converter_(
"cmf", "TransferTypeEnum", {
{TransferTypeEnum::Original, "Original"},
{TransferTypeEnum::Recursive, "Recursive"},
{TransferTypeEnum::SwapClusters, "SwapClusters"}
{TransferTypeEnum::Original, "Original"},
{TransferTypeEnum::Recursive, "Recursive"},
{TransferTypeEnum::SwapClusters, "SwapClusters"}
}
);
transfer_type_ = transfer_type_converter_.getFromConfig(config, transfer_type_);
Expand Down
7 changes: 1 addition & 6 deletions src/vt/vrt/collection/balance/temperedlb/temperedlb.h
Original file line number Diff line number Diff line change
Expand Up @@ -172,12 +172,7 @@ struct TemperedLB : BaseLB {
LoadType target_max_load_ = 0.0;
CriterionEnum criterion_ = CriterionEnum::ModifiedGrapevine;
InformTypeEnum inform_type_ = InformTypeEnum::AsyncInform;
/**
* \brief Type of strategy to be used in transfer stage
*
* Available strategies include: Original, Recursive, and SwapClusters
* and are adapted to different kinds of problems.
*/
/// Type of strategy to be used in transfer stage
TransferTypeEnum transfer_type_ = TransferTypeEnum::Original;
ObjectOrderEnum obj_ordering_ = ObjectOrderEnum::FewestMigrations;
CMFTypeEnum cmf_type_ = CMFTypeEnum::NormByMax;
Expand Down

0 comments on commit fa249e6

Please sign in to comment.