Bugfix for #1375.
- Adding configure options that allow to disable IB/RDMA-CM support. - Code cleanup in openib section of configure This commit was SVN r18830.
Этот коммит содержится в:
родитель
613d0f8017
Коммит
452141bfb8
@ -30,6 +30,9 @@
|
|||||||
AC_DEFUN([OMPI_CHECK_OPENIB],[
|
AC_DEFUN([OMPI_CHECK_OPENIB],[
|
||||||
OMPI_VAR_SCOPE_PUSH([$1_msg])
|
OMPI_VAR_SCOPE_PUSH([$1_msg])
|
||||||
|
|
||||||
|
#
|
||||||
|
# Openfabrics support
|
||||||
|
#
|
||||||
AC_ARG_WITH([openib],
|
AC_ARG_WITH([openib],
|
||||||
[AC_HELP_STRING([--with-openib(=DIR)],
|
[AC_HELP_STRING([--with-openib(=DIR)],
|
||||||
[Build OpenFabrics support, searching for libraries in DIR])])
|
[Build OpenFabrics support, searching for libraries in DIR])])
|
||||||
@ -37,6 +40,28 @@ AC_DEFUN([OMPI_CHECK_OPENIB],[
|
|||||||
[AC_HELP_STRING([--with-openib-libdir=DIR],
|
[AC_HELP_STRING([--with-openib-libdir=DIR],
|
||||||
[Search for OpenFabrics libraries in DIR])])
|
[Search for OpenFabrics libraries in DIR])])
|
||||||
|
|
||||||
|
#
|
||||||
|
# ConnectX XRC support
|
||||||
|
#
|
||||||
|
AC_ARG_ENABLE([connectx-xrc],
|
||||||
|
[AC_HELP_STRING([--enable-openib-connectx-xrc],
|
||||||
|
[Enable ConnectX XRC support. If you do not have InfiniBand ConnectX adapters, you may disable the ConnectX XRC support. If you do not know which InfiniBand adapter is installed on your cluster, leave this option enabled (default: enabled)])],
|
||||||
|
[enable_connectx_xrc="$enableval"], [enable_connectx_xrc="yes"])
|
||||||
|
#
|
||||||
|
# Openfabrics IBCM
|
||||||
|
#
|
||||||
|
AC_ARG_ENABLE([openib-ibcm],
|
||||||
|
[AC_HELP_STRING([--enable-openib-ibcm],
|
||||||
|
[Enable Open Fabrics IBCM support in openib BTL (default: enabled)])],
|
||||||
|
[enable_openib_ibcm="$enableval"], [enable_openib_ibcm="yes"])
|
||||||
|
#
|
||||||
|
# Openfabrics RDMACM
|
||||||
|
#
|
||||||
|
AC_ARG_ENABLE([openib-rdmacm],
|
||||||
|
[AC_HELP_STRING([--enable-openib-rdmacm],
|
||||||
|
[Enable Open Fabrics RDMACM support in openib BTL (default: enabled)])],
|
||||||
|
[enable_openib_rdmacm="$enableval"], [enable_openib_rdmacm="yes"])
|
||||||
|
|
||||||
AS_IF([test ! -z "$with_openib" -a "$with_openib" != "yes"],
|
AS_IF([test ! -z "$with_openib" -a "$with_openib" != "yes"],
|
||||||
[ompi_check_openib_dir="$with_openib"])
|
[ompi_check_openib_dir="$with_openib"])
|
||||||
AS_IF([test ! -z "$with_openib_libdir" -a "$with_openib_libdir" != "yes"],
|
AS_IF([test ! -z "$with_openib_libdir" -a "$with_openib_libdir" != "yes"],
|
||||||
@ -103,6 +128,7 @@ AC_DEFUN([OMPI_CHECK_OPENIB],[
|
|||||||
|
|
||||||
# Set these up so that we can do an AC_DEFINE below
|
# Set these up so that we can do an AC_DEFINE below
|
||||||
# (unconditionally)
|
# (unconditionally)
|
||||||
|
$1_have_xrc=0
|
||||||
$1_have_rdmacm=0
|
$1_have_rdmacm=0
|
||||||
$1_have_ibcm=0
|
$1_have_ibcm=0
|
||||||
|
|
||||||
@ -117,17 +143,20 @@ AC_DEFUN([OMPI_CHECK_OPENIB],[
|
|||||||
[#include <infiniband/verbs.h>])
|
[#include <infiniband/verbs.h>])
|
||||||
|
|
||||||
# ibv_create_xrc_rcv_qp was added in OFED 1.3
|
# ibv_create_xrc_rcv_qp was added in OFED 1.3
|
||||||
|
if test "$enable_connectx_xrc" = "yes"; then
|
||||||
AC_CHECK_FUNCS([ibv_create_xrc_rcv_qp], [$1_have_xrc=1])
|
AC_CHECK_FUNCS([ibv_create_xrc_rcv_qp], [$1_have_xrc=1])
|
||||||
|
fi
|
||||||
|
|
||||||
# Do we have a recent enough RDMA CM? Need to have the
|
# Do we have a recent enough RDMA CM? Need to have the
|
||||||
# rdma_get_peer_addr (inline) function (originally appeared
|
# rdma_get_peer_addr (inline) function (originally appeared
|
||||||
# in OFED v1.3).
|
# in OFED v1.3).
|
||||||
|
if test "$enable_openib_rdmacm" = "yes"; then
|
||||||
AC_CHECK_HEADERS([rdma/rdma_cma.h],
|
AC_CHECK_HEADERS([rdma/rdma_cma.h],
|
||||||
[AC_CHECK_LIB([rdmacm], [rdma_create_id],
|
[AC_CHECK_LIB([rdmacm], [rdma_create_id],
|
||||||
[AC_MSG_CHECKING([for rdma_get_peer_addr])
|
[AC_MSG_CHECKING([for rdma_get_peer_addr])
|
||||||
$1_msg=no
|
$1_msg=no
|
||||||
AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include "rdma/rdma_cma.h"
|
AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include "rdma/rdma_cma.h"
|
||||||
]], [[void *ret = (void*) rdma_get_peer_addr((struct rdma_cm_id*)0);]])],
|
]], [[void *ret = (void*) rdma_get_peer_addr((struct rdma_cm_id*)0);]])],
|
||||||
[$1_have_rdmacm=1
|
[$1_have_rdmacm=1
|
||||||
$1_msg=yes])
|
$1_msg=yes])
|
||||||
AC_MSG_RESULT([$$1_msg])])])
|
AC_MSG_RESULT([$$1_msg])])])
|
||||||
@ -135,22 +164,47 @@ AC_DEFUN([OMPI_CHECK_OPENIB],[
|
|||||||
if test "1" = "$$1_have_rdmacm"; then
|
if test "1" = "$$1_have_rdmacm"; then
|
||||||
$1_LIBS="-lrdmacm $$1_LIBS"
|
$1_LIBS="-lrdmacm $$1_LIBS"
|
||||||
fi
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
# Do we have IB CM? (note that OFED IB CM depends on RDMA
|
# Do we have IB CM? (note that OFED IB CM depends on RDMA
|
||||||
# CM, so no need to add it into the other-libraries
|
# CM, so no need to add it into the other-libraries
|
||||||
# argument to AC_CHECK_ LIB). Note that we only want IBCM
|
# argument to AC_CHECK_ LIB). Note that we only want IBCM
|
||||||
# starting with OFED 1.2 or so, so check for
|
# starting with OFED 1.2 or so, so check for
|
||||||
# ib_cm_open_device (introduced in libibcm 1.0/OFED 1.2).
|
# ib_cm_open_device (introduced in libibcm 1.0/OFED 1.2).
|
||||||
|
if test "$enable_openib_ibcm" = "yes"; then
|
||||||
AC_CHECK_HEADERS([infiniband/cm.h],
|
AC_CHECK_HEADERS([infiniband/cm.h],
|
||||||
[AC_CHECK_LIB([ibcm], [ib_cm_open_device],
|
[AC_CHECK_LIB([ibcm], [ib_cm_open_device],
|
||||||
[$1_have_ibcm=1
|
[$1_have_ibcm=1
|
||||||
$1_LIBS="-libcm $$1_LIBS"])])
|
$1_LIBS="-libcm $$1_LIBS"])])
|
||||||
|
fi
|
||||||
])
|
])
|
||||||
|
|
||||||
|
AC_MSG_CHECKING([if ConnectX XRC support is enabled])
|
||||||
|
AC_DEFINE_UNQUOTED([OMPI_HAVE_CONNECTX_XRC], [$$1_have_xrc],
|
||||||
|
[Enable features required for ConnectX XRC support])
|
||||||
|
if test "1" = "$$1_have_xrc"; then
|
||||||
|
AC_MSG_RESULT([yes])
|
||||||
|
else
|
||||||
|
AC_MSG_RESULT([no])
|
||||||
|
fi
|
||||||
|
|
||||||
|
AC_MSG_CHECKING([if OpenFabrics RDMACM support is enabled])
|
||||||
AC_DEFINE_UNQUOTED([OMPI_HAVE_RDMACM], [$$1_have_rdmacm],
|
AC_DEFINE_UNQUOTED([OMPI_HAVE_RDMACM], [$$1_have_rdmacm],
|
||||||
[Whether RDMA CM is available or not])
|
[Whether RDMA CM is available or not])
|
||||||
|
if test "1" = "$$1_have_rdmacm"; then
|
||||||
|
AC_MSG_RESULT([yes])
|
||||||
|
else
|
||||||
|
AC_MSG_RESULT([no])
|
||||||
|
fi
|
||||||
|
|
||||||
|
AC_MSG_CHECKING([if OpenFabrics IBCM support is enabled])
|
||||||
AC_DEFINE_UNQUOTED([OMPI_HAVE_IBCM], [$$1_have_ibcm],
|
AC_DEFINE_UNQUOTED([OMPI_HAVE_IBCM], [$$1_have_ibcm],
|
||||||
[Whether IB CM is available or not])
|
[Whether IB CM is available or not])
|
||||||
|
if test "1" = "$$1_have_ibcm"; then
|
||||||
|
AC_MSG_RESULT([yes])
|
||||||
|
else
|
||||||
|
AC_MSG_RESULT([no])
|
||||||
|
fi
|
||||||
|
|
||||||
CPPFLAGS="$ompi_check_openib_$1_save_CPPFLAGS"
|
CPPFLAGS="$ompi_check_openib_$1_save_CPPFLAGS"
|
||||||
LDFLAGS="$ompi_check_openib_$1_save_LDFLAGS"
|
LDFLAGS="$ompi_check_openib_$1_save_LDFLAGS"
|
||||||
|
@ -717,22 +717,4 @@ AC_DEFINE_UNQUOTED([OPAL_IDENT_STRING], ["$with_ident_string"],
|
|||||||
[ident string for Open MPI])
|
[ident string for Open MPI])
|
||||||
AC_MSG_RESULT([$with_ident_string])
|
AC_MSG_RESULT([$with_ident_string])
|
||||||
|
|
||||||
#
|
|
||||||
# ConnectX XRC support
|
|
||||||
#
|
|
||||||
AC_MSG_CHECKING([if ConnectX XRC support should be enabled])
|
|
||||||
AC_ARG_ENABLE([connectx-xrc],
|
|
||||||
[AC_HELP_STRING([--enable-connectx-xrc],
|
|
||||||
[Enable features required for ConnectX XRC support. If you do not have InfiniBand ConnectX adapters, you may disable the ConnectX XRC support. If you do not know which InfiniBand adapter is installed on your cluster, leave this option enabled (default: enabled)])])
|
|
||||||
if test "$enable_connectx_xrc" = "no" ; then
|
|
||||||
AC_MSG_RESULT([no])
|
|
||||||
ompi_want_connectx_xrc=0
|
|
||||||
else
|
|
||||||
AC_MSG_RESULT([yes])
|
|
||||||
ompi_want_connectx_xrc=1
|
|
||||||
fi
|
|
||||||
AC_DEFINE_UNQUOTED([OMPI_ENABLE_CONNECTX_XRC_SUPPORT],
|
|
||||||
[$ompi_want_connectx_xrc],
|
|
||||||
[Enable features required for ConnectX XRC support])
|
|
||||||
|
|
||||||
])
|
])
|
||||||
|
@ -50,7 +50,7 @@
|
|||||||
|
|
||||||
BEGIN_C_DECLS
|
BEGIN_C_DECLS
|
||||||
|
|
||||||
#define HAVE_XRC (defined(HAVE_IBV_CREATE_XRC_RCV_QP) && (1 == OMPI_ENABLE_CONNECTX_XRC_SUPPORT))
|
#define HAVE_XRC (1 == OMPI_HAVE_CONNECTX_XRC)
|
||||||
|
|
||||||
#define MCA_BTL_IB_LEAVE_PINNED 1
|
#define MCA_BTL_IB_LEAVE_PINNED 1
|
||||||
#define IB_DEFAULT_GID_PREFIX 0xfe80000000000000ll
|
#define IB_DEFAULT_GID_PREFIX 0xfe80000000000000ll
|
||||||
|
@ -22,7 +22,7 @@
|
|||||||
# MCA_btl_openib_POST_CONFIG([should_build])
|
# MCA_btl_openib_POST_CONFIG([should_build])
|
||||||
# ------------------------------------------
|
# ------------------------------------------
|
||||||
AC_DEFUN([MCA_btl_openib_POST_CONFIG], [
|
AC_DEFUN([MCA_btl_openib_POST_CONFIG], [
|
||||||
AM_CONDITIONAL([MCA_btl_openib_have_xrc], [test $1 -eq 1 -a "x$btl_openib_have_xrc" = "x1" -a "x$ompi_want_connectx_xrc" = "x1"])
|
AM_CONDITIONAL([MCA_btl_openib_have_xrc], [test $1 -eq 1 -a "x$btl_openib_have_xrc" = "x1"])
|
||||||
AM_CONDITIONAL([MCA_btl_openib_have_rdmacm], [test $1 -eq 1 -a "x$btl_openib_have_rdmacm" = "x1"])
|
AM_CONDITIONAL([MCA_btl_openib_have_rdmacm], [test $1 -eq 1 -a "x$btl_openib_have_rdmacm" = "x1"])
|
||||||
AM_CONDITIONAL([MCA_btl_openib_have_ibcm], [test $1 -eq 1 -a "x$btl_openib_have_ibcm" = "x1"])
|
AM_CONDITIONAL([MCA_btl_openib_have_ibcm], [test $1 -eq 1 -a "x$btl_openib_have_ibcm" = "x1"])
|
||||||
])
|
])
|
||||||
@ -56,13 +56,13 @@ AC_DEFUN([MCA_btl_openib_CONFIG],[
|
|||||||
|
|
||||||
|
|
||||||
AS_IF([test "$btl_openib_happy" = "yes"],
|
AS_IF([test "$btl_openib_happy" = "yes"],
|
||||||
[if test "x$btl_openib_have_xrc" = "x1" -a "x$ompi_want_connectx_xrc" = "x1"; then
|
[if test "x$btl_openib_have_xrc" = "x1"; then
|
||||||
cpcs="$cpcs xoob"
|
cpcs="$cpcs xoob"
|
||||||
fi
|
fi
|
||||||
if test "x$btl_openib_have_rdma_cm" = "x1"; then
|
if test "x$btl_openib_have_rdmacm" = "x1"; then
|
||||||
cpcs="$cpcs rdma_cm"
|
cpcs="$cpcs rdmacm"
|
||||||
fi
|
fi
|
||||||
if test "x$btl_openib_have_ib_cm" = "x1"; then
|
if test "x$btl_openib_have_ibcm" = "x1"; then
|
||||||
cpcs="$cpcs ibcm"
|
cpcs="$cpcs ibcm"
|
||||||
fi
|
fi
|
||||||
AC_MSG_CHECKING([which openib btl cpcs will be built])
|
AC_MSG_CHECKING([which openib btl cpcs will be built])
|
||||||
|
Загрузка…
Ссылка в новой задаче
Block a user