Skip to content

Commit 7f051f8

Browse files
committed
#2201: replay: set the actual LBData structure so user-defined fields are passed to LB
1 parent 9789a48 commit 7f051f8

File tree

2 files changed

+13
-0
lines changed

2 files changed

+13
-0
lines changed

src/vt/vrt/collection/balance/node_lb_data.h

+12
Original file line numberDiff line numberDiff line change
@@ -256,6 +256,18 @@ struct NodeLBData : runtime::component::Component<NodeLBData> {
256256
*/
257257
LBDataHolder* getLBData() { return lb_data_.get(); }
258258

259+
/**
260+
* \brief Set the LB data
261+
*
262+
* \note Used for replay
263+
* \warning Squashes all the existing data!
264+
*
265+
* \param[in] lb_data LB data to override
266+
*/
267+
void setLBData(LBDataHolder const& lb_data) {
268+
lb_data_ = std::make_unique<LBDataHolder>(lb_data);
269+
}
270+
259271
template <typename SerializerT>
260272
void serialize(SerializerT& s) {
261273
s | proxy_

src/vt/vrt/collection/balance/workload_replay.cc

+1
Original file line numberDiff line numberDiff line change
@@ -222,6 +222,7 @@ void replayWorkloads(
222222
auto cb = theCB()->makeFunc<ReassignmentMsg>(
223223
vt::pipe::LifetimeEnum::Once, postLBWork
224224
);
225+
theNodeLBData()->setLBData(*workloads.get());
225226
theLBManager()->selectStartLB(phase, cb);
226227
});
227228
runInEpochCollective("WorkloadReplayDriver -> destroyLB", [&] {

0 commit comments

Comments
 (0)