configure: add a summary section at the end of configure output
This commit adds two m4 macros: OPAL_SUMMARY_ADD, OPAL_SUMMARY_PRINT. OPAL_SUMMARY_ADD adds an item to a section in the summary. For example OPAL_SUMMARY_ADD([[Transports]],[[Foo]],...,[yes]) will add the following to the summary: Transports ----------------------- Foo: yes With this commit two sections are added: Transports, Resource Managers. The OPAL_SUMMARY_PRINT macro is called after AC_OUTPUT and prints out some information about the build (version, projects, etc) and then the summarys sections. It will additionally print a warning if internal debugging is enabled. Example output: Open MPI configuration: ----------------------- Version: 3.0.0 a1 Build Open Platform Abstration project: yes Build Open Runtime project: yes Build Open MPI project: yes Build Open SHMEM project: no MPI C++ bindings (deprecated): no MPI Fortran bindings: mpif.h, use mpi, use mpi_f08 Debug build: yes Transports ----------------------- Cray uGNI (Gemini/Aries): no Intel Omnipath (PSM2): no KNEM Shared Memory: no Linux CMA IPC: no Mellanox MXM: no Open UCX: no OpenFabrics libfabric: no OpenFabrics Verbs: no portals4: no QLogic Infinipath (PSM): no tcp: yes XPMEM Shared Memory: no Resource Managers ----------------------- Cray Alps: no Grid Engine: no LSF: no Slurm: yes Torque: yes INTERNAL DEBUGGING IS ENABLED. DO NOT USE THIS BUILD FOR PERFORMANCE MEASUREMENTS! Signed-off-by: Nathan Hjelm <hjelmn@me.com>
This commit is contained in:
parent
d6fb56af29
commit
d2f5fca82a
@ -3,6 +3,8 @@ dnl
|
||||
dnl Copyright (c) 2001-2011 Mellanox Technologies Ltd. ALL RIGHTS RESERVED.
|
||||
dnl Copyright (c) 2015 Research Organization for Information Science
|
||||
dnl and Technology (RIST). All rights reserved.
|
||||
dnl Copyright (c) 2016 Los Alamos National Security, LLC. All rights
|
||||
dnl reserved.
|
||||
dnl $COPYRIGHT$
|
||||
dnl
|
||||
dnl Additional copyrights may follow
|
||||
@ -16,51 +18,50 @@ dnl
|
||||
# LDFLAGS, LIBS} as needed and runs action-if-found if there is
|
||||
# support, otherwise executes action-if-not-found
|
||||
AC_DEFUN([OMPI_CHECK_MXM],[
|
||||
AC_ARG_WITH([mxm],
|
||||
[AC_HELP_STRING([--with-mxm(=DIR)],
|
||||
[Build Mellanox Messaging support, optionally adding
|
||||
DIR/include and DIR/lib or DIR/lib64 to the search path for headers and libraries])])
|
||||
AC_ARG_WITH([mxm-libdir],
|
||||
[AC_HELP_STRING([--with-mxm-libdir=DIR],
|
||||
[Search for Mellanox MXM libraries in DIR])])
|
||||
OPAL_CHECK_WITHDIR([mxm-libdir], [$with_mxm_libdir], [libmxm.*])
|
||||
if test -z "$ompi_check_mxm_happy" ; then
|
||||
AC_ARG_WITH([mxm],
|
||||
[AC_HELP_STRING([--with-mxm(=DIR)],
|
||||
[Build Mellanox Messaging support, optionally adding
|
||||
DIR/include and DIR/lib or DIR/lib64 to the search path for headers and libraries])])
|
||||
AC_ARG_WITH([mxm-libdir],
|
||||
[AC_HELP_STRING([--with-mxm-libdir=DIR],
|
||||
[Search for Mellanox MXM libraries in DIR])])
|
||||
OPAL_CHECK_WITHDIR([mxm-libdir], [$with_mxm_libdir], [libmxm.*])
|
||||
|
||||
ompi_check_mxm_$1_save_CPPFLAGS="$CPPFLAGS"
|
||||
ompi_check_mxm_$1_save_LDFLAGS="$LDFLAGS"
|
||||
ompi_check_mxm_$1_save_LIBS="$LIBS"
|
||||
ompi_check_mxm_$1_save_CPPFLAGS="$CPPFLAGS"
|
||||
ompi_check_mxm_$1_save_LDFLAGS="$LDFLAGS"
|
||||
ompi_check_mxm_$1_save_LIBS="$LIBS"
|
||||
|
||||
AS_IF([test "$with_mxm" != "no"],
|
||||
[AS_IF([test ! -z "$with_mxm" && test "$with_mxm" != "yes"],
|
||||
[
|
||||
AS_IF([test "$with_mxm" != "no"],
|
||||
[AS_IF([test ! -z "$with_mxm" && test "$with_mxm" != "yes"],
|
||||
[
|
||||
ompi_check_mxm_dir="$with_mxm"
|
||||
])
|
||||
AS_IF([test ! -z "$with_mxm_libdir" && test "$with_mxm_libdir" != "yes"],
|
||||
[ompi_check_mxm_libdir="$with_mxm_libdir"])
|
||||
])
|
||||
AS_IF([test ! -z "$with_mxm_libdir" && test "$with_mxm_libdir" != "yes"],
|
||||
[ompi_check_mxm_libdir="$with_mxm_libdir"])
|
||||
|
||||
OPAL_CHECK_PACKAGE([$1],
|
||||
[mxm/api/mxm_api.h],
|
||||
[mxm],
|
||||
[mxm_cleanup],
|
||||
[],
|
||||
[$ompi_check_mxm_dir],
|
||||
[$ompi_check_mxm_libdir],
|
||||
[ompi_check_mxm_happy="yes"],
|
||||
[ompi_check_mxm_happy="no"])],
|
||||
[ompi_check_mxm_happy="no"])
|
||||
OPAL_CHECK_PACKAGE([ompi_check_mxm],
|
||||
[mxm/api/mxm_api.h],
|
||||
[mxm],
|
||||
[mxm_cleanup],
|
||||
[],
|
||||
[$ompi_check_mxm_dir],
|
||||
[$ompi_check_mxm_libdir],
|
||||
[ompi_check_mxm_happy="yes"],
|
||||
[ompi_check_mxm_happy="no"])],
|
||||
[ompi_check_mxm_happy="no"])
|
||||
|
||||
CPPFLAGS="$ompi_check_mxm_$1_save_CPPFLAGS"
|
||||
LDFLAGS="$ompi_check_mxm_$1_save_LDFLAGS"
|
||||
LIBS="$ompi_check_mxm_$1_save_LIBS"
|
||||
|
||||
|
||||
CPPFLAGS="$ompi_check_mxm_$1_save_CPPFLAGS"
|
||||
LDFLAGS="$ompi_check_mxm_$1_save_LDFLAGS"
|
||||
LIBS="$ompi_check_mxm_$1_save_LIBS"
|
||||
|
||||
AC_MSG_CHECKING(for MXM version compatibility)
|
||||
AC_REQUIRE_CPP
|
||||
old_CFLAGS="$CFLAGS"
|
||||
CFLAGS="$CFLAGS -I$ompi_check_mxm_dir/include"
|
||||
AC_COMPILE_IFELSE(
|
||||
AC_MSG_CHECKING(for MXM version compatibility)
|
||||
AC_REQUIRE_CPP
|
||||
old_CFLAGS="$CFLAGS"
|
||||
CFLAGS="$CFLAGS -I$ompi_check_mxm_dir/include"
|
||||
AC_COMPILE_IFELSE(
|
||||
[AC_LANG_PROGRAM([[#include <mxm/api/mxm_version.h>]],
|
||||
[[
|
||||
[[
|
||||
#ifndef MXM_VERSION
|
||||
#error "MXM Version is less than 2.1, please upgrade"
|
||||
#endif
|
||||
@ -72,13 +73,19 @@ AC_DEFUN([OMPI_CHECK_MXM],[
|
||||
[ompi_mxm_version_ok="yes"],
|
||||
[ompi_mxm_version_ok="no"])
|
||||
|
||||
AC_MSG_RESULT([$ompi_mxm_version_ok])
|
||||
CFLAGS=$old_CFLAGS
|
||||
AC_MSG_RESULT([$ompi_mxm_version_ok])
|
||||
CFLAGS=$old_CFLAGS
|
||||
|
||||
AS_IF([test "$ompi_mxm_version_ok" = "no"], [ompi_check_mxm_happy="no"])
|
||||
AS_IF([test "$ompi_mxm_version_ok" = "no"], [ompi_check_mxm_happy="no"])
|
||||
|
||||
OMPI_SUMMARY_ADD([[Transports]],[[Mellanox MXM]],[$1],[$ompi_check_mxm_happy])
|
||||
fi
|
||||
|
||||
AS_IF([test "$ompi_check_mxm_happy" = "yes"],
|
||||
[$2],
|
||||
[$1_LDFLAGS="[$]$_LDFLAGS $ompi_check_mxm_LDFLAGS"
|
||||
$1_LIBS="[$]$1_LIBS $ompi_check_mxm_LIBS"
|
||||
$1_CPPFLAGS="[$]$1_CPPFLAGS $ompi_check_mxm_CPPFLAGS"
|
||||
$2],
|
||||
[AS_IF([test ! -z "$with_mxm" && test "$with_mxm" != "no"],
|
||||
[AC_MSG_ERROR([MXM support requested but not found. Aborting])])
|
||||
$3])
|
||||
|
@ -14,6 +14,8 @@ dnl Copyright (c) 2006 QLogic Corp. All rights reserved.
|
||||
dnl Copyright (c) 2009 Cisco Systems, Inc. All rights reserved.
|
||||
dnl Copyright (c) 2015 Research Organization for Information Science
|
||||
dnl and Technology (RIST). All rights reserved.
|
||||
dnl Copyright (c) 2016 Los Alamos National Security, LLC. All rights
|
||||
dnl reserved.
|
||||
dnl $COPYRIGHT$
|
||||
dnl
|
||||
dnl Additional copyrights may follow
|
||||
@ -27,46 +29,53 @@ dnl
|
||||
# LDFLAGS, LIBS} as needed and runs action-if-found if there is
|
||||
# support, otherwise executes action-if-not-found
|
||||
AC_DEFUN([OMPI_CHECK_PSM],[
|
||||
AC_ARG_WITH([psm],
|
||||
[AC_HELP_STRING([--with-psm(=DIR)],
|
||||
[Build PSM (Qlogic InfiniPath) support, optionally adding DIR/include, DIR/lib, and DIR/lib64 to the search path for headers and libraries])])
|
||||
OPAL_CHECK_WITHDIR([psm], [$with_psm], [include/psm.h])
|
||||
AC_ARG_WITH([psm-libdir],
|
||||
[AC_HELP_STRING([--with-psm-libdir=DIR],
|
||||
[Search for PSM (QLogic InfiniPath PSM) libraries in DIR])])
|
||||
OPAL_CHECK_WITHDIR([psm-libdir], [$with_psm_libdir], [libpsm_infinipath.*])
|
||||
if test -z "$ompi_check_psm_happy" ; then
|
||||
AC_ARG_WITH([psm],
|
||||
[AC_HELP_STRING([--with-psm(=DIR)],
|
||||
[Build PSM (Qlogic InfiniPath) support, optionally adding DIR/include, DIR/lib, and DIR/lib64 to the search path for headers and libraries])])
|
||||
OPAL_CHECK_WITHDIR([psm], [$with_psm], [include/psm.h])
|
||||
AC_ARG_WITH([psm-libdir],
|
||||
[AC_HELP_STRING([--with-psm-libdir=DIR],
|
||||
[Search for PSM (QLogic InfiniPath PSM) libraries in DIR])])
|
||||
OPAL_CHECK_WITHDIR([psm-libdir], [$with_psm_libdir], [libpsm_infinipath.*])
|
||||
|
||||
ompi_check_psm_$1_save_CPPFLAGS="$CPPFLAGS"
|
||||
ompi_check_psm_$1_save_LDFLAGS="$LDFLAGS"
|
||||
ompi_check_psm_$1_save_LIBS="$LIBS"
|
||||
ompi_check_psm_$1_save_CPPFLAGS="$CPPFLAGS"
|
||||
ompi_check_psm_$1_save_LDFLAGS="$LDFLAGS"
|
||||
ompi_check_psm_$1_save_LIBS="$LIBS"
|
||||
|
||||
AS_IF([test "$with_psm" != "no"],
|
||||
[AS_IF([test ! -z "$with_psm" && test "$with_psm" != "yes"],
|
||||
[ompi_check_psm_dir="$with_psm"])
|
||||
AS_IF([test ! -z "$with_psm_libdir" && test "$with_psm_libdir" != "yes"],
|
||||
[ompi_check_psm_libdir="$with_psm_libdir"])
|
||||
AS_IF([test "$with_psm" != "no"],
|
||||
[AS_IF([test ! -z "$with_psm" && test "$with_psm" != "yes"],
|
||||
[ompi_check_psm_dir="$with_psm"])
|
||||
AS_IF([test ! -z "$with_psm_libdir" && test "$with_psm_libdir" != "yes"],
|
||||
[ompi_check_psm_libdir="$with_psm_libdir"])
|
||||
|
||||
OPAL_CHECK_PACKAGE([$1],
|
||||
[psm.h],
|
||||
[psm_infinipath],
|
||||
[psm_finalize],
|
||||
[],
|
||||
[$ompi_check_psm_dir],
|
||||
[$ompi_check_psm_libdir],
|
||||
[ompi_check_psm_happy="yes"],
|
||||
[ompi_check_psm_happy="no"])],
|
||||
[ompi_check_psm_happy="no"])
|
||||
OPAL_CHECK_PACKAGE([ompi_check_psm],
|
||||
[psm.h],
|
||||
[psm_infinipath],
|
||||
[psm_finalize],
|
||||
[],
|
||||
[$ompi_check_psm_dir],
|
||||
[$ompi_check_psm_libdir],
|
||||
[ompi_check_psm_happy="yes"],
|
||||
[ompi_check_psm_happy="no"])],
|
||||
[ompi_check_psm_happy="no"])
|
||||
|
||||
CPPFLAGS="$ompi_check_psm_$1_save_CPPFLAGS"
|
||||
LDFLAGS="$ompi_check_psm_$1_save_LDFLAGS"
|
||||
LIBS="$ompi_check_psm_$1_save_LIBS"
|
||||
CPPFLAGS="$ompi_check_psm_$1_save_CPPFLAGS"
|
||||
LDFLAGS="$ompi_check_psm_$1_save_LDFLAGS"
|
||||
LIBS="$ompi_check_psm_$1_save_LIBS"
|
||||
|
||||
AS_IF([test "$ompi_check_psm_happy" = "yes" && test "$enable_progress_threads" = "yes"],
|
||||
[AC_MSG_WARN([PSM driver does not currently support progress threads. Disabling BTL.])
|
||||
ompi_check_psm_happy="no"])
|
||||
AS_IF([test "$ompi_check_psm_happy" = "yes" && test "$enable_progress_threads" = "yes"],
|
||||
[AC_MSG_WARN([PSM driver does not currently support progress threads. Disabling BTL.])
|
||||
ompi_check_psm_happy="no"])
|
||||
|
||||
OMPI_SUMMARY_ADD([[Transports]],[[QLogic Infinipath (PSM)]],[$1],[$ompi_check_psm_happy])
|
||||
fi
|
||||
|
||||
AS_IF([test "$ompi_check_psm_happy" = "yes"],
|
||||
[$2],
|
||||
[$1_LDFLAGS="[$]$1_LDFLAGS $ompi_check_psm_LDFLAGS"
|
||||
$1_CPPFLAGS="[$]$1_CPPFLAGS $ompi_check_psm_CPPFLAGS"
|
||||
$1_LIBS="[$]$1_LIBS $ompi_check_psm_LIBS"
|
||||
$2],
|
||||
[AS_IF([test ! -z "$with_psm" && test "$with_psm" != "no"],
|
||||
[AC_MSG_ERROR([PSM support requested but not found. Aborting])])
|
||||
$3])
|
||||
|
@ -15,6 +15,8 @@
|
||||
# Copyright (c) 2014 Intel Corporation. All rights reserved.
|
||||
# Copyright (c) 2015 Research Organization for Information Science
|
||||
# and Technology (RIST). All rights reserved.
|
||||
# Copyright (c) 2016 Los Alamos National Security, LLC. All rights
|
||||
# reserved.
|
||||
# $COPYRIGHT$
|
||||
#
|
||||
# Additional copyrights may follow
|
||||
@ -28,46 +30,53 @@
|
||||
# LDFLAGS, LIBS} as needed and runs action-if-found if there is
|
||||
# support, otherwise executes action-if-not-found
|
||||
AC_DEFUN([OMPI_CHECK_PSM2],[
|
||||
AC_ARG_WITH([psm2],
|
||||
[AC_HELP_STRING([--with-psm2(=DIR)],
|
||||
[Build PSM2 (Intel PSM2) support, optionally adding DIR/include, DIR/lib, and DIR/lib64 to the search path for headers and libraries])])
|
||||
OPAL_CHECK_WITHDIR([psm2], [$with_psm2], [include/psm2.h])
|
||||
AC_ARG_WITH([psm2-libdir],
|
||||
[AC_HELP_STRING([--with-psm2-libdir=DIR],
|
||||
[Search for PSM (Intel PSM2) libraries in DIR])])
|
||||
OPAL_CHECK_WITHDIR([psm2-libdir], [$with_psm2_libdir], [libpsm2.*])
|
||||
if test -z "$ompi_check_psm2_happy" ; then
|
||||
AC_ARG_WITH([psm2],
|
||||
[AC_HELP_STRING([--with-psm2(=DIR)],
|
||||
[Build PSM2 (Intel PSM2) support, optionally adding DIR/include, DIR/lib, and DIR/lib64 to the search path for headers and libraries])])
|
||||
OPAL_CHECK_WITHDIR([psm2], [$with_psm2], [include/psm2.h])
|
||||
AC_ARG_WITH([psm2-libdir],
|
||||
[AC_HELP_STRING([--with-psm2-libdir=DIR],
|
||||
[Search for PSM (Intel PSM2) libraries in DIR])])
|
||||
OPAL_CHECK_WITHDIR([psm2-libdir], [$with_psm2_libdir], [libpsm2.*])
|
||||
|
||||
ompi_check_psm2_$1_save_CPPFLAGS="$CPPFLAGS"
|
||||
ompi_check_psm2_$1_save_LDFLAGS="$LDFLAGS"
|
||||
ompi_check_psm2_$1_save_LIBS="$LIBS"
|
||||
ompi_check_psm2_$1_save_CPPFLAGS="$CPPFLAGS"
|
||||
ompi_check_psm2_$1_save_LDFLAGS="$LDFLAGS"
|
||||
ompi_check_psm2_$1_save_LIBS="$LIBS"
|
||||
|
||||
AS_IF([test "$with_psm2" != "no"],
|
||||
[AS_IF([test ! -z "$with_psm2" && test "$with_psm2" != "yes"],
|
||||
[ompi_check_psm2_dir="$with_psm2"])
|
||||
AS_IF([test ! -z "$with_psm2_libdir" && test "$with_psm2_libdir" != "yes"],
|
||||
[ompi_check_psm2_libdir="$with_psm2_libdir"])
|
||||
AS_IF([test "$with_psm2" != "no"],
|
||||
[AS_IF([test ! -z "$with_psm2" && test "$with_psm2" != "yes"],
|
||||
[ompi_check_psm2_dir="$with_psm2"])
|
||||
AS_IF([test ! -z "$with_psm2_libdir" && test "$with_psm2_libdir" != "yes"],
|
||||
[ompi_check_psm2_libdir="$with_psm2_libdir"])
|
||||
|
||||
OPAL_CHECK_PACKAGE([$1],
|
||||
[psm2.h],
|
||||
[psm2],
|
||||
[psm2_mq_irecv2],
|
||||
[],
|
||||
[$ompi_check_psm2_dir],
|
||||
[$ompi_check_psm2_libdir],
|
||||
[ompi_check_psm2_happy="yes"],
|
||||
[ompi_check_psm2_happy="no"])],
|
||||
[ompi_check_psm2_happy="no"])
|
||||
OPAL_CHECK_PACKAGE([ompi_check_psm2],
|
||||
[psm2.h],
|
||||
[psm2],
|
||||
[psm2_mq_irecv2],
|
||||
[],
|
||||
[$ompi_check_psm2_dir],
|
||||
[$ompi_check_psm2_libdir],
|
||||
[ompi_check_psm2_happy="yes"],
|
||||
[ompi_check_psm2_happy="no"])],
|
||||
[ompi_check_psm2_happy="no"])
|
||||
|
||||
CPPFLAGS="$ompi_check_psm2_$1_save_CPPFLAGS"
|
||||
LDFLAGS="$ompi_check_psm2_$1_save_LDFLAGS"
|
||||
LIBS="$ompi_check_psm2_$1_save_LIBS"
|
||||
CPPFLAGS="$ompi_check_psm2_$1_save_CPPFLAGS"
|
||||
LDFLAGS="$ompi_check_psm2_$1_save_LDFLAGS"
|
||||
LIBS="$ompi_check_psm2_$1_save_LIBS"
|
||||
|
||||
AS_IF([test "$ompi_check_psm2_happy" = "yes" && test "$enable_progress_threads" = "yes"],
|
||||
[AC_MSG_WARN([PSM2 driver does not currently support progress threads. Disabling MTL.])
|
||||
ompi_check_psm2_happy="no"])
|
||||
AS_IF([test "$ompi_check_psm2_happy" = "yes" && test "$enable_progress_threads" = "yes"],
|
||||
[AC_MSG_WARN([PSM2 driver does not currently support progress threads. Disabling MTL.])
|
||||
ompi_check_psm2_happy="no"])
|
||||
|
||||
OMPI_SUMMARY_ADD([[Transports]],[[Intel Omnipath (PSM2)]],[$1],[$ompi_check_psm2_happy])
|
||||
fi
|
||||
|
||||
AS_IF([test "$ompi_check_psm2_happy" = "yes"],
|
||||
[$2],
|
||||
[$1_LDFLAGS="[$]$1_LDFLAGS $ompi_check_psm2_LDFLAGS"
|
||||
$1_CPPFLAGS="[$]$1_CPPFLAGS $ompi_check_psm2_CPPFLAGS"
|
||||
$1_LIBS="[$]$1_LIBS $ompi_check_psm2_LIBS"
|
||||
$2],
|
||||
[AS_IF([test ! -z "$with_psm2" && test "$with_psm2" != "no"],
|
||||
[AC_MSG_ERROR([PSM2 support requested but not found. Aborting])])
|
||||
$3])
|
||||
|
@ -3,6 +3,8 @@
|
||||
# Copyright (C) 2015 Mellanox Technologies Ltd. ALL RIGHTS RESERVED.
|
||||
# Copyright (c) 2015 Research Organization for Information Science
|
||||
# and Technology (RIST). All rights reserved.
|
||||
# Copyright (c) 2016 Los Alamos National Security, LLC. All rights
|
||||
# reserved.
|
||||
# $COPYRIGHT$
|
||||
#
|
||||
# Additional copyrights may follow
|
||||
@ -16,65 +18,73 @@
|
||||
# LDFLAGS, LIBS} as needed and runs action-if-found if there is
|
||||
# support, otherwise executes action-if-not-found
|
||||
AC_DEFUN([OMPI_CHECK_UCX],[
|
||||
AC_ARG_WITH([ucx],
|
||||
[AC_HELP_STRING([--with-ucx(=DIR)],
|
||||
[Build with Unified Communication X library support])])
|
||||
OPAL_CHECK_WITHDIR([ucx], [$with_ucx], [include/ucp/api/ucp.h])
|
||||
AC_ARG_WITH([ucx-libdir],
|
||||
[AC_HELP_STRING([--with-ucx-libdir=DIR],
|
||||
[Search for Unified Communication X libraries in DIR])])
|
||||
OPAL_CHECK_WITHDIR([ucx-libdir], [$with_ucx_libdir], [libucp.*])
|
||||
if test -z "$ompi_check_ucx_happy" ; then
|
||||
AC_ARG_WITH([ucx],
|
||||
[AC_HELP_STRING([--with-ucx(=DIR)],
|
||||
[Build with Unified Communication X library support])])
|
||||
OPAL_CHECK_WITHDIR([ucx], [$with_ucx], [include/ucp/api/ucp.h])
|
||||
AC_ARG_WITH([ucx-libdir],
|
||||
[AC_HELP_STRING([--with-ucx-libdir=DIR],
|
||||
[Search for Unified Communication X libraries in DIR])])
|
||||
OPAL_CHECK_WITHDIR([ucx-libdir], [$with_ucx_libdir], [libucp.*])
|
||||
|
||||
ompi_check_ucx_$1_save_CPPFLAGS="$CPPFLAGS"
|
||||
ompi_check_ucx_$1_save_LDFLAGS="$LDFLAGS"
|
||||
ompi_check_ucx_$1_save_LIBS="$LIBS"
|
||||
ompi_check_ucx_$1_save_CPPFLAGS="$CPPFLAGS"
|
||||
ompi_check_ucx_$1_save_LDFLAGS="$LDFLAGS"
|
||||
ompi_check_ucx_$1_save_LIBS="$LIBS"
|
||||
|
||||
AS_IF([test "$with_ucx" != "no"],
|
||||
[AS_IF([test ! -z "$with_ucx" && test "$with_ucx" != "yes"],
|
||||
[
|
||||
ompi_check_ucx_dir="$with_ucx"
|
||||
ompi_check_ucx_libdir="$with_ucx/lib"
|
||||
])
|
||||
AS_IF([test ! -z "$with_ucx_libdir" && test "$with_ucx_libdir" != "yes"],
|
||||
[ompi_check_ucx_libdir="$with_ucx_libdir"])
|
||||
AS_IF([test "$with_ucx" != "no"],
|
||||
[AS_IF([test ! -z "$with_ucx" && test "$with_ucx" != "yes"],
|
||||
[
|
||||
ompi_check_ucx_dir="$with_ucx"
|
||||
ompi_check_ucx_libdir="$with_ucx/lib"
|
||||
])
|
||||
AS_IF([test ! -z "$with_ucx_libdir" && test "$with_ucx_libdir" != "yes"],
|
||||
[ompi_check_ucx_libdir="$with_ucx_libdir"])
|
||||
|
||||
ompi_check_ucx_extra_libs="-L$ompi_check_ucx_libdir"
|
||||
ompi_check_ucx_extra_libs="-L$ompi_check_ucx_libdir"
|
||||
|
||||
OPAL_CHECK_PACKAGE([$1],
|
||||
[ucp/api/ucp.h],
|
||||
[ucp],
|
||||
[ucp_cleanup],
|
||||
[$ompi_check_ucx_extra_libs],
|
||||
[$ompi_check_ucx_dir],
|
||||
[$ompi_check_ucx_libdir],
|
||||
[ompi_check_ucx_happy="yes"],
|
||||
[ompi_check_ucx_happy="no"])],
|
||||
[ompi_check_ucx_happy="no"])
|
||||
OPAL_CHECK_PACKAGE([ompi_check_ucx],
|
||||
[ucp/api/ucp.h],
|
||||
[ucp],
|
||||
[ucp_cleanup],
|
||||
[$ompi_check_ucx_extra_libs],
|
||||
[$ompi_check_ucx_dir],
|
||||
[$ompi_check_ucx_libdir],
|
||||
[ompi_check_ucx_happy="yes"],
|
||||
[ompi_check_ucx_happy="no"])],
|
||||
[ompi_check_ucx_happy="no"])
|
||||
|
||||
|
||||
|
||||
CPPFLAGS="$ompi_check_ucx_$1_save_CPPFLAGS"
|
||||
LDFLAGS="$ompi_check_ucx_$1_save_LDFLAGS"
|
||||
LIBS="$ompi_check_ucx_$1_save_LIBS"
|
||||
CPPFLAGS="$ompi_check_ucx_$1_save_CPPFLAGS"
|
||||
LDFLAGS="$ompi_check_ucx_$1_save_LDFLAGS"
|
||||
LIBS="$ompi_check_ucx_$1_save_LIBS"
|
||||
|
||||
AC_MSG_CHECKING(for UCX version compatibility)
|
||||
AC_REQUIRE_CPP
|
||||
old_CFLAGS="$CFLAGS"
|
||||
CFLAGS="$CFLAGS -I$ompi_check_ucx_dir/include"
|
||||
AC_COMPILE_IFELSE(
|
||||
AC_MSG_CHECKING(for UCX version compatibility)
|
||||
AC_REQUIRE_CPP
|
||||
old_CFLAGS="$CFLAGS"
|
||||
CFLAGS="$CFLAGS -I$ompi_check_ucx_dir/include"
|
||||
AC_COMPILE_IFELSE(
|
||||
[AC_LANG_PROGRAM([[#include <uct/api/version.h>]],
|
||||
[[
|
||||
]])],
|
||||
[[
|
||||
]])],
|
||||
[ompi_ucx_version_ok="yes"],
|
||||
[ompi_ucx_version_ok="no"])
|
||||
|
||||
AC_MSG_RESULT([$ompi_ucx_version_ok])
|
||||
CFLAGS=$old_CFLAGS
|
||||
AC_MSG_RESULT([$ompi_ucx_version_ok])
|
||||
CFLAGS=$old_CFLAGS
|
||||
|
||||
AS_IF([test "$ompi_ucx_version_ok" = "no"], [ompi_check_ucx_happy="no"])
|
||||
|
||||
OMPI_SUMMARY_ADD([[Transports]],[[Open UCX]],[$1],[$ompi_check_ucx_happy])
|
||||
fi
|
||||
|
||||
AS_IF([test "$ompi_ucx_version_ok" = "no"], [ompi_check_ucx_happy="no"])
|
||||
|
||||
AS_IF([test "$ompi_check_ucx_happy" = "yes"],
|
||||
[$2],
|
||||
[$1_CFLAGS="[$]$1_CFLAGS $ompi_check_ucx_CFLAGS"
|
||||
$1_LDFLAGS="[$]$1_LDFLAGS $ompi_check_ucx_LDFLAGS"
|
||||
$1_LIBS="[$]$1_LIBS $ompi_check_ucx_LIBS"
|
||||
$2],
|
||||
[AS_IF([test ! -z "$with_ucx" && test "$with_ucx" != "no"],
|
||||
[AC_MSG_ERROR([UCX support requested but not found. Aborting])])
|
||||
$3])
|
||||
|
@ -5,7 +5,7 @@
|
||||
# reserved.
|
||||
# Copyright (c) 2009-2010 Cisco Systems, Inc. All rights reserved.
|
||||
# Copyright (c) 2010-2012 IBM Corporation. All rights reserved.
|
||||
# Copyright (c) 2013-2014 Los Alamos National Security, LLC. All rights
|
||||
# Copyright (c) 2013-2016 Los Alamos National Security, LLC. All rights
|
||||
# reserved.
|
||||
# $COPYRIGHT$
|
||||
#
|
||||
@ -18,29 +18,31 @@
|
||||
# --------------------------------------------------------
|
||||
# check if cma support is wanted.
|
||||
AC_DEFUN([OPAL_CHECK_CMA],[
|
||||
OPAL_VAR_SCOPE_PUSH([ompi_check_cma_happy ompi_check_cma_need_defs])
|
||||
if test -z "$ompi_check_cma_happy" ; then
|
||||
OPAL_VAR_SCOPE_PUSH([ompi_check_cma_need_defs ompi_check_cma_kernel_version])
|
||||
|
||||
ompi_check_cma_happy="no"
|
||||
AC_ARG_WITH([cma],
|
||||
[AC_HELP_STRING([--with-cma],
|
||||
[Build Cross Memory Attach support (default: no)])])
|
||||
ompi_check_cma_happy="no"
|
||||
AC_ARG_WITH([cma],
|
||||
[AC_HELP_STRING([--with-cma],
|
||||
[Build Cross Memory Attach support (default: no)])])
|
||||
|
||||
AC_MSG_CHECKING([if user requested CMA build])
|
||||
if test "$with_cma" = "yes" ; then
|
||||
# Enable CMA support by default if process_vm_readv is defined in glibc
|
||||
AC_CHECK_FUNC(process_vm_readv, [ompi_check_cma_need_defs=0],
|
||||
[ompi_check_cma_need_defs=1])
|
||||
# If the user specifically requests CMA go ahead and enable it even
|
||||
# if the glibc version does not support process_vm_readv
|
||||
if test $ompi_check_cma_need_defs = 0 || test "x$with_cma" = "xyes" ; then
|
||||
ompi_check_cma_happy="yes"
|
||||
AC_MSG_RESULT([yes])
|
||||
AC_CHECK_FUNC(process_vm_readv, [ompi_check_cma_need_defs=0],
|
||||
[ompi_check_cma_need_defs=1])
|
||||
AC_DEFINE_UNQUOTED([OPAL_CMA_NEED_SYSCALL_DEFS],
|
||||
[$ompi_check_cma_need_defs],
|
||||
[Need CMA syscalls defined])
|
||||
AC_CHECK_HEADERS([sys/prctl.h])
|
||||
else
|
||||
AC_MSG_RESULT([no])
|
||||
fi
|
||||
AS_IF([test "$ompi_check_cma_happy" = "yes"],
|
||||
[$2],
|
||||
[$3])
|
||||
fi
|
||||
|
||||
OPAL_VAR_SCOPE_POP
|
||||
])dnl
|
||||
OPAL_VAR_SCOPE_POP
|
||||
|
||||
OMPI_SUMMARY_ADD([[Transports]],[[Linux CMA IPC]],[$1],[$ompi_check_cma_happy])
|
||||
fi
|
||||
|
||||
AS_IF([test "$ompi_check_cma_happy" = "yes"], [$2], [$3])
|
||||
])
|
||||
|
@ -1,64 +0,0 @@
|
||||
# -*- shell-script ; indent-tabs-mode:nil -*-
|
||||
#
|
||||
# Copyright (c) 2004-2005 The Trustees of Indiana University and Indiana
|
||||
# University Research and Technology
|
||||
# Corporation. All rights reserved.
|
||||
# Copyright (c) 2004-2005 The University of Tennessee and The University
|
||||
# of Tennessee Research Foundation. All rights
|
||||
# reserved.
|
||||
# Copyright (c) 2004-2005 High Performance Computing Center Stuttgart,
|
||||
# University of Stuttgart. All rights reserved.
|
||||
# Copyright (c) 2004-2005 The Regents of the University of California.
|
||||
# All rights reserved.
|
||||
# Copyright (c) 2009-2011 Cisco Systems, Inc. All rights reserved.
|
||||
# Copyright (c) 2011-2014 Los Alamos National Security, LLC. All rights
|
||||
# reserved.
|
||||
# Copyright (c) 2014 Intel, Inc. All rights reserved.
|
||||
# Copyright (c) 2014-2015 Research Organization for Information Science
|
||||
# and Technology (RIST). All rights reserved.
|
||||
# $COPYRIGHT$
|
||||
#
|
||||
# Additional copyrights may follow
|
||||
#
|
||||
# $HEADER$
|
||||
#
|
||||
|
||||
#
|
||||
# special check for cray xpmem, uses macro(s) from pkg.m4
|
||||
#
|
||||
# OPAL_CHECK_CRAY_XPMEM(prefix, [action-if-found], [action-if-not-found])
|
||||
# --------------------------------------------------------
|
||||
AC_DEFUN([OPAL_CHECK_CRAY_XPMEM],[
|
||||
AC_ARG_WITH([cray_xpmem],
|
||||
[AC_HELP_STRING([--with-cray-xpmem(=yes/no)],
|
||||
[Build Cray XPMEM support(default: auto)])],
|
||||
[], with_cray_xpmem=auto)
|
||||
|
||||
AC_MSG_CHECKING([for Cray XPMEM support])
|
||||
AS_IF([test "$with_cray_xpmem" = "no"],
|
||||
[AC_MSG_RESULT([no])
|
||||
$3],
|
||||
[AS_IF([test "$with_cray_xpmem" = "auto" || test "$with_cray_xpmem" = "yes"],
|
||||
[PKG_CHECK_MODULES_STATIC([CRAY_XPMEM], [cray-xpmem],
|
||||
[opal_check_cray_xpmem_happy="yes"],
|
||||
[opal_check_cray_xpmem_happy="no"]
|
||||
[AS_IF([test "$with_cray_xpmem" = "yes"],
|
||||
[AC_MSG_WARN([Cray XPMEM support requested but pkg-config failed.])
|
||||
AC_MSG_ERROR([Aborting])],[])]
|
||||
)],
|
||||
[])
|
||||
])
|
||||
|
||||
AS_IF([test "$opal_check_cray_xpmem_happy" = "yes" && test "$enable_static" = "yes"],
|
||||
[CRAY_XPMEM_LIBS = $CRAY_XPMEM_STATIC_LIBS],[])
|
||||
|
||||
AS_IF([test "$opal_check_cray_xpmem_happy" = "yes"],
|
||||
[$1_LDFLAGS="$CRAY_XPMEM_LIBS"
|
||||
$1_CPPFLAGS="$CRAY_XPMEM_CFLAGS"
|
||||
$1_LIBS="$CRAY_XPMEM_LIBS"
|
||||
AC_DEFINE_UNQUOTED([HAVE_XPMEM_H], [1],[is xpmem.h available])
|
||||
$2], [$3])
|
||||
])
|
||||
|
||||
|
||||
|
@ -5,7 +5,7 @@ dnl of Tennessee Research Foundation. All rights
|
||||
dnl reserved.
|
||||
dnl Copyright (c) 2009-2010 Cisco Systems, Inc. All rights reserved.
|
||||
dnl Copyright (c) 2010-2012 IBM Corporation. All rights reserved.
|
||||
dnl Copyright (c) 2014 Los Alamos National Security, LLC. All rights
|
||||
dnl Copyright (c) 2014-2016 Los Alamos National Security, LLC. All rights
|
||||
dnl reserved.
|
||||
dnl Copyright (c) 2015 Research Organization for Information Science
|
||||
dnl and Technology (RIST). All rights reserved.
|
||||
@ -22,48 +22,53 @@ dnl
|
||||
# LDFLAGS, LIBS} as needed and runs action-if-found if there is
|
||||
# support, otherwise executes action-if-not-found
|
||||
AC_DEFUN([OPAL_CHECK_KNEM],[
|
||||
OPAL_VAR_SCOPE_PUSH([opal_check_knem_happy opal_check_knem_$1_save_CPPFLAGS opal_check_knem_dir])
|
||||
AC_ARG_WITH([knem],
|
||||
[AC_HELP_STRING([--with-knem(=DIR)],
|
||||
[Build knem Linux kernel module support, searching for headers in DIR/include])])
|
||||
if test -z "$opal_check_knem_happy" ; then
|
||||
OPAL_VAR_SCOPE_PUSH([opal_check_knem_$1_save_CPPFLAGS opal_check_knem_dir])
|
||||
AC_ARG_WITH([knem],
|
||||
[AC_HELP_STRING([--with-knem(=DIR)],
|
||||
[Build knem Linux kernel module support, searching for headers in DIR/include])])
|
||||
|
||||
OPAL_CHECK_WITHDIR([knem], [$with_knem], [include/knem_io.h])
|
||||
opal_check_knem_$1_save_CPPFLAGS="$CPPFLAGS"
|
||||
OPAL_CHECK_WITHDIR([knem], [$with_knem], [include/knem_io.h])
|
||||
opal_check_knem_$1_save_CPPFLAGS="$CPPFLAGS"
|
||||
|
||||
AS_IF([test "$with_knem" != "no"],
|
||||
[AS_IF([test ! -z "$with_knem" && test "$with_knem" != "yes"],
|
||||
[opal_check_knem_dir="$with_knem"])
|
||||
opal_check_knem_happy=no
|
||||
|
||||
_OPAL_CHECK_PACKAGE_HEADER([$1],
|
||||
[knem_io.h],
|
||||
[$opal_check_knem_dir],
|
||||
[opal_check_knem_happy="yes"],
|
||||
[opal_check_knem_happy="no"])],
|
||||
[opal_check_knem_happy="no"])
|
||||
AS_IF([test "$with_knem" != "no"],
|
||||
[AS_IF([test ! -z "$with_knem" && test "$with_knem" != "yes"],
|
||||
[opal_check_knem_dir="$with_knem"])
|
||||
|
||||
CPPFLAGS="$CPPFLAGS $$1_CPPFLAGS"
|
||||
_OPAL_CHECK_PACKAGE_HEADER([ompi_check_knem],
|
||||
[knem_io.h],
|
||||
[$opal_check_knem_dir],
|
||||
[opal_check_knem_happy="yes"],
|
||||
[])],
|
||||
[])
|
||||
|
||||
# need at least version 0x0000000b
|
||||
AS_IF([test "$opal_check_knem_happy" = "yes"],
|
||||
[AC_CACHE_CHECK([for knem ABI version 0xb or later],
|
||||
[opal_cv_knem_version_ok],
|
||||
[AC_PREPROC_IFELSE(
|
||||
[AC_LANG_PROGRAM([
|
||||
CPPFLAGS="$CPPFLAGS $ompi_check_knem_CPPFLAGS"
|
||||
|
||||
# need at least version 0x0000000b
|
||||
if test "$opal_check_knem_happy" = "yes" ; then
|
||||
AC_PREPROC_IFELSE([AC_LANG_PROGRAM([
|
||||
#include <knem_io.h>
|
||||
],[
|
||||
],[
|
||||
#if KNEM_ABI_VERSION < 0xc
|
||||
#error "Version less than 0xc"
|
||||
#endif
|
||||
])],
|
||||
[opal_cv_knem_version_ok=yes],
|
||||
[opal_cv_knem_version_ok=no])])])
|
||||
])],
|
||||
[opal_check_knem_happy=yes],
|
||||
[opal_check_knem_happy=no])
|
||||
fi
|
||||
|
||||
CPPFLAGS="$opal_check_knem_$1_save_CPPFLAGS"
|
||||
CPPFLAGS="$opal_check_knem_$1_save_CPPFLAGS"
|
||||
|
||||
AS_IF([test "$opal_check_knem_happy" = "yes" && test "$opal_cv_knem_version_ok" = "yes"],
|
||||
[$2],
|
||||
OMPI_SUMMARY_ADD([[Transports]],[[KNEM Shared Memory]],[$1],[$opal_check_knem_happy])
|
||||
OPAL_VAR_SCOPE_POP
|
||||
fi
|
||||
|
||||
AS_IF([test "$opal_check_knem_happy" = "yes"],
|
||||
[$1_CPPFLAGS="[$]$1_CPPFLAGS $ompi_check_knem_CPPFLAGS"
|
||||
$2],
|
||||
[AS_IF([test ! -z "$with_knem" && test "$with_knem" != "no"],
|
||||
[AC_MSG_ERROR([KNEM support requested but not found. Aborting])])
|
||||
$3])
|
||||
OPAL_VAR_SCOPE_POP
|
||||
])dnl
|
||||
|
@ -1,6 +1,8 @@
|
||||
dnl -*- shell-script -*-
|
||||
dnl
|
||||
dnl Copyright (c) 2015 Cisco Systems, Inc. All rights reserved.
|
||||
dnl Copyright (c) 2016 Los Alamos National Security, LLC. All rights
|
||||
dnl reserved.
|
||||
dnl $COPYRIGHT$
|
||||
dnl
|
||||
dnl Additional copyrights may follow
|
||||
@ -18,66 +20,76 @@ dnl
|
||||
# action-if-not-found.
|
||||
#
|
||||
AC_DEFUN([OPAL_CHECK_LIBFABRIC],[
|
||||
OPAL_VAR_SCOPE_PUSH([opal_check_libfabric_$1_save_CPPFLAGS opal_check_libfabric_$1_save_LDFLAGS opal_check_libfabric_$1_save_LIBS])
|
||||
if test -z "$opal_check_libfabric_happy" ; then
|
||||
OPAL_VAR_SCOPE_PUSH([opal_check_libfabric_$1_save_CPPFLAGS opal_check_libfabric_$1_save_LDFLAGS opal_check_libfabric_$1_save_LIBS])
|
||||
|
||||
# Add --with options
|
||||
AC_ARG_WITH([libfabric],
|
||||
[AC_HELP_STRING([--with-libfabric=DIR],
|
||||
[Specify location of libfabric installation, adding DIR/include to the default search location for libfabric headers, and DIR/lib or DIR/lib64 to the default search location for libfabric libraries. Error if libfabric support cannot be found.])])
|
||||
AC_ARG_WITH([libfabric-libdir],
|
||||
[AC_HELP_STRING([--with-libfabric-libdir=DIR],
|
||||
[Search for libfabric libraries in DIR])])
|
||||
# Add --with options
|
||||
AC_ARG_WITH([libfabric],
|
||||
[AC_HELP_STRING([--with-libfabric=DIR],
|
||||
[Specify location of libfabric installation, adding DIR/include to the default search location for libfabric headers, and DIR/lib or DIR/lib64 to the default search location for libfabric libraries. Error if libfabric support cannot be found.])])
|
||||
AC_ARG_WITH([libfabric-libdir],
|
||||
[AC_HELP_STRING([--with-libfabric-libdir=DIR],
|
||||
[Search for libfabric libraries in DIR])])
|
||||
|
||||
# Sanity check the --with values
|
||||
OPAL_CHECK_WITHDIR([libfabric], [$with_libfabric],
|
||||
[include/rdma/fabric.h])
|
||||
OPAL_CHECK_WITHDIR([libfabric-libdir], [$with_libfabric_libdir],
|
||||
[libfabric.*])
|
||||
# Sanity check the --with values
|
||||
OPAL_CHECK_WITHDIR([libfabric], [$with_libfabric],
|
||||
[include/rdma/fabric.h])
|
||||
OPAL_CHECK_WITHDIR([libfabric-libdir], [$with_libfabric_libdir],
|
||||
[libfabric.*])
|
||||
|
||||
opal_check_libfabric_$1_save_CPPFLAGS=$CPPFLAGS
|
||||
opal_check_libfabric_$1_save_LDFLAGS=$LDFLAGS
|
||||
opal_check_libfabric_$1_save_LIBS=$LIBS
|
||||
opal_check_libfabric_$1_save_CPPFLAGS=$CPPFLAGS
|
||||
opal_check_libfabric_$1_save_LDFLAGS=$LDFLAGS
|
||||
opal_check_libfabric_$1_save_LIBS=$LIBS
|
||||
|
||||
opal_check_libfabric_happy=1
|
||||
AS_IF([test "$with_libfabric" = "no"],
|
||||
[opal_check_libfabric_happy=0])
|
||||
opal_check_libfabric_happy=yes
|
||||
AS_IF([test "$with_libfabric" = "no"],
|
||||
[opal_check_libfabric_happy=no])
|
||||
|
||||
AS_IF([test $opal_check_libfabric_happy -eq 1],
|
||||
[AC_MSG_CHECKING([looking for libfabric in])
|
||||
AS_IF([test "$with_libfabric" != "yes"],
|
||||
[opal_libfabric_dir=$with_libfabric
|
||||
AC_MSG_RESULT([($opal_libfabric_dir)])],
|
||||
[AC_MSG_RESULT([(default search paths)])])
|
||||
AS_IF([test ! -z "$with_libfabric_libdir" && \
|
||||
test "$with_libfabric_libdir" != "yes"],
|
||||
[opal_libfabric_libdir=$with_libfabric_libdir])
|
||||
])
|
||||
AS_IF([test $opal_check_libfabric_happy = yes],
|
||||
[AC_MSG_CHECKING([looking for libfabric in])
|
||||
AS_IF([test "$with_libfabric" != "yes"],
|
||||
[opal_libfabric_dir=$with_libfabric
|
||||
AC_MSG_RESULT([($opal_libfabric_dir)])],
|
||||
[AC_MSG_RESULT([(default search paths)])])
|
||||
AS_IF([test ! -z "$with_libfabric_libdir" && \
|
||||
test "$with_libfabric_libdir" != "yes"],
|
||||
[opal_libfabric_libdir=$with_libfabric_libdir])
|
||||
])
|
||||
|
||||
AS_IF([test $opal_check_libfabric_happy -eq 1],
|
||||
[OPAL_CHECK_PACKAGE([$1],
|
||||
[rdma/fabric.h],
|
||||
[fabric],
|
||||
[fi_getinfo],
|
||||
[],
|
||||
[$opal_libfabric_dir],
|
||||
[$opal_libfabric_libdir],
|
||||
[opal_check_libfabric_happy=1],
|
||||
[opal_check_libfabric_happy=0])])
|
||||
AS_IF([test $opal_check_libfabric_happy = yes],
|
||||
[OPAL_CHECK_PACKAGE([opal_check_libfabric],
|
||||
[rdma/fabric.h],
|
||||
[fabric],
|
||||
[fi_getinfo],
|
||||
[],
|
||||
[$opal_libfabric_dir],
|
||||
[$opal_libfabric_libdir],
|
||||
[],
|
||||
[opal_check_libfabric_happy=no])])
|
||||
|
||||
CPPFLAGS=$opal_check_libfabric_$1_save_CPPFLAGS
|
||||
LDFLAGS=$opal_check_libfabric_$1_save_LDFLAGS
|
||||
LIBS=$opal_check_libfabric_$1_save_LIBS
|
||||
CPPFLAGS=$opal_check_libfabric_$1_save_CPPFLAGS
|
||||
LDFLAGS=$opal_check_libfabric_$1_save_LDFLAGS
|
||||
LIBS=$opal_check_libfabric_$1_save_LIBS
|
||||
|
||||
AC_SUBST($1_CPPFLAGS)
|
||||
AC_SUBST($1_LDFLAGS)
|
||||
AC_SUBST($1_LIBS)
|
||||
OMPI_SUMMARY_ADD([[Transports]],[[OpenFabrics libfabric]],[$1],[$opal_check_libfabric_happy])
|
||||
|
||||
AS_IF([test $opal_check_libfabric_happy -eq 1],
|
||||
OPAL_VAR_SCOPE_POP
|
||||
fi
|
||||
|
||||
if test $opal_check_libfabric_happy = yes ; then
|
||||
$1_CPPFLAGS="[$]$1_CPPFLAGS $opal_check_libfabric_CPPFLAGS"
|
||||
$1_LIBS="[$]$1_LIBS $opal_check_libfabric_LIBS"
|
||||
$1_LDFLAGS="[$]$1_LDFLAGS $opal_check_libfabric_LDFLAGS"
|
||||
|
||||
AC_SUBST($1_CPPFLAGS)
|
||||
AC_SUBST($1_LDFLAGS)
|
||||
AC_SUBST($1_LIBS)
|
||||
fi
|
||||
|
||||
AS_IF([test $opal_check_libfabric_happy = yes],
|
||||
[$2],
|
||||
[AS_IF([test "$opal_want_libfabric" = "yes"],
|
||||
[AC_MSG_WARN([libfabric support requested (via --with-libfabric), but not found.])
|
||||
AC_MSG_ERROR([Cannot continue.])])
|
||||
$3])
|
||||
|
||||
OPAL_VAR_SCOPE_POP
|
||||
])dnl
|
||||
|
@ -11,7 +11,7 @@
|
||||
# Copyright (c) 2004-2005 The Regents of the University of California.
|
||||
# All rights reserved.
|
||||
# Copyright (c) 2006-2015 Cisco Systems, Inc. All rights reserved.
|
||||
# Copyright (c) 2006-2015 Los Alamos National Security, LLC. All rights
|
||||
# Copyright (c) 2006-2016 Los Alamos National Security, LLC. All rights
|
||||
# reserved.
|
||||
# Copyright (c) 2006-2009 Mellanox Technologies. All rights reserved.
|
||||
# Copyright (c) 2010-2012 Oracle and/or its affiliates. All rights reserved.
|
||||
@ -38,253 +38,265 @@ AC_DEFUN([OPAL_CHECK_OPENFABRICS],[
|
||||
# verbs stuff lives.
|
||||
AC_REQUIRE([OPAL_CHECK_VERBS_DIR])
|
||||
|
||||
#
|
||||
# Add padding to OpenIB header
|
||||
#
|
||||
AC_ARG_ENABLE([openib-control-hdr-padding],
|
||||
[AC_HELP_STRING([--enable-openib-control-hdr-padding],
|
||||
[Add padding bytes to the openib BTL control header (default:disabled)])])
|
||||
AC_MSG_CHECKING([if want to add padding to the openib BTL control header])
|
||||
if test "$enable_openib_control_hdr_padding" = "yes"; then
|
||||
AC_MSG_RESULT([yes])
|
||||
ompi_openib_pad_hdr=1
|
||||
elif test "$enable_openib_control_hdr_padding" = "no"; then
|
||||
AC_MSG_RESULT([no])
|
||||
ompi_openib_pad_hdr=0
|
||||
else
|
||||
#
|
||||
# Enable padding for SPARC platforms by default because the
|
||||
# btl will segv otherwise. Keep padding disabled for other
|
||||
# platforms since there are some performance implications with
|
||||
# padding on for those plaforms.
|
||||
#
|
||||
case "${host}" in
|
||||
sparc*)
|
||||
AC_MSG_RESULT([yes (enabled by default on SPARC)])
|
||||
if test -z "$opal_check_openib_happy" ; then
|
||||
#
|
||||
# Add padding to OpenIB header
|
||||
#
|
||||
AC_ARG_ENABLE([openib-control-hdr-padding],
|
||||
[AC_HELP_STRING([--enable-openib-control-hdr-padding],
|
||||
[Add padding bytes to the openib BTL control header (default:disabled)])])
|
||||
AC_MSG_CHECKING([if want to add padding to the openib BTL control header])
|
||||
if test "$enable_openib_control_hdr_padding" = "yes"; then
|
||||
AC_MSG_RESULT([yes])
|
||||
ompi_openib_pad_hdr=1
|
||||
;;
|
||||
*)
|
||||
elif test "$enable_openib_control_hdr_padding" = "no"; then
|
||||
AC_MSG_RESULT([no])
|
||||
ompi_openib_pad_hdr=0
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
AC_DEFINE_UNQUOTED([OPAL_OPENIB_PAD_HDR], [$ompi_openib_pad_hdr],
|
||||
[Add padding bytes to the openib BTL control header])
|
||||
else
|
||||
#
|
||||
# Enable padding for SPARC platforms by default because the
|
||||
# btl will segv otherwise. Keep padding disabled for other
|
||||
# platforms since there are some performance implications with
|
||||
# padding on for those plaforms.
|
||||
#
|
||||
case "${host}" in
|
||||
sparc*)
|
||||
AC_MSG_RESULT([yes (enabled by default on SPARC)])
|
||||
ompi_openib_pad_hdr=1
|
||||
;;
|
||||
*)
|
||||
AC_MSG_RESULT([no])
|
||||
ompi_openib_pad_hdr=0
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
AC_DEFINE_UNQUOTED([OPAL_OPENIB_PAD_HDR], [$ompi_openib_pad_hdr],
|
||||
[Add padding bytes to the openib BTL control header])
|
||||
|
||||
AS_IF([test "$opal_want_verbs" = "no"],
|
||||
[opal_check_openib_happy="no"],
|
||||
[opal_check_openib_happy="yes"])
|
||||
AS_IF([test "$opal_want_verbs" = "no"],
|
||||
[opal_check_openib_happy="no"],
|
||||
[opal_check_openib_happy="yes"])
|
||||
|
||||
ompi_check_openib_$1_save_CPPFLAGS="$CPPFLAGS"
|
||||
ompi_check_openib_$1_save_LDFLAGS="$LDFLAGS"
|
||||
ompi_check_openib_$1_save_LIBS="$LIBS"
|
||||
ompi_check_openib_$1_save_CPPFLAGS="$CPPFLAGS"
|
||||
ompi_check_openib_$1_save_LDFLAGS="$LDFLAGS"
|
||||
ompi_check_openib_$1_save_LIBS="$LIBS"
|
||||
|
||||
AS_IF([test "$opal_check_openib_happy" = "yes"],
|
||||
[AC_CHECK_HEADERS(
|
||||
fcntl.h sys/poll.h,
|
||||
[],
|
||||
[AC_MSG_WARN([fcntl.h sys/poll.h not found. Can not build component.])
|
||||
opal_check_openib_happy="no"])])
|
||||
AS_IF([test "$opal_check_openib_happy" = "yes"],
|
||||
[AC_CHECK_HEADERS(
|
||||
fcntl.h sys/poll.h,
|
||||
[],
|
||||
[AC_MSG_WARN([fcntl.h sys/poll.h not found. Can not build component.])
|
||||
opal_check_openib_happy="no"])])
|
||||
|
||||
AS_IF([test "$opal_check_openib_happy" = "yes"],
|
||||
[OPAL_CHECK_PACKAGE([$1],
|
||||
[infiniband/verbs.h],
|
||||
[ibverbs],
|
||||
[ibv_open_device],
|
||||
[],
|
||||
[$opal_verbs_dir],
|
||||
[$opal_verbs_libdir],
|
||||
[opal_check_openib_happy="yes"],
|
||||
[opal_check_openib_happy="no"])])
|
||||
AS_IF([test "$opal_check_openib_happy" = "yes"],
|
||||
[OPAL_CHECK_PACKAGE([opal_check_openib],
|
||||
[infiniband/verbs.h],
|
||||
[ibverbs],
|
||||
[ibv_open_device],
|
||||
[],
|
||||
[$opal_verbs_dir],
|
||||
[$opal_verbs_libdir],
|
||||
[opal_check_openib_happy="yes"],
|
||||
[opal_check_openib_happy="no"])])
|
||||
|
||||
CPPFLAGS="$CPPFLAGS $$1_CPPFLAGS"
|
||||
LDFLAGS="$LDFLAGS $$1_LDFLAGS"
|
||||
LIBS="$LIBS $$1_LIBS"
|
||||
CPPFLAGS="$CPPFLAGS $opal_check_openib_CPPFLAGS"
|
||||
LDFLAGS="$LDFLAGS $opal_check_openib_LDFLAGS"
|
||||
LIBS="$LIBS $opal_check_openib_LIBS"
|
||||
|
||||
AS_IF([test "$opal_check_openib_happy" = "yes"],
|
||||
[AC_CACHE_CHECK(
|
||||
[number of arguments to ibv_create_cq],
|
||||
[ompi_cv_func_ibv_create_cq_args],
|
||||
[AC_LINK_IFELSE(
|
||||
[AC_LANG_PROGRAM(
|
||||
[[#include <infiniband/verbs.h> ]],
|
||||
[[ibv_create_cq(NULL, 0, NULL, NULL, 0);]])],
|
||||
[ompi_cv_func_ibv_create_cq_args=5],
|
||||
[AC_LINK_IFELSE(
|
||||
[AC_LANG_PROGRAM(
|
||||
[[#include <infiniband/verbs.h> ]],
|
||||
[[ibv_create_cq(NULL, 0, NULL);]])],
|
||||
[ompi_cv_func_ibv_create_cq_args=3],
|
||||
[ompi_cv_func_ibv_create_cq_args="unknown"])])])
|
||||
AS_IF([test "$ompi_cv_func_ibv_create_cq_args" = "unknown"],
|
||||
[AC_MSG_WARN([Can not determine number of args to ibv_create_cq.])
|
||||
AC_MSG_WARN([Not building component.])
|
||||
opal_check_openib_happy="no"],
|
||||
[AC_DEFINE_UNQUOTED([OPAL_IBV_CREATE_CQ_ARGS],
|
||||
[$ompi_cv_func_ibv_create_cq_args],
|
||||
[Number of arguments to ibv_create_cq])])])
|
||||
AS_IF([test "$opal_check_openib_happy" = "yes"],
|
||||
[AC_CACHE_CHECK(
|
||||
[number of arguments to ibv_create_cq],
|
||||
[ompi_cv_func_ibv_create_cq_args],
|
||||
[AC_LINK_IFELSE(
|
||||
[AC_LANG_PROGRAM(
|
||||
[[#include <infiniband/verbs.h> ]],
|
||||
[[ibv_create_cq(NULL, 0, NULL, NULL, 0);]])],
|
||||
[ompi_cv_func_ibv_create_cq_args=5],
|
||||
[AC_LINK_IFELSE(
|
||||
[AC_LANG_PROGRAM(
|
||||
[[#include <infiniband/verbs.h> ]],
|
||||
[[ibv_create_cq(NULL, 0, NULL);]])],
|
||||
[ompi_cv_func_ibv_create_cq_args=3],
|
||||
[ompi_cv_func_ibv_create_cq_args="unknown"])])])
|
||||
AS_IF([test "$ompi_cv_func_ibv_create_cq_args" = "unknown"],
|
||||
[AC_MSG_WARN([Can not determine number of args to ibv_create_cq.])
|
||||
AC_MSG_WARN([Not building component.])
|
||||
opal_check_openib_happy="no"],
|
||||
[AC_DEFINE_UNQUOTED([OPAL_IBV_CREATE_CQ_ARGS],
|
||||
[$ompi_cv_func_ibv_create_cq_args],
|
||||
[Number of arguments to ibv_create_cq])])])
|
||||
|
||||
#
|
||||
# OpenIB dynamic SL
|
||||
#
|
||||
AC_ARG_ENABLE([openib-dynamic-sl],
|
||||
[AC_HELP_STRING([--enable-openib-dynamic-sl],
|
||||
[Enable openib BTL to query Subnet Manager for IB SL (default: enabled)])])
|
||||
#
|
||||
# OpenIB dynamic SL
|
||||
#
|
||||
AC_ARG_ENABLE([openib-dynamic-sl],
|
||||
[AC_HELP_STRING([--enable-openib-dynamic-sl],
|
||||
[Enable openib BTL to query Subnet Manager for IB SL (default: enabled)])])
|
||||
|
||||
# Set these up so that we can do an AC_DEFINE below
|
||||
# (unconditionally)
|
||||
$1_have_xrc=0
|
||||
$1_have_xrc_domains=0
|
||||
$1_have_opensm_devel=0
|
||||
# Set these up so that we can do an AC_DEFINE below
|
||||
# (unconditionally)
|
||||
opal_check_openib_have_xrc=0
|
||||
opal_check_openib_have_xrc_domains=0
|
||||
opal_check_openib_have_opensm_devel=0
|
||||
|
||||
# If we have the openib stuff available, find out what we've got
|
||||
AS_IF([test "$opal_check_openib_happy" = "yes"],
|
||||
[AC_CHECK_DECLS([IBV_EVENT_CLIENT_REREGISTER, IBV_ACCESS_SO, IBV_ATOMIC_HCA], [], [],
|
||||
[#include <infiniband/verbs.h>])
|
||||
AC_CHECK_FUNCS([ibv_get_device_list ibv_resize_cq])
|
||||
|
||||
# struct ibv_device.transport_type was added in OFED v1.2
|
||||
AC_CHECK_MEMBERS([struct ibv_device.transport_type], [], [],
|
||||
[#include <infiniband/verbs.h>])
|
||||
|
||||
# We have to check functions both exits *and* are declared
|
||||
# since some distro ship broken ibverbs devel headers
|
||||
# IBV_DEVICE_XRC is common to all OFED versions
|
||||
# ibv_create_xrc_rcv_qp was added in OFED 1.3
|
||||
# ibv_cmd_open_xrcd (aka XRC Domains) was added in OFED 3.12
|
||||
if test "$enable_connectx_xrc" = "yes"; then
|
||||
AC_CHECK_DECLS([IBV_DEVICE_XRC],
|
||||
[$1_have_xrc=1
|
||||
$1_have_xrc_domains=1],
|
||||
[],
|
||||
# If we have the openib stuff available, find out what we've got
|
||||
AS_IF([test "$opal_check_openib_happy" = "yes"],
|
||||
[AC_CHECK_DECLS([IBV_EVENT_CLIENT_REREGISTER, IBV_ACCESS_SO, IBV_ATOMIC_HCA], [], [],
|
||||
[#include <infiniband/verbs.h>])
|
||||
fi
|
||||
if test "$enable_connectx_xrc" = "yes" \
|
||||
&& test $$1_have_xrc -eq 1; then
|
||||
AC_CHECK_DECLS([ibv_create_xrc_rcv_qp],
|
||||
[AC_CHECK_FUNCS([ibv_create_xrc_rcv_qp],
|
||||
[], [$1_have_xrc=0])],
|
||||
[$1_have_xrc=0],
|
||||
[#include <infiniband/driver.h>])
|
||||
fi
|
||||
if test "$enable_connectx_xrc" = "yes" \
|
||||
&& test $$1_have_xrc_domains -eq 1; then
|
||||
AC_CHECK_DECLS([ibv_cmd_open_xrcd],
|
||||
[AC_CHECK_DECLS([IBV_SRQT_XRC],
|
||||
[AC_CHECK_FUNCS([ibv_cmd_open_xrcd],
|
||||
[], [$1_have_xrc_domains=0])],
|
||||
[$1_have_xrc_domains=0],
|
||||
[#include <infiniband/verbs.h>])],
|
||||
[$1_have_xrc_domains=0],
|
||||
[#include <infiniband/driver.h>])
|
||||
# XRC and XRC Domains should be considered as exclusive
|
||||
if test "$$1_have_xrc" -eq 1 && \
|
||||
test "$$1_have_xrc_domains" -eq 1; then
|
||||
$1_have_xrc=0
|
||||
AC_CHECK_FUNCS([ibv_get_device_list ibv_resize_cq])
|
||||
|
||||
# struct ibv_device.transport_type was added in OFED v1.2
|
||||
AC_CHECK_MEMBERS([struct ibv_device.transport_type], [], [],
|
||||
[#include <infiniband/verbs.h>])
|
||||
|
||||
# We have to check functions both exits *and* are declared
|
||||
# since some distro ship broken ibverbs devel headers
|
||||
# IBV_DEVICE_XRC is common to all OFED versions
|
||||
# ibv_create_xrc_rcv_qp was added in OFED 1.3
|
||||
# ibv_cmd_open_xrcd (aka XRC Domains) was added in OFED 3.12
|
||||
if test "$enable_connectx_xrc" = "yes"; then
|
||||
AC_CHECK_DECLS([IBV_DEVICE_XRC],
|
||||
[opal_check_openib_have_xrc=1
|
||||
opal_check_openib_have_xrc_domains=1],
|
||||
[],
|
||||
[#include <infiniband/verbs.h>])
|
||||
fi
|
||||
if test "$enable_connectx_xrc" = "yes" \
|
||||
&& test $opal_check_openib_have_xrc -eq 1; then
|
||||
AC_CHECK_DECLS([ibv_create_xrc_rcv_qp],
|
||||
[AC_CHECK_FUNCS([ibv_create_xrc_rcv_qp],
|
||||
[], [opal_check_openib_have_xrc=0])],
|
||||
[opal_check_openib_have_xrc=0],
|
||||
[#include <infiniband/driver.h>])
|
||||
fi
|
||||
if test "$enable_connectx_xrc" = "yes" \
|
||||
&& test $opal_check_openib_have_xrc_domains -eq 1; then
|
||||
AC_CHECK_DECLS([ibv_cmd_open_xrcd],
|
||||
[AC_CHECK_DECLS([IBV_SRQT_XRC],
|
||||
[AC_CHECK_FUNCS([ibv_cmd_open_xrcd],
|
||||
[], [opal_check_openib_have_xrc_domains=0])],
|
||||
[opal_check_openib_have_xrc_domains=0],
|
||||
[#include <infiniband/verbs.h>])],
|
||||
[opal_check_openib_have_xrc_domains=0],
|
||||
[#include <infiniband/driver.h>])
|
||||
# XRC and XRC Domains should be considered as exclusive
|
||||
if test "$opal_check_openib_have_xrc" -eq 1 && \
|
||||
test "$opal_check_openib_have_xrc_domains" -eq 1; then
|
||||
opal_check_openib_have_xrc=0
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
if test "no" != "$enable_openib_dynamic_sl"; 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],
|
||||
[AC_CHECK_LIB([osmcomp], [cl_map_init],
|
||||
[$1_have_opensm_devel=1],[])],
|
||||
[],
|
||||
[])
|
||||
# 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/library files could not be found])
|
||||
AC_MSG_WARN([Please install opensm-devel if you need dynamic SL support])
|
||||
AC_MSG_ERROR([Cannot continue])])])
|
||||
fi
|
||||
if test "no" != "$enable_openib_dynamic_sl"; 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],
|
||||
[AC_CHECK_LIB([osmcomp], [cl_map_init],
|
||||
[opal_check_openib_have_opensm_devel=1],[])],
|
||||
[],
|
||||
[])
|
||||
# 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 "$opal_check_openib_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/library files could not be found])
|
||||
AC_MSG_WARN([Please install opensm-devel if you need dynamic SL support])
|
||||
AC_MSG_ERROR([Cannot continue])])])
|
||||
fi
|
||||
|
||||
|
||||
# Check support for RDMAoE devices
|
||||
$1_have_rdmaoe=0
|
||||
AC_CHECK_DECLS([IBV_LINK_LAYER_ETHERNET],
|
||||
[$1_have_rdmaoe=1], [],
|
||||
[#include <infiniband/verbs.h>])
|
||||
# Check support for RDMAoE devices
|
||||
$1_have_rdmaoe=0
|
||||
AC_CHECK_DECLS([IBV_LINK_LAYER_ETHERNET],
|
||||
[$1_have_rdmaoe=1], [],
|
||||
[#include <infiniband/verbs.h>])
|
||||
|
||||
AC_MSG_CHECKING([if RDMAoE support is enabled])
|
||||
AC_DEFINE_UNQUOTED([OPAL_HAVE_RDMAOE], [$$1_have_rdmaoe], [Enable RDMAoE support])
|
||||
if test "1" = "$$1_have_rdmaoe"; then
|
||||
AC_MSG_RESULT([yes])
|
||||
else
|
||||
AC_MSG_RESULT([no])
|
||||
fi
|
||||
AC_MSG_CHECKING([if RDMAoE support is enabled])
|
||||
AC_DEFINE_UNQUOTED([OPAL_HAVE_RDMAOE], [$$1_have_rdmaoe], [Enable RDMAoE support])
|
||||
if test "1" = "$$1_have_rdmaoe"; then
|
||||
AC_MSG_RESULT([yes])
|
||||
else
|
||||
AC_MSG_RESULT([no])
|
||||
fi
|
||||
|
||||
])
|
||||
])
|
||||
|
||||
# Check to see if <infiniband/driver.h> works. It is known to
|
||||
# create problems on some platforms with some compilers (e.g.,
|
||||
# RHEL4U3 with the PGI 32 bit compiler). Use undocumented (in AC
|
||||
# 2.63) feature of AC_CHECK_HEADERS: if you explicitly pass in
|
||||
# AC_INCLUDES_DEFAULT as the 4th arg to AC_CHECK_HEADERS, the test
|
||||
# will fail if the header is present but not compilable, *but it
|
||||
# will not print the big scary warning*. See
|
||||
# http://lists.gnu.org/archive/html/autoconf/2008-10/msg00143.html.
|
||||
AS_IF([test "$opal_check_openib_happy" = "yes"],
|
||||
[AC_CHECK_HEADERS([infiniband/driver.h], [], [],
|
||||
[AC_INCLUDES_DEFAULT])])
|
||||
# Check to see if <infiniband/driver.h> works. It is known to
|
||||
# create problems on some platforms with some compilers (e.g.,
|
||||
# RHEL4U3 with the PGI 32 bit compiler). Use undocumented (in AC
|
||||
# 2.63) feature of AC_CHECK_HEADERS: if you explicitly pass in
|
||||
# AC_INCLUDES_DEFAULT as the 4th arg to AC_CHECK_HEADERS, the test
|
||||
# will fail if the header is present but not compilable, *but it
|
||||
# will not print the big scary warning*. See
|
||||
# http://lists.gnu.org/archive/html/autoconf/2008-10/msg00143.html.
|
||||
AS_IF([test "$opal_check_openib_happy" = "yes"],
|
||||
[AC_CHECK_HEADERS([infiniband/driver.h], [], [],
|
||||
[AC_INCLUDES_DEFAULT])])
|
||||
|
||||
AC_MSG_CHECKING([if ConnectX XRC support is enabled])
|
||||
AC_DEFINE_UNQUOTED([OPAL_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])
|
||||
AC_MSG_CHECKING([if ConnectX XRC support is enabled])
|
||||
AC_DEFINE_UNQUOTED([OPAL_HAVE_CONNECTX_XRC], [$opal_check_openib_have_xrc],
|
||||
[Enable features required for ConnectX XRC support])
|
||||
if test "1" = "$opal_check_openib_have_xrc"; then
|
||||
AC_MSG_RESULT([yes])
|
||||
else
|
||||
AC_MSG_RESULT([no])
|
||||
fi
|
||||
|
||||
AC_MSG_CHECKING([if ConnectIB XRC support is enabled])
|
||||
AC_DEFINE_UNQUOTED([OPAL_HAVE_CONNECTX_XRC_DOMAINS], [$opal_check_openib_have_xrc_domains],
|
||||
[Enable features required for XRC domains support])
|
||||
if test "1" = "$opal_check_openib_have_xrc_domains"; then
|
||||
AC_MSG_RESULT([yes])
|
||||
else
|
||||
AC_MSG_RESULT([no])
|
||||
fi
|
||||
|
||||
AC_MSG_CHECKING([if dynamic SL is enabled])
|
||||
AC_DEFINE_UNQUOTED([OPAL_ENABLE_DYNAMIC_SL], [$opal_check_openib_have_opensm_devel],
|
||||
[Enable features required for dynamic SL support])
|
||||
if test "1" = "$opal_check_openib_have_opensm_devel"; then
|
||||
AC_MSG_RESULT([yes])
|
||||
$1_LIBS="-losmcomp $$1_LIBS"
|
||||
else
|
||||
AC_MSG_RESULT([no])
|
||||
fi
|
||||
|
||||
AS_IF([test -z "$opal_verbs_dir"],
|
||||
[openib_include_dir="/usr/include"],
|
||||
[openib_include_dir="$opal_verbs_dir/include"])
|
||||
opal_check_openib_CPPFLAGS="$opal_check_openib_CPPFLAGS -I$openib_include_dir/infiniband"
|
||||
|
||||
CPPFLAGS="$ompi_check_openib_$1_save_CPPFLAGS"
|
||||
LDFLAGS="$ompi_check_openib_$1_save_LDFLAGS"
|
||||
LIBS="$ompi_check_openib_$1_save_LIBS"
|
||||
|
||||
OMPI_SUMMARY_ADD([[Transports]],[[OpenFabrics Verbs]],[$1],[$opal_check_openib_happy])
|
||||
|
||||
OPAL_VAR_SCOPE_POP
|
||||
fi
|
||||
|
||||
AC_MSG_CHECKING([if ConnectIB XRC support is enabled])
|
||||
AC_DEFINE_UNQUOTED([OPAL_HAVE_CONNECTX_XRC_DOMAINS], [$$1_have_xrc_domains],
|
||||
[Enable features required for XRC domains support])
|
||||
if test "1" = "$$1_have_xrc_domains"; then
|
||||
AC_MSG_RESULT([yes])
|
||||
else
|
||||
AC_MSG_RESULT([no])
|
||||
fi
|
||||
|
||||
AC_MSG_CHECKING([if dynamic SL is enabled])
|
||||
AC_DEFINE_UNQUOTED([OPAL_ENABLE_DYNAMIC_SL], [$$1_have_opensm_devel],
|
||||
[Enable features required for dynamic SL support])
|
||||
if test "1" = "$$1_have_opensm_devel"; then
|
||||
AC_MSG_RESULT([yes])
|
||||
$1_LIBS="-losmcomp $$1_LIBS"
|
||||
else
|
||||
AC_MSG_RESULT([no])
|
||||
fi
|
||||
|
||||
AS_IF([test -z "$opal_verbs_dir"],
|
||||
[openib_include_dir="/usr/include"],
|
||||
[openib_include_dir="$opal_verbs_dir/include"])
|
||||
$1_CPPFLAGS="$$1_CPPFLAGS -I$openib_include_dir/infiniband"
|
||||
|
||||
CPPFLAGS="$ompi_check_openib_$1_save_CPPFLAGS"
|
||||
LDFLAGS="$ompi_check_openib_$1_save_LDFLAGS"
|
||||
LIBS="$ompi_check_openib_$1_save_LIBS"
|
||||
$1_have_xrc=$opal_check_openib_have_xrc
|
||||
$1_have_xrc_domains=$opal_check_openib_have_xrc_domains
|
||||
$1_have_opensm_devel=$opal_check_openib_have_opensm_devel
|
||||
|
||||
AS_IF([test "$opal_check_openib_happy" = "yes"],
|
||||
[$2],
|
||||
[$1_CPPFLAGS="[$]$1_CPPFLAGS $opal_check_openib_CPPFLAGS"
|
||||
$1_LDFLAGS="[$]$1_LDFLAGS $opal_check_openib_LDFLAGS"
|
||||
$1_LIBS="[$]$1_LIBS $opal_check_openib_LIBS"
|
||||
$2],
|
||||
[AS_IF([test "$opal_want_verbs" = "yes"],
|
||||
[AC_MSG_WARN([Verbs support requested (via --with-verbs) but not found.])
|
||||
AC_MSG_WARN([If you are using libibverbs v1.0 (i.e., OFED v1.0 or v1.1), you *MUST* have both the libsysfs headers and libraries installed. Later versions of libibverbs do not require libsysfs.])
|
||||
AC_MSG_ERROR([Aborting.])])
|
||||
$3])
|
||||
|
||||
OPAL_VAR_SCOPE_POP
|
||||
])
|
||||
|
||||
AC_DEFUN([OPAL_CHECK_OPENFABRICS_CM_ARGS],[
|
||||
|
@ -14,6 +14,8 @@ dnl Copyright (c) 2006 QLogic Corp. All rights reserved.
|
||||
dnl Copyright (c) 2009 Cisco Systems, Inc. All rights reserved.
|
||||
dnl Copyright (c) 2015 Research Organization for Information Science
|
||||
dnl and Technology (RIST). All rights reserved.
|
||||
dnl Copyright (c) 2016 Los Alamos National Security, LLC. All rights
|
||||
dnl reserved.
|
||||
dnl $COPYRIGHT$
|
||||
dnl
|
||||
dnl Additional copyrights may follow
|
||||
@ -27,72 +29,79 @@ dnl
|
||||
# LDFLAGS, LIBS} as needed and runs action-if-found if there is
|
||||
# support, otherwise executes action-if-not-found
|
||||
AC_DEFUN([OPAL_CHECK_PORTALS4],[
|
||||
AC_ARG_WITH([portals4],
|
||||
[AC_HELP_STRING([--with-portals4(=DIR)],
|
||||
[Build Portals4 support, optionally adding DIR/include, DIR/lib, and DIR/lib64 to the search path for headers and libraries])])
|
||||
OPAL_CHECK_WITHDIR([portals4], [$with_portals4], [include/portals4.h])
|
||||
AC_ARG_WITH([portals4-libdir],
|
||||
[AC_HELP_STRING([--with-portals4-libdir=DIR],
|
||||
[Search for Portals4 libraries in DIR])])
|
||||
OPAL_CHECK_WITHDIR([portals4-libdir], [$with_portals4_libdir], [libportals.*])
|
||||
if test -z "$ompi_check_portals4_happy" ; then
|
||||
AC_ARG_WITH([portals4],
|
||||
[AC_HELP_STRING([--with-portals4(=DIR)],
|
||||
[Build Portals4 support, optionally adding DIR/include, DIR/lib, and DIR/lib64 to the search path for headers and libraries])])
|
||||
OPAL_CHECK_WITHDIR([portals4], [$with_portals4], [include/portals4.h])
|
||||
AC_ARG_WITH([portals4-libdir],
|
||||
[AC_HELP_STRING([--with-portals4-libdir=DIR],
|
||||
[Search for Portals4 libraries in DIR])])
|
||||
OPAL_CHECK_WITHDIR([portals4-libdir], [$with_portals4_libdir], [libportals.*])
|
||||
|
||||
ompi_check_portals4_$1_save_CPPFLAGS="$CPPFLAGS"
|
||||
ompi_check_portals4_$1_save_LDFLAGS="$LDFLAGS"
|
||||
ompi_check_portals4_$1_save_LIBS="$LIBS"
|
||||
ompi_check_portals4_$1_save_CPPFLAGS="$CPPFLAGS"
|
||||
ompi_check_portals4_$1_save_LDFLAGS="$LDFLAGS"
|
||||
ompi_check_portals4_$1_save_LIBS="$LIBS"
|
||||
|
||||
AS_IF([test "$with_portals4" != "no"],
|
||||
[AS_IF([test ! -z "$with_portals4" && test "$with_portals4" != "yes"],
|
||||
[ompi_check_portals4_dir="$with_portals4"])
|
||||
AS_IF([test ! -z "$with_portals4_libdir" && test "$with_portals4_libdir" != "yes"],
|
||||
[ompi_check_portals4_libdir="$with_portals4_libdir"])
|
||||
AS_IF([test "$with_portals4" != "no"],
|
||||
[AS_IF([test ! -z "$with_portals4" && test "$with_portals4" != "yes"],
|
||||
[ompi_check_portals4_dir="$with_portals4"])
|
||||
AS_IF([test ! -z "$with_portals4_libdir" && test "$with_portals4_libdir" != "yes"],
|
||||
[ompi_check_portals4_libdir="$with_portals4_libdir"])
|
||||
|
||||
OPAL_CHECK_PACKAGE([$1],
|
||||
[portals4.h],
|
||||
[portals],
|
||||
[PtlLEAppend],
|
||||
[],
|
||||
[$ompi_check_portals4_dir],
|
||||
[$ompi_check_portals4_libdir],
|
||||
[ompi_check_portals4_happy="yes"],
|
||||
[ompi_check_portals4_happy="no"])],
|
||||
[ompi_check_portals4_happy="no"])
|
||||
OPAL_CHECK_PACKAGE([opal_check_portals4],
|
||||
[portals4.h],
|
||||
[portals],
|
||||
[PtlLEAppend],
|
||||
[],
|
||||
[$ompi_check_portals4_dir],
|
||||
[$ompi_check_portals4_libdir],
|
||||
[ompi_check_portals4_happy="yes"],
|
||||
[ompi_check_portals4_happy="no"])],
|
||||
[ompi_check_portals4_happy="no"])
|
||||
|
||||
CPPFLAGS="$ompi_check_portals4_$1_save_CPPFLAGS"
|
||||
LDFLAGS="$ompi_check_portals4_$1_save_LDFLAGS"
|
||||
LIBS="$ompi_check_portals4_$1_save_LIBS"
|
||||
CPPFLAGS="$ompi_check_portals4_$1_save_CPPFLAGS"
|
||||
LDFLAGS="$ompi_check_portals4_$1_save_LDFLAGS"
|
||||
LIBS="$ompi_check_portals4_$1_save_LIBS"
|
||||
|
||||
max_md_size=0
|
||||
AC_ARG_WITH([portals4-max-md-size],
|
||||
[AC_HELP_STRING([--with-portals4-max-md-size=SIZE],
|
||||
[Log base 2 of the maximum size in bytes of a memory descriptor. Should only be set for implementations which do not support binding all of virtual address space.])])
|
||||
AS_IF([test "$with_portals4_max_md_size" = "yes" || test "$with_portals4_max_md_size" = "no"],
|
||||
[AC_MSG_ERROR([--with-portals4-max-md-size requires an integer argument])],
|
||||
[AS_IF([test -n "$with_portals4_max_md_size"],
|
||||
[max_md_size="$with_portals4_max_md_size"])])
|
||||
AC_DEFINE_UNQUOTED([OPAL_PORTALS4_MAX_MD_SIZE], [$max_md_size],
|
||||
[Log base 2 of the maximum size in bytes of a memory descriptor. Set to 0 if MD can bind all of memory.])
|
||||
max_md_size=0
|
||||
AC_ARG_WITH([portals4-max-md-size],
|
||||
[AC_HELP_STRING([--with-portals4-max-md-size=SIZE],
|
||||
[Log base 2 of the maximum size in bytes of a memory descriptor. Should only be set for implementations which do not support binding all of virtual address space.])])
|
||||
AS_IF([test "$with_portals4_max_md_size" = "yes" || test "$with_portals4_max_md_size" = "no"],
|
||||
[AC_MSG_ERROR([--with-portals4-max-md-size requires an integer argument])],
|
||||
[AS_IF([test -n "$with_portals4_max_md_size"],
|
||||
[max_md_size="$with_portals4_max_md_size"])])
|
||||
AC_DEFINE_UNQUOTED([OPAL_PORTALS4_MAX_MD_SIZE], [$max_md_size],
|
||||
[Log base 2 of the maximum size in bytes of a memory descriptor. Set to 0 if MD can bind all of memory.])
|
||||
|
||||
max_va_size=0
|
||||
AC_ARG_WITH([portals4-max-va-size],
|
||||
[AC_HELP_STRING([--with-portals4-max-va-size=SIZE],
|
||||
[Log base 2 of the maximum size in bytes of the user virtual address space. Should only be set for implementations which do not support binding all of virtual address space.])])
|
||||
AS_IF([test "$with_portals4_max_va_size" = "yes" || test "$with_portals4_max_va_size" = "no"],
|
||||
[AC_MSG_ERROR([--with-portals4-max-va-size requires an integer argument])],
|
||||
[AS_IF([test -n "$with_portals4_max_va_size"],
|
||||
[max_va_size="$with_portals4_max_va_size"])])
|
||||
AC_DEFINE_UNQUOTED([OPAL_PORTALS4_MAX_VA_SIZE], [$max_va_size],
|
||||
[Log base 2 of the maximum size in bytes of the user virtual address space. Set to 0 if MD can bind all of memory.])
|
||||
max_va_size=0
|
||||
AC_ARG_WITH([portals4-max-va-size],
|
||||
[AC_HELP_STRING([--with-portals4-max-va-size=SIZE],
|
||||
[Log base 2 of the maximum size in bytes of the user virtual address space. Should only be set for implementations which do not support binding all of virtual address space.])])
|
||||
AS_IF([test "$with_portals4_max_va_size" = "yes" || test "$with_portals4_max_va_size" = "no"],
|
||||
[AC_MSG_ERROR([--with-portals4-max-va-size requires an integer argument])],
|
||||
[AS_IF([test -n "$with_portals4_max_va_size"],
|
||||
[max_va_size="$with_portals4_max_va_size"])])
|
||||
AC_DEFINE_UNQUOTED([OPAL_PORTALS4_MAX_VA_SIZE], [$max_va_size],
|
||||
[Log base 2 of the maximum size in bytes of the user virtual address space. Set to 0 if MD can bind all of memory.])
|
||||
|
||||
AS_IF([(test $max_md_size -eq 0 && test $max_va_size -ne 0 ) || (test $max_md_size -ne 0 && test $max_va_size -eq 0 )],
|
||||
AS_IF([(test $max_md_size -eq 0 && test $max_va_size -ne 0 ) || (test $max_md_size -ne 0 && test $max_va_size -eq 0 )],
|
||||
[AC_ERROR([If either --with-portals4-max-md-size or --with-portals4-max-va-size is set, both must be set.])])
|
||||
AS_IF([test $max_md_size -ge $max_va_size],
|
||||
[max_md_size=0
|
||||
max_va_size=0])
|
||||
AS_IF([test $max_md_size -ne 0 && test $max_va_size -ne 0],
|
||||
[AC_MSG_NOTICE([Portals 4 address space size: $max_md_size, $max_va_size])])
|
||||
AS_IF([test $max_md_size -ge $max_va_size],
|
||||
[max_md_size=0
|
||||
max_va_size=0])
|
||||
AS_IF([test $max_md_size -ne 0 && test $max_va_size -ne 0],
|
||||
[AC_MSG_NOTICE([Portals 4 address space size: $max_md_size, $max_va_size])])
|
||||
|
||||
OMPI_SUMMARY_ADD([[Transports]],[[portals4]],[$1],[$ompi_check_portals4_happy])
|
||||
fi
|
||||
|
||||
AS_IF([test "$ompi_check_portals4_happy" = "yes"],
|
||||
[$2],
|
||||
[$1_LDFLAGS="[$]$1_LDFLAGS $opal_check_portals4_LDFLAGS"
|
||||
$1_CPPFLAGS="[$]$1_CPPFLAGS $opal_check_portals4_CPPFLAGS"
|
||||
$1_LIBS="[$]$1_LIBS $opal_check_portals4_LIBS"
|
||||
$2],
|
||||
[AS_IF([test ! -z "$with_portals4" && test "$with_portals4" != "no"],
|
||||
[AC_MSG_ERROR([Portals4 support requested but not found. Aborting])])
|
||||
$3])
|
||||
|
@ -1,4 +1,4 @@
|
||||
dnl -*- Mode: Shell ; indent-tabs-mode:nil -*-
|
||||
dnl -*- Mode: Shell-script ; indent-tabs-mode:nil -*-
|
||||
dnl
|
||||
dnl Copyright (c) 2004-2005 The Trustees of Indiana University and Indiana
|
||||
dnl University Research and Technology
|
||||
@ -12,8 +12,8 @@ dnl Copyright (c) 2004-2006 The Regents of the University of California.
|
||||
dnl All rights reserved.
|
||||
dnl Copyright (c) 2006 QLogic Corp. All rights reserved.
|
||||
dnl Copyright (c) 2009 Cisco Systems, Inc. All rights reserved.
|
||||
dnl Copyright (c) 2011-2014 Los Alamos National Security, LLC.
|
||||
dnl All rights reserved.
|
||||
dnl Copyright (c) 2011-2016 Los Alamos National Security, LLC. All rights
|
||||
dnl reserved.
|
||||
dnl Copyright (c) 2014 Intel, Inc. All rights reserved
|
||||
dnl Copyright (c) 2015 Research Organization for Information Science
|
||||
dnl and Technology (RIST). All rights reserved.
|
||||
@ -32,25 +32,24 @@ dnl
|
||||
#
|
||||
|
||||
AC_DEFUN([OPAL_CHECK_UGNI], [
|
||||
AC_ARG_WITH([ugni], [AC_HELP_STRING([--with-ugni],
|
||||
[Build support for Cray GNI. Set PKG_CONFIG_PATH env. variable to specify alternate path.])])
|
||||
if test -z "$opal_check_ugni_happy" ; then
|
||||
AC_ARG_WITH([ugni], [AC_HELP_STRING([--with-ugni],
|
||||
[Build support for Cray GNI. Set PKG_CONFIG_PATH env. variable to specify alternate path.])])
|
||||
|
||||
opal_check_ugni_happy="no"
|
||||
opal_check_ugni_happy="no"
|
||||
|
||||
AS_IF([test "$with_ugni" = "no"],
|
||||
[opal_check_ugni_happy="no"],
|
||||
[PKG_CHECK_MODULES([CRAY_UGNI], [cray-ugni],
|
||||
[$1_LDFLAGS="$CRAY_UGNI_LIBS"
|
||||
$1_CPPFLAGS="$CRAY_UGNI_CFLAGS"
|
||||
opal_check_ugni_happy="yes"],
|
||||
[ opal_check_ugni_happy="no"])])
|
||||
AS_IF([test "$with_ugni" = "no"],
|
||||
[opal_check_ugni_happy="no"],
|
||||
[PKG_CHECK_MODULES([CRAY_UGNI], [cray-ugni],
|
||||
[opal_check_ugni_happy="yes"],
|
||||
[opal_check_ugni_happy="no"])])
|
||||
|
||||
opal_check_ugni_$1_save_CPPFLAGS="$CPPFLAGS"
|
||||
opal_check_ugni_$1_save_LDFLAGS="$LDFLAGS"
|
||||
opal_check_ugni_$1_save_LIBS="$LIBS"
|
||||
opal_check_ugni_$1_save_CPPFLAGS="$CPPFLAGS"
|
||||
opal_check_ugni_$1_save_LIBS="$LIBS"
|
||||
|
||||
CPPFLAGS="$CPPFLAGS $$1_CPPFLAGS"
|
||||
LDFLAGS="$LDFLAGS $$1_LDFLAGS"
|
||||
if test "$opal_check_ugni_happy" = "yes" ; then
|
||||
CPPFLAGS="$CPPFLAGS $CRAY_UGNI_CFLAGS"
|
||||
LIBS="$LIBS $CRAY_UGNI_LIBS"
|
||||
# echo "+++++++++++++++++++++++CPPFLAGS",$CPPFLAGS
|
||||
# echo "+++++++++++++++++++++++LDFLAGSS",$LDFLAGS
|
||||
# echo "+++++++++++++++++++++++1_CPPFLAGS",$$1_CPPFLAGS
|
||||
@ -58,23 +57,24 @@ AC_DEFUN([OPAL_CHECK_UGNI], [
|
||||
|
||||
# sanity checks
|
||||
|
||||
AS_IF([test "$opal_check_ugni_happy" = "yes"],
|
||||
[AC_CHECK_HEADER([gni_pub.h],[],AC_MSG_ERROR(['gni_pub.h not found.']))
|
||||
AC_CHECK_FUNCS([GNI_GetJobResInfo])])
|
||||
AC_CHECK_HEADER([gni_pub.h],[],AC_MSG_ERROR(['gni_pub.h not found.']))
|
||||
AC_CHECK_FUNCS([GNI_GetJobResInfo])
|
||||
|
||||
# AS_IF([test "$opal_check_ugni_happy" = "yes"],
|
||||
# [AC_CHECK_FUNCS([GNI_GetJobResInfo])])
|
||||
CPPFLAGS="$opal_check_ugni_$1_save_CPPFLAGS"
|
||||
LIBS="$opal_check_ugni_$1_save_LIBS"
|
||||
fi
|
||||
|
||||
CPPFLAGS="$opal_check_ugni_$1_save_CPPFLAGS"
|
||||
LDFLAGS="$opal_check_ugni_$1_save_LDFLAGS"
|
||||
LIBS="$opal_check_ugni_$1_save_LIBS"
|
||||
AS_IF([test "$opal_check_ugni_happy" = "yes" && test "$enable_progress_threads" = "yes"],
|
||||
[AC_MSG_WARN([GNI driver does not currently support progress threads. Disabling.])
|
||||
opal_check_ugni_happy="no"])
|
||||
|
||||
AS_IF([test "$opal_check_ugni_happy" = "yes" && test "$enable_progress_threads" = "yes"],
|
||||
[AC_MSG_WARN([GNI driver does not currently support progress threads. Disabling.])
|
||||
opal_check_ugni_happy="no"])
|
||||
OMPI_SUMMARY_ADD([[Transports]],[[Cray uGNI (Gemini/Aries)]],[$1],[$opal_check_ugni_happy])
|
||||
fi
|
||||
|
||||
AS_IF([test "$opal_check_ugni_happy" = "yes"],
|
||||
[$2],
|
||||
[$1_CPPFLAGS="[$]$1_CPPFLAGS $CRAY_UGNI_CFLAGS"
|
||||
$1_LIBS="[$]$1_LIBS $CRAY_UGNI_LIBS"
|
||||
$2],
|
||||
[AS_IF([test ! -z "$with_ugni" && test "$with_ugni" != "no"],
|
||||
[AC_MSG_ERROR([GNI support requested but not found. Cannot continue.])])
|
||||
$3])
|
||||
|
112
config/opal_check_xpmem.m4
Normal file
112
config/opal_check_xpmem.m4
Normal file
@ -0,0 +1,112 @@
|
||||
# -*- shell-script ; indent-tabs-mode:nil -*-
|
||||
#
|
||||
# Copyright (c) 2004-2005 The Trustees of Indiana University and Indiana
|
||||
# University Research and Technology
|
||||
# Corporation. All rights reserved.
|
||||
# Copyright (c) 2004-2005 The University of Tennessee and The University
|
||||
# of Tennessee Research Foundation. All rights
|
||||
# reserved.
|
||||
# Copyright (c) 2004-2005 High Performance Computing Center Stuttgart,
|
||||
# University of Stuttgart. All rights reserved.
|
||||
# Copyright (c) 2004-2005 The Regents of the University of California.
|
||||
# All rights reserved.
|
||||
# Copyright (c) 2009-2011 Cisco Systems, Inc. All rights reserved.
|
||||
# Copyright (c) 2011-2016 Los Alamos National Security, LLC. All rights
|
||||
# reserved.
|
||||
# Copyright (c) 2014 Intel, Inc. All rights reserved.
|
||||
# Copyright (c) 2014-2015 Research Organization for Information Science
|
||||
# and Technology (RIST). All rights reserved.
|
||||
# $COPYRIGHT$
|
||||
#
|
||||
# Additional copyrights may follow
|
||||
#
|
||||
# $HEADER$
|
||||
#
|
||||
|
||||
#
|
||||
# special check for cray xpmem, uses macro(s) from pkg.m4
|
||||
#
|
||||
# OPAL_CHECK_CRAY_XPMEM(prefix, [action-if-found], [action-if-not-found])
|
||||
# --------------------------------------------------------
|
||||
AC_DEFUN([OPAL_CHECK_CRAY_XPMEM],[
|
||||
if test -z "$opal_check_cray_xpmem_happy" ; then
|
||||
AC_ARG_WITH([cray_xpmem],
|
||||
[AC_HELP_STRING([--with-cray-xpmem(=yes/no)],
|
||||
[Build Cray XPMEM support(default: auto)])],
|
||||
[], with_cray_xpmem=auto)
|
||||
|
||||
AC_MSG_CHECKING([for Cray XPMEM support])
|
||||
AS_IF([test "$with_cray_xpmem" = "no"],
|
||||
[AC_MSG_RESULT([no])
|
||||
$3],
|
||||
[AS_IF([test "$with_cray_xpmem" = "auto" || test "$with_cray_xpmem" = "yes"],
|
||||
[PKG_CHECK_MODULES_STATIC([CRAY_XPMEM], [cray-xpmem],
|
||||
[opal_check_cray_xpmem_happy="yes"],
|
||||
[opal_check_cray_xpmem_happy="no"]
|
||||
[AS_IF([test "$with_cray_xpmem" = "yes"],
|
||||
[AC_MSG_WARN([Cray XPMEM support requested but pkg-config failed.])
|
||||
AC_MSG_ERROR([Aborting])],[])]
|
||||
)],
|
||||
[])
|
||||
])
|
||||
|
||||
AS_IF([test "$opal_check_cray_xpmem_happy" = "yes" && test "$enable_static" = "yes"],
|
||||
[CRAY_XPMEM_LIBS = $CRAY_XPMEM_STATIC_LIBS],[])
|
||||
fi
|
||||
|
||||
AS_IF([test "$opal_check_cray_xpmem_happy" = "yes"],
|
||||
[$1_LDFLAGS="[$]$1_LDFLAGS $CRAY_XPMEM_LIBS"
|
||||
$1_CPPFLAGS="[$]$1_CPPFLAGS $CRAY_XPMEM_CFLAGS"
|
||||
$1_LIBS="[$]$1_LIBS $CRAY_XPMEM_LIBS"
|
||||
AC_DEFINE_UNQUOTED([HAVE_XPMEM_H], [1],[is xpmem.h available])
|
||||
$2], [$3])
|
||||
])
|
||||
|
||||
# OPAL_CHECK_XPMEM(prefix, [action-if-found], [action-if-not-found])
|
||||
# --------------------------------------------------------
|
||||
# check if XPMEM support can be found. sets prefix_{CPPFLAGS,
|
||||
# LDFLAGS, LIBS} as needed and runs action-if-found if there is
|
||||
# support, otherwise executes action-if-not-found
|
||||
AC_DEFUN([OPAL_CHECK_XPMEM], [
|
||||
if test -z "$opal_check_xpmem_happy" ; then
|
||||
# check for a cray installed xpmem first
|
||||
OPAL_CHECK_CRAY_XPMEM([opal_check_xpmem],[opal_check_xpmem_happy=yes],[opal_check_xpmem_happy=no])
|
||||
|
||||
if test "$opal_check_xpmem_happy" = no ; then
|
||||
AC_ARG_WITH([xpmem],
|
||||
[AC_HELP_STRING([--with-xpmem(=DIR)],
|
||||
[Build with XPMEM kernel module support, searching for headers in DIR])])
|
||||
OPAL_CHECK_WITHDIR([xpmem], [$with_xpmem], [include/xpmem.h])
|
||||
|
||||
AC_ARG_WITH([xpmem-libdir],
|
||||
[AC_HELP_STRING([--with-xpmem-libdir=DIR],
|
||||
[Search for XPMEM library in DIR])])
|
||||
OPAL_CHECK_WITHDIR([xpmem-libdir], [$with_xpmem_libdir], [libxpmem.*])
|
||||
|
||||
if test ! "$with_xpmem" = "no" ; then
|
||||
if test ! -z "$with_xpmem" && test "$with_xpmem" != "yes" ; then
|
||||
opal_check_xpmem_dir="$with_xpmem"
|
||||
fi
|
||||
|
||||
if test ! -z "$with_xpmem_libdir" && test "$with_xpmem_libdir" != "yes" ; then
|
||||
opal_check_xpmem_libdir="$with_xpmem_libdir"
|
||||
fi
|
||||
|
||||
OPAL_CHECK_PACKAGE([opal_check_xpmem],[xpmem.h],[xpmem],[xpmem_make],[],
|
||||
[$opal_check_xpmem_dir],[$opal_check_xpmem_libdir], [opal_check_xpmem_happy="yes"], [])
|
||||
|
||||
if test "$opal_check_xpmem_happy" = "no" && test -n "$with_xpmem" && test "$with_xpmem" != "yes" ; then
|
||||
AC_MSG_ERROR([XPMEM support requested but not found. Aborting])
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
OMPI_SUMMARY_ADD([[Transports]],[[XPMEM Shared Memory]],[$1],[$opal_check_cray_xpmem_happy])
|
||||
fi
|
||||
|
||||
AS_IF([test "$opal_check_xpmem_happy" = "yes"], [
|
||||
$1_CPPFLAGS="[$]$1_CPPFLAGS $opal_check_xpmem_CPPFLAGS"
|
||||
$1_LDFLAGS="[$]$1_LDFLAGS $opal_check_xpmem_LDFLAGS"
|
||||
$1_LIBS="[$]$1_LIBS $opal_check_xpmem_LIBS"
|
||||
$2], [$3])
|
||||
])dnl
|