From 0e0ba9c4a775f3745651ac1d9e4283c4ff7f0044 Mon Sep 17 00:00:00 2001 From: Arkadiusz Szczepkowicz Date: Tue, 6 Aug 2024 16:51:37 -0400 Subject: [PATCH] #2299: Switch condition for lb to minimal object load divided by number of nodes --- src/vt/vrt/collection/balance/temperedlb/temperedlb.cc | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/vt/vrt/collection/balance/temperedlb/temperedlb.cc b/src/vt/vrt/collection/balance/temperedlb/temperedlb.cc index 5f431701c3..6dba6e0ecf 100644 --- a/src/vt/vrt/collection/balance/temperedlb/temperedlb.cc +++ b/src/vt/vrt/collection/balance/temperedlb/temperedlb.cc @@ -59,7 +59,6 @@ #include #include #include -#include namespace vt { namespace vrt { namespace collection { namespace lb { @@ -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_) { @@ -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::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_; }