From 1a8a3df328a3be6ec003929995e35ff0d112ac26 Mon Sep 17 00:00:00 2001 From: Arkadiusz Szczepkowicz Date: Mon, 11 Dec 2023 13:21:05 +0100 Subject: [PATCH] #1934: Reaply interface changes after rebase --- src/vt/elm/elm_lb_data.h | 2 +- src/vt/vrt/collection/balance/lb_data_holder.cc | 6 +++--- .../vrt/collection/balance/lb_invoke/lb_manager.cc | 2 +- src/vt/vrt/collection/balance/model/comm_overhead.cc | 6 +++--- src/vt/vrt/collection/balance/model/comm_overhead.h | 6 +++--- .../vrt/collection/balance/model/composed_model.cc | 6 +++--- src/vt/vrt/collection/balance/model/composed_model.h | 6 +++--- src/vt/vrt/collection/balance/model/load_model.h | 6 +++--- .../vrt/collection/balance/model/per_collection.cc | 6 +++--- src/vt/vrt/collection/balance/model/per_collection.h | 6 +++--- src/vt/vrt/collection/balance/model/raw_data.cc | 8 ++++---- src/vt/vrt/collection/balance/model/raw_data.h | 12 ++++++------ .../vrt/collection/balance/model/weighted_messages.h | 6 +++--- src/vt/vrt/collection/balance/node_lb_data.cc | 4 ++-- tests/unit/collection/test_lb.extended.cc | 10 +++++----- tests/unit/collection/test_lb_data_holder.cc | 2 +- .../collection/test_model_comm_overhead.nompi.cc | 8 ++++---- .../unit/collection/test_model_linear_model.nompi.cc | 6 +++--- .../collection/test_model_multiple_phases.nompi.cc | 6 +++--- .../collection/test_model_naive_persistence.nompi.cc | 6 +++--- tests/unit/collection/test_model_norm.nompi.cc | 8 ++++---- .../test_model_persistence_median_last_n.nompi.cc | 6 +++--- tests/unit/collection/test_model_raw_data.nompi.cc | 6 +++--- .../collection/test_model_select_subphases.nompi.cc | 8 ++++---- ...test_model_weighted_communication_volume.nompi.cc | 6 +++--- .../collection/test_model_weighted_messages.nompi.cc | 6 +++--- tests/unit/lb/test_offlinelb.cc | 2 +- 27 files changed, 81 insertions(+), 81 deletions(-) diff --git a/src/vt/elm/elm_lb_data.h b/src/vt/elm/elm_lb_data.h index 0c10d1e63d..e00ac6fe0c 100644 --- a/src/vt/elm/elm_lb_data.h +++ b/src/vt/elm/elm_lb_data.h @@ -118,7 +118,7 @@ struct ElementLBData { /** * \brief Resize internal buffers - * + * * \param[in] hist_lb_data_count the requested buffers capacity */ void setHistoryCapacity(unsigned int hist_lb_data_count); diff --git a/src/vt/vrt/collection/balance/lb_data_holder.cc b/src/vt/vrt/collection/balance/lb_data_holder.cc index 66d6703e41..272bcad1e1 100644 --- a/src/vt/vrt/collection/balance/lb_data_holder.cc +++ b/src/vt/vrt/collection/balance/lb_data_holder.cc @@ -346,7 +346,7 @@ LBDataHolder::LBDataHolder(nlohmann::json const& j) from_elm, to_elm, type == "Broadcast" ); CommVolume vol{bytes, messages}; - (*this->node_comm_[id])[key] = vol; + this->node_comm_[id][key] = vol; } else if ( type == "NodeToCollection" || type == "NodeToCollectionBcast" ) { @@ -366,7 +366,7 @@ LBDataHolder::LBDataHolder(nlohmann::json const& j) type == "NodeToCollectionBcast" ); CommVolume vol{bytes, messages}; - (*this->node_comm_[id])[key] = vol; + this->node_comm_[id][key] = vol; } else if ( type == "CollectionToNode" || type == "CollectionToNodeBcast" ) { @@ -386,7 +386,7 @@ LBDataHolder::LBDataHolder(nlohmann::json const& j) type == "CollectionToNodeBcast" ); CommVolume vol{bytes, messages}; - (*this->node_comm_[id])[key] = vol; + this->node_comm_[id][key] = vol; } } } diff --git a/src/vt/vrt/collection/balance/lb_invoke/lb_manager.cc b/src/vt/vrt/collection/balance/lb_invoke/lb_manager.cc index c75899661a..35a1aa18da 100644 --- a/src/vt/vrt/collection/balance/lb_invoke/lb_manager.cc +++ b/src/vt/vrt/collection/balance/lb_invoke/lb_manager.cc @@ -169,8 +169,8 @@ void LBManager::setLoadModel(std::shared_ptr model) { model_ = model; model_->setLoads(nlb_data->getNodeLoad(), + nlb_data->getNodeComm(), nlb_data->getUserData()); - nlb_data->getNodeComm()); // Adjust buffers size on the objs in collection runInEpochCollective("LBManager: setLoadModel", [=] { diff --git a/src/vt/vrt/collection/balance/model/comm_overhead.cc b/src/vt/vrt/collection/balance/model/comm_overhead.cc index 470d28e18b..586d7b2bff 100644 --- a/src/vt/vrt/collection/balance/model/comm_overhead.cc +++ b/src/vt/vrt/collection/balance/model/comm_overhead.cc @@ -54,9 +54,9 @@ CommOverhead::CommOverhead( per_byte_weight_(in_per_byte_weight) { } -void CommOverhead::setLoads(std::unordered_map const* proc_load, - std::unordered_map const* proc_comm, - std::unordered_map const* user_data) { +void CommOverhead::setLoads(vt::util::container::CircularPhasesBuffer const* proc_load, + vt::util::container::CircularPhasesBuffer const* proc_comm, + vt::util::container::CircularPhasesBuffer const* user_data) { proc_comm_ = proc_comm; ComposedModel::setLoads(proc_load, proc_comm, user_data); } diff --git a/src/vt/vrt/collection/balance/model/comm_overhead.h b/src/vt/vrt/collection/balance/model/comm_overhead.h index 8298c89708..36dd38b0c2 100644 --- a/src/vt/vrt/collection/balance/model/comm_overhead.h +++ b/src/vt/vrt/collection/balance/model/comm_overhead.h @@ -65,9 +65,9 @@ struct CommOverhead : public ComposedModel { LoadType in_per_byte_weight ); - void setLoads(std::unordered_map const* proc_load, - std::unordered_map const* proc_comm, - std::unordered_map const* user_data) override; + void setLoads(vt::util::container::CircularPhasesBuffer const* proc_load, + vt::util::container::CircularPhasesBuffer const* proc_comm, + vt::util::container::CircularPhasesBuffer const* user_data) override; LoadType getModeledLoad(ElementIDStruct object, PhaseOffset when) const override; diff --git a/src/vt/vrt/collection/balance/model/composed_model.cc b/src/vt/vrt/collection/balance/model/composed_model.cc index 1090662414..22534a5023 100644 --- a/src/vt/vrt/collection/balance/model/composed_model.cc +++ b/src/vt/vrt/collection/balance/model/composed_model.cc @@ -45,9 +45,9 @@ namespace vt { namespace vrt { namespace collection { namespace balance { -void ComposedModel::setLoads(std::unordered_map const* proc_load, - std::unordered_map const* proc_comm, - std::unordered_map const* user_data) { +void ComposedModel::setLoads(vt::util::container::CircularPhasesBuffer const* proc_load, + vt::util::container::CircularPhasesBuffer const* proc_comm, + vt::util::container::CircularPhasesBuffer const* user_data) { base_->setLoads(proc_load, proc_comm, user_data); } diff --git a/src/vt/vrt/collection/balance/model/composed_model.h b/src/vt/vrt/collection/balance/model/composed_model.h index 6d0e28fb83..75f924811d 100644 --- a/src/vt/vrt/collection/balance/model/composed_model.h +++ b/src/vt/vrt/collection/balance/model/composed_model.h @@ -64,9 +64,9 @@ class ComposedModel : public LoadModel // \param[in] base must not be null explicit ComposedModel(std::shared_ptr base) : base_(base) {} - void setLoads(std::unordered_map const* proc_load, - std::unordered_map const* proc_comm, - std::unordered_map const* user_data) override; + void setLoads(vt::util::container::CircularPhasesBuffer const* proc_load, + vt::util::container::CircularPhasesBuffer const* proc_comm, + vt::util::container::CircularPhasesBuffer const* user_data) override; void updateLoads(PhaseType last_completed_phase) override; diff --git a/src/vt/vrt/collection/balance/model/load_model.h b/src/vt/vrt/collection/balance/model/load_model.h index 23cacc19c0..6dd6e053ef 100644 --- a/src/vt/vrt/collection/balance/model/load_model.h +++ b/src/vt/vrt/collection/balance/model/load_model.h @@ -196,9 +196,9 @@ struct LoadModel * passed a new model instance for a collection */ virtual void setLoads( - std::unordered_map const* proc_load, - std::unordered_map const* proc_comm, - std::unordered_map const* user_data + vt::util::container::CircularPhasesBuffer const* proc_load, + vt::util::container::CircularPhasesBuffer const* proc_comm, + vt::util::container::CircularPhasesBuffer const* user_data ) = 0; /** diff --git a/src/vt/vrt/collection/balance/model/per_collection.cc b/src/vt/vrt/collection/balance/model/per_collection.cc index 38847b11f0..6ad5e6efb2 100644 --- a/src/vt/vrt/collection/balance/model/per_collection.cc +++ b/src/vt/vrt/collection/balance/model/per_collection.cc @@ -55,9 +55,9 @@ void PerCollection::addModel(CollectionID proxy, std::shared_ptr mode models_[proxy] = model; } -void PerCollection::setLoads(std::unordered_map const* proc_load, - std::unordered_map const* proc_comm, - std::unordered_map const* user_data) { +void PerCollection::setLoads(vt::util::container::CircularPhasesBuffer const* proc_load, + vt::util::container::CircularPhasesBuffer const* proc_comm, + vt::util::container::CircularPhasesBuffer const* user_data) { for (auto& m : models_) m.second->setLoads(proc_load, proc_comm, user_data); ComposedModel::setLoads(proc_load, proc_comm, user_data); diff --git a/src/vt/vrt/collection/balance/model/per_collection.h b/src/vt/vrt/collection/balance/model/per_collection.h index acc8ad7b83..f73c8920b1 100644 --- a/src/vt/vrt/collection/balance/model/per_collection.h +++ b/src/vt/vrt/collection/balance/model/per_collection.h @@ -73,9 +73,9 @@ struct PerCollection : public ComposedModel */ void addModel(CollectionID proxy, std::shared_ptr model); - void setLoads(std::unordered_map const* proc_load, - std::unordered_map const* proc_comm, - std::unordered_map const* user_data) override; + void setLoads(vt::util::container::CircularPhasesBuffer const* proc_load, + vt::util::container::CircularPhasesBuffer const* proc_comm, + vt::util::container::CircularPhasesBuffer const* user_data) override; void updateLoads(PhaseType last_completed_phase) override; diff --git a/src/vt/vrt/collection/balance/model/raw_data.cc b/src/vt/vrt/collection/balance/model/raw_data.cc index 05a7e41616..ddd0b77b53 100644 --- a/src/vt/vrt/collection/balance/model/raw_data.cc +++ b/src/vt/vrt/collection/balance/model/raw_data.cc @@ -50,9 +50,9 @@ void RawData::updateLoads(PhaseType last_completed_phase) { last_completed_phase_ = last_completed_phase; } -void RawData::setLoads(std::unordered_map const* proc_load, - std::unordered_map const* proc_comm, - std::unordered_map const* user_data) +void RawData::setLoads(vt::util::container::CircularPhasesBuffer const* proc_load, + vt::util::container::CircularPhasesBuffer const* proc_comm, + vt::util::container::CircularPhasesBuffer const* user_data) { proc_load_ = proc_load; proc_comm_ = proc_comm; @@ -118,7 +118,7 @@ ElmUserDataType RawData::getUserData(ElementIDStruct object, PhaseOffset offset) "RawData makes no predictions. Compose with NaivePersistence or some longer-range forecasting model as needed"); auto phase = getNumCompletedPhases() + offset.phases; - if (user_data_->find(phase) != user_data_->end()) { + if (user_data_->contains(phase)) { auto& phase_data = user_data_->at(phase); if (phase_data.find(object) != phase_data.end()) { return phase_data.at(object); diff --git a/src/vt/vrt/collection/balance/model/raw_data.h b/src/vt/vrt/collection/balance/model/raw_data.h index e579823eb9..b363200f7b 100644 --- a/src/vt/vrt/collection/balance/model/raw_data.h +++ b/src/vt/vrt/collection/balance/model/raw_data.h @@ -65,9 +65,9 @@ struct RawData : public LoadModel { bool hasUserData() const override { return user_data_ != nullptr; } ElmUserDataType getUserData(ElementIDStruct object, PhaseOffset when) const override; - void setLoads(std::unordered_map const* proc_load, - std::unordered_map const* proc_comm, - std::unordered_map const* user_data) override; + void setLoads(vt::util::container::CircularPhasesBuffer const* proc_load, + vt::util::container::CircularPhasesBuffer const* proc_comm, + vt::util::container::CircularPhasesBuffer const* user_data) override; ObjectIterator begin() const override; @@ -77,9 +77,9 @@ struct RawData : public LoadModel { unsigned int getNumPastPhasesNeeded(unsigned int look_back) const override; // Observer pointers to the underlying data. In operation, these would be owned by NodeLBData - std::unordered_map const* proc_load_; - std::unordered_map const* proc_comm_; - std::unordered_map const* user_data_; + vt::util::container::CircularPhasesBuffer const* proc_load_; + vt::util::container::CircularPhasesBuffer const* proc_comm_; + vt::util::container::CircularPhasesBuffer const* user_data_; PhaseType last_completed_phase_ = ~0; }; // class RawData diff --git a/src/vt/vrt/collection/balance/model/weighted_messages.h b/src/vt/vrt/collection/balance/model/weighted_messages.h index 06d7f7bf4a..fad5af9b4b 100644 --- a/src/vt/vrt/collection/balance/model/weighted_messages.h +++ b/src/vt/vrt/collection/balance/model/weighted_messages.h @@ -65,9 +65,9 @@ struct WeightedMessages : public ComposedModel { per_byte_weight_(in_per_byte_weight) { } void setLoads( - std::unordered_map const* proc_load, - std::unordered_map const* proc_comm, - std::unordered_map const* user_data + vt::util::container::CircularPhasesBuffer const* proc_load, + vt::util::container::CircularPhasesBuffer const* proc_comm, + vt::util::container::CircularPhasesBuffer const* user_data ) override { proc_comm_ = proc_comm; ComposedModel::setLoads(proc_load, proc_comm, user_data); diff --git a/src/vt/vrt/collection/balance/node_lb_data.cc b/src/vt/vrt/collection/balance/node_lb_data.cc index e083e35829..586113f7ba 100644 --- a/src/vt/vrt/collection/balance/node_lb_data.cc +++ b/src/vt/vrt/collection/balance/node_lb_data.cc @@ -356,12 +356,12 @@ void NodeLBData::addNodeLBData( } if (storable) { - (*lb_data_->user_defined_json_[phase])[id] = std::make_shared( + lb_data_->user_defined_json_[phase][id] = std::make_shared( storable->toJson() ); storable->foreachLB( [&](std::string const& key, auto val) { - (*lb_data_->user_defined_lb_info_[phase])[id][key] = val->toVariant(); + lb_data_->user_defined_lb_info_[phase][id][key] = val->toVariant(); } ); } diff --git a/tests/unit/collection/test_lb.extended.cc b/tests/unit/collection/test_lb.extended.cc index 44d0499350..79eed48990 100644 --- a/tests/unit/collection/test_lb.extended.cc +++ b/tests/unit/collection/test_lb.extended.cc @@ -571,15 +571,15 @@ TEST_F(TestRestoreLBData, test_restore_lb_data_data_1) { CommKey::NodeToCollectionTag{}, this_node, elm_id, false ); CommVolume ntocvol{ntoc, ntocm}; - (*lbdh.node_comm_[phase])[ntockey] = ntocvol; - (*lbdh.node_subphase_comm_[phase])[i % 2][ntockey] = ntocvol; + lbdh.node_comm_[phase][ntockey] = ntocvol; + lbdh.node_subphase_comm_[phase][i % 2][ntockey] = ntocvol; CommKey ctonkey( CommKey::CollectionToNodeTag{}, elm_id, this_node, false ); CommVolume ctonvol{cton, ctonm}; - (*lbdh.node_comm_[phase])[ctonkey] = ctonvol; - (*lbdh.node_subphase_comm_[phase])[(i + 1) % 2][ctonkey] = ctonvol; + lbdh.node_comm_[phase][ctonkey] = ctonvol; + lbdh.node_subphase_comm_[phase][(i + 1) % 2][ctonkey] = ctonvol; std::vector arr; arr.push_back(idx.x()); @@ -744,7 +744,7 @@ TEST_P(TestDumpUserdefinedData, test_dump_userdefined_json) { auto elm_id = elm_ptr->getElmID(); elm_ptr->valInsert("hello", std::string("world"), should_dump, false); elm_ptr->valInsert("elephant", 123456789, should_dump, false); - (*lbdh.user_defined_json_[phase])[elm_id] = std::make_shared( + lbdh.user_defined_json_[phase][elm_id] = std::make_shared( elm_ptr->toJson() ); lbdh.node_data_[phase][elm_id].whole_phase_load = 1.0; diff --git a/tests/unit/collection/test_lb_data_holder.cc b/tests/unit/collection/test_lb_data_holder.cc index d5fa1a7abc..e65c36c5f2 100644 --- a/tests/unit/collection/test_lb_data_holder.cc +++ b/tests/unit/collection/test_lb_data_holder.cc @@ -76,7 +76,7 @@ void addPhasesDataToJson(nlohmann::json& json, PhaseType amountOfPhasesToAdd, st LBDataHolder dh(amountOfPhasesToAdd); for (unsigned i = 0; i < amountOfPhasesToAdd; i++) { for (auto&& elm : ids[i]) { - (*dh.node_data_[i])[elm] = LoadSummary{3.}; + dh.node_data_[i][elm] = LoadSummary{3.}; } } diff --git a/tests/unit/collection/test_model_comm_overhead.nompi.cc b/tests/unit/collection/test_model_comm_overhead.nompi.cc index 4fb1936184..d912703cf8 100644 --- a/tests/unit/collection/test_model_comm_overhead.nompi.cc +++ b/tests/unit/collection/test_model_comm_overhead.nompi.cc @@ -69,10 +69,10 @@ using vt::vrt::collection::balance::SubphaseLoadMapType; using vt::vrt::collection::balance::LoadMapObjectIterator; using vt::vrt::collection::balance::DataMapType; -using ProcLoadMap = std::unordered_map; -using ProcSubphaseLoadMap = std::unordered_map; -using ProcCommMap = std::unordered_map; -using UserDataMap = std::unordered_map; +using ProcLoadMap = vt::util::container::CircularPhasesBuffer; +using ProcSubphaseLoadMap = vt::util::container::CircularPhasesBuffer; +using ProcCommMap = vt::util::container::CircularPhasesBuffer; +using UserDataMap = vt::util::container::CircularPhasesBuffer; static auto num_phases = 0; diff --git a/tests/unit/collection/test_model_linear_model.nompi.cc b/tests/unit/collection/test_model_linear_model.nompi.cc index 9d4c987dd6..7357d07e16 100644 --- a/tests/unit/collection/test_model_linear_model.nompi.cc +++ b/tests/unit/collection/test_model_linear_model.nompi.cc @@ -73,9 +73,9 @@ struct StubModel : LoadModel { virtual ~StubModel() = default; void setLoads( - std::unordered_map const* proc_load, - std::unordered_map const*, - std::unordered_map const*) override { + vt::util::container::CircularPhasesBuffer const* proc_load, + vt::util::container::CircularPhasesBuffer const*, + vt::util::container::CircularPhasesBuffer const*) override { proc_load_ = proc_load; } diff --git a/tests/unit/collection/test_model_multiple_phases.nompi.cc b/tests/unit/collection/test_model_multiple_phases.nompi.cc index c6b3f85d80..c0823c26ab 100644 --- a/tests/unit/collection/test_model_multiple_phases.nompi.cc +++ b/tests/unit/collection/test_model_multiple_phases.nompi.cc @@ -71,9 +71,9 @@ struct StubModel : LoadModel { virtual ~StubModel() = default; void setLoads( - std::unordered_map const* proc_load, - std::unordered_map const*, - std::unordered_map const*) override { + vt::util::container::CircularPhasesBuffer const* proc_load, + vt::util::container::CircularPhasesBuffer const*, + vt::util::container::CircularPhasesBuffer const*) override { proc_load_ = proc_load; } diff --git a/tests/unit/collection/test_model_naive_persistence.nompi.cc b/tests/unit/collection/test_model_naive_persistence.nompi.cc index f3f57f4c87..dd1b68a1fb 100644 --- a/tests/unit/collection/test_model_naive_persistence.nompi.cc +++ b/tests/unit/collection/test_model_naive_persistence.nompi.cc @@ -75,9 +75,9 @@ struct StubModel : LoadModel { virtual ~StubModel() = default; void setLoads( - std::unordered_map const* proc_load, - std::unordered_map const*, - std::unordered_map const*) override { + vt::util::container::CircularPhasesBuffer const* proc_load, + vt::util::container::CircularPhasesBuffer const*, + vt::util::container::CircularPhasesBuffer const*) override { proc_load_ = proc_load; } diff --git a/tests/unit/collection/test_model_norm.nompi.cc b/tests/unit/collection/test_model_norm.nompi.cc index 1185323c2e..c57ca94151 100644 --- a/tests/unit/collection/test_model_norm.nompi.cc +++ b/tests/unit/collection/test_model_norm.nompi.cc @@ -66,10 +66,10 @@ using vt::vrt::collection::balance::SubphaseLoadMapType; using vt::vrt::collection::balance::LoadMapObjectIterator; using vt::vrt::collection::balance::DataMapType; -using ProcLoadMap = std::unordered_map; -using ProcSubphaseLoadMap = std::unordered_map; -using ProcCommMap = std::unordered_map; -using UserDataMap = std::unordered_map; +using ProcLoadMap = vt::util::container::CircularPhasesBuffer; +using ProcSubphaseLoadMap = vt::util::container::CircularPhasesBuffer; +using ProcCommMap = vt::util::container::CircularPhasesBuffer; +using UserDataMap = vt::util::container::CircularPhasesBuffer; constexpr auto num_subphases = 3; diff --git a/tests/unit/collection/test_model_persistence_median_last_n.nompi.cc b/tests/unit/collection/test_model_persistence_median_last_n.nompi.cc index ec97f5f30a..76438bbf30 100644 --- a/tests/unit/collection/test_model_persistence_median_last_n.nompi.cc +++ b/tests/unit/collection/test_model_persistence_median_last_n.nompi.cc @@ -73,9 +73,9 @@ struct StubModel : LoadModel { virtual ~StubModel() = default; void setLoads( - std::unordered_map const* proc_load, - std::unordered_map const*, - std::unordered_map const*) override { + vt::util::container::CircularPhasesBuffer const* proc_load, + vt::util::container::CircularPhasesBuffer const*, + vt::util::container::CircularPhasesBuffer const*) override { proc_load_ = proc_load; } diff --git a/tests/unit/collection/test_model_raw_data.nompi.cc b/tests/unit/collection/test_model_raw_data.nompi.cc index 3c0f73801f..29606dd91b 100644 --- a/tests/unit/collection/test_model_raw_data.nompi.cc +++ b/tests/unit/collection/test_model_raw_data.nompi.cc @@ -70,7 +70,7 @@ TEST_F(TestRawData, test_model_raw_data_scalar) { auto test_model = std::make_shared(); - std::unordered_map proc_loads; + vt::util::container::CircularPhasesBuffer proc_loads; test_model->setLoads(&proc_loads, nullptr, nullptr); EXPECT_TRUE(test_model->hasRawLoad()); EXPECT_FALSE(test_model->hasUserData()); // because passed a nullptr @@ -129,8 +129,8 @@ TEST_F(TestRawData, test_model_raw_user_data) { auto test_model = std::make_shared(); - std::unordered_map proc_loads; - std::unordered_map user_data; + vt::util::container::CircularPhasesBuffer proc_loads; + vt::util::container::CircularPhasesBuffer user_data; test_model->setLoads(&proc_loads, nullptr, &user_data); EXPECT_TRUE(test_model->hasRawLoad()); EXPECT_TRUE(test_model->hasUserData()); diff --git a/tests/unit/collection/test_model_select_subphases.nompi.cc b/tests/unit/collection/test_model_select_subphases.nompi.cc index ec2ee0ec5a..699cc54419 100644 --- a/tests/unit/collection/test_model_select_subphases.nompi.cc +++ b/tests/unit/collection/test_model_select_subphases.nompi.cc @@ -65,10 +65,10 @@ using vt::vrt::collection::balance::SubphaseLoadMapType; using vt::vrt::collection::balance::LoadMapObjectIterator; using vt::vrt::collection::balance::DataMapType; -using ProcLoadMap = std::unordered_map; -using ProcSubphaseLoadMap = std::unordered_map; -using ProcCommMap = std::unordered_map; -using UserDataMap = std::unordered_map; +using ProcLoadMap = vt::util::container::CircularPhasesBuffer; +using ProcSubphaseLoadMap = vt::util::container::CircularPhasesBuffer; +using ProcCommMap = vt::util::container::CircularPhasesBuffer; +using UserDataMap = vt::util::container::CircularPhasesBuffer; constexpr auto num_subphases = 3; diff --git a/tests/unit/collection/test_model_weighted_communication_volume.nompi.cc b/tests/unit/collection/test_model_weighted_communication_volume.nompi.cc index 0f94cf7c62..aa0994ca0d 100644 --- a/tests/unit/collection/test_model_weighted_communication_volume.nompi.cc +++ b/tests/unit/collection/test_model_weighted_communication_volume.nompi.cc @@ -69,9 +69,9 @@ using vt::vrt::collection::balance::PhaseOffset; using vt::vrt::collection::balance::LoadMapObjectIterator; using vt::vrt::collection::balance::DataMapType; -using ProcLoadMap = std::unordered_map; -using ProcCommMap = std::unordered_map; -using UserDataMap = std::unordered_map; +using ProcLoadMap = vt::util::container::CircularPhasesBuffer; +using ProcCommMap = vt::util::container::CircularPhasesBuffer; +using UserDataMap = vt::util::container::CircularPhasesBuffer; static auto num_phases = 0; diff --git a/tests/unit/collection/test_model_weighted_messages.nompi.cc b/tests/unit/collection/test_model_weighted_messages.nompi.cc index 50527bf86e..2ea4c2d35c 100644 --- a/tests/unit/collection/test_model_weighted_messages.nompi.cc +++ b/tests/unit/collection/test_model_weighted_messages.nompi.cc @@ -67,9 +67,9 @@ using vt::vrt::collection::balance::PhaseOffset; using vt::vrt::collection::balance::LoadMapObjectIterator; using vt::vrt::collection::balance::DataMapType; -using ProcLoadMap = std::unordered_map; -using ProcCommMap = std::unordered_map; -using UserDataMap = std::unordered_map; +using ProcLoadMap = vt::util::container::CircularPhasesBuffer; +using ProcCommMap = vt::util::container::CircularPhasesBuffer; +using UserDataMap = vt::util::container::CircularPhasesBuffer; static auto num_phases = 0; diff --git a/tests/unit/lb/test_offlinelb.cc b/tests/unit/lb/test_offlinelb.cc index 912d59a47a..814d6f3d83 100644 --- a/tests/unit/lb/test_offlinelb.cc +++ b/tests/unit/lb/test_offlinelb.cc @@ -112,7 +112,7 @@ TEST_F(TestOfflineLB, test_offlinelb_1) { LBDataHolder dh(num_phases); for (PhaseType i = 0; i < num_phases; i++) { for (auto&& elm : ids[i]) { - (*dh.node_data_[i])[elm] = LoadSummary{3}; + dh.node_data_[i][elm] = LoadSummary{3}; } }