Skip to content

Commit

Permalink
#1934: Update changes after rebasing on develop
Browse files Browse the repository at this point in the history
  • Loading branch information
thearusable committed Oct 19, 2023
1 parent 142fc3f commit a764621
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 6 deletions.
2 changes: 1 addition & 1 deletion src/vt/vrt/collection/balance/lb_data_holder.h
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ struct LBDataHolder {
ElementIDStruct, std::shared_ptr<nlohmann::json>
>> user_defined_json_;
/// User-defined data from each phase for LB
std::unordered_map<PhaseType, DataMapType> user_defined_lb_info_;
std::map<PhaseType, DataMapType> user_defined_lb_info_;
/// Node indices for each ID along with the proxy ID
std::unordered_map<ElementIDStruct, std::tuple<VirtualProxyType, std::vector<uint64_t>>> node_idx_;
/// Map from id to objgroup proxy
Expand Down
2 changes: 1 addition & 1 deletion src/vt/vrt/collection/balance/model/comm_overhead.h
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ struct CommOverhead : public ComposedModel {
LoadType getModeledLoad(ElementIDStruct object, PhaseOffset when) const override;

private:
std::unordered_map<PhaseType, CommMapType> const* proc_comm_; /**< Underlying comm data */
std::map<PhaseType, CommMapType> const* proc_comm_; /**< Underlying comm data */
LoadType per_msg_weight_ = 0.001; /**< Cost per message */
LoadType per_byte_weight_ = 0.000001; /**< Cost per bytes */
}; // class CommOverhead
Expand Down
6 changes: 4 additions & 2 deletions src/vt/vrt/collection/balance/node_lb_data.cc
Original file line number Diff line number Diff line change
Expand Up @@ -98,12 +98,12 @@ NodeLBData::getNodeLoad() const {
return &lb_data_->node_data_;
}

std::unordered_map<PhaseType, DataMapType> const*
std::map<PhaseType, DataMapType> const*
NodeLBData::getUserData() const {
return &lb_data_->user_defined_lb_info_;
}

std::unordered_map<PhaseType, CommMapType> const* NodeLBData::getNodeComm() const {
std::map<PhaseType, CommMapType> const* NodeLBData::getNodeComm() const {
return &lb_data_->node_comm_;
}

Expand All @@ -127,6 +127,7 @@ void NodeLBData::startIterCleanup(PhaseType phase) {
lb_data_->node_data_.erase(phase - min_hist_lb_data_);
lb_data_->node_comm_.erase(phase - min_hist_lb_data_);
lb_data_->node_subphase_comm_.erase(phase - min_hist_lb_data_);
lb_data_->user_defined_lb_info_.erase(phase - min_hist_lb_data_);
lb_data_->user_defined_json_.erase(phase - min_hist_lb_data_);
}

Expand All @@ -147,6 +148,7 @@ void NodeLBData::trimLBDataHistory() {
trim_data(lb_data_->node_data_);
trim_data(lb_data_->node_comm_);
trim_data(lb_data_->node_subphase_comm_);
trim_data(lb_data_->user_defined_lb_info_);
trim_data(lb_data_->user_defined_json_);

NodeLBData::node_migrate_.clear();
Expand Down
2 changes: 1 addition & 1 deletion src/vt/vrt/collection/balance/node_lb_data.h
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@ struct NodeLBData : runtime::component::Component<NodeLBData> {
*
* \return an observer pointer to the user-defined LB data
*/
std::unordered_map<PhaseType, DataMapType> const* getUserData() const;
std::map<PhaseType, DataMapType> const* getUserData() const;

/**
* \internal \brief Get stored object comm data for a specific phase
Expand Down
2 changes: 1 addition & 1 deletion tests/unit/collection/test_model_linear_model.nompi.cc
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ TEST_F(TestLinearModel, test_model_linear_model_1) {

// For linear regression there needs to be at least 2 phases completed
// so we begin with 1 phase already done
std::unordered_map<PhaseType, LoadMapType> proc_loads{{0, LoadMapType{
std::map<PhaseType, LoadMapType> proc_loads{{0, LoadMapType{
{ElementIDStruct{1,this_node}, {LoadType{10}, {}}},
{ElementIDStruct{2,this_node}, {LoadType{40}, {}}}
}}};
Expand Down

0 comments on commit a764621

Please sign in to comment.