Skip to content

Commit

Permalink
fix #1
Browse files Browse the repository at this point in the history
1. Enable ucx_perf test to testiov's
2. Fix uninitialized ep: callback ep_mem_reg_nc wasn't initialized
causing data type registration to fail
  • Loading branch information
artpol84 committed Jan 2, 2018
1 parent db9a466 commit 7d12cab
Showing 1 changed file with 25 additions and 2 deletions.
27 changes: 25 additions & 2 deletions src/tools/perf/ucp_tests.cc
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,8 @@ class ucp_perf_test_runner {
if (UCP_PERF_DATATYPE_IOV == datatype) {
*buffer_p = iov;
*length = m_perf.params.msg_size_cnt;
type = ucp_dt_make_iov();
/* WARNING: debugging code, test iov reusable code */
type = ucp_dt_make_iov_reusable();
}
}
return type;
Expand Down Expand Up @@ -122,6 +123,16 @@ class ucp_perf_test_runner {
request = ucp_tag_send_sync_nb(ep, buffer, length, datatype, TAG,
(ucp_send_callback_t)ucs_empty_function);
} else {
/* WARNING: debug code */
static int wired_up = false;
if(!wired_up) {
int tmp;
/* send the first empty message to wireup the connection */
request = ucp_tag_send_nb(ep, &tmp, sizeof(tmp), ucp_dt_make_contig(1), TAG + 1,
(ucp_send_callback_t)ucs_empty_function);
wait(request, true);
}
/* normal send flow */
request = ucp_tag_send_nb(ep, buffer, length, datatype, TAG,
(ucp_send_callback_t)ucs_empty_function);
}
Expand Down Expand Up @@ -177,10 +188,22 @@ class ucp_perf_test_runner {

/* coverity[switch_selector_expr_is_constant] */
switch (CMD) {
case UCX_PERF_CMD_TAG:
case UCX_PERF_CMD_TAG: {
/* WARNING: debugging code! */
static bool wired_up = false;
if(!wired_up) {
int tmp;
/* send the first empty message to wireup the connection */
request = ucp_tag_recv_nb(worker, &tmp, sizeof(tmp), ucp_dt_make_contig(1), TAG + 1, TAG_MASK,
(ucp_tag_recv_callback_t)ucs_empty_function);
wait(request, true);
}

/* normal message receive flow */
request = ucp_tag_recv_nb(worker, buffer, length, datatype, TAG, TAG_MASK,
(ucp_tag_recv_callback_t)ucs_empty_function);
return wait(request, false);
}
case UCX_PERF_CMD_PUT:
/* coverity[switch_selector_expr_is_constant] */
switch (TYPE) {
Expand Down

0 comments on commit 7d12cab

Please sign in to comment.