Skip to content

Commit

Permalink
#276: lb: update zoltanlb for new reduce interface
Browse files Browse the repository at this point in the history
  • Loading branch information
lifflander committed Jun 13, 2023
1 parent 59b93d6 commit c7da00b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 6 deletions.
8 changes: 3 additions & 5 deletions src/vt/vrt/collection/balance/zoltanlb/zoltanlb.cc
Original file line number Diff line number Diff line change
Expand Up @@ -336,13 +336,11 @@ void ZoltanLB::countEdges() {
total_ids
);

auto cb = theCB()->makeBcast<&ZoltanLB::reduceCount>(proxy);
auto msg = makeMessage<ReduceMsg>(total_ids);
proxy.reduce<collective::MaxOp<int>>(msg.get(),cb);
proxy.allreduce<&ZoltanLB::reduceCount, collective::MaxOp>(total_ids);
}

void ZoltanLB::reduceCount(ReduceMsg* msg) {
max_edges_per_node_ = msg->getVal();
void ZoltanLB::reduceCount(int max_edges_per_node) {
max_edges_per_node_ = max_edges_per_node;

vt_debug_print(
normal, lb,
Expand Down
2 changes: 1 addition & 1 deletion src/vt/vrt/collection/balance/zoltanlb/zoltanlb.h
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ struct ZoltanLB : BaseLB {
void combineEdges();
void countEdges();
void allocateEdges();
void reduceCount(ReduceMsg* msg);
void reduceCount(int max_edges_per_node);
void allocateShareEdgeGIDs();

void recvSharedEdges(CommMsg* msg);
Expand Down

0 comments on commit c7da00b

Please sign in to comment.