Skip to content

Commit

Permalink
#1672: use theNodeLBData where necessary
Browse files Browse the repository at this point in the history
  • Loading branch information
cz4rs committed May 30, 2022
1 parent 730d050 commit 8be2e96
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/vt/vrt/collection/balance/baselb/baselb.cc
Original file line number Diff line number Diff line change
Expand Up @@ -263,7 +263,7 @@ void BaseLB::finalize(CountMsg* msg) {

void BaseLB::recvSharedEdges(CommMsg* msg) {
auto phase = thePhase()->getCurrentPhase();
auto comm_map = theNodeStats()->getNodeComm(phase);
auto comm_map = theNodeLBData()->getNodeComm(phase);

if (comm_map != nullptr) {
auto& comm = msg->comm_;
Expand Down
4 changes: 2 additions & 2 deletions src/vt/vrt/collection/balance/lb_invoke/lb_manager.cc
Original file line number Diff line number Diff line change
Expand Up @@ -732,8 +732,8 @@ void makeGraphSymmetric(
PhaseType phase, objgroup::proxy::Proxy<lb::BaseLB> proxy
) {
auto const this_node = theContext()->getNode();
auto iter = theNodeStats()->getNodeComm()->find(phase);
if (iter == theNodeStats()->getNodeComm()->end()) {
auto iter = theNodeLBData()->getNodeComm()->find(phase);
if (iter == theNodeLBData()->getNodeComm()->end()) {
return;
}

Expand Down
5 changes: 3 additions & 2 deletions tests/unit/collection/test_lb.extended.cc
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@

#include "vt/vrt/collection/manager.h"
#include "vt/vrt/collection/balance/lb_data_holder.h"
#include "vt/vrt/collection/balance/node_lb_data.h"
#include "vt/vrt/collection/balance/lb_invoke/lb_manager.h"
#include "vt/utils/json/json_reader.h"
#include "vt/utils/json/json_appender.h"
Expand Down Expand Up @@ -163,8 +164,8 @@ TEST_F(TestLoadBalancerOther, test_make_graph_symmetric) {
// );

auto phase = num_phases - 1;
auto iter = theNodeStats()->getNodeComm()->find(phase);
ASSERT_NE(iter, theNodeStats()->getNodeComm()->end());
auto iter = theNodeLBData()->getNodeComm()->find(phase);
ASSERT_NE(iter, theNodeLBData()->getNodeComm()->end());

elm::CommMapType const& comm_data = iter->second;

Expand Down

0 comments on commit 8be2e96

Please sign in to comment.