Skip to content

Commit

Permalink
#2299: Use square root of LoadType epsilon for minimal bound
Browse files Browse the repository at this point in the history
  • Loading branch information
thearusable committed Aug 9, 2024
1 parent 96689a3 commit 5ab4506
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/vt/vrt/collection/balance/temperedlb/temperedlb.cc
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,8 @@
#include <vector>
#include <unordered_set>
#include <set>
#include <limits>
#include <cmath>

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

Expand Down Expand Up @@ -449,7 +451,8 @@ void TemperedLB::runLB(LoadType total_load) {
target_max_load_ = avg;
}

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

Expand Down

0 comments on commit 5ab4506

Please sign in to comment.