Skip to content

Commit

Permalink
Update
Browse files Browse the repository at this point in the history
  • Loading branch information
thearusable committed Feb 8, 2023
1 parent 08d8b3d commit e69f41f
Show file tree
Hide file tree
Showing 11 changed files with 25 additions and 25 deletions.
12 changes: 6 additions & 6 deletions tests/unit/termination/test_term_chaining.cc
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ struct TestTermChaining : TestParallelHarness {

EXPECT_EQ(theContext()->getNode(), 1);
auto msg2 = makeMessage<TestMsg>();
theMsg()->sendMsg<TestMsg, test_handler_response>(0, msg2);
theMsg()->sendMsg<test_handler_response>(0, msg2);
}

static void test_handler_response(TestMsg* msg) {
Expand All @@ -96,7 +96,7 @@ struct TestTermChaining : TestParallelHarness {
EXPECT_EQ(handler_count, 12);
handler_count++;
auto msg2 = makeMessage<TestMsg>();
theMsg()->sendMsg<TestMsg, test_handler_chained>(0, msg2);
theMsg()->sendMsg<test_handler_chained>(0, msg2);
}

static void test_handler_chained(TestMsg* msg) {
Expand Down Expand Up @@ -140,7 +140,7 @@ struct TestTermChaining : TestParallelHarness {
vt::theMsg()->pushEpoch(epoch1);
auto msg = makeMessage<TestMsg>();
chain.add(
epoch1, theMsg()->sendMsg<TestMsg, test_handler_reflector>(1, msg)
epoch1, theMsg()->sendMsg<test_handler_reflector>(1, msg)
);
vt::theMsg()->popEpoch(epoch1);
vt::theTerm()->finishedEpoch(epoch1);
Expand All @@ -149,7 +149,7 @@ struct TestTermChaining : TestParallelHarness {
vt::theMsg()->pushEpoch(epoch2);
auto msg2 = makeMessage<TestMsg>();
chain.add(
epoch2, theMsg()->sendMsg<TestMsg, test_handler_chainer>(1, msg2)
epoch2, theMsg()->sendMsg<test_handler_chainer>(1, msg2)
);
vt::theMsg()->popEpoch(epoch2);
vt::theTerm()->finishedEpoch(epoch2);
Expand All @@ -165,7 +165,7 @@ struct TestTermChaining : TestParallelHarness {
vt::theMsg()->pushEpoch(epoch1);
auto msg = makeMessage<TestMsg>();
chain.add(
epoch1, theMsg()->sendMsg<TestMsg, test_handler_reflector>(1, msg.get()));
epoch1, theMsg()->sendMsg<test_handler_reflector>(1, msg.get()));
vt::theMsg()->popEpoch(epoch1);
vt::theTerm()->finishedEpoch(epoch1);
}
Expand All @@ -182,7 +182,7 @@ struct TestTermChaining : TestParallelHarness {
vt::theMsg()->pushEpoch(epoch3);
auto msg3 = makeMessage<TestMsg>();
chain.add(
epoch3, theMsg()->broadcastMsg<TestMsg, test_handler_bcast>(msg3.get()));
epoch3, theMsg()->broadcastMsg<test_handler_bcast>(msg3.get()));
vt::theMsg()->popEpoch(epoch3);
vt::theTerm()->finishedEpoch(epoch3);

Expand Down
8 changes: 4 additions & 4 deletions tests/unit/termination/test_term_cleanup.cc
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ TEST_F(TestTermCleanup, test_termination_cleanup_1) {

auto msg = makeMessage<TestMsgType>();
envelopeSetEpoch(msg->env, epoch);
theMsg()->sendMsg<TestMsgType, handler>(next, msg);
theMsg()->sendMsg<handler>(next, msg);

theTerm()->finishedEpoch(epoch);
vt::runSchedulerThrough(epoch);
Expand Down Expand Up @@ -123,17 +123,17 @@ TEST_F(TestTermCleanup, test_termination_cleanup_2) {
for (int j = 0; j < 5; j++) {
auto msg = makeMessage<TestMsgType>();
envelopeSetEpoch(msg->env, coll_epoch);
theMsg()->sendMsg<TestMsgType, handler>(next, msg);
theMsg()->sendMsg<handler>(next, msg);
}
for (int j = 0; j < 5; j++) {
auto msg = makeMessage<TestMsgType>();
envelopeSetEpoch(msg->env, root_epoch);
theMsg()->sendMsg<TestMsgType, handler>(next, msg);
theMsg()->sendMsg<handler>(next, msg);
}
for (int j = 0; j < 5; j++) {
auto msg = makeMessage<TestMsgType>();
envelopeSetEpoch(msg->env, wave_epoch);
theMsg()->sendMsg<TestMsgType, handler>(next, msg);
theMsg()->sendMsg<handler>(next, msg);
}

theTerm()->finishedEpoch(coll_epoch);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@ inline void add(vt::EpochType const& epoch, int order){
EXPECT_TRUE(channel::hasEnded(epoch));
channel::ok = true;
auto msg = vt::makeMessage<vt::Message>();
vt::theMsg()->broadcastMsg<vt::Message, &setOk>(msg);
vt::theMsg()->broadcastMsg<&setOk>(msg);
});
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ void sendMsg(vt::NodeType dst, int count, vt::EpochType ep) {
if (ep != vt::no_epoch) {
vt::envelopeSetEpoch(msg->env,ep);
}
vt::theMsg()->sendMsg<Msg,handler>(dst, msg);
vt::theMsg()->sendMsg<handler>(dst, msg);
}

// note: only for basic messages,
Expand All @@ -68,7 +68,7 @@ void broadcast(int count, vt::EpochType ep) {
if (ep != vt::no_epoch) {
vt::envelopeSetEpoch(msg->env,ep);
}
vt::theMsg()->broadcastMsg<BasicMsg,handler>(msg);
vt::theMsg()->broadcastMsg<handler>(msg);

for (auto&& active : data[ep].count_) {
auto const& dst = active.first;
Expand Down
4 changes: 2 additions & 2 deletions tests/unit/termination/test_termination_reset.cc
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ TEST_F(TestTermReset, test_termination_reset_1) {

if (this_node == 0) {
auto msg = makeMessage<TestMsg>();
theMsg()->broadcastMsg<TestMsg, test_handler>(msg);
theMsg()->broadcastMsg<test_handler>(msg);
} else if (this_node == 1) {
theTerm()->addAction([=]{
EXPECT_EQ(handler_count, 10);
Expand All @@ -89,7 +89,7 @@ TEST_F(TestTermReset, test_termination_reset_1) {

if (this_node == 1) {
auto msg = makeMessage<TestMsg>();
theMsg()->broadcastMsg<TestMsg, test_handler>(msg);
theMsg()->broadcastMsg<test_handler>(msg);
} else if (this_node == 0) {
theTerm()->addAction([=]{
EXPECT_EQ(handler_count, 10);
Expand Down
2 changes: 1 addition & 1 deletion tutorial/tutorial_1b.h
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ static inline void activeMessageNode() {
if (this_node == 0) {
NodeType const to_node = 1;
auto msg = ::vt::makeMessage<MyMsg>(29,32);
::vt::theMsg()->sendMsg<MyMsg,msgHandlerA>(to_node, msg);
::vt::theMsg()->sendMsg<msgHandlerA>(to_node, msg);
}
}

Expand Down
2 changes: 1 addition & 1 deletion tutorial/tutorial_1c.h
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ static inline void activeMessageSerialization() {
auto msg = ::vt::makeMessage<ParticleMsg>(1,2,3);
msg->particles.push_back(Particle{10,11,12});
msg->particles.push_back(Particle{13,14,15});
::vt::theMsg()->sendMsg<ParticleMsg,msgSerialA>(to_node, msg);
::vt::theMsg()->sendMsg<msgSerialA>(to_node, msg);
}
}

Expand Down
2 changes: 1 addition & 1 deletion tutorial/tutorial_1e.h
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ static inline void activeMessageGroupRoot() {
fmt::print("Group is created: id={:x}\n", group_id);
auto msg = makeMessage<MySimpleMsg>();
envelopeSetGroup(msg->env, group_id);
theMsg()->broadcastMsg<MySimpleMsg,msgHandlerGroupA>(msg);
theMsg()->broadcastMsg<msgHandlerGroupA>(msg);
});
// The `id' that is returned from the newGroup invocation, can be used
// anywhere in the system to broadcast (multicast) to this group.
Expand Down
2 changes: 1 addition & 1 deletion tutorial/tutorial_1f.h
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ static inline void activeMessageGroupCollective() {
if (my_node == 1) {
auto msg = makeMessage<MySimpleMsg2>();
envelopeSetGroup(msg->env, group_id);
theMsg()->broadcastMsg<MySimpleMsg2,msgHandlerGroupB>(msg);
theMsg()->broadcastMsg<msgHandlerGroupB>(msg);
}
}
);
Expand Down
8 changes: 4 additions & 4 deletions tutorial/tutorial_1g.h
Original file line number Diff line number Diff line change
Expand Up @@ -113,21 +113,21 @@ static inline void activeMessageCallback() {
{
auto cb = ::vt::theCB()->makeFunc(vt::pipe::LifetimeEnum::Once, void_fn);
auto msg = ::vt::makeMessage<MsgWithCallback>(cb);
::vt::theMsg()->sendMsg<MsgWithCallback,getCallbackHandler>(to_node, msg);
::vt::theMsg()->sendMsg<getCallbackHandler>(to_node, msg);
}

// Example of active message handler callback with send node
{
auto cb = ::vt::theCB()->makeSend<DataMsg,callbackHandler>(cb_node);
auto msg = ::vt::makeMessage<MsgWithCallback>(cb);
::vt::theMsg()->sendMsg<MsgWithCallback,getCallbackHandler>(to_node, msg);
::vt::theMsg()->sendMsg<getCallbackHandler>(to_node, msg);
}

// Example of active message handler callback with broadcast
{
auto cb = ::vt::theCB()->makeBcast<DataMsg,callbackBcastHandler>();
auto msg = ::vt::makeMessage<MsgWithCallback>(cb);
::vt::theMsg()->sendMsg<MsgWithCallback,getCallbackHandler>(to_node, msg);
::vt::theMsg()->sendMsg<getCallbackHandler>(to_node, msg);
}

// Example of context callback
Expand All @@ -136,7 +136,7 @@ static inline void activeMessageCallback() {
vt::pipe::LifetimeEnum::Once, &ctx, callbackCtx
);
auto msg = ::vt::makeMessage<MsgWithCallback>(cb);
::vt::theMsg()->sendMsg<MsgWithCallback,getCallbackHandler>(to_node, msg);
::vt::theMsg()->sendMsg<getCallbackHandler>(to_node, msg);
}
}
}
Expand Down
4 changes: 2 additions & 2 deletions tutorial/tutorial_3a.h
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ static inline void activeMessageTerm() {
if (this_node == 0) {
auto msg = vt::makeMessage<ExampleMsg>(8);
envelopeSetEpoch(msg->env, new_epoch);
vt::theMsg()->sendMsg<ExampleMsg,recurHandler>(this_node+1, msg);
vt::theMsg()->sendMsg<recurHandler>(this_node+1, msg);
}

// Any node that wishes to have a notification on termination for a given
Expand Down Expand Up @@ -116,7 +116,7 @@ static void recurHandler(ExampleMsg* msg) {
);

auto msg_send = vt::makeMessage<ExampleMsg>(msg->ttl);
vt::theMsg()->sendMsg<ExampleMsg,recurHandler>(next_node, msg_send);
vt::theMsg()->sendMsg<recurHandler>(next_node, msg_send);
}
}
}
Expand Down

0 comments on commit e69f41f

Please sign in to comment.