Skip to content

Commit

Permalink
#883: active: Remove the warn when sending data to current node
Browse files Browse the repository at this point in the history
  • Loading branch information
JacobDomagala committed Feb 23, 2021
1 parent 441d45b commit 767492d
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 14 deletions.
14 changes: 6 additions & 8 deletions src/vt/messaging/active.cc
Original file line number Diff line number Diff line change
Expand Up @@ -186,6 +186,7 @@ EventType ActiveMessenger::sendMsgBytesWithPut(
auto const& is_term = envelopeIsTerm(msg->env);
auto const& is_put = envelopeIsPut(msg->env);
auto const& is_put_packed = envelopeIsPackedPutType(msg->env);
auto const& is_bcast = envelopeIsBcast(msg->env);

if (!is_term || vt_check_enabled(print_term_msgs)) {
vt_debug_print(
Expand All @@ -195,6 +196,11 @@ EventType ActiveMessenger::sendMsgBytesWithPut(
);
}

vtWarnIf(
!(dest != theContext()->getNode() || is_bcast),
"Destination {} should != this node"
);

MsgSizeType new_msg_size = msg_size;

if (is_put && !is_put_packed) {
Expand Down Expand Up @@ -388,10 +394,6 @@ EventType ActiveMessenger::sendMsgBytes(
);
}

vtWarnIf(
!(dest != theContext()->getNode() || is_bcast),
"Destination {} should != this node"
);
vtAbortIf(
dest >= theContext()->getNumNodes() || dest < 0, "Invalid destination: {}"
);
Expand Down Expand Up @@ -520,10 +522,6 @@ SendInfo ActiveMessenger::sendData(
data_ptr, num_bytes, dest, tag, send_tag
);

vtWarnIf(
dest == theContext()->getNode(),
"Destination {} should != this node"
);
vtAbortIf(
dest >= theContext()->getNumNodes() || dest < 0,
"Invalid destination: {}"
Expand Down
4 changes: 1 addition & 3 deletions tests/unit/active/test_active_bcast_put.cc
Original file line number Diff line number Diff line change
Expand Up @@ -131,9 +131,7 @@ TEST_P(TestActiveBroadcastPut, test_type_safe_active_fn_bcast2) {
}
});

if (my_node != root) {
ASSERT_TRUE(handler_count == num_msg_sent);
}
ASSERT_TRUE(handler_count == num_msg_sent);
}

// Spin here so test_vec does not go out of scope before the send completes
Expand Down
4 changes: 1 addition & 3 deletions tests/unit/active/test_active_broadcast.cc
Original file line number Diff line number Diff line change
Expand Up @@ -109,9 +109,7 @@ TEST_P(TestActiveBroadcast, test_type_safe_active_fn_bcast2) {
}
});

if (my_node != root) {
ASSERT_TRUE(handler_count == num_msg_sent);
}
ASSERT_TRUE(handler_count == num_msg_sent);
}
}

Expand Down

0 comments on commit 767492d

Please sign in to comment.