Skip to content

Commit

Permalink
#1830: TemperedWMin: exclude current node from potential recipients
Browse files Browse the repository at this point in the history
  • Loading branch information
cz4rs committed Oct 20, 2022
1 parent 231eaf7 commit db8b936
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion src/vt/vrt/collection/balance/temperedwmin/temperedwmin.cc
Original file line number Diff line number Diff line change
Expand Up @@ -104,13 +104,20 @@ void TemperedWMin::inputParams(balance::ConfigEntry* config) {
}

std::vector<NodeType> TemperedWMin::getPotentialRecipients() const {
auto const this_node = theContext()->getNode();
std::vector<NodeType> nodes = {};

for (auto&& elm : load_info_) {
nodes.push_back(elm.first);
auto const node = elm.first;
if (node != this_node) {
nodes.push_back(node);
}
}

if (isDeterministic()) {
std::sort(nodes.begin(), nodes.end());
}

return nodes;
}

Expand Down

0 comments on commit db8b936

Please sign in to comment.