Skip to content

Commit

Permalink
#2201: replay: set the actual LBData structure so user-defined fields…
Browse files Browse the repository at this point in the history
… are passed to LB
  • Loading branch information
lifflander committed Nov 29, 2023
1 parent 9789a48 commit 7f051f8
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 0 deletions.
12 changes: 12 additions & 0 deletions src/vt/vrt/collection/balance/node_lb_data.h
Original file line number Diff line number Diff line change
Expand Up @@ -256,6 +256,18 @@ struct NodeLBData : runtime::component::Component<NodeLBData> {
*/
LBDataHolder* getLBData() { return lb_data_.get(); }

/**
* \brief Set the LB data
*
* \note Used for replay
* \warning Squashes all the existing data!
*
* \param[in] lb_data LB data to override
*/
void setLBData(LBDataHolder const& lb_data) {
lb_data_ = std::make_unique<LBDataHolder>(lb_data);
}

template <typename SerializerT>
void serialize(SerializerT& s) {
s | proxy_
Expand Down
1 change: 1 addition & 0 deletions src/vt/vrt/collection/balance/workload_replay.cc
Original file line number Diff line number Diff line change
Expand Up @@ -222,6 +222,7 @@ void replayWorkloads(
auto cb = theCB()->makeFunc<ReassignmentMsg>(
vt::pipe::LifetimeEnum::Once, postLBWork
);
theNodeLBData()->setLBData(*workloads.get());
theLBManager()->selectStartLB(phase, cb);
});
runInEpochCollective("WorkloadReplayDriver -> destroyLB", [&] {
Expand Down

0 comments on commit 7f051f8

Please sign in to comment.