As suggested by Jeff, checking if dynamic SL support
was explicitly requested. If it was, but opensm-devel package is not found, warn and abort. Otherwise, doing the best effort: if opensm-devel found, enable dynamic SL. If it's not found, disable dynamic SL and build OMPI w/o it. This commit was SVN r24852.
Этот коммит содержится в:
родитель
5e6919b4e1
Коммит
3e43b21d41
@ -162,14 +162,14 @@ dnl [enable_openib_ibcm="$enableval"], [enable_openib_ibc
|
||||
[AC_HELP_STRING([--enable-openib-dynamic-sl],
|
||||
[Enable openib BTL to query Subnet Manager for IB SL (default: enabled)])],
|
||||
[enable_openib_dynamic_sl="$enableval"],
|
||||
[enable_openib_dynamic_sl="yes"])
|
||||
[enable_openib_dynamic_sl="not_provided"])
|
||||
|
||||
# Set these up so that we can do an AC_DEFINE below
|
||||
# (unconditionally)
|
||||
$1_have_xrc=0
|
||||
$1_have_rdmacm=0
|
||||
$1_have_ibcm=0
|
||||
$1_have_dynamic_sl=0
|
||||
$1_have_opensm_devel=0
|
||||
|
||||
# If we have the openib stuff available, find out what we've got
|
||||
AS_IF([test "$ompi_check_openib_happy" = "yes"],
|
||||
@ -186,18 +186,14 @@ dnl [enable_openib_ibcm="$enableval"], [enable_openib_ibc
|
||||
AC_CHECK_FUNCS([ibv_create_xrc_rcv_qp], [$1_have_xrc=1])
|
||||
fi
|
||||
|
||||
if test "$enable_openib_dynamic_sl" = "yes"; then
|
||||
# We need ib_types.h file, which is installed with opensm-devel
|
||||
# package. However, ib_types.h has a bad include directive,
|
||||
# which will cause AC_CHECK_HEADER to fail.
|
||||
# So instead, we will look for another file that is also
|
||||
# installed as part of opensm-devel package and included in
|
||||
# ib_types.h, but it doesn't include any other IB-related files.
|
||||
AC_CHECK_HEADER([infiniband/complib/cl_types_osd.h],
|
||||
[$1_have_dynamic_sl=1],
|
||||
[AC_MSG_WARN([opensm-devel package not found - please install it or disable dynamic SL support with \"--disable-openib-dynamic-sl\"])],
|
||||
[])
|
||||
fi
|
||||
# We need ib_types.h file, which is installed with opensm-devel
|
||||
# package. However, ib_types.h has a bad include directive,
|
||||
# which will cause AC_CHECK_HEADER to fail.
|
||||
# So instead, we will look for another file that is also
|
||||
# installed as part of opensm-devel package and included in
|
||||
# ib_types.h, but it doesn't include any other IB-related files.
|
||||
AC_CHECK_HEADER([infiniband/complib/cl_types_osd.h],
|
||||
[$1_have_opensm_devel=1], [], [])
|
||||
|
||||
# Do we have a recent enough RDMA CM? Need to have the
|
||||
# rdma_get_peer_addr (inline) function (originally appeared
|
||||
@ -268,15 +264,20 @@ dnl fi
|
||||
AC_MSG_RESULT([no])
|
||||
fi
|
||||
|
||||
AC_MSG_CHECKING([if dynamic SL is enabled])
|
||||
AC_DEFINE_UNQUOTED([OMPI_ENABLE_DYNAMIC_SL], [$$1_have_dynamic_sl],
|
||||
[Enable features required for dynamic SL support])
|
||||
if test "1" = "$$1_have_dynamic_sl"; then
|
||||
AC_MSG_RESULT([yes])
|
||||
else
|
||||
AC_MSG_RESULT([no])
|
||||
if test "no" != "$enable_openib_dynamic_sl"; then
|
||||
# Abort if dynamic SL support was explicitly requested but opensm-devel
|
||||
# package wasn't found. Otherwise, OMPI will be built w/o dynamic SL.
|
||||
AC_MSG_CHECKING([if can use dynamic SL support])
|
||||
AS_IF([test "$$1_have_opensm_devel" = "1"],
|
||||
[AC_MSG_RESULT([yes])],
|
||||
[AC_MSG_RESULT([no])
|
||||
AS_IF([test "$enable_openib_dynamic_sl" = "yes"],
|
||||
[AC_MSG_WARN([--enable-openib-dynamic-sl was specified but the])
|
||||
AC_MSG_WARN([appropriate header files could not be found])
|
||||
AC_MSG_WARN([Please install opensm-devel if you need dynamic SL support])
|
||||
AC_MSG_ERROR([Cannot continue])])])
|
||||
fi
|
||||
|
||||
|
||||
AC_MSG_CHECKING([if OpenFabrics RDMACM support is enabled])
|
||||
AC_DEFINE_UNQUOTED([OMPI_HAVE_RDMACM], [$$1_have_rdmacm],
|
||||
[Whether RDMA CM is available or not])
|
||||
|
Загрузка…
x
Ссылка в новой задаче
Block a user