#2452: temperedlb: add rank-based alpha from file read in#2453
Open
lifflander wants to merge 2 commits intodevelopfrom
Open
#2452: temperedlb: add rank-based alpha from file read in#2453lifflander wants to merge 2 commits intodevelopfrom
lifflander wants to merge 2 commits intodevelopfrom
Conversation
1 task
|
diff --git a/src/vt/vrt/collection/balance/temperedlb/temperedlb.cc b/src/vt/vrt/collection/balance/temperedlb/temperedlb.cc
index 4b4906754..be4791e1c 100644
--- a/src/vt/vrt/collection/balance/temperedlb/temperedlb.cc
+++ b/src/vt/vrt/collection/balance/temperedlb/temperedlb.cc
@@ -522,15 +522,16 @@ std::tuple<std::string, int, int> TemperedLB::getNodeRank() {
MPI_Get_processor_name(hostname, &hostname_len);
MPI_Comm shared_comm;
- MPI_Comm_split_type(world_comm, MPI_COMM_TYPE_SHARED, 0, MPI_INFO_NULL, &shared_comm);
+ MPI_Comm_split_type(
+ world_comm, MPI_COMM_TYPE_SHARED, 0, MPI_INFO_NULL, &shared_comm
+ );
int shared_rank = -1, shared_size = -1;
MPI_Comm_rank(shared_comm, &shared_rank);
MPI_Comm_size(shared_comm, &shared_size);
vt_debug_print(
- verbose, temperedlb,
- "hostname: {}, global rank: {}, local rank: {}\n",
+ verbose, temperedlb, "hostname: {}, global rank: {}, local rank: {}\n",
hostname, world_rank, shared_rank
);
@@ -558,10 +559,8 @@ void TemperedLB::readAlphaFromFile() {
if (file_hostname == hostname and shared_rank == file_shared_rank) {
alpha = rank_alpha;
vt_debug_print(
- verbose, temperedlb,
- "For rank {}, setting alpha to {}\n",
- theContext()->getNode(),
- alpha
+ verbose, temperedlb, "For rank {}, setting alpha to {}\n",
+ theContext()->getNode(), alpha
);
break;
}
@@ -1236,8 +1235,12 @@ void TemperedLB::doLBStages(LoadType start_imb) {
// Perform the reduction for Rank_load_modeled -> processor load only
proxy_.allreduce<&TemperedLB::workStatsHandler, collective::PlusOp>(
std::vector<balance::LoadData>{
- {balance::LoadData{Statistic::Rank_load_modeled, this_new_load_ * alpha}},
- {balance::LoadData{Statistic::Rank_strategy_specific_load_modeled, this_new_work_}}
+ {balance::LoadData{
+ Statistic::Rank_load_modeled, this_new_load_ * alpha
+ }},
+ {balance::LoadData{
+ Statistic::Rank_strategy_specific_load_modeled, this_new_work_
+ }}
}
);
});
@@ -1367,8 +1370,12 @@ void TemperedLB::doLBStages(LoadType start_imb) {
// Perform the reduction for Rank_load_modeled -> processor load only
proxy_.allreduce<&TemperedLB::loadStatsHandler, collective::PlusOp>(
std::vector<balance::LoadData>{
- {balance::LoadData{Statistic::Rank_load_modeled, this_new_load_ * alpha}},
- {balance::LoadData{Statistic::Rank_strategy_specific_load_modeled, this_new_work_}}
+ {balance::LoadData{
+ Statistic::Rank_load_modeled, this_new_load_ * alpha
+ }},
+ {balance::LoadData{
+ Statistic::Rank_strategy_specific_load_modeled, this_new_work_
+ }}
}
);
});
@@ -1702,9 +1709,12 @@ void TemperedLB::propagateRound(uint8_t k_cur, bool sync, EpochType epoch) {
}
NodeInfo info{
alpha,
- this_new_load_, this_new_work_,
- this_new_breakdown_.inter_send_vol, this_new_breakdown_.inter_recv_vol,
- this_new_breakdown_.intra_send_vol, this_new_breakdown_.intra_recv_vol,
+ this_new_load_,
+ this_new_work_,
+ this_new_breakdown_.inter_send_vol,
+ this_new_breakdown_.inter_recv_vol,
+ this_new_breakdown_.intra_send_vol,
+ this_new_breakdown_.intra_recv_vol,
this_new_breakdown_.shared_vol
};
msg->addNodeInfo(this_node, info);
@@ -1722,9 +1732,12 @@ void TemperedLB::propagateRound(uint8_t k_cur, bool sync, EpochType epoch) {
}
NodeInfo info{
alpha,
- this_new_load_, this_new_work_,
- this_new_breakdown_.inter_send_vol, this_new_breakdown_.inter_recv_vol,
- this_new_breakdown_.intra_send_vol, this_new_breakdown_.intra_recv_vol,
+ this_new_load_,
+ this_new_work_,
+ this_new_breakdown_.inter_send_vol,
+ this_new_breakdown_.inter_recv_vol,
+ this_new_breakdown_.intra_send_vol,
+ this_new_breakdown_.intra_recv_vol,
this_new_breakdown_.shared_vol
};
msg->addNodeInfo(this_node, info);
@@ -2345,9 +2358,12 @@ void TemperedLB::considerSwapsAfterLock(MsgSharedPtr<LockedInfoMsg> msg) {
NodeInfo this_info{
alpha,
- this_new_load_, this_new_work_,
- this_new_breakdown_.inter_send_vol, this_new_breakdown_.inter_recv_vol,
- this_new_breakdown_.intra_send_vol, this_new_breakdown_.intra_recv_vol,
+ this_new_load_,
+ this_new_work_,
+ this_new_breakdown_.inter_send_vol,
+ this_new_breakdown_.inter_recv_vol,
+ this_new_breakdown_.intra_send_vol,
+ this_new_breakdown_.intra_recv_vol,
this_new_breakdown_.shared_vol
};
@@ -2677,9 +2693,12 @@ void TemperedLB::satisfyLockRequest() {
NodeInfo this_info{
alpha,
- this_new_load_, this_new_work_,
- this_new_breakdown_.inter_send_vol, this_new_breakdown_.inter_recv_vol,
- this_new_breakdown_.intra_send_vol, this_new_breakdown_.intra_recv_vol,
+ this_new_load_,
+ this_new_work_,
+ this_new_breakdown_.inter_send_vol,
+ this_new_breakdown_.inter_recv_vol,
+ this_new_breakdown_.intra_send_vol,
+ this_new_breakdown_.intra_recv_vol,
this_new_breakdown_.shared_vol
};
@@ -2701,9 +2720,12 @@ void TemperedLB::swapClusters() {
NodeInfo this_info{
alpha,
- this_new_load_, this_new_work_,
- this_new_breakdown_.inter_send_vol, this_new_breakdown_.inter_recv_vol,
- this_new_breakdown_.intra_send_vol, this_new_breakdown_.intra_recv_vol,
+ this_new_load_,
+ this_new_work_,
+ this_new_breakdown_.inter_send_vol,
+ this_new_breakdown_.inter_recv_vol,
+ this_new_breakdown_.intra_send_vol,
+ this_new_breakdown_.intra_recv_vol,
this_new_breakdown_.shared_vol
};
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #2452