Skip to content

Commit

Permalink
#1265: tests: make more self documenting
Browse files Browse the repository at this point in the history
  • Loading branch information
nlslatt committed Feb 26, 2021
1 parent a069015 commit 029bccf
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions examples/collection/lb_tuning_driver.cc
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,8 @@ inline vt::NodeType empireMap(vt::Index2D* idx, vt::Index2D*, vt::NodeType) {
return idx->x();
}

struct Hello : vt::Collection<Hello, vt::Index2D> {
using TestMsg = vt::CollectionMessage<Hello>;
struct PlaceHolder : vt::Collection<PlaceHolder, vt::Index2D> {
using TestMsg = vt::CollectionMessage<PlaceHolder>;

void timestep(TestMsg* msg) { }
};
Expand Down Expand Up @@ -153,7 +153,7 @@ int main(int argc, char** argv) {
auto const node = vt::theContext()->getNode();

auto range = vt::Index2D(static_cast<int>(nranks), num_elms_per_rank);
auto proxy = vt::theCollection()->constructCollective<Hello,empireMap>(range);
auto proxy = vt::theCollection()->constructCollective<PlaceHolder,empireMap>(range);

auto base = vt::theLBManager()->getBaseLoadModel();
auto per_col = std::make_shared<PerCollection>(base);
Expand All @@ -171,8 +171,11 @@ int main(int argc, char** argv) {
vt::theLBManager()->setLoadModel(per_col);

for (int i = 0; i < phases_to_run; i++) {
if (node == 0)
vt_print(gen, "Simulated phase {}...\n", i + initial_phase);

// Delete this?
proxy.broadcastCollective<Hello::TestMsg, &Hello::timestep>();
proxy.broadcastCollective<PlaceHolder::TestMsg, &PlaceHolder::timestep>();

vt::thePhase()->nextPhaseCollective();
}
Expand Down

0 comments on commit 029bccf

Please sign in to comment.