mtl/ofi: check for FI_LOCAL_COMM+FI_REMOTE_COMM
Make sure to get an RDM provider that can provide both local and remote communication. We need this check because some providers could be selected via RXD or RXM, but can't provide local communication, for example. Add OPAL_CHECK_OFI_VERSION_GE() m4 macro to check that the Libfabric we're building against is >= a target version. Use this check in two places: 1. MTL/OFI: Make sure it is >= v1.5, because the FI_LOCAL_COMM / FI_REMOTE_COMM constants were introduced in Libfabric API v1.5. 2. BTL/usnic: It already had similar configury to check for Libfabric >= v1.1, but the usnic component was checking for >= v1.3. So update the btl/usnic configury to use the new macro and check for >= v1.3. Signed-off-by: Jeff Squyres <jsquyres@cisco.com>
Этот коммит содержится в:
родитель
dd2d7d2866
Коммит
21bc9042e1
@ -1,6 +1,6 @@
|
||||
dnl -*- shell-script -*-
|
||||
dnl
|
||||
dnl Copyright (c) 2015-2019 Cisco Systems, Inc. All rights reserved.
|
||||
dnl Copyright (c) 2015-2020 Cisco Systems, Inc. All rights reserved.
|
||||
dnl Copyright (c) 2016-2017 Los Alamos National Security, LLC. All rights
|
||||
dnl reserved.
|
||||
dnl $COPYRIGHT$
|
||||
@ -10,6 +10,45 @@ dnl
|
||||
dnl $HEADER$
|
||||
dnl
|
||||
|
||||
dnl
|
||||
dnl OPAL_CHECK_OFI_VERSION_GE
|
||||
dnl
|
||||
dnl Check that the OFI API version number is >= a specific value.
|
||||
dnl
|
||||
dnl $1: version number to compare, in the form of "major,minor"
|
||||
dnl (without quotes) -- i.e., a single token representing the
|
||||
dnl arguments to FI_VERSION()
|
||||
dnl $2: action if OFI API version is >= $1
|
||||
dnl $3: action if OFI API version is < $1
|
||||
AC_DEFUN([OPAL_CHECK_OFI_VERSION_GE],[
|
||||
OPAL_VAR_SCOPE_PUSH([opal_ofi_ver_ge_save_CPPFLAGS opal_ofi_ver_ge_happy])
|
||||
|
||||
AC_MSG_CHECKING([if OFI API version number is >= $1])
|
||||
opal_ofi_ver_ge_save_CPPFLAGS=$CPPFLAGS
|
||||
CPPFLAGS=$opal_ofi_CPPFLAGS
|
||||
|
||||
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <rdma/fabric.h>]],
|
||||
[[
|
||||
#if !defined(FI_MAJOR_VERSION)
|
||||
#error "we cannot check the version -- sad panda"
|
||||
#elif FI_VERSION_LT(FI_VERSION(FI_MAJOR_VERSION, FI_MINOR_VERSION), FI_VERSION($1))
|
||||
#error "version is too low -- nopes"
|
||||
#endif
|
||||
]])],
|
||||
[opal_ofi_ver_ge_happy=1],
|
||||
[opal_ofi_ver_ge_happy=0])
|
||||
|
||||
AS_IF([test $opal_ofi_ver_ge_happy -eq 1],
|
||||
[AC_MSG_RESULT([yes])
|
||||
$2],
|
||||
[AC_MSG_RESULT([no])
|
||||
$3])
|
||||
|
||||
CPPFLAGS=$opal_ofi_ver_ge_save_CPPFLAGS
|
||||
|
||||
OPAL_VAR_SCOPE_POP
|
||||
])dnl
|
||||
|
||||
dnl
|
||||
dnl _OPAL_CHECK_OFI
|
||||
dnl --------------------------------------------------------
|
||||
|
@ -2,7 +2,7 @@
|
||||
#
|
||||
# Copyright (c) 2013-2014 Intel, Inc. All rights reserved
|
||||
#
|
||||
# Copyright (c) 2014-2019 Cisco Systems, Inc. All rights reserved
|
||||
# Copyright (c) 2014-2020 Cisco Systems, Inc. All rights reserved
|
||||
# Copyright (c) 2017 Los Alamos National Security, LLC. All rights
|
||||
# reserved.
|
||||
# $COPYRIGHT$
|
||||
@ -28,6 +28,12 @@ AC_DEFUN([MCA_ompi_mtl_ofi_CONFIG],[
|
||||
# Check for OFI
|
||||
OPAL_CHECK_OFI
|
||||
|
||||
# The OFI MTL requires at least OFI libfabric v1.5.
|
||||
AS_IF([test "$opal_ofi_happy" = "yes"],
|
||||
[OPAL_CHECK_OFI_VERSION_GE([1,5],
|
||||
[],
|
||||
[opal_ofi_happy=no])])
|
||||
|
||||
AS_IF([test "$opal_ofi_happy" = "yes"],
|
||||
[$1],
|
||||
[$2])
|
||||
|
@ -647,9 +647,11 @@ ompi_mtl_ofi_component_init(bool enable_progress_threads,
|
||||
__FILE__, __LINE__);
|
||||
goto error;
|
||||
}
|
||||
/* Make sure to get a RDM provider that can do the tagged matching
|
||||
interface and local communication and remote communication. */
|
||||
hints->mode = FI_CONTEXT;
|
||||
hints->ep_attr->type = FI_EP_RDM; /* Reliable datagram */
|
||||
hints->caps = FI_TAGGED; /* Tag matching interface */
|
||||
hints->ep_attr->type = FI_EP_RDM;
|
||||
hints->caps = FI_TAGGED | FI_LOCAL_COMM | FI_REMOTE_COMM;
|
||||
hints->tx_attr->msg_order = FI_ORDER_SAS;
|
||||
hints->rx_attr->msg_order = FI_ORDER_SAS;
|
||||
hints->rx_attr->op_flags = FI_COMPLETION;
|
||||
@ -697,8 +699,13 @@ ompi_mtl_ofi_component_init(bool enable_progress_threads,
|
||||
* FI_VERSION provides binary backward and forward compatibility support
|
||||
* Specify the version of OFI is coded to, the provider will select struct
|
||||
* layouts that are compatible with this version.
|
||||
*
|
||||
* Note: API version 1.5 is the first version that supports
|
||||
* FI_LOCAL_COMM / FI_REMOTE_COMM checking (and we definitely need
|
||||
* that checking -- e.g., some providers are suitable for RXD or
|
||||
* RXM, but can't provide local communication).
|
||||
*/
|
||||
fi_version = FI_VERSION(1, 0);
|
||||
fi_version = FI_VERSION(1, 5);
|
||||
|
||||
/**
|
||||
* fi_getinfo: returns information about fabric services for reaching a
|
||||
|
@ -12,7 +12,7 @@
|
||||
# All rights reserved.
|
||||
# Copyright (c) 2006 Sandia National Laboratories. All rights
|
||||
# reserved.
|
||||
# Copyright (c) 2010-2019 Cisco Systems, Inc. All rights reserved
|
||||
# Copyright (c) 2010-2020 Cisco Systems, Inc. All rights reserved
|
||||
# Copyright (c) 2017 Los Alamos National Security, LLC. All rights
|
||||
# reserved.
|
||||
# $COPYRIGHT$
|
||||
@ -100,25 +100,11 @@ AC_DEFUN([_OPAL_BTL_USNIC_DO_CONFIG],[
|
||||
OPAL_CHECK_OFI
|
||||
opal_btl_usnic_happy=$opal_ofi_happy])
|
||||
|
||||
# The usnic BTL requires at least OFI libfabric v1.1 (there was a
|
||||
# critical bug in libfabric v1.0).
|
||||
# The usnic BTL requires at least OFI libfabric v1.3.
|
||||
AS_IF([test "$opal_btl_usnic_happy" = "yes"],
|
||||
[AC_MSG_CHECKING([whether OFI libfabric is >= v1.1])
|
||||
opal_btl_usnic_CPPFLAGS_save=$CPPFLAGS
|
||||
CPPFLAGS="$opal_ofi_CPPFLAGS $CPPFLAGS"
|
||||
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <rdma/fabric.h>]],
|
||||
[[
|
||||
#if !defined(FI_MAJOR_VERSION)
|
||||
#error your version of OFI libfabric is too old
|
||||
#elif FI_VERSION(FI_MAJOR_VERSION, FI_MINOR_VERSION) < FI_VERSION(1, 1)
|
||||
#error your version of OFI libfabric is too old
|
||||
#endif
|
||||
]])],
|
||||
[opal_btl_usnic_happy=yes],
|
||||
[opal_btl_usnic_happy=no])
|
||||
AC_MSG_RESULT([$opal_btl_usnic_happy])
|
||||
CPPFLAGS=$opal_btl_usnic_CPPFLAGS_save
|
||||
])
|
||||
[OPAL_CHECK_OFI_VERSION_GE([1,3],
|
||||
[],
|
||||
[opal_btl_usnic_happy=no])])
|
||||
|
||||
# Make sure we can find the OFI libfabric usnic extensions header
|
||||
AS_IF([test "$opal_btl_usnic_happy" = "yes" ],
|
||||
|
Загрузка…
x
Ссылка в новой задаче
Block a user