From 51e4bff9e1983728b598467082380a157139acc8 Mon Sep 17 00:00:00 2001 From: Artem Polyakov Date: Fri, 30 Jun 2017 01:59:30 +0300 Subject: [PATCH] ucx: fix latency test as per https://github.com/openucx/ucx/issues/1492 --- ucx/latency/ucp_latency.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/ucx/latency/ucp_latency.c b/ucx/latency/ucp_latency.c index 4cf8a1f..77ad758 100644 --- a/ucx/latency/ucp_latency.c +++ b/ucx/latency/ucp_latency.c @@ -183,6 +183,12 @@ int recv_msg(ucp_worker_h ucp_worker, ucp_ep_h server_ep) /* Following blocked methods used to polling internal file descriptor * to make CPU idle and don't spin loop */ + /* Progressing before probe to update the state */ + ucp_worker_progress(ucp_worker); + + /* Probing incoming events in non-block mode */ + msg_tag = ucp_tag_probe_nb(ucp_worker, tag, tag_mask, 1, &info_tag); + if (ucp_test_mode == TEST_MODE_WAIT) { /* Polling incoming events*/ status = ucp_worker_wait(ucp_worker); @@ -196,11 +202,6 @@ int recv_msg(ucp_worker_h ucp_worker, ucp_ep_h server_ep) } } - /* Progressing before probe to update the state */ - ucp_worker_progress(ucp_worker); - - /* Probing incoming events in non-block mode */ - msg_tag = ucp_tag_probe_nb(ucp_worker, tag, tag_mask, 1, &info_tag); } while (msg_tag == NULL); if( same_buf ) {