Skip to content

Commit 624d596

Browse files
author
Sergey Oblomov
committed
MCA/COMMON/UCX: minor optimization of build scripts
Signed-off-by: Sergey Oblomov <sergeyo@mellanox.com>
1 parent de8568c commit 624d596

File tree

2 files changed

+6
-15
lines changed

2 files changed

+6
-15
lines changed

config/ompi_check_ucx.m4

Lines changed: 2 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -108,17 +108,8 @@ AC_DEFUN([OMPI_CHECK_UCX],[
108108
[AC_DEFINE([HAVE_UCP_TAG_SEND_NBR],[1],
109109
[have ucp_tag_send_nbr()])], [],
110110
[#include <ucp/api/ucp.h>])
111-
AC_CHECK_DECLS([ucp_ep_flush_nb],
112-
[AC_DEFINE([HAVE_UCP_EP_FLUSH_NB],[1],
113-
[have ucp_ep_flush_nb()])], [],
114-
[#include <ucp/api/ucp.h>])
115-
AC_CHECK_DECLS([ucp_worker_flush_nb],
116-
[AC_DEFINE([HAVE_UCP_WORKER_FLUSH_NB],[1],
117-
[have ucp_worker_flush_nb()])], [],
118-
[#include <ucp/api/ucp.h>])
119-
AC_CHECK_DECLS([ucp_request_check_status],
120-
[AC_DEFINE([HAVE_UCP_REQUEST_CHECK_STATUS],[1],
121-
[have ucp_request_check_status()])], [],
111+
AC_CHECK_DECLS([ucp_ep_flush_nb, ucp_worker_flush_nb, ucp_request_check_status],
112+
[], [],
122113
[#include <ucp/api/ucp.h>])
123114
CPPFLAGS=$old_CPPFLAGS
124115

opal/mca/common/ucx/common_ucx.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ ucs_status_t opal_common_ucx_wait_request(ucs_status_ptr_t request, ucp_worker_h
3333
{
3434
ucs_status_t status;
3535
int i;
36-
#ifndef HAVE_UCP_REQUEST_CHECK_STATUS
36+
#if !HAVE_DECL_UCP_REQUEST_CHECK_STATUS
3737
ucp_tag_recv_info_t info;
3838
#endif
3939

@@ -48,7 +48,7 @@ ucs_status_t opal_common_ucx_wait_request(ucs_status_ptr_t request, ucp_worker_h
4848
/* call UCX progress */
4949
for (i = 0; i < opal_common_ucx_progress_iterations; i++) {
5050
if (UCS_INPROGRESS != (status =
51-
#if HAVE_UCP_REQUEST_CHECK_STATUS
51+
#if HAVE_DECL_UCP_REQUEST_CHECK_STATUS
5252
ucp_request_check_status(request)
5353
#else
5454
ucp_request_test(request, &info)
@@ -68,7 +68,7 @@ ucs_status_t opal_common_ucx_wait_request(ucs_status_ptr_t request, ucp_worker_h
6868
static inline
6969
ucs_status_t opal_common_ucx_ep_flush(ucp_ep_h ep, ucp_worker_h worker)
7070
{
71-
#if HAVE_UCP_EP_FLUSH_NB
71+
#if HAVE_DECL_UCP_EP_FLUSH_NB
7272
ucs_status_ptr_t status;
7373

7474
status = ucp_ep_flush_nb(ep, 0, opal_common_ucx_empty_complete_cb);
@@ -81,7 +81,7 @@ ucs_status_t opal_common_ucx_ep_flush(ucp_ep_h ep, ucp_worker_h worker)
8181
static inline
8282
ucs_status_t opal_common_ucx_worker_flush(ucp_worker_h worker)
8383
{
84-
#if HAVE_UCP_WORKER_FLUSH_NB
84+
#if HAVE_DECL_UCP_WORKER_FLUSH_NB
8585
ucs_status_ptr_t status;
8686

8787
status = ucp_worker_flush_nb(worker, 0, opal_common_ucx_empty_complete_cb);

0 commit comments

Comments
 (0)