From 6b6bf80bab371035fdeb0a323e02b381553b6920 Mon Sep 17 00:00:00 2001 From: Arkadiusz Szczepkowicz Date: Thu, 19 Sep 2024 17:01:43 +0200 Subject: [PATCH] #1934: Remove leftovers from previous implementation of the circular buffer --- src/vt/vrt/collection/balance/lb_data_holder.cc | 4 ---- src/vt/vrt/collection/balance/lb_data_restart_reader.cc | 2 +- tests/unit/lb/test_offlinelb.cc | 4 ---- 3 files changed, 1 insertion(+), 9 deletions(-) diff --git a/src/vt/vrt/collection/balance/lb_data_holder.cc b/src/vt/vrt/collection/balance/lb_data_holder.cc index c3316f29e2..7945429744 100644 --- a/src/vt/vrt/collection/balance/lb_data_holder.cc +++ b/src/vt/vrt/collection/balance/lb_data_holder.cc @@ -608,10 +608,6 @@ void LBDataHolder::readMetadata(nlohmann::json const& j) { min = std::min(min, *identical_phases_.begin()); max = std::max(max, *identical_phases_.rbegin()); } - if (skipped_phases_.size() > 0) { - min = std::min(min, *skipped_phases_.begin()); - max = std::max(max, *skipped_phases_.rbegin()); - } auto phases = j["phases"]; if (phases.is_array()) { diff --git a/src/vt/vrt/collection/balance/lb_data_restart_reader.cc b/src/vt/vrt/collection/balance/lb_data_restart_reader.cc index 430a9c5a01..33e72cf514 100644 --- a/src/vt/vrt/collection/balance/lb_data_restart_reader.cc +++ b/src/vt/vrt/collection/balance/lb_data_restart_reader.cc @@ -90,7 +90,7 @@ void LBDataRestartReader::readHistory(LBDataHolder const& lbdh) { PhaseType last_found_phase = 0; for (PhaseType phase = 0; phase < num_phases_; phase++) { - if (lbdh.node_data_.contains(phase) && lbdh.node_data_.at(phase).size() > 0) { + if (lbdh.node_data_.contains(phase)) { last_found_phase = phase; for (auto const& obj : lbdh.node_data_.at(phase)) { if (obj.first.isMigratable()) { diff --git a/tests/unit/lb/test_offlinelb.cc b/tests/unit/lb/test_offlinelb.cc index 9bb39d6647..9e5dca565a 100644 --- a/tests/unit/lb/test_offlinelb.cc +++ b/tests/unit/lb/test_offlinelb.cc @@ -206,10 +206,6 @@ TEST_F(TestOfflineLB, test_offlinelb_2) { dh.node_data_[i][elms[j]] = LoadSummary{ static_cast(i + j) + 3}; } } - else { - // add empty element - circular buffer expects continuous phases - dh.node_data_[i]; - } } using JSONAppender = util::json::Appender;