Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit d64c8c1

Browse files
committedMar 4, 2025·
PERF: Assertion on final ack message with RNDV
1 parent a8f9138 commit d64c8c1

File tree

1 file changed

+13
-3
lines changed

1 file changed

+13
-3
lines changed
 

‎src/tools/perf/lib/ucp_tests.cc

+13-3
Original file line numberDiff line numberDiff line change
@@ -275,11 +275,21 @@ class ucp_perf_test_runner {
275275
const ucp_am_recv_param_t *rx_params)
276276
{
277277
ucs_assert(!(rx_params->recv_attr & UCP_AM_RECV_ATTR_FLAG_DATA));
278-
ucs_assert(length == ucx_perf_get_message_size(&m_perf.params));
278+
unsigned my_index = rte_call(&m_perf, group_index);
279+
if (my_index == 0) {
280+
/* Receiver may only receive payload */
281+
size_t UCS_V_UNUSED expected_length =
282+
ucx_perf_get_message_size(&m_perf.params);
283+
ucs_assertv(length == expected_length, "length=%zu, expected=%zu,"
284+
" index=%u", length, expected_length, my_index);
285+
} else if (my_index == 1) {
286+
/* Sender may only receive final ack */
287+
ucs_assertv(length == 1, "length=%zu, expected=1, index=%u", length,
288+
my_index);
289+
}
279290

280291
ucs_status_ptr_t sp = ucp_am_recv_data_nbx(m_perf.ucp.worker, data,
281-
m_am_rx_buffer,
282-
m_am_rx_length,
292+
m_am_rx_buffer, length,
283293
&m_am_rx_params);
284294
ucs_assert(UCS_PTR_IS_PTR(sp));
285295
ucp_request_release(sp);

0 commit comments

Comments
 (0)
Please sign in to comment.