Skip to content

Commit

Permalink
#2074: Add checks in sparse handler
Browse files Browse the repository at this point in the history
  • Loading branch information
thearusable committed Jun 5, 2023
1 parent 2f78471 commit 044d7c4
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions tests/unit/lb/test_offlinelb.cc
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,15 @@ struct SimCol : vt::Collection<SimCol, vt::Index1D> {
}

void sparseHandler(Msg* m){
auto const this_node = theContext()->getNode();
auto const num_nodes = theContext()->getNumNodes();
auto const next_node = (this_node + 1) % num_nodes;
vt_debug_print(terse, lb, "sparseHandler: idx={}: elm={}\n", getIndex(), getElmID());
if (m->iter == 0 or m->iter == 1) {
EXPECT_EQ(getIndex().x() / 2, this_node);
} else if (m->iter == 2 or m->iter == 3 or m->iter == 4 or m->iter == 5 or m->iter == 6) {
EXPECT_EQ(getIndex().x() / 2, next_node);
}
}
};

Expand Down

0 comments on commit 044d7c4

Please sign in to comment.