Skip to content

Commit

Permalink
#1328: Fix failing tests on single rank, where enqueued Runnables wou…
Browse files Browse the repository at this point in the history
…ld not produce to collective epoch resulting in premature epoch termination
  • Loading branch information
JacobDomagala committed Mar 29, 2021
1 parent 47470a8 commit cf18bb0
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion src/vt/collective/reduce/reduce.impl.h
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ void Reduce::reduceRootRecv(MsgT* msg) {

auto m = promoteMsg(msg);
runnable::makeRunnable(m, false, handler, from_node)
.withTDEpochFromMsg()
.withTDEpoch(theMsg()->getEpoch())
.run();
}

Expand Down
2 changes: 1 addition & 1 deletion src/vt/pipe/callback/handler_send/callback_send.impl.h
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ CallbackSend<MsgT>::triggerDispatch(SignalDataType* data, PipeType const& pid) {
auto msg = reinterpret_cast<ShortMessage*>(data);
auto m = promoteMsg(msg);
runnable::makeRunnable(m, true, handler_, this_node)
.withTDEpochFromMsg()
.withTDEpoch(theMsg()->getEpoch())
.enqueue();
} else {
theMsg()->sendMsg<SignalDataType>(send_node_, handler_, data);
Expand Down
2 changes: 1 addition & 1 deletion src/vt/pipe/callback/handler_send/callback_send_tl.impl.h
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ void CallbackSendTypeless::trigger(MsgT* msg, PipeType const& pipe) {
auto pmsg = promoteMsg(msg);
if (this_node == send_node_) {
runnable::makeRunnable(pmsg, true, handler_, this_node)
.withTDEpochFromMsg()
.withTDEpoch(theMsg()->getEpoch())
.enqueue();
} else {
theMsg()->sendMsg<MsgT>(send_node_, handler_, pmsg);
Expand Down
6 changes: 3 additions & 3 deletions tests/unit/pipe/test_callback_send.cc
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ TEST_F(TestCallbackSend, test_callback_send_1) {

called = 0;

runInEpochCollective([this_node]{
runInEpochRooted([this_node]{
auto cb = theCB()->makeSend<DataMsg, callbackFn>(this_node);
cb.send(1, 2, 3);
});
Expand All @@ -126,7 +126,7 @@ TEST_F(TestCallbackSend, test_callback_send_2) {
auto const& this_node = theContext()->getNode();
called = 0;

runInEpochCollective([this_node]{
runInEpochRooted([this_node]{
auto cb = theCB()->makeSend<CallbackFunctor>(this_node);
cb.send(1, 2, 3);
});
Expand All @@ -138,7 +138,7 @@ TEST_F(TestCallbackSend, test_callback_send_3) {
auto const& this_node = theContext()->getNode();
called = 0;

runInEpochCollective([this_node]{
runInEpochRooted([this_node]{
auto cb = theCB()->makeSend<CallbackFunctorEmpty>(this_node);
cb.send();
});
Expand Down

0 comments on commit cf18bb0

Please sign in to comment.