Skip to content

Commit

Permalink
#2299: Switch condition for lb to minimal object load divided by numb…
Browse files Browse the repository at this point in the history
…er of nodes
  • Loading branch information
thearusable committed Aug 7, 2024
1 parent acd5812 commit 0e0ba9c
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/vt/vrt/collection/balance/temperedlb/temperedlb.cc
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,6 @@
#include <unordered_set>
#include <set>
#include <limits>
#include <cmath>

namespace vt { namespace vrt { namespace collection { namespace lb {

Expand Down Expand Up @@ -440,6 +439,9 @@ void TemperedLB::runLB(LoadType total_load) {
auto const imb = stats.at(lb::Statistic::Rank_load_modeled).at(
lb::StatisticQuantity::imb
);
auto const min = stats.at(lb::Statistic::Object_load_modeled).at(
lb::StatisticQuantity::min
);
auto const load = this_load;

if (target_pole_) {
Expand All @@ -451,8 +453,8 @@ void TemperedLB::runLB(LoadType total_load) {
target_max_load_ = avg;
}

// Use an absolute minimal bound on average load to load-balance
if (avg > std::sqrt(std::numeric_limits<LoadType>::epsilon())) {
// Use an minimal object load on average rank load to load-balance
if (avg > min / theContext()->getNumNodes()) {
should_lb = max > (run_temperedlb_tolerance + 1.0) * target_max_load_;
}

Expand Down

0 comments on commit 0e0ba9c

Please sign in to comment.