1
1

Merge pull request #5344 from hoopoepg/topic/mca-common-ucx-fixed-build

MCA/COMMON/UCX: fixed build scripts
Этот коммит содержится в:
Yossi Itigin 2018-06-28 15:14:04 +03:00 коммит произвёл GitHub
родитель 304cf97ab5 624d59604b
Коммит 3a7271ef4e
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 4AEE18F83AFDEB23
4 изменённых файлов: 30 добавлений и 2 удалений

Просмотреть файл

@ -108,6 +108,9 @@ AC_DEFUN([OMPI_CHECK_UCX],[
[AC_DEFINE([HAVE_UCP_TAG_SEND_NBR],[1],
[have ucp_tag_send_nbr()])], [],
[#include <ucp/api/ucp.h>])
AC_CHECK_DECLS([ucp_ep_flush_nb, ucp_worker_flush_nb, ucp_request_check_status],
[], [],
[#include <ucp/api/ucp.h>])
CPPFLAGS=$old_CPPFLAGS
OPAL_SUMMARY_ADD([[Transports]],[[Open UCX]],[$1],[$ompi_check_ucx_happy])])])

Просмотреть файл

@ -50,6 +50,10 @@ endif
lib@OPAL_LIB_PREFIX@mca_common_ucx_la_SOURCES = \
$(headers) $(sources)
lib@OPAL_LIB_PREFIX@mca_common_ucx_la_CFLAGS = \
$(common_ucx_CFLAGS)
lib@OPAL_LIB_PREFIX@mca_common_ucx_la_CPPFLAGS = \
$(common_ucx_CPPFLAGS)
lib@OPAL_LIB_PREFIX@mca_common_ucx_la_LDFLAGS = \
-version-info $(libmca_opal_common_ucx_so_version) \
$(common_ucx_LDFLAGS)
@ -58,6 +62,10 @@ lib@OPAL_LIB_PREFIX@mca_common_ucx_la_LIBADD = \
$(OMPI_TOP_BUILDDIR)/opal/lib@OPAL_LIB_PREFIX@open-pal.la
lib@OPAL_LIB_PREFIX@mca_common_ucx_noinst_la_SOURCES = \
$(headers) $(sources)
lib@OPAL_LIB_PREFIX@mca_common_ucx_noinst_la_CFLAGS = \
$(common_ucx_CFLAGS)
lib@OPAL_LIB_PREFIX@mca_common_ucx_noinst_la_CPPFLAGS = \
$(common_ucx_CPPFLAGS)
lib@OPAL_LIB_PREFIX@mca_common_ucx_noinst_la_LDFLAGS = \
$(common_ucx_LDFLAGS)
lib@OPAL_LIB_PREFIX@mca_common_ucx_noinst_la_LIBADD = \

Просмотреть файл

@ -33,6 +33,9 @@ ucs_status_t opal_common_ucx_wait_request(ucs_status_ptr_t request, ucp_worker_h
{
ucs_status_t status;
int i;
#if !HAVE_DECL_UCP_REQUEST_CHECK_STATUS
ucp_tag_recv_info_t info;
#endif
/* check for request completed or failed */
if (OPAL_LIKELY(UCS_OK == request)) {
@ -44,7 +47,13 @@ ucs_status_t opal_common_ucx_wait_request(ucs_status_ptr_t request, ucp_worker_h
while (1) {
/* call UCX progress */
for (i = 0; i < opal_common_ucx_progress_iterations; i++) {
if (UCS_INPROGRESS != (status = ucp_request_check_status(request))) {
if (UCS_INPROGRESS != (status =
#if HAVE_DECL_UCP_REQUEST_CHECK_STATUS
ucp_request_check_status(request)
#else
ucp_request_test(request, &info)
#endif
)) {
ucp_request_free(request);
return status;
}
@ -59,19 +68,27 @@ ucs_status_t opal_common_ucx_wait_request(ucs_status_ptr_t request, ucp_worker_h
static inline
ucs_status_t opal_common_ucx_ep_flush(ucp_ep_h ep, ucp_worker_h worker)
{
#if HAVE_DECL_UCP_EP_FLUSH_NB
ucs_status_ptr_t status;
status = ucp_ep_flush_nb(ep, 0, opal_common_ucx_empty_complete_cb);
return opal_common_ucx_wait_request(status, worker);
#else
return ucp_ep_flush(ep);
#endif
}
static inline
ucs_status_t opal_common_ucx_worker_flush(ucp_worker_h worker)
{
#if HAVE_DECL_UCP_WORKER_FLUSH_NB
ucs_status_ptr_t status;
status = ucp_worker_flush_nb(worker, 0, opal_common_ucx_empty_complete_cb);
return opal_common_ucx_wait_request(status, worker);
#else
return ucp_worker_flush(worker);
#endif
}
static inline

Просмотреть файл

@ -23,7 +23,7 @@ AC_DEFUN([MCA_opal_common_ucx_CONFIG],[
[$2])
# substitute in the things needed to build openib
# substitute in the things needed to build common_ucx
AC_SUBST([common_ucx_CFLAGS])
AC_SUBST([common_ucx_CPPFLAGS])
AC_SUBST([common_ucx_LDFLAGS])