From 17b6909b5ec5cb74f5082c341933d0a4a6151753 Mon Sep 17 00:00:00 2001 From: Nathan Hjelm Date: Wed, 12 Oct 2016 12:34:54 -0600 Subject: [PATCH 01/10] Revert "configury: UCX uses CPPFLAGS (instead of CFLAGS)" This reverts commit fa6a7045f7c1d32078580eff58be0cbd28ca1060. --- config/ompi_check_ucx.m4 | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/config/ompi_check_ucx.m4 b/config/ompi_check_ucx.m4 index 52143957412..86db9de3a78 100644 --- a/config/ompi_check_ucx.m4 +++ b/config/ompi_check_ucx.m4 @@ -1,7 +1,7 @@ # -*- shell-script -*- # # Copyright (C) 2015 Mellanox Technologies Ltd. ALL RIGHTS RESERVED. -# Copyright (c) 2015-2016 Research Organization for Information Science +# Copyright (c) 2015 Research Organization for Information Science # and Technology (RIST). All rights reserved. # $COPYRIGHT$ # @@ -59,8 +59,8 @@ AC_DEFUN([OMPI_CHECK_UCX],[ AC_MSG_CHECKING(for UCX version compatibility) AC_REQUIRE_CPP - old_CPPFLAGS="$CPPFLAGS" - CPPFLAGS="$CPPFLAGS -I$ompi_check_ucx_dir/include" + old_CFLAGS="$CFLAGS" + CFLAGS="$CFLAGS -I$ompi_check_ucx_dir/include" AC_COMPILE_IFELSE( [AC_LANG_PROGRAM([[#include ]], [[ @@ -69,7 +69,7 @@ AC_DEFUN([OMPI_CHECK_UCX],[ [ompi_ucx_version_ok="no"]) AC_MSG_RESULT([$ompi_ucx_version_ok]) - CPPFLAGS=$old_CPPFLAGS + CFLAGS=$old_CFLAGS AS_IF([test "$ompi_ucx_version_ok" = "no"], [ompi_check_ucx_happy="no"]) From 7ba35173bf4f370247a062c737fb9f3fd181cd11 Mon Sep 17 00:00:00 2001 From: Nathan Hjelm Date: Tue, 1 Mar 2016 11:01:51 -0700 Subject: [PATCH 02/10] 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 (cherry picked from commit d2f5fca82a44cbe27a068e08c3b69ae66cdf6e53) Signed-off-by: Nathan Hjelm --- config/ompi_check_mxm.m4 | 91 +++--- config/ompi_check_psm.m4 | 79 ++--- config/ompi_check_psm2.m4 | 80 +++--- config/ompi_check_ucx.m4 | 98 ++++--- config/opal_check_cma.m4 | 38 +-- config/opal_check_cray_xpmem.m4 | 64 ----- config/opal_check_knem.m4 | 67 +++-- config/opal_check_libfabric.m4 | 108 +++---- config/opal_check_openfabrics.m4 | 476 ++++++++++++++++--------------- config/opal_check_portals4.m4 | 121 ++++---- config/opal_check_ugni.m4 | 60 ++-- config/opal_check_xpmem.m4 | 112 ++++++++ config/opal_summary.m4 | 110 +++++++ config/orte_check_alps.m4 | 21 +- config/orte_check_lsf.m4 | 186 ++++++------ config/orte_check_sge.m4 | 44 +-- config/orte_check_slurm.m4 | 82 +++--- config/orte_check_tm.m4 | 222 +++++++------- configure.ac | 2 + opal/mca/btl/openib/configure.m4 | 10 +- opal/mca/btl/tcp/configure.m4 | 12 +- opal/mca/btl/vader/configure.m4 | 47 +-- 22 files changed, 1176 insertions(+), 954 deletions(-) delete mode 100644 config/opal_check_cray_xpmem.m4 create mode 100644 config/opal_check_xpmem.m4 create mode 100644 config/opal_summary.m4 diff --git a/config/ompi_check_mxm.m4 b/config/ompi_check_mxm.m4 index c510fbeb6e2..5cfe1e44cb5 100644 --- a/config/ompi_check_mxm.m4 +++ b/config/ompi_check_mxm.m4 @@ -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 ]], - [[ + [[ #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]) diff --git a/config/ompi_check_psm.m4 b/config/ompi_check_psm.m4 index 9142c756030..cfe17920605 100644 --- a/config/ompi_check_psm.m4 +++ b/config/ompi_check_psm.m4 @@ -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 (c) 2016 Intel Corporation. All rights reserved. dnl dnl $COPYRIGHT$ @@ -29,53 +31,60 @@ 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"]) - AS_IF([test "$ompi_check_psm_happy" = "yes"], - [AC_CHECK_HEADERS( + AS_IF([test "$ompi_check_psm_happy" = "yes"], + [AC_CHECK_HEADERS( glob.h, [], [AC_MSG_WARN([glob.h not found. Can not build component.]) 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]) diff --git a/config/ompi_check_psm2.m4 b/config/ompi_check_psm2.m4 index e5f0a25555a..5ed14766882 100644 --- a/config/ompi_check_psm2.m4 +++ b/config/ompi_check_psm2.m4 @@ -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,54 +30,60 @@ # 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"]) - AS_IF([test "$ompi_check_psm2_happy" = "yes"], - [AC_CHECK_HEADERS( + AS_IF([test "$ompi_check_psm2_happy" = "yes"], + [AC_CHECK_HEADERS( glob.h, [], [AC_MSG_WARN([glob.h not found. Can not build component.]) 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]) diff --git a/config/ompi_check_ucx.m4 b/config/ompi_check_ucx.m4 index 86db9de3a78..db5ae44d35b 100644 --- a/config/ompi_check_ucx.m4 +++ b/config/ompi_check_ucx.m4 @@ -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 ]], - [[ - ]])], + [[ + ]])], [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]) diff --git a/config/opal_check_cma.m4 b/config/opal_check_cma.m4 index cfb7639c13b..68a3f86e5ce 100644 --- a/config/opal_check_cma.m4 +++ b/config/opal_check_cma.m4 @@ -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 + + 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]) - OPAL_VAR_SCOPE_POP -])dnl + AS_IF([test "$ompi_check_cma_happy" = "yes"], [$2], [$3]) +]) diff --git a/config/opal_check_cray_xpmem.m4 b/config/opal_check_cray_xpmem.m4 deleted file mode 100644 index f489cab3417..00000000000 --- a/config/opal_check_cray_xpmem.m4 +++ /dev/null @@ -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]) -]) - - - diff --git a/config/opal_check_knem.m4 b/config/opal_check_knem.m4 index 6d2d7c0f0f0..eb00a081fe0 100644 --- a/config/opal_check_knem.m4 +++ b/config/opal_check_knem.m4 @@ -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 - ],[ + ],[ #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 diff --git a/config/opal_check_libfabric.m4 b/config/opal_check_libfabric.m4 index bcedf993f80..7f888605c80 100644 --- a/config/opal_check_libfabric.m4 +++ b/config/opal_check_libfabric.m4 @@ -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 -n "$with_libfabric" && test "$with_libfabric" != "no"], [AC_MSG_WARN([libfabric support requested (via --with-libfabric), but not found.]) AC_MSG_ERROR([Cannot continue.])]) $3]) - - OPAL_VAR_SCOPE_POP ])dnl diff --git a/config/opal_check_openfabrics.m4 b/config/opal_check_openfabrics.m4 index 60d61d08b90..069226d0b07 100644 --- a/config/opal_check_openfabrics.m4 +++ b/config/opal_check_openfabrics.m4 @@ -11,13 +11,13 @@ # 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. # Copyright (c) 2009-2012 Oak Ridge National Laboratory. All rights reserved. # Copyright (c) 2014 Bull SAS. All rights reserved. -# Copyright (c) 2014-2016 Research Organization for Information Science +# Copyright (c) 2014-2015 Research Organization for Information Science # and Technology (RIST). All rights reserved. # $COPYRIGHT$ # @@ -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]) - - AS_IF([test "$opal_want_verbs" = "no"], - [ompi_check_openib_happy="no"], - [ompi_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" - - AS_IF([test "$ompi_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.]) - ompi_check_openib_happy="no"])]) - - AS_IF([test "$ompi_check_openib_happy" = "yes"], - [OPAL_CHECK_PACKAGE([$1], - [infiniband/verbs.h], - [ibverbs], - [ibv_open_device], - [], - [$opal_verbs_dir], - [$opal_verbs_libdir], - [ompi_check_openib_happy="yes"], - [ompi_check_openib_happy="no"])]) + 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"]) + + 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"], + [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 $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 ]], + [[ibv_create_cq(NULL, 0, NULL, NULL, 0);]])], + [ompi_cv_func_ibv_create_cq_args=5], + [AC_LINK_IFELSE( + [AC_LANG_PROGRAM( + [[#include ]], + [[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)])]) + + # 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 ]) + 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 ]) + + # 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 ]) + 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 ]) + 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 ])], + [opal_check_openib_have_xrc_domains=0], + [#include ]) + # 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 - CPPFLAGS="$CPPFLAGS $$1_CPPFLAGS" - LDFLAGS="$LDFLAGS $$1_LDFLAGS" - LIBS="$LIBS $$1_LIBS" + 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 - AS_IF([test "$ompi_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 ]], - [[ibv_create_cq(NULL, 0, NULL, NULL, 0);]])], - [ompi_cv_func_ibv_create_cq_args=5], - [AC_LINK_IFELSE( - [AC_LANG_PROGRAM( - [[#include ]], - [[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.]) - ompi_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)])]) - - # 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 - - # If we have the openib stuff available, find out what we've got - AS_IF([test "$ompi_check_openib_happy" = "yes"], - [AC_CHECK_DECLS([IBV_EVENT_CLIENT_REREGISTER, IBV_ACCESS_SO, IBV_ATOMIC_HCA], [], [], - [#include ]) - 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 ]) - - # 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], - [], + # Check support for RDMAoE devices + $1_have_rdmaoe=0 + AC_CHECK_DECLS([IBV_LINK_LAYER_ETHERNET], + [$1_have_rdmaoe=1], [], [#include ]) - 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 ]) - 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 ])], - [$1_have_xrc_domains=0], - [#include ]) - # 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 - 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 + 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 support for RDMAoE devices - $1_have_rdmaoe=0 - AC_CHECK_DECLS([IBV_LINK_LAYER_ETHERNET], - [$1_have_rdmaoe=1], [], - [#include ]) + ]) + + # Check to see if 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], [$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 - 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 + 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" - ]) - - # Check to see if 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 "$ompi_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]) - fi + CPPFLAGS="$ompi_check_openib_$1_save_CPPFLAGS" + LDFLAGS="$ompi_check_openib_$1_save_LDFLAGS" + LIBS="$ompi_check_openib_$1_save_LIBS" - 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 + OMPI_SUMMARY_ADD([[Transports]],[[OpenFabrics Verbs]],[$1],[$opal_check_openib_happy]) - 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]) + OPAL_VAR_SCOPE_POP 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 "$ompi_check_openib_happy" = "yes"], - [$2], + AS_IF([test "$opal_check_openib_happy" = "yes"], + [$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],[ @@ -332,7 +344,7 @@ AC_DEFUN([OPAL_CHECK_OPENFABRICS_CM],[ LDFLAGS="$LDFLAGS $$1_LDFLAGS" LIBS="$LIBS $$1_LIBS" - AS_IF([test "$ompi_check_openib_happy" = "yes"], + AS_IF([test "$opal_check_openib_happy" = "yes"], [# Do we have a recent enough RDMA CM? Need to have the # rdma_get_peer_addr (inline) function (originally appeared # in OFED v1.3). @@ -400,9 +412,9 @@ AC_DEFUN([OPAL_CHECK_EXP_VERBS],[ AC_DEFINE_UNQUOTED([HAVE_EXP_VERBS], [$have_struct_ibv_exp_send_wr], [Experimental verbs]) AC_CHECK_DECLS([IBV_EXP_ATOMIC_HCA_REPLY_BE, IBV_EXP_QP_CREATE_ATOMIC_BE_REPLY, ibv_exp_create_qp, ibv_exp_query_device, IBV_EXP_QP_INIT_ATTR_ATOMICS_ARG], [], [], [#include ]) - AC_CHECK_MEMBERS([struct ibv_exp_device_attr.ext_atom, struct ibv_exp_device_attr.exp_atomic_cap], [], [], + AC_CHECK_MEMBERS([struct ibv_exp_device_attr.ext_atom, struct ibv_exp_device_attr.ext_atomic_cap], [], [], [[#include ]]) - AS_IF([test '$have_struct_ibv_exp_send_wr' = 1], [$1], [$2]) +AS_IF([test '$have_struct_ibv_exp_send_wr' = 1], [$1], [$2]) OPAL_VAR_SCOPE_POP ])dnl @@ -410,7 +422,7 @@ AC_DEFUN([OPAL_CHECK_MLNX_OPENFABRICS],[ $1_have_mverbs=0 $1_have_mqe=0 - AS_IF([test "$ompi_check_openib_happy" = "yes"], + AS_IF([test "$opal_check_openib_happy" = "yes"], [OPAL_CHECK_PACKAGE([$1], [infiniband/mverbs.h], [mverbs], @@ -421,7 +433,7 @@ AC_DEFUN([OPAL_CHECK_MLNX_OPENFABRICS],[ [$1_have_mverbs=1], [])]) - AS_IF([test "$ompi_check_openib_happy" = "yes"], + AS_IF([test "$opal_check_openib_happy" = "yes"], [OPAL_CHECK_PACKAGE([$1], [infiniband/mqe.h], [mqe], diff --git a/config/opal_check_portals4.m4 b/config/opal_check_portals4.m4 index d8a27ffe8ef..71fc3ffa61c 100644 --- a/config/opal_check_portals4.m4 +++ b/config/opal_check_portals4.m4 @@ -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]) diff --git a/config/opal_check_ugni.m4 b/config/opal_check_ugni.m4 index 6acc7fa74b3..12d0613fd71 100644 --- a/config/opal_check_ugni.m4 +++ b/config/opal_check_ugni.m4 @@ -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]) diff --git a/config/opal_check_xpmem.m4 b/config/opal_check_xpmem.m4 new file mode 100644 index 00000000000..7d8e3d2a87d --- /dev/null +++ b/config/opal_check_xpmem.m4 @@ -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 diff --git a/config/opal_summary.m4 b/config/opal_summary.m4 new file mode 100644 index 00000000000..754b57ab68d --- /dev/null +++ b/config/opal_summary.m4 @@ -0,0 +1,110 @@ +dnl -*- shell-script -*- +dnl +dnl Copyright (c) 2016 Los Alamos National Security, LLC. All rights +dnl reserved. +dnl $COPYRIGHT$ +dnl +dnl Additional copyrights may follow +dnl +dnl $HEADER$ +dnl +AC_DEFUN([OMPI_SUMMARY_ADD],[ + OPAL_VAR_SCOPE_PUSH([ompi_summary_section ompi_summary_line ompi_summary_section_current]) + + dnl need to replace spaces in the section name with somethis else. _ seems like a reasonable + dnl choice. if this changes remember to change OMPI_PRINT_SUMMARY as well. + ompi_summary_section=$(echo $1 | tr ' ' '_') + ompi_summary_line="$2: $4" + ompi_summary_section_current=$(eval echo \$ompi_summary_values_$ompi_summary_section) + + if test -z "$ompi_summary_section_current" ; then + if test -z "$ompi_summary_sections" ; then + ompi_summary_sections=$ompi_summary_section + else + ompi_summary_sections="$ompi_summary_sections $ompi_summary_section" + fi + eval ompi_summary_values_$ompi_summary_section=\"$ompi_summary_line\" + else + eval ompi_summary_values_$ompi_summary_section=\"$ompi_summary_section_current,$ompi_summary_line\" + fi + + OPAL_VAR_SCOPE_POP +]) + +AC_DEFUN([OMPI_SUMMARY_PRINT],[ + OPAL_VAR_SCOPE_PUSH([ompi_summary_section ompi_summary_section_name]) + echo "\nOpen MPI configuration:" + echo "-----------------------" + echo "Version: $OMPI_MAJOR_VERSION.$OMPI_MINOR_VERSION.$OMPI_RELEASE_VERSION $OMPI_GREEK_VERSION" + + dnl Print out which projects will be built + echo "Build Open Platform Abstration project: yes" + if test "$project_orte_amc" = "true" ; then + echo "Build Open Runtime project: yes" + else + echo "Build Open Runtime project: no" + fi + + if test "$project_ompi_amc" = "true" ; then + echo "Build Open MPI project: yes" + else + echo "Build Open MPI project: no" + fi + + if test "$project_shmem_amc" = "true" ; then + echo "Build Open SHMEM project: yes" + else + echo "Build Open SHMEM project: no" + fi + + dnl Print out the bindings if we are building OMPI + if test "$project_ompi_amc" = "true" ; then + if test x$enable_mpi_cxx = xyes ; then + echo "MPI C++ bindings (deprecated): yes" + else + echo "MPI C++ bindings (deprecated): no" + fi + + if test $OMPI_BUILD_FORTRAN_BINDINGS = $OMPI_FORTRAN_MPIFH_BINDINGS ; then + echo "MPI Fortran bindings: mpif.h" + elif test $OMPI_BUILD_FORTRAN_BINDINGS = $OMPI_FORTRAN_USEMPI_BINDINGS ; then + echo "MPI Fortran bindings: mpif.h, use mpi" + elif test $OMPI_BUILD_FORTRAN_BINDINGS = $OMPI_FORTRAN_USEMPIF08_BINDINGS ; then + echo "MPI Fortran bindings: mpif.h, use mpi, use mpi_f08" + else + echo "MPI Fortran bindings: no" + fi + + if test x$opal_java_happy = xyes ; then + echo "MPI Java bindings (experimental): yes" + else + echo "MPI Java bindings (experimental): no" + fi + fi + + if test $WANT_DEBUG = 0 ; then + echo "Debug build: no" + else + echo "Debug build: yes" + fi + + if test ! -z $with_platform ; then + echo "Platform file: $with_platform" + fi + + echo + + for ompi_summary_section in $(echo $ompi_summary_sections) ; do + ompi_summary_section_name=$(echo $ompi_summary_section | tr '_' ' ') + echo "$ompi_summary_section_name" + echo "-----------------------" + echo "$(eval echo \$ompi_summary_values_$ompi_summary_section)" | tr ',' $'\n' | sort -f + echo + done + + if test $WANT_DEBUG = 1 ; then + echo "INTERNAL DEBUGGING IS ENABLED. DO NOT USE THIS BUILD FOR PERFORMANCE MEASUREMENTS!\n" + fi + + OPAL_VAR_SCOPE_POP +]) diff --git a/config/orte_check_alps.m4 b/config/orte_check_alps.m4 index b0555822ba5..0818c4d5fee 100644 --- a/config/orte_check_alps.m4 +++ b/config/orte_check_alps.m4 @@ -13,6 +13,8 @@ dnl 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 @@ -81,7 +83,7 @@ AC_DEFUN([ORTE_CHECK_ALPS_CLE4],[ # ORTE_CHECK_ALPS(prefix, [action-if-found], [action-if-not-found]) # -------------------------------------------------------- AC_DEFUN([ORTE_CHECK_ALPS],[ - if test -z "$orte_check_alps_happy"; then + if test -z "$orte_check_cray_alps_happy"; then AC_ARG_WITH([alps], [AC_HELP_STRING([--with-alps(=DIR|yes|no)], @@ -155,16 +157,15 @@ AC_DEFUN([ORTE_CHECK_ALPS],[ CRAY_ALPSUTIL_LIBS = $CRAY_ALPSUTIL_STATIC_LIBS], []) - AS_IF([test "$orte_check_cray_alps_happy" = "yes"], - [$1_LDFLAGS="$CRAY_ALPSLLI_LIBS $CRAY_ALPSUTIL_LIBS" - $1_CPPFLAGS="$CRAY_ALPSLLI_CFLAGS $CRAY_ALPSUTIL_CFLAGS $CRAY_ALPS_CFLAGS $CRAY_WLM_DETECT_CFLAGS" - $1_LIBS="$CRAY_ALPSLLI_LIBS $CRAY_ALPSUTIL_LIBS $CRAY_WLM_DETECT_LIBS" - $1_WRAPPER_EXTRA_LDFLAGS="$CRAY_ALPSLLI_LIBS $CRAY_ALPSUTIL_LIBS $CRAY_WLM_DETECT_LIBS" - $1_WRAPPER_EXTRA_LIBS="$CRAY_ALPSLLI_LIBS $CRAY_ALPSUTIL_LIBS $CRAY_WLM_DETECT_LIBS"], - []) - + OMPI_SUMMARY_ADD([[Resource Managers]],[[Cray Alps]],[$1],[$orte_check_cray_alps_happy]) fi AS_IF([test "$orte_check_cray_alps_happy" = "yes"], - [$2], [$3]) + [$1_LDFLAGS="[$]$1_LDFLAGS $CRAY_ALPSLLI_LIBS $CRAY_ALPSUTIL_LIBS" + $1_CPPFLAGS="[$]$1_CPPFLAGS $CRAY_ALPSLLI_CFLAGS $CRAY_ALPSUTIL_CFLAGS $CRAY_ALPS_CFLAGS $CRAY_WLM_DETECT_CFLAGS" + $1_LIBS="[$]$1_LIBS $CRAY_ALPSLLI_LIBS $CRAY_ALPSUTIL_LIBS $CRAY_WLM_DETECT_LIBS" + $1_WRAPPER_EXTRA_LDFLAGS="$CRAY_ALPSLLI_LIBS $CRAY_ALPSUTIL_LIBS $CRAY_WLM_DETECT_LIBS" + $1_WRAPPER_EXTRA_LIBS="$CRAY_ALPSLLI_LIBS $CRAY_ALPSUTIL_LIBS $CRAY_WLM_DETECT_LIBS" + $2], + [$3]) ]) diff --git a/config/orte_check_lsf.m4 b/config/orte_check_lsf.m4 index 7ce3f610ad3..1a95e7e117d 100644 --- a/config/orte_check_lsf.m4 +++ b/config/orte_check_lsf.m4 @@ -13,6 +13,8 @@ dnl All rights reserved. dnl Copyright (c) 2007-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 @@ -24,111 +26,113 @@ dnl # ORTE_CHECK_LSF(prefix, [action-if-found], [action-if-not-found]) # -------------------------------------------------------- AC_DEFUN([ORTE_CHECK_LSF],[ - AC_ARG_WITH([lsf], - [AC_HELP_STRING([--with-lsf(=DIR)], - [Build LSF support])]) - OPAL_CHECK_WITHDIR([lsf], [$with_lsf], [include/lsf/lsbatch.h]) - AC_ARG_WITH([lsf-libdir], - [AC_HELP_STRING([--with-lsf-libdir=DIR], - [Search for LSF libraries in DIR])]) - OPAL_CHECK_WITHDIR([lsf-libdir], [$with_lsf_libdir], [libbat.*]) - - # Defaults - orte_check_lsf_dir_msg="compiler default" - orte_check_lsf_libdir_msg="linker default" + if test -z "$orte_check_lsf_happy" ; then + AC_ARG_WITH([lsf], + [AC_HELP_STRING([--with-lsf(=DIR)], + [Build LSF support])]) + OPAL_CHECK_WITHDIR([lsf], [$with_lsf], [include/lsf/lsbatch.h]) + AC_ARG_WITH([lsf-libdir], + [AC_HELP_STRING([--with-lsf-libdir=DIR], + [Search for LSF libraries in DIR])]) + OPAL_CHECK_WITHDIR([lsf-libdir], [$with_lsf_libdir], [libbat.*]) - # Save directory names if supplied - AS_IF([test ! -z "$with_lsf" && test "$with_lsf" != "yes"], - [orte_check_lsf_dir="$with_lsf" - orte_check_lsf_dir_msg="$orte_check_lsf_dir (from --with-lsf)"]) - AS_IF([test ! -z "$with_lsf_libdir" && test "$with_lsf_libdir" != "yes"], - [orte_check_lsf_libdir="$with_lsf_libdir" - orte_check_lsf_libdir_msg="$orte_check_lsf_libdir (from --with-lsf-libdir)"]) + # Defaults + orte_check_lsf_dir_msg="compiler default" + orte_check_lsf_libdir_msg="linker default" - # If no directories were specified, look for LSF_LIBDIR, - # LSF_INCLUDEDIR, and/or LSF_ENVDIR. - AS_IF([test -z "$orte_check_lsf_dir" && test -z "$orte_check_lsf_libdir"], - [AS_IF([test ! -z "$LSF_ENVDIR" && test -z "$LSF_LIBDIR" && test -f "$LSF_ENVDIR/lsf.conf"], - [LSF_LIBDIR=`egrep ^LSF_LIBDIR= $LSF_ENVDIR/lsf.conf | cut -d= -f2-`]) - AS_IF([test ! -z "$LSF_ENVDIR" && test -z "$LSF_INCLUDEDIR" && test -f "$LSF_ENVDIR/lsf.conf"], - [LSF_INCLUDEDIR=`egrep ^LSF_INCLUDEDIR= $LSF_ENVDIR/lsf.conf | cut -d= -f2-`]) - AS_IF([test ! -z "$LSF_LIBDIR"], - [orte_check_lsf_libdir=$LSF_LIBDIR - orte_check_lsf_libdir_msg="$LSF_LIBDIR (from \$LSF_LIBDIR)"]) - AS_IF([test ! -z "$LSF_INCLUDEDIR"], - [orte_check_lsf_dir=`dirname $LSF_INCLUDEDIR` - orte_check_lsf_dir_msg="$orte_check_lsf_dir (from \$LSF_INCLUDEDIR)"])]) + # Save directory names if supplied + AS_IF([test ! -z "$with_lsf" && test "$with_lsf" != "yes"], + [orte_check_lsf_dir="$with_lsf" + orte_check_lsf_dir_msg="$orte_check_lsf_dir (from --with-lsf)"]) + AS_IF([test ! -z "$with_lsf_libdir" && test "$with_lsf_libdir" != "yes"], + [orte_check_lsf_libdir="$with_lsf_libdir" + orte_check_lsf_libdir_msg="$orte_check_lsf_libdir (from --with-lsf-libdir)"]) - AS_IF([test "$with_lsf" = "no"], - [orte_check_lsf_happy="no"], - [orte_check_lsf_happy="yes"]) + # If no directories were specified, look for LSF_LIBDIR, + # LSF_INCLUDEDIR, and/or LSF_ENVDIR. + AS_IF([test -z "$orte_check_lsf_dir" && test -z "$orte_check_lsf_libdir"], + [AS_IF([test ! -z "$LSF_ENVDIR" && test -z "$LSF_LIBDIR" && test -f "$LSF_ENVDIR/lsf.conf"], + [LSF_LIBDIR=`egrep ^LSF_LIBDIR= $LSF_ENVDIR/lsf.conf | cut -d= -f2-`]) + AS_IF([test ! -z "$LSF_ENVDIR" && test -z "$LSF_INCLUDEDIR" && test -f "$LSF_ENVDIR/lsf.conf"], + [LSF_INCLUDEDIR=`egrep ^LSF_INCLUDEDIR= $LSF_ENVDIR/lsf.conf | cut -d= -f2-`]) + AS_IF([test ! -z "$LSF_LIBDIR"], + [orte_check_lsf_libdir=$LSF_LIBDIR + orte_check_lsf_libdir_msg="$LSF_LIBDIR (from \$LSF_LIBDIR)"]) + AS_IF([test ! -z "$LSF_INCLUDEDIR"], + [orte_check_lsf_dir=`dirname $LSF_INCLUDEDIR` + orte_check_lsf_dir_msg="$orte_check_lsf_dir (from \$LSF_INCLUDEDIR)"])]) - orte_check_lsf_$1_save_CPPFLAGS="$CPPFLAGS" - orte_check_lsf_$1_save_LDFLAGS="$LDFLAGS" - orte_check_lsf_$1_save_LIBS="$LIBS" + AS_IF([test "$with_lsf" = "no"], + [orte_check_lsf_happy="no"], + [orte_check_lsf_happy="yes"]) - # liblsf requires yp_all, yp_get_default_domain, and ypprot_err - # on Linux, Solaris, NEC, and Sony NEWSs these are found in libnsl - # on AIX it should be in libbsd - # on HP-UX it should be in libBSD - # on IRIX < 6 it should be in libsun (IRIX 6 and later it is in libc) - OPAL_SEARCH_LIBS_COMPONENT([yp_all_nsl], [yp_all], [nsl bsd BSD sun], - [yp_all_nsl_happy="yes"], - [yp_all_nsl_happy="no"]) + orte_check_lsf_$1_save_CPPFLAGS="$CPPFLAGS" + orte_check_lsf_$1_save_LDFLAGS="$LDFLAGS" + orte_check_lsf_$1_save_LIBS="$LIBS" - AS_IF([test "$yp_all_nsl_happy" = "no"], - [orte_check_lsf_happy="no"], - [orte_check_lsf_happy="yes"]) + # liblsf requires yp_all, yp_get_default_domain, and ypprot_err + # on Linux, Solaris, NEC, and Sony NEWSs these are found in libnsl + # on AIX it should be in libbsd + # on HP-UX it should be in libBSD + # on IRIX < 6 it should be in libsun (IRIX 6 and later it is in libc) + OPAL_SEARCH_LIBS_COMPONENT([yp_all_nsl], [yp_all], [nsl bsd BSD sun], + [yp_all_nsl_happy="yes"], + [yp_all_nsl_happy="no"]) - # liblsb requires liblsf - using ls_info as a test for liblsf presence - OPAL_CHECK_PACKAGE([ls_info_lsf], - [lsf/lsf.h], - [lsf], - [ls_info], - [$yp_all_nsl_LIBS], - [$orte_check_lsf_dir], - [$orte_check_lsf_libdir], - [ls_info_lsf_happy="yes"], - [ls_info_lsf_happy="no"]) + AS_IF([test "$yp_all_nsl_happy" = "no"], + [orte_check_lsf_happy="no"], + [orte_check_lsf_happy="yes"]) - AS_IF([test "$ls_info_lsf_happy" = "no"], - [orte_check_lsf_happy="no"], - [orte_check_lsf_happy="yes"]) + # liblsb requires liblsf - using ls_info as a test for liblsf presence + OPAL_CHECK_PACKAGE([ls_info_lsf], + [lsf/lsf.h], + [lsf], + [ls_info], + [$yp_all_nsl_LIBS], + [$orte_check_lsf_dir], + [$orte_check_lsf_libdir], + [ls_info_lsf_happy="yes"], + [ls_info_lsf_happy="no"]) - # test function of liblsb LSF package - AS_IF([test "$orte_check_lsf_happy" = "yes"], - [AC_MSG_CHECKING([for LSF dir]) - AC_MSG_RESULT([$orte_check_lsf_dir_msg]) - AC_MSG_CHECKING([for LSF library dir]) - AC_MSG_RESULT([$orte_check_lsf_libdir_msg]) - AC_MSG_CHECKING([for liblsf function]) - AC_MSG_RESULT([$ls_info_lsf_happy]) - AC_MSG_CHECKING([for liblsf yp requirements]) - AC_MSG_RESULT([$yp_all_nsl_happy]) - OPAL_CHECK_PACKAGE([$1], - [lsf/lsbatch.h], - [bat], - [lsb_launch], - [$ls_info_lsf_LIBS $yp_all_nsl_LIBS], - [$orte_check_lsf_dir], - [$orte_check_lsf_libdir], - [orte_check_lsf_happy="yes"], - [orte_check_lsf_happy="no"])]) + AS_IF([test "$ls_info_lsf_happy" = "no"], + [orte_check_lsf_happy="no"], + [orte_check_lsf_happy="yes"]) - CPPFLAGS="$orte_check_lsf_$1_save_CPPFLAGS" - LDFLAGS="$orte_check_lsf_$1_save_LDFLAGS" - LIBS="$orte_check_lsf_$1_save_LIBS" + # test function of liblsb LSF package + AS_IF([test "$orte_check_lsf_happy" = "yes"], + [AC_MSG_CHECKING([for LSF dir]) + AC_MSG_RESULT([$orte_check_lsf_dir_msg]) + AC_MSG_CHECKING([for LSF library dir]) + AC_MSG_RESULT([$orte_check_lsf_libdir_msg]) + AC_MSG_CHECKING([for liblsf function]) + AC_MSG_RESULT([$ls_info_lsf_happy]) + AC_MSG_CHECKING([for liblsf yp requirements]) + AC_MSG_RESULT([$yp_all_nsl_happy]) + OPAL_CHECK_PACKAGE([orte_check_lsf], + [lsf/lsbatch.h], + [bat], + [lsb_launch], + [$ls_info_lsf_LIBS $yp_all_nsl_LIBS], + [$orte_check_lsf_dir], + [$orte_check_lsf_libdir], + [orte_check_lsf_happy="yes"], + [orte_check_lsf_happy="no"])]) - # add the LSF libraries to static builds as they are required - $1_WRAPPER_EXTRA_LDFLAGS=[$]$1_LDFLAGS - $1_WRAPPER_EXTRA_LIBS=[$]$1_LIBS + CPPFLAGS="$orte_check_lsf_$1_save_CPPFLAGS" + LDFLAGS="$orte_check_lsf_$1_save_LDFLAGS" + LIBS="$orte_check_lsf_$1_save_LIBS" - # Reset for the next time we're called - orte_check_lsf_dir= - orte_check_lsf_libdir= + OMPI_SUMMARY_ADD([[Resource Managers]],[[LSF]],[$1],[$orte_check_lsf_happy]) + fi AS_IF([test "$orte_check_lsf_happy" = "yes"], - [$2], + [$1_LIBS="[$]$1_LIBS $orte_check_lsf_LIBS" + $1_LDFLAGS="[$]$1_LDFLAGS $orte_check_lsf_LDFLAGS" + $1_CPPFLAGS="[$]$1_CPPFLAGS $orte_check_lsf_CPPFLAGS" + # add the LSF libraries to static builds as they are required + $1_WRAPPER_EXTRA_LDFLAGS=[$]$1_LDFLAGS + $1_WRAPPER_EXTRA_LIBS=[$]$1_LIBS + $2], [AS_IF([test ! -z "$with_lsf" && test "$with_lsf" != "no"], [AC_MSG_WARN([LSF support requested (via --with-lsf) but not found.]) AC_MSG_ERROR([Aborting.])]) diff --git a/config/orte_check_sge.m4 b/config/orte_check_sge.m4 index f951a03bbae..41e12b35b7f 100644 --- a/config/orte_check_sge.m4 +++ b/config/orte_check_sge.m4 @@ -11,6 +11,8 @@ # Copyright (c) 2004-2005 The Regents of the University of California. # All rights reserved. # Copyright (c) 2006-2009 Cisco Systems, Inc. All rights reserved. +# Copyright (c) 2016 Los Alamos National Security, LLC. All rights +# reserved. # $COPYRIGHT$ # # Additional copyrights may follow @@ -26,26 +28,30 @@ # ORTE_CHECK_GRIDENGINE(prefix, [action-if-found], [action-if-not-found]) # -------------------------------------------------------- AC_DEFUN([ORTE_CHECK_GRIDENGINE],[ - AC_ARG_WITH([sge], - [AC_HELP_STRING([--with-sge], - [Build SGE or Grid Engine support (default: no)])]) + if test -z "$orte_gridengine_build" ; then + AC_ARG_WITH([sge], + [AC_HELP_STRING([--with-sge], + [Build SGE or Grid Engine support (default: no)])]) + + AC_MSG_CHECKING([if user requested SGE build]) + orte_gridengine_build="no" + AS_IF([test "$with_sge" = "yes"], + [AC_MSG_RESULT([yes]) + orte_gridengine_build=yes], + [AS_IF([test "$with_sge" = "no"], + [AC_MSG_RESULT([no])], + [AC_MSG_RESULT([not specified; checking environment]) + AC_CHECK_PROG([QRSH], [qrsh], [qrsh]) + AS_IF([test "$QRSH" != ""], + [orte_gridengine_build=yes], + [AC_MSG_CHECKING([for SGE_ROOT environment variable]) + AS_IF([test "$SGE_ROOT" != ""], + [AC_MSG_RESULT([found]) + orte_gridengine_build=yes], + [AC_MSG_RESULT([not found])])])])]) - AC_MSG_CHECKING([if user requested SGE build]) - orte_gridengine_build= - AS_IF([test "$with_sge" = "yes"], - [AC_MSG_RESULT([yes]) - orte_gridengine_build=yes], - [AS_IF([test "$with_sge" = "no"], - [AC_MSG_RESULT([no])], - [AC_MSG_RESULT([not specified; checking environment]) - AC_CHECK_PROG([QRSH], [qrsh], [qrsh]) - AS_IF([test "$QRSH" != ""], - [orte_gridengine_build=yes], - [AC_MSG_CHECKING([for SGE_ROOT environment variable]) - AS_IF([test "$SGE_ROOT" != ""], - [AC_MSG_RESULT([found]) - orte_gridengine_build=yes], - [AC_MSG_RESULT([not found])])])])]) + OMPI_SUMMARY_ADD([[Resource Managers]],[[Grid Engine]],[$1],[$orte_gridengine_build]) + fi AS_IF([test "$orte_gridengine_build" = "yes"], [$2], diff --git a/config/orte_check_slurm.m4 b/config/orte_check_slurm.m4 index e86d9ea91f7..d3cde774274 100644 --- a/config/orte_check_slurm.m4 +++ b/config/orte_check_slurm.m4 @@ -11,6 +11,8 @@ # Copyright (c) 2004-2005 The Regents of the University of California. # All rights reserved. # Copyright (c) 2009 Cisco Systems, Inc. All rights reserved. +# Copyright (c) 2016 Los Alamos National Security, LLC. All rights +# reserved. # $COPYRIGHT$ # # Additional copyrights may follow @@ -21,49 +23,53 @@ # ORTE_CHECK_SLURM(prefix, [action-if-found], [action-if-not-found]) # -------------------------------------------------------- AC_DEFUN([ORTE_CHECK_SLURM],[ - AC_ARG_WITH([slurm], - [AC_HELP_STRING([--with-slurm], - [Build SLURM scheduler component (default: yes)])]) + if test -z "$orte_check_slurm_happy" ; then + AC_ARG_WITH([slurm], + [AC_HELP_STRING([--with-slurm], + [Build SLURM scheduler component (default: yes)])]) - if test "$with_slurm" = "no" ; then - orte_check_slurm_happy="no" - elif test "$with_slurm" = "" ; then - # unless user asked, only build slurm component on linux, AIX, - # and OS X systems (these are the platforms that SLURM - # supports) - case $host in - *-linux*|*-aix*|*-apple-darwin*) - orte_check_slurm_happy="yes" - ;; - *) - AC_MSG_CHECKING([for SLURM srun in PATH]) - OPAL_WHICH([srun], [ORTE_CHECK_SLURM_SRUN]) - if test "$ORTE_CHECK_SLURM_SRUN" = ""; then - orte_check_slurm_happy="no" - else + if test "$with_slurm" = "no" ; then + orte_check_slurm_happy="no" + elif test "$with_slurm" = "" ; then + # unless user asked, only build slurm component on linux, AIX, + # and OS X systems (these are the platforms that SLURM + # supports) + case $host in + *-linux*|*-aix*|*-apple-darwin*) orte_check_slurm_happy="yes" - fi - AC_MSG_RESULT([$orte_check_slurm_happy]) - ;; - esac - else - orte_check_slurm_happy="yes" - fi + ;; + *) + AC_MSG_CHECKING([for SLURM srun in PATH]) + OPAL_WHICH([srun], [ORTE_CHECK_SLURM_SRUN]) + if test "$ORTE_CHECK_SLURM_SRUN" = ""; then + orte_check_slurm_happy="no" + else + orte_check_slurm_happy="yes" + fi + AC_MSG_RESULT([$orte_check_slurm_happy]) + ;; + esac + else + orte_check_slurm_happy="yes" + fi - AS_IF([test "$orte_check_slurm_happy" = "yes"], - [AC_CHECK_FUNC([fork], - [orte_check_slurm_happy="yes"], - [orte_check_slurm_happy="no"])]) + AS_IF([test "$orte_check_slurm_happy" = "yes"], + [AC_CHECK_FUNC([fork], + [orte_check_slurm_happy="yes"], + [orte_check_slurm_happy="no"])]) - AS_IF([test "$orte_check_slurm_happy" = "yes"], - [AC_CHECK_FUNC([execve], - [orte_check_slurm_happy="yes"], - [orte_check_slurm_happy="no"])]) + AS_IF([test "$orte_check_slurm_happy" = "yes"], + [AC_CHECK_FUNC([execve], + [orte_check_slurm_happy="yes"], + [orte_check_slurm_happy="no"])]) - AS_IF([test "$orte_check_slurm_happy" = "yes"], - [AC_CHECK_FUNC([setpgid], - [orte_check_slurm_happy="yes"], - [orte_check_slurm_happy="no"])]) + AS_IF([test "$orte_check_slurm_happy" = "yes"], + [AC_CHECK_FUNC([setpgid], + [orte_check_slurm_happy="yes"], + [orte_check_slurm_happy="no"])]) + + OMPI_SUMMARY_ADD([[Resource Managers]],[[Slurm]],[$1],[$orte_check_slurm_happy]) + fi AS_IF([test "$orte_check_slurm_happy" = "yes"], [$2], diff --git a/config/orte_check_tm.m4 b/config/orte_check_tm.m4 index 05a9e981d8c..8ee802993eb 100644 --- a/config/orte_check_tm.m4 +++ b/config/orte_check_tm.m4 @@ -13,6 +13,8 @@ dnl All rights reserved. dnl Copyright (c) 2006-2014 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 @@ -43,114 +45,122 @@ AC_DEFUN([ORTE_CHECK_TM_LIBS_FLAGS],[ # ORTE_CHECK_TM(prefix, [action-if-found], [action-if-not-found]) # -------------------------------------------------------- AC_DEFUN([ORTE_CHECK_TM],[ - OPAL_VAR_SCOPE_PUSH([orte_check_tm_found orte_check_tm_happy orte_check_tm_dir orte_check_tm_pbs_config LDFLAGS_save CPPFLAGS_save LIBS_save]) - AC_ARG_WITH([tm], - [AC_HELP_STRING([--with-tm(=DIR)], - [Build TM (Torque, PBSPro, and compatible) support, optionally adding DIR/include, DIR/lib, and DIR/lib64 to the search path for headers and libraries])]) - OPAL_CHECK_WITHDIR([tm], [$with_tm], [include/tm.h]) - - orte_check_tm_found=no - AS_IF([test "$with_tm" = "no"], - [orte_check_tm_happy="no"], - [orte_check_tm_happy="yes" - AS_IF([test ! -z "$with_tm" && test "$with_tm" != "yes"], - [orte_check_tm_dir="$with_tm"], - [orte_check_tm_dir=""])]) - - AS_IF([test "$orte_check_tm_happy" = "yes"], - [AC_MSG_CHECKING([for pbs-config]) - orte_check_tm_pbs_config="not found" - AS_IF([test "$orte_check_tm_dir" != "" && test -d "$orte_check_tm_dir" && test -x "$orte_check_tm_dir/bin/pbs-config"], - [orte_check_tm_pbs_config="$orte_check_tm_dir/bin/pbs-config"], - [AS_IF([pbs-config --prefix >/dev/null 2>&1], - [orte_check_tm_pbs_config="pbs-config"])]) - AC_MSG_RESULT([$orte_check_tm_pbs_config])]) - - # If we have pbs-config, get the flags we need from there and then - # do simplistic tests looking for the tm headers and symbols - - AS_IF([test "$orte_check_tm_happy" = "yes" && test "$orte_check_tm_pbs_config" != "not found"], - [$1_CPPFLAGS=`$orte_check_tm_pbs_config --cflags` - OPAL_LOG_MSG([$1_CPPFLAGS from pbs-config: $$1_CPPFLAGS], 1) - - ORTE_CHECK_TM_LIBS_FLAGS([$1], [LDFLAGS]) - OPAL_LOG_MSG([$1_LDFLAGS from pbs-config: $$1_LDFLAGS], 1) - - ORTE_CHECK_TM_LIBS_FLAGS([$1], [LIBS]) - OPAL_LOG_MSG([$1_LIBS from pbs-config: $$1_LIBS], 1) - - # Now that we supposedly have the right flags, try them out. - - CPPFLAGS_save="$CPPFLAGS" - LDFLAGS_save="$LDFLAGS" - LIBS_save="$LIBS" - - CPPFLAGS="$CPPFLAGS $$1_CPPFLAGS" - LIBS="$LIBS $$1_LIBS" - LDFLAGS="$LDFLAGS $$1_LDFLAGS" - - AC_CHECK_HEADER([tm.h], - [AC_CHECK_FUNC([tm_finalize], - [orte_check_tm_found="yes"])]) - - CPPFLAGS="$CPPFLAGS_save" - LDFLAGS="$LDFLAGS_save" - LIBS="$LIBS_save"]) - - # If we don't have pbs-config, then we have to look around - # manually. - - # Note that Torque 2.1.0 changed the name of their back-end - # library to "libtorque". So we have to check for both libpbs and - # libtorque. First, check for libpbs. - - orte_check_package_$1_save_CPPFLAGS="$CPPFLAGS" - orte_check_package_$1_save_LDFLAGS="$LDFLAGS" - orte_check_package_$1_save_LIBS="$LIBS" - - orte_check_package_$1_orig_CPPFLAGS="$$1_CPPFLAGS" - orte_check_package_$1_orig_LDFLAGS="$$1_LDFLAGS" - orte_check_package_$1_orig_LIBS="$$1_LIBS" - - AS_IF([test "$orte_check_tm_found" = "no"], - [AS_IF([test "$orte_check_tm_happy" = "yes"], - [_OPAL_CHECK_PACKAGE_HEADER([$1], - [tm.h], - [$orte_check_tm_dir], - [orte_check_tm_found="yes"], - [orte_check_tm_found="no"])]) - - AS_IF([test "$orte_check_tm_found" = "yes"], - [_OPAL_CHECK_PACKAGE_LIB([$1], - [pbs], - [tm_init], - [], - [$orte_check_tm_dir], - [$orte_check_tm_libdir], - [orte_check_tm_found="yes"], - [_OPAL_CHECK_PACKAGE_LIB([$1], - [torque], - [tm_init], - [], - [$orte_check_tm_dir], - [$orte_check_tm_libdir], - [orte_check_tm_found="yes"], - [orte_check_tm_found="no"])])])]) - - CPPFLAGS="$orte_check_package_$1_save_CPPFLAGS" - LDFLAGS="$orte_check_package_$1_save_LDFLAGS" - LIBS="$orte_check_package_$1_save_LIBS" - - # add the TM libraries to static builds as they are required - $1_WRAPPER_EXTRA_LDFLAGS=[$]$1_LDFLAGS - $1_WRAPPER_EXTRA_LIBS=[$]$1_LIBS + if test -z $orte_check_tm_happy ; then + OPAL_VAR_SCOPE_PUSH([orte_check_tm_found orte_check_tm_dir orte_check_tm_pbs_config orte_check_tm_LDFLAGS_save orte_check_tm_CPPFLAGS_save orte_check_tm_LIBS_save]) + + AC_ARG_WITH([tm], + [AC_HELP_STRING([--with-tm(=DIR)], + [Build TM (Torque, PBSPro, and compatible) support, optionally adding DIR/include, DIR/lib, and DIR/lib64 to the search path for headers and libraries])]) + OPAL_CHECK_WITHDIR([tm], [$with_tm], [include/tm.h]) + + orte_check_tm_found=no + AS_IF([test "$with_tm" = "no"], + [orte_check_tm_happy="no"], + [orte_check_tm_happy="yes" + AS_IF([test ! -z "$with_tm" && test "$with_tm" != "yes"], + [orte_check_tm_dir="$with_tm"], + [orte_check_tm_dir=""])]) + + AS_IF([test "$orte_check_tm_happy" = "yes"], + [AC_MSG_CHECKING([for pbs-config]) + orte_check_tm_pbs_config="not found" + AS_IF([test "$orte_check_tm_dir" != "" && test -d "$orte_check_tm_dir" && test -x "$orte_check_tm_dir/bin/pbs-config"], + [orte_check_tm_pbs_config="$orte_check_tm_dir/bin/pbs-config"], + [AS_IF([pbs-config --prefix >/dev/null 2>&1], + [orte_check_tm_pbs_config="pbs-config"])]) + AC_MSG_RESULT([$orte_check_tm_pbs_config])]) + + # If we have pbs-config, get the flags we need from there and then + # do simplistic tests looking for the tm headers and symbols + + AS_IF([test "$orte_check_tm_happy" = "yes" && test "$orte_check_tm_pbs_config" != "not found"], + [orte_check_tm_CPPFLAGS=`$orte_check_tm_pbs_config --cflags` + OPAL_LOG_MSG([orte_check_tm_CPPFLAGS from pbs-config: $orte_check_tm_CPPFLAGS], 1) + + ORTE_CHECK_TM_LIBS_FLAGS([orte_check_tm], [LDFLAGS]) + OPAL_LOG_MSG([orte_check_tm_LDFLAGS from pbs-config: $orte_check_tm_LDFLAGS], 1) + + ORTE_CHECK_TM_LIBS_FLAGS([orte_check_tm], [LIBS]) + OPAL_LOG_MSG([orte_check_tm_LIBS from pbs-config: $orte_check_tm_LIBS], 1) + + # Now that we supposedly have the right flags, try them out. + + orte_check_tm_CPPFLAGS_save="$CPPFLAGS" + orte_check_tm_LDFLAGS_save="$LDFLAGS" + orte_check_tm_LIBS_save="$LIBS" + + CPPFLAGS="$CPPFLAGS $orte_check_tm_CPPFLAGS" + LIBS="$LIBS $orte_check_tm_LIBS" + LDFLAGS="$LDFLAGS $orte_check_tm_LDFLAGS" + + AC_CHECK_HEADER([tm.h], + [AC_CHECK_FUNC([tm_finalize], + [orte_check_tm_found="yes"])]) + + CPPFLAGS="$orte_check_tm_CPPFLAGS_save" + LDFLAGS="$orte_check_tm_LDFLAGS_save" + LIBS="$orte_check_tm_LIBS_save"]) + + # If we don't have pbs-config, then we have to look around + # manually. + + # Note that Torque 2.1.0 changed the name of their back-end + # library to "libtorque". So we have to check for both libpbs and + # libtorque. First, check for libpbs. + + orte_check_package_$1_save_CPPFLAGS="$CPPFLAGS" + orte_check_package_$1_save_LDFLAGS="$LDFLAGS" + orte_check_package_$1_save_LIBS="$LIBS" + + AS_IF([test "$orte_check_tm_found" = "no"], + [AS_IF([test "$orte_check_tm_happy" = "yes"], + [_OPAL_CHECK_PACKAGE_HEADER([orte_check_tm], + [tm.h], + [$orte_check_tm_dir], + [orte_check_tm_found="yes"], + [orte_check_tm_found="no"])]) + + AS_IF([test "$orte_check_tm_found" = "yes"], + [_OPAL_CHECK_PACKAGE_LIB([orte_check_tm], + [pbs], + [tm_init], + [], + [$orte_check_tm_dir], + [$orte_check_tm_libdir], + [orte_check_tm_found="yes"], + [_OPAL_CHECK_PACKAGE_LIB([orte_check_tm], + [torque], + [tm_init], + [], + [$orte_check_tm_dir], + [$orte_check_tm_libdir], + [orte_check_tm_found="yes"], + [orte_check_tm_found="no"])])])]) + + CPPFLAGS="$orte_check_package_$1_save_CPPFLAGS" + LDFLAGS="$orte_check_package_$1_save_LDFLAGS" + LIBS="$orte_check_package_$1_save_LIBS" + + if test "$orte_check_tm_found" = "no" ; then + orte_check_tm_happy=no + fi + + OMPI_SUMMARY_ADD([[Resource Managers]],[[Torque]],[$1],[$orte_check_tm_happy]) + + OPAL_VAR_SCOPE_POP + fi # Did we find the right stuff? - AS_IF([test "$orte_check_tm_happy" = "yes" && test "$orte_check_tm_found" = "yes"], - [$2], + AS_IF([test "$orte_check_tm_happy" = "yes"], + [$1_LIBS="[$]$1_LIBS $orte_check_tm_LIBS" + $1_LDFLAGS="[$]$1_LDFLAGS $orte_check_tm_LDFLAGS" + $1_CPPFLAGS="[$]$1_CPPFLAGS $orte_check_tm_CPPFLAGS" + # add the TM libraries to static builds as they are required + $1_WRAPPER_EXTRA_LDFLAGS=[$]$1_LDFLAGS + $1_WRAPPER_EXTRA_LIBS=[$]$1_LIBS + $2], [AS_IF([test ! -z "$with_tm" && test "$with_tm" != "no"], [AC_MSG_ERROR([TM support requested but not found. Aborting])]) - $3]) - - OPAL_VAR_SCOPE_POP + orte_check_tm_happy="no" + $3]) ]) diff --git a/configure.ac b/configure.ac index fbdafda8f10..a1a8e12c694 100644 --- a/configure.ac +++ b/configure.ac @@ -1404,3 +1404,5 @@ m4_ifdef([project_ompi], [OMPI_CONFIG_FILES]) m4_ifdef([project_oshmem], [OSHMEM_CONFIG_FILES]) AC_OUTPUT + +OMPI_SUMMARY_PRINT diff --git a/opal/mca/btl/openib/configure.m4 b/opal/mca/btl/openib/configure.m4 index 9c3d9025c6d..c11dee47cb5 100644 --- a/opal/mca/btl/openib/configure.m4 +++ b/opal/mca/btl/openib/configure.m4 @@ -39,7 +39,7 @@ AC_DEFUN([MCA_opal_btl_openib_POST_CONFIG], [ AC_DEFUN([MCA_opal_btl_openib_CONFIG],[ AC_CONFIG_FILES([opal/mca/btl/openib/Makefile]) - OPAL_VAR_SCOPE_PUSH([cpcs LDFLAGS_save LIBS_save]) + OPAL_VAR_SCOPE_PUSH([cpcs btl_openib_LDFLAGS_save btl_openib_LIBS_save]) cpcs="oob" OPAL_CHECK_OPENFABRICS([btl_openib], @@ -50,13 +50,13 @@ AC_DEFUN([MCA_opal_btl_openib_CONFIG],[ AS_IF([test "$btl_openib_happy" = "yes"], [# With the new openib flags, look for ibv_fork_init - LDFLAGS_save="$LDFLAGS" - LIBS_save="$LIBS" + btl_openib_LDFLAGS_save="$LDFLAGS" + btl_openib_LIBS_save="$LIBS" LDFLAGS="$LDFLAGS $btl_openib_LDFLAGS" LIBS="$LIBS $btl_openib_LIBS" AC_CHECK_FUNCS([ibv_fork_init]) - LDFLAGS="$LDFLAGS_save" - LIBS="$LIBS_save" + LDFLAGS="$btl_openib_LDFLAGS_save" + LIBS="$btl_openib_LIBS_save" $1], [$2]) diff --git a/opal/mca/btl/tcp/configure.m4 b/opal/mca/btl/tcp/configure.m4 index cb68705be8c..d6dc664b21a 100644 --- a/opal/mca/btl/tcp/configure.m4 +++ b/opal/mca/btl/tcp/configure.m4 @@ -11,6 +11,8 @@ # Copyright (c) 2004-2005 The Regents of the University of California. # All rights reserved. # Copyright (c) 2010 Cisco Systems, Inc. All rights reserved. +# Copyright (c) 2016 Los Alamos National Security, LLC. All rights +# reserved. # $COPYRIGHT$ # # Additional copyrights may follow @@ -25,10 +27,14 @@ AC_DEFUN([MCA_opal_btl_tcp_CONFIG],[ # check for sockaddr_in (a good sign we have TCP) AC_CHECK_TYPES([struct sockaddr_in], - [$1], - [$2], + [opal_btl_tcp_happy=yes + $1], + [opal_btl_tcp_happy=no + $2], [AC_INCLUDES_DEFAULT #ifdef HAVE_NETINET_IN_H #include -#endif]) +#endif + ]) + OMPI_SUMMARY_ADD([[Transports]],[[tcp]],[[btl_tcp]],[$opal_btl_tcp_happy]) ])dnl diff --git a/opal/mca/btl/vader/configure.m4 b/opal/mca/btl/vader/configure.m4 index 6d9e2650663..bb67b1a9804 100644 --- a/opal/mca/btl/vader/configure.m4 +++ b/opal/mca/btl/vader/configure.m4 @@ -15,47 +15,6 @@ # $HEADER$ # -# 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], [ - OPAL_VAR_SCOPE_PUSH([opal_check_xpmem_happy]) - 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.*]) - - opal_check_xpmem_happy="no" - - 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([$1],[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 - - AS_IF([test "$opal_check_xpmem_happy" = "yes"], [$2], [$3]) - - OPAL_VAR_SCOPE_POP -])dnl - # MCA_btl_vader_CONFIG([action-if-can-compile], # [action-if-cant-compile]) # ------------------------------------------------ @@ -66,11 +25,7 @@ AC_DEFUN([MCA_opal_btl_vader_CONFIG],[ # Check for single-copy APIs - OPAL_CHECK_CRAY_XPMEM([btl_vader], [btl_vader_xpmem_happy=1], [btl_vader_xpmem_happy=0]) - - AS_IF([test "$btl_vader_xpmem_happy" -eq 0], - [OPAL_CHECK_XPMEM([btl_vader], [btl_vader_xpmem_happy=1], [btl_vader_xpmem_happy=0])],[]) - + OPAL_CHECK_XPMEM([btl_vader], [btl_vader_xpmem_happy=1], [btl_vader_xpmem_happy=0]) OPAL_CHECK_KNEM([btl_vader], [btl_vader_knem_happy=1],[btl_vader_knem_happy=0]) OPAL_CHECK_CMA([btl_vader], [AC_CHECK_HEADER([sys/prctl.h]) btl_vader_cma_happy=1], [btl_vader_cma_happy=0]) From f9f14d64e4628b3f122f0970faced4e94f72b083 Mon Sep 17 00:00:00 2001 From: Gilles Gouaillardet Date: Mon, 14 Mar 2016 11:42:16 +0900 Subject: [PATCH 03/10] configury: UCX uses CPPFLAGS (instead of CFLAGS) (cherry picked from commit a93b849f13b12a7b1c1cdde71a9e491ddc220e17) Signed-off-by: Nathan Hjelm --- config/ompi_check_ucx.m4 | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/config/ompi_check_ucx.m4 b/config/ompi_check_ucx.m4 index db5ae44d35b..3b1247174ce 100644 --- a/config/ompi_check_ucx.m4 +++ b/config/ompi_check_ucx.m4 @@ -62,8 +62,8 @@ AC_DEFUN([OMPI_CHECK_UCX],[ AC_MSG_CHECKING(for UCX version compatibility) AC_REQUIRE_CPP - old_CFLAGS="$CFLAGS" - CFLAGS="$CFLAGS -I$ompi_check_ucx_dir/include" + old_CPPFLAGS="$CPPFLAGS" + CPPFLAGS="$CPPFLAGS -I$ompi_check_ucx_dir/include" AC_COMPILE_IFELSE( [AC_LANG_PROGRAM([[#include ]], [[ @@ -72,7 +72,7 @@ AC_DEFUN([OMPI_CHECK_UCX],[ [ompi_ucx_version_ok="no"]) AC_MSG_RESULT([$ompi_ucx_version_ok]) - CFLAGS=$old_CFLAGS + CPPFLAGS=$old_CPPFLAGS AS_IF([test "$ompi_ucx_version_ok" = "no"], [ompi_check_ucx_happy="no"]) @@ -81,7 +81,7 @@ AC_DEFUN([OMPI_CHECK_UCX],[ AS_IF([test "$ompi_check_ucx_happy" = "yes"], - [$1_CFLAGS="[$]$1_CFLAGS $ompi_check_ucx_CFLAGS" + [$1_CPPFLAGS="[$]$1_CPPFLAGS $ompi_check_ucx_CPPFLAGS" $1_LDFLAGS="[$]$1_LDFLAGS $ompi_check_ucx_LDFLAGS" $1_LIBS="[$]$1_LIBS $ompi_check_ucx_LIBS" $2], From 69568eefc887a646cfd1f3514b61a4b810bd60fa Mon Sep 17 00:00:00 2001 From: Jeff Squyres Date: Thu, 10 Mar 2016 07:59:55 -0800 Subject: [PATCH 04/10] configury: minor updates to config summary output (cherry picked from commit 48c650c47a24fe3ca7291263d6429a0d7e3aac9b) Signed-off-by: Nathan Hjelm --- config/ompi_check_psm.m4 | 4 +-- config/opal_check_cma.m4 | 4 +-- config/opal_check_cuda.m4 | 4 ++- config/opal_check_knem.m4 | 4 +-- config/opal_check_libfabric.m4 | 4 +-- config/opal_check_portals4.m4 | 4 +-- config/opal_check_xpmem.m4 | 4 +-- config/opal_summary.m4 | 59 +++++++++++++++++---------------- opal/mca/btl/scif/configure.m4 | 3 ++ opal/mca/btl/tcp/configure.m4 | 4 +-- opal/mca/btl/vader/configure.m4 | 6 ++-- orte/mca/plm/rsh/configure.m4 | 3 +- 12 files changed, 57 insertions(+), 46 deletions(-) diff --git a/config/ompi_check_psm.m4 b/config/ompi_check_psm.m4 index cfe17920605..788c3fd21cf 100644 --- a/config/ompi_check_psm.m4 +++ b/config/ompi_check_psm.m4 @@ -11,7 +11,7 @@ dnl University of Stuttgart. All rights reserved. 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) 2009-2016 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 @@ -77,7 +77,7 @@ AC_DEFUN([OMPI_CHECK_PSM],[ [AC_MSG_WARN([glob.h not found. Can not build component.]) ompi_check_psm_happy="no"])]) - OMPI_SUMMARY_ADD([[Transports]],[[QLogic Infinipath (PSM)]],[$1],[$ompi_check_psm_happy]) + OMPI_SUMMARY_ADD([[Transports]],[[Intel TrueScale (PSM)]],[$1],[$ompi_check_psm_happy]) fi AS_IF([test "$ompi_check_psm_happy" = "yes"], diff --git a/config/opal_check_cma.m4 b/config/opal_check_cma.m4 index 68a3f86e5ce..bd99b55edab 100644 --- a/config/opal_check_cma.m4 +++ b/config/opal_check_cma.m4 @@ -3,7 +3,7 @@ # Copyright (c) 2009 The University of Tennessee and The University # of Tennessee Research Foundation. All rights # reserved. -# Copyright (c) 2009-2010 Cisco Systems, Inc. All rights reserved. +# Copyright (c) 2009-2016 Cisco Systems, Inc. All rights reserved. # Copyright (c) 2010-2012 IBM Corporation. All rights reserved. # Copyright (c) 2013-2016 Los Alamos National Security, LLC. All rights # reserved. @@ -41,7 +41,7 @@ AC_DEFUN([OPAL_CHECK_CMA],[ OPAL_VAR_SCOPE_POP - OMPI_SUMMARY_ADD([[Transports]],[[Linux CMA IPC]],[$1],[$ompi_check_cma_happy]) + OMPI_SUMMARY_ADD([[Transports]],[[Shared memory/Linux CMA]],[$1],[$ompi_check_cma_happy]) fi AS_IF([test "$ompi_check_cma_happy" = "yes"], [$2], [$3]) diff --git a/config/opal_check_cuda.m4 b/config/opal_check_cuda.m4 index 11456ef905e..6e2da3a7d7a 100644 --- a/config/opal_check_cuda.m4 +++ b/config/opal_check_cuda.m4 @@ -10,7 +10,7 @@ dnl Copyright (c) 2004-2005 High Performance Computing Center Stuttgart, dnl University of Stuttgart. All rights reserved. dnl Copyright (c) 2004-2005 The Regents of the University of California. dnl All rights reserved. -dnl Copyright (c) 2006-2015 Cisco Systems, Inc. All rights reserved. +dnl Copyright (c) 2006-2016 Cisco Systems, Inc. All rights reserved. dnl Copyright (c) 2007 Sun Microsystems, Inc. All rights reserved. dnl Copyright (c) 2009 IBM Corporation. All rights reserved. dnl Copyright (c) 2009 Los Alamos National Security, LLC. All rights @@ -124,6 +124,8 @@ else CUDA_SUPPORT=0 fi +OMPI_SUMMARY_ADD([[Miscellaneous]],[[CUDA support]],[opal_cuda], [$opal_check_cuda_happy]) + AM_CONDITIONAL([OPAL_cuda_support], [test "x$CUDA_SUPPORT" = "x1"]) AC_DEFINE_UNQUOTED([OPAL_CUDA_SUPPORT],$CUDA_SUPPORT, [Whether we want cuda device pointer support]) diff --git a/config/opal_check_knem.m4 b/config/opal_check_knem.m4 index eb00a081fe0..e1210784ba6 100644 --- a/config/opal_check_knem.m4 +++ b/config/opal_check_knem.m4 @@ -3,7 +3,7 @@ dnl dnl Copyright (c) 2009 The University of Tennessee and The University dnl of Tennessee Research Foundation. All rights dnl reserved. -dnl Copyright (c) 2009-2010 Cisco Systems, Inc. All rights reserved. +dnl Copyright (c) 2009-2016 Cisco Systems, Inc. All rights reserved. dnl Copyright (c) 2010-2012 IBM Corporation. All rights reserved. dnl Copyright (c) 2014-2016 Los Alamos National Security, LLC. All rights dnl reserved. @@ -61,7 +61,7 @@ AC_DEFUN([OPAL_CHECK_KNEM],[ CPPFLAGS="$opal_check_knem_$1_save_CPPFLAGS" - OMPI_SUMMARY_ADD([[Transports]],[[KNEM Shared Memory]],[$1],[$opal_check_knem_happy]) + OMPI_SUMMARY_ADD([[Transports]],[[Shared memory/Linux KNEM]],[$1],[$opal_check_knem_happy]) OPAL_VAR_SCOPE_POP fi diff --git a/config/opal_check_libfabric.m4 b/config/opal_check_libfabric.m4 index 7f888605c80..3678404ea86 100644 --- a/config/opal_check_libfabric.m4 +++ b/config/opal_check_libfabric.m4 @@ -1,6 +1,6 @@ dnl -*- shell-script -*- dnl -dnl Copyright (c) 2015 Cisco Systems, Inc. All rights reserved. +dnl Copyright (c) 2015-2016 Cisco Systems, Inc. All rights reserved. dnl Copyright (c) 2016 Los Alamos National Security, LLC. All rights dnl reserved. dnl $COPYRIGHT$ @@ -71,7 +71,7 @@ AC_DEFUN([OPAL_CHECK_LIBFABRIC],[ LDFLAGS=$opal_check_libfabric_$1_save_LDFLAGS LIBS=$opal_check_libfabric_$1_save_LIBS - OMPI_SUMMARY_ADD([[Transports]],[[OpenFabrics libfabric]],[$1],[$opal_check_libfabric_happy]) + OMPI_SUMMARY_ADD([[Transports]],[[OpenFabrics Libfabric]],[$1],[$opal_check_libfabric_happy]) OPAL_VAR_SCOPE_POP fi diff --git a/config/opal_check_portals4.m4 b/config/opal_check_portals4.m4 index 71fc3ffa61c..1e3e0a207ae 100644 --- a/config/opal_check_portals4.m4 +++ b/config/opal_check_portals4.m4 @@ -11,7 +11,7 @@ dnl University of Stuttgart. All rights reserved. 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) 2009-2016 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 @@ -94,7 +94,7 @@ AC_DEFUN([OPAL_CHECK_PORTALS4],[ 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]) + OMPI_SUMMARY_ADD([[Transports]],[[Portals4]],[$1],[$ompi_check_portals4_happy]) fi AS_IF([test "$ompi_check_portals4_happy" = "yes"], diff --git a/config/opal_check_xpmem.m4 b/config/opal_check_xpmem.m4 index 7d8e3d2a87d..829f7209f8c 100644 --- a/config/opal_check_xpmem.m4 +++ b/config/opal_check_xpmem.m4 @@ -10,7 +10,7 @@ # 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) 2009-2016 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. @@ -101,7 +101,7 @@ AC_DEFUN([OPAL_CHECK_XPMEM], [ fi fi - OMPI_SUMMARY_ADD([[Transports]],[[XPMEM Shared Memory]],[$1],[$opal_check_cray_xpmem_happy]) + OMPI_SUMMARY_ADD([[Transports]],[[Shared memory/XPMEM]],[$1],[$opal_check_cray_xpmem_happy]) fi AS_IF([test "$opal_check_xpmem_happy" = "yes"], [ diff --git a/config/opal_summary.m4 b/config/opal_summary.m4 index 754b57ab68d..4e072bd3fdc 100644 --- a/config/opal_summary.m4 +++ b/config/opal_summary.m4 @@ -2,6 +2,7 @@ dnl -*- shell-script -*- dnl dnl Copyright (c) 2016 Los Alamos National Security, LLC. All rights dnl reserved. +dnl Copyright (c) 2016 Cisco Systems, Inc. All rights reserved. dnl $COPYRIGHT$ dnl dnl Additional copyrights may follow @@ -33,55 +34,50 @@ AC_DEFUN([OMPI_SUMMARY_ADD],[ AC_DEFUN([OMPI_SUMMARY_PRINT],[ OPAL_VAR_SCOPE_PUSH([ompi_summary_section ompi_summary_section_name]) - echo "\nOpen MPI configuration:" - echo "-----------------------" - echo "Version: $OMPI_MAJOR_VERSION.$OMPI_MINOR_VERSION.$OMPI_RELEASE_VERSION $OMPI_GREEK_VERSION" - - dnl Print out which projects will be built - echo "Build Open Platform Abstration project: yes" - if test "$project_orte_amc" = "true" ; then - echo "Build Open Runtime project: yes" - else - echo "Build Open Runtime project: no" - fi + cat < #endif ]) - OMPI_SUMMARY_ADD([[Transports]],[[tcp]],[[btl_tcp]],[$opal_btl_tcp_happy]) + OMPI_SUMMARY_ADD([[Transports]],[[TCP]],[[btl_tcp]],[$opal_btl_tcp_happy]) ])dnl diff --git a/opal/mca/btl/vader/configure.m4 b/opal/mca/btl/vader/configure.m4 index bb67b1a9804..578b9fc9861 100644 --- a/opal/mca/btl/vader/configure.m4 +++ b/opal/mca/btl/vader/configure.m4 @@ -3,7 +3,7 @@ # Copyright (c) 2009 The University of Tennessee and The University # of Tennessee Research Foundation. All rights # reserved. -# Copyright (c) 2009-2010 Cisco Systems, Inc. All rights reserved. +# Copyright (c) 2009-2016 Cisco Systems, Inc. All rights reserved. # Copyright (c) 2011-2014 Los Alamos National Security, LLC. All rights # reserved. # Copyright (c) 2015 Research Organization for Information Science @@ -43,7 +43,9 @@ AC_DEFUN([MCA_opal_btl_vader_CONFIG],[ # always happy [$1] - # substitute in the things needed to build with XPMEM support + OMPI_SUMMARY_ADD([[Transports]],[[Shared memory/copy in+copy out]],[$1],[yes]) + +# substitute in the things needed to build with XPMEM support AC_SUBST([btl_vader_CFLAGS]) AC_SUBST([btl_vader_CPPFLAGS]) AC_SUBST([btl_vader_LDFLAGS]) diff --git a/orte/mca/plm/rsh/configure.m4 b/orte/mca/plm/rsh/configure.m4 index e1956e025bd..6c9bd98055d 100644 --- a/orte/mca/plm/rsh/configure.m4 +++ b/orte/mca/plm/rsh/configure.m4 @@ -12,7 +12,7 @@ # All rights reserved. # Copyright (c) 2011-2013 Los Alamos National Security, LLC. # All rights reserved. -# Copyright (c) 2010 Cisco Systems, Inc. All rights reserved. +# Copyright (c) 2010-2016 Cisco Systems, Inc. All rights reserved. # $COPYRIGHT$ # # Additional copyrights may follow @@ -27,5 +27,6 @@ AC_DEFUN([MCA_orte_plm_rsh_CONFIG],[ AC_CHECK_FUNC([fork], [plm_rsh_happy="yes"], [plm_rsh_happy="no"]) + OMPI_SUMMARY_ADD([[Resource Managers]],[[ssh/rsh]],[$1],[$plm_rsh_happy]) AS_IF([test "$plm_rsh_happy" = "yes"], [$1], [$2]) ])dnl From 9122dcf9ab92f423afcdad70f7c65ac4a40370f2 Mon Sep 17 00:00:00 2001 From: Igor Ivanov Date: Wed, 16 Mar 2016 17:48:51 +0200 Subject: [PATCH 05/10] config: Fix wrong variable name Changed $project_shmem with $project_oshmem (cherry picked from commit 7bd12dc1a4238b598cb2f7118cd07ef5d0aa019c) Signed-off-by: Nathan Hjelm --- config/opal_summary.m4 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/opal_summary.m4 b/config/opal_summary.m4 index 4e072bd3fdc..0fb919faf73 100644 --- a/config/opal_summary.m4 +++ b/config/opal_summary.m4 @@ -72,7 +72,7 @@ EOF fi fi - if test "$project_shmem_amc" = "true" ; then + if test "$project_oshmem_amc" = "true" ; then echo "Build Open SHMEM support: yes" else echo "Build Open SHMEM support: no" From 592b97b1701ce9c5efa8ebd69469932f6b0391c8 Mon Sep 17 00:00:00 2001 From: Jeff Squyres Date: Mon, 28 Mar 2016 08:32:15 -0700 Subject: [PATCH 06/10] opal_summary: no tabs! * Replace all tabs with spaces * Remove extraneous extra blank line at the end (in some cases, we were getting *2* blank lines at the end) * Use `echo " "` instead of `echo` (which may not be portable) Signed-off-by: Jeff Squyres (cherry picked from commit bd3c15cef07b57b968b6f144b96590c010041581) Signed-off-by: Nathan Hjelm --- config/opal_summary.m4 | 50 +++++++++++++++++++++--------------------- 1 file changed, 25 insertions(+), 25 deletions(-) diff --git a/config/opal_summary.m4 b/config/opal_summary.m4 index 0fb919faf73..5955a62c127 100644 --- a/config/opal_summary.m4 +++ b/config/opal_summary.m4 @@ -19,14 +19,14 @@ AC_DEFUN([OMPI_SUMMARY_ADD],[ ompi_summary_section_current=$(eval echo \$ompi_summary_values_$ompi_summary_section) if test -z "$ompi_summary_section_current" ; then - if test -z "$ompi_summary_sections" ; then - ompi_summary_sections=$ompi_summary_section - else - ompi_summary_sections="$ompi_summary_sections $ompi_summary_section" - fi - eval ompi_summary_values_$ompi_summary_section=\"$ompi_summary_line\" + if test -z "$ompi_summary_sections" ; then + ompi_summary_sections=$ompi_summary_section + else + ompi_summary_sections="$ompi_summary_sections $ompi_summary_section" + fi + eval ompi_summary_values_$ompi_summary_section=\"$ompi_summary_line\" else - eval ompi_summary_values_$ompi_summary_section=\"$ompi_summary_section_current,$ompi_summary_line\" + eval ompi_summary_values_$ompi_summary_section=\"$ompi_summary_section_current,$ompi_summary_line\" fi OPAL_VAR_SCOPE_POP @@ -42,23 +42,23 @@ Version: $OMPI_MAJOR_VERSION.$OMPI_MINOR_VERSION.$OMPI_RELEASE_VERSION$OMPI_GREE EOF if test "$project_ompi_amc" = "true" ; then - echo "Build MPI C bindings: yes" + echo "Build MPI C bindings: yes" else - echo "Build MPI C bindings: no" + echo "Build MPI C bindings: no" fi dnl Print out the bindings if we are building OMPI if test "$project_ompi_amc" = "true" ; then if test x$enable_mpi_cxx = xyes ; then - echo "Build MPI C++ bindings (deprecated): yes" + echo "Build MPI C++ bindings (deprecated): yes" else - echo "Build MPI C++ bindings (deprecated): no" + echo "Build MPI C++ bindings (deprecated): no" fi if test $OMPI_BUILD_FORTRAN_BINDINGS = $OMPI_FORTRAN_MPIFH_BINDINGS ; then - echo "Build MPI Fortran bindings: mpif.h" + echo "Build MPI Fortran bindings: mpif.h" elif test $OMPI_BUILD_FORTRAN_BINDINGS = $OMPI_FORTRAN_USEMPI_BINDINGS ; then - echo "Build MPI Fortran bindings: mpif.h, use mpi" + echo "Build MPI Fortran bindings: mpif.h, use mpi" elif test $OMPI_BUILD_FORTRAN_BINDINGS = $OMPI_FORTRAN_USEMPIF08_BINDINGS ; then echo "Build MPI Fortran bindings: mpif.h, use mpi, use mpi_f08" else @@ -73,31 +73,31 @@ EOF fi if test "$project_oshmem_amc" = "true" ; then - echo "Build Open SHMEM support: yes" + echo "Build Open SHMEM support: yes" else - echo "Build Open SHMEM support: no" + echo "Build Open SHMEM support: no" fi if test $WANT_DEBUG = 0 ; then - echo "Debug build: no" + echo "Debug build: no" else - echo "Debug build: yes" + echo "Debug build: yes" fi if test ! -z $with_platform ; then - echo "Platform file: $with_platform" + echo "Platform file: $with_platform" else - echo "Platform file: (none)" + echo "Platform file: (none)" fi echo for ompi_summary_section in $(echo $ompi_summary_sections) ; do - ompi_summary_section_name=$(echo $ompi_summary_section | tr '_' ' ') - echo "$ompi_summary_section_name" - echo "-----------------------" - echo "$(eval echo \$ompi_summary_values_$ompi_summary_section)" | tr ',' $'\n' | sort -f - echo + ompi_summary_section_name=$(echo $ompi_summary_section | tr '_' ' ') + echo "$ompi_summary_section_name" + echo "-----------------------" + echo "$(eval echo \$ompi_summary_values_$ompi_summary_section)" | tr ',' $'\n' | sort -f + echo " " done if test $WANT_DEBUG = 1 ; then @@ -105,9 +105,9 @@ EOF ***************************************************************************** THIS IS A DEBUG BUILD! DO NOT USE THIS BUILD FOR PERFORMANCE MEASUREMENTS! ***************************************************************************** + EOF fi - echo " " OPAL_VAR_SCOPE_POP ]) From 4adaa71ccf9a174da9b3deac630aad2c04ef3a4a Mon Sep 17 00:00:00 2001 From: Jeff Squyres Date: Wed, 20 Apr 2016 08:38:57 -0700 Subject: [PATCH 07/10] m4: rename OMPI_SUMMARY_* macros to OPAL_SUMMARY_* These macros should really be named OPAL_SUMMARY_*; they're used in all projects, and therefore should be in the lowest later project (OPAL). Signed-off-by: Jeff Squyres (cherry picked from commit 6800ef9ec0d349f6e555821a31660755e47812b6) Signed-off-by: Nathan Hjelm --- config/ompi_check_mxm.m4 | 3 ++- config/ompi_check_psm.m4 | 2 +- config/ompi_check_psm2.m4 | 4 ++-- config/ompi_check_ucx.m4 | 3 ++- config/opal_check_cma.m4 | 2 +- config/opal_check_cuda.m4 | 2 +- config/opal_check_knem.m4 | 2 +- config/opal_check_libfabric.m4 | 2 +- config/opal_check_openfabrics.m4 | 4 ++-- config/opal_check_portals4.m4 | 2 +- config/opal_check_ugni.m4 | 4 ++-- config/opal_check_xpmem.m4 | 2 +- config/opal_summary.m4 | 4 ++-- config/orte_check_alps.m4 | 4 ++-- config/orte_check_lsf.m4 | 4 ++-- config/orte_check_sge.m4 | 4 ++-- config/orte_check_slurm.m4 | 4 ++-- config/orte_check_tm.m4 | 4 ++-- configure.ac | 4 ++-- opal/mca/btl/scif/configure.m4 | 2 +- opal/mca/btl/tcp/configure.m4 | 2 +- opal/mca/btl/vader/configure.m4 | 2 +- orte/mca/plm/rsh/configure.m4 | 2 +- 23 files changed, 35 insertions(+), 33 deletions(-) diff --git a/config/ompi_check_mxm.m4 b/config/ompi_check_mxm.m4 index 5cfe1e44cb5..a0d98c1e504 100644 --- a/config/ompi_check_mxm.m4 +++ b/config/ompi_check_mxm.m4 @@ -5,6 +5,7 @@ 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 (c) 2016 Cisco Systems, Inc. All rights reserved. dnl $COPYRIGHT$ dnl dnl Additional copyrights may follow @@ -78,7 +79,7 @@ AC_DEFUN([OMPI_CHECK_MXM],[ AS_IF([test "$ompi_mxm_version_ok" = "no"], [ompi_check_mxm_happy="no"]) - OMPI_SUMMARY_ADD([[Transports]],[[Mellanox MXM]],[$1],[$ompi_check_mxm_happy]) + OPAL_SUMMARY_ADD([[Transports]],[[Mellanox MXM]],[$1],[$ompi_check_mxm_happy]) fi AS_IF([test "$ompi_check_mxm_happy" = "yes"], diff --git a/config/ompi_check_psm.m4 b/config/ompi_check_psm.m4 index 788c3fd21cf..12954f40630 100644 --- a/config/ompi_check_psm.m4 +++ b/config/ompi_check_psm.m4 @@ -77,7 +77,7 @@ AC_DEFUN([OMPI_CHECK_PSM],[ [AC_MSG_WARN([glob.h not found. Can not build component.]) ompi_check_psm_happy="no"])]) - OMPI_SUMMARY_ADD([[Transports]],[[Intel TrueScale (PSM)]],[$1],[$ompi_check_psm_happy]) + OPAL_SUMMARY_ADD([[Transports]],[[Intel TrueScale (PSM)]],[$1],[$ompi_check_psm_happy]) fi AS_IF([test "$ompi_check_psm_happy" = "yes"], diff --git a/config/ompi_check_psm2.m4 b/config/ompi_check_psm2.m4 index 5ed14766882..ff00cb54d77 100644 --- a/config/ompi_check_psm2.m4 +++ b/config/ompi_check_psm2.m4 @@ -11,7 +11,7 @@ # Copyright (c) 2004-2006 The Regents of the University of California. # All rights reserved. # Copyright (c) 2006 QLogic Corp. All rights reserved. -# Copyright (c) 2009 Cisco Systems, Inc. All rights reserved. +# Copyright (c) 2009-2016 Cisco Systems, Inc. All rights reserved. # Copyright (c) 2014 Intel Corporation. All rights reserved. # Copyright (c) 2015 Research Organization for Information Science # and Technology (RIST). All rights reserved. @@ -76,7 +76,7 @@ AC_DEFUN([OMPI_CHECK_PSM2],[ [AC_MSG_WARN([glob.h not found. Can not build component.]) ompi_check_psm2_happy="no"])]) - OMPI_SUMMARY_ADD([[Transports]],[[Intel Omnipath (PSM2)]],[$1],[$ompi_check_psm2_happy]) + OPAL_SUMMARY_ADD([[Transports]],[[Intel Omnipath (PSM2)]],[$1],[$ompi_check_psm2_happy]) fi AS_IF([test "$ompi_check_psm2_happy" = "yes"], diff --git a/config/ompi_check_ucx.m4 b/config/ompi_check_ucx.m4 index 3b1247174ce..93aceebca3e 100644 --- a/config/ompi_check_ucx.m4 +++ b/config/ompi_check_ucx.m4 @@ -5,6 +5,7 @@ # and Technology (RIST). All rights reserved. # Copyright (c) 2016 Los Alamos National Security, LLC. All rights # reserved. +# Copyright (c) 2016 Cisco Systems, Inc. All rights reserved. # $COPYRIGHT$ # # Additional copyrights may follow @@ -76,7 +77,7 @@ AC_DEFUN([OMPI_CHECK_UCX],[ AS_IF([test "$ompi_ucx_version_ok" = "no"], [ompi_check_ucx_happy="no"]) - OMPI_SUMMARY_ADD([[Transports]],[[Open UCX]],[$1],[$ompi_check_ucx_happy]) + OPAL_SUMMARY_ADD([[Transports]],[[Open UCX]],[$1],[$ompi_check_ucx_happy]) fi diff --git a/config/opal_check_cma.m4 b/config/opal_check_cma.m4 index bd99b55edab..8309d8b36d3 100644 --- a/config/opal_check_cma.m4 +++ b/config/opal_check_cma.m4 @@ -41,7 +41,7 @@ AC_DEFUN([OPAL_CHECK_CMA],[ OPAL_VAR_SCOPE_POP - OMPI_SUMMARY_ADD([[Transports]],[[Shared memory/Linux CMA]],[$1],[$ompi_check_cma_happy]) + OPAL_SUMMARY_ADD([[Transports]],[[Shared memory/Linux CMA]],[$1],[$ompi_check_cma_happy]) fi AS_IF([test "$ompi_check_cma_happy" = "yes"], [$2], [$3]) diff --git a/config/opal_check_cuda.m4 b/config/opal_check_cuda.m4 index 6e2da3a7d7a..fd7816e3ea7 100644 --- a/config/opal_check_cuda.m4 +++ b/config/opal_check_cuda.m4 @@ -124,7 +124,7 @@ else CUDA_SUPPORT=0 fi -OMPI_SUMMARY_ADD([[Miscellaneous]],[[CUDA support]],[opal_cuda], [$opal_check_cuda_happy]) +OPAL_SUMMARY_ADD([[Miscellaneous]],[[CUDA support]],[opal_cuda], [$opal_check_cuda_happy]) AM_CONDITIONAL([OPAL_cuda_support], [test "x$CUDA_SUPPORT" = "x1"]) AC_DEFINE_UNQUOTED([OPAL_CUDA_SUPPORT],$CUDA_SUPPORT, diff --git a/config/opal_check_knem.m4 b/config/opal_check_knem.m4 index e1210784ba6..2e999f1fd42 100644 --- a/config/opal_check_knem.m4 +++ b/config/opal_check_knem.m4 @@ -61,7 +61,7 @@ AC_DEFUN([OPAL_CHECK_KNEM],[ CPPFLAGS="$opal_check_knem_$1_save_CPPFLAGS" - OMPI_SUMMARY_ADD([[Transports]],[[Shared memory/Linux KNEM]],[$1],[$opal_check_knem_happy]) + OPAL_SUMMARY_ADD([[Transports]],[[Shared memory/Linux KNEM]],[$1],[$opal_check_knem_happy]) OPAL_VAR_SCOPE_POP fi diff --git a/config/opal_check_libfabric.m4 b/config/opal_check_libfabric.m4 index 3678404ea86..142c7c61008 100644 --- a/config/opal_check_libfabric.m4 +++ b/config/opal_check_libfabric.m4 @@ -71,7 +71,7 @@ AC_DEFUN([OPAL_CHECK_LIBFABRIC],[ LDFLAGS=$opal_check_libfabric_$1_save_LDFLAGS LIBS=$opal_check_libfabric_$1_save_LIBS - OMPI_SUMMARY_ADD([[Transports]],[[OpenFabrics Libfabric]],[$1],[$opal_check_libfabric_happy]) + OPAL_SUMMARY_ADD([[Transports]],[[OpenFabrics Libfabric]],[$1],[$opal_check_libfabric_happy]) OPAL_VAR_SCOPE_POP fi diff --git a/config/opal_check_openfabrics.m4 b/config/opal_check_openfabrics.m4 index 069226d0b07..0ead428eb56 100644 --- a/config/opal_check_openfabrics.m4 +++ b/config/opal_check_openfabrics.m4 @@ -10,7 +10,7 @@ # University of Stuttgart. All rights reserved. # 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-2016 Cisco Systems, Inc. All rights reserved. # Copyright (c) 2006-2016 Los Alamos National Security, LLC. All rights # reserved. # Copyright (c) 2006-2009 Mellanox Technologies. All rights reserved. @@ -277,7 +277,7 @@ AC_DEFUN([OPAL_CHECK_OPENFABRICS],[ 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_SUMMARY_ADD([[Transports]],[[OpenFabrics Verbs]],[$1],[$opal_check_openib_happy]) OPAL_VAR_SCOPE_POP fi diff --git a/config/opal_check_portals4.m4 b/config/opal_check_portals4.m4 index 1e3e0a207ae..086bb3f665d 100644 --- a/config/opal_check_portals4.m4 +++ b/config/opal_check_portals4.m4 @@ -94,7 +94,7 @@ AC_DEFUN([OPAL_CHECK_PORTALS4],[ 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]) + OPAL_SUMMARY_ADD([[Transports]],[[Portals4]],[$1],[$ompi_check_portals4_happy]) fi AS_IF([test "$ompi_check_portals4_happy" = "yes"], diff --git a/config/opal_check_ugni.m4 b/config/opal_check_ugni.m4 index 12d0613fd71..6ae8bc25d6e 100644 --- a/config/opal_check_ugni.m4 +++ b/config/opal_check_ugni.m4 @@ -11,7 +11,7 @@ dnl University of Stuttgart. All rights reserved. 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) 2009-2016 Cisco Systems, Inc. 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 @@ -68,7 +68,7 @@ AC_DEFUN([OPAL_CHECK_UGNI], [ [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]) + OPAL_SUMMARY_ADD([[Transports]],[[Cray uGNI (Gemini/Aries)]],[$1],[$opal_check_ugni_happy]) fi AS_IF([test "$opal_check_ugni_happy" = "yes"], diff --git a/config/opal_check_xpmem.m4 b/config/opal_check_xpmem.m4 index 829f7209f8c..ee1fd42027a 100644 --- a/config/opal_check_xpmem.m4 +++ b/config/opal_check_xpmem.m4 @@ -101,7 +101,7 @@ AC_DEFUN([OPAL_CHECK_XPMEM], [ fi fi - OMPI_SUMMARY_ADD([[Transports]],[[Shared memory/XPMEM]],[$1],[$opal_check_cray_xpmem_happy]) + OPAL_SUMMARY_ADD([[Transports]],[[Shared memory/XPMEM]],[$1],[$opal_check_cray_xpmem_happy]) fi AS_IF([test "$opal_check_xpmem_happy" = "yes"], [ diff --git a/config/opal_summary.m4 b/config/opal_summary.m4 index 5955a62c127..40ae015aa95 100644 --- a/config/opal_summary.m4 +++ b/config/opal_summary.m4 @@ -9,7 +9,7 @@ dnl Additional copyrights may follow dnl dnl $HEADER$ dnl -AC_DEFUN([OMPI_SUMMARY_ADD],[ +AC_DEFUN([OPAL_SUMMARY_ADD],[ OPAL_VAR_SCOPE_PUSH([ompi_summary_section ompi_summary_line ompi_summary_section_current]) dnl need to replace spaces in the section name with somethis else. _ seems like a reasonable @@ -32,7 +32,7 @@ AC_DEFUN([OMPI_SUMMARY_ADD],[ OPAL_VAR_SCOPE_POP ]) -AC_DEFUN([OMPI_SUMMARY_PRINT],[ +AC_DEFUN([OPAL_SUMMARY_PRINT],[ OPAL_VAR_SCOPE_PUSH([ompi_summary_section ompi_summary_section_name]) cat < #endif ]) - OMPI_SUMMARY_ADD([[Transports]],[[TCP]],[[btl_tcp]],[$opal_btl_tcp_happy]) + OPAL_SUMMARY_ADD([[Transports]],[[TCP]],[[btl_tcp]],[$opal_btl_tcp_happy]) ])dnl diff --git a/opal/mca/btl/vader/configure.m4 b/opal/mca/btl/vader/configure.m4 index 578b9fc9861..328d8f3094a 100644 --- a/opal/mca/btl/vader/configure.m4 +++ b/opal/mca/btl/vader/configure.m4 @@ -43,7 +43,7 @@ AC_DEFUN([MCA_opal_btl_vader_CONFIG],[ # always happy [$1] - OMPI_SUMMARY_ADD([[Transports]],[[Shared memory/copy in+copy out]],[$1],[yes]) + OPAL_SUMMARY_ADD([[Transports]],[[Shared memory/copy in+copy out]],[$1],[yes]) # substitute in the things needed to build with XPMEM support AC_SUBST([btl_vader_CFLAGS]) diff --git a/orte/mca/plm/rsh/configure.m4 b/orte/mca/plm/rsh/configure.m4 index 6c9bd98055d..246dde9731c 100644 --- a/orte/mca/plm/rsh/configure.m4 +++ b/orte/mca/plm/rsh/configure.m4 @@ -27,6 +27,6 @@ AC_DEFUN([MCA_orte_plm_rsh_CONFIG],[ AC_CHECK_FUNC([fork], [plm_rsh_happy="yes"], [plm_rsh_happy="no"]) - OMPI_SUMMARY_ADD([[Resource Managers]],[[ssh/rsh]],[$1],[$plm_rsh_happy]) + OPAL_SUMMARY_ADD([[Resource Managers]],[[ssh/rsh]],[$1],[$plm_rsh_happy]) AS_IF([test "$plm_rsh_happy" = "yes"], [$1], [$2]) ])dnl From 34bc9d3578a60682f74d9257fdf55638fd84cf47 Mon Sep 17 00:00:00 2001 From: Gilles Gouaillardet Date: Mon, 2 May 2016 16:21:52 +0900 Subject: [PATCH 08/10] configury: fix MPI Java bindings message in summary (cherry picked from commit cdac9e813d59189f97e56b8e1e1dc3a412953682) Signed-off-by: Nathan Hjelm --- config/opal_summary.m4 | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/config/opal_summary.m4 b/config/opal_summary.m4 index 40ae015aa95..084896df125 100644 --- a/config/opal_summary.m4 +++ b/config/opal_summary.m4 @@ -3,6 +3,8 @@ dnl dnl Copyright (c) 2016 Los Alamos National Security, LLC. All rights dnl reserved. dnl Copyright (c) 2016 Cisco Systems, Inc. All rights reserved. +dnl Copyright (c) 2016 Research Organization for Information Science +dnl and Technology (RIST). All rights reserved. dnl $COPYRIGHT$ dnl dnl Additional copyrights may follow @@ -65,7 +67,7 @@ EOF echo "Build MPI Fortran bindings: no" fi - if test x$opal_java_happy = xyes ; then + if test x$WANT_MPI_JAVA_SUPPORT = x1 ; then echo "Build MPI Java bindings (experimental): yes" else echo "MPI Build Java bindings (experimental): no" From 57d15bbcf799d9f397ab95363c28f290c8f1f4d3 Mon Sep 17 00:00:00 2001 From: Nathan Hjelm Date: Sun, 5 Jun 2016 22:12:38 -0600 Subject: [PATCH 09/10] opal/cma: improve Linux CMA detection This commit improves the CMA detection when the installed glibc doesn't have support for CMA. In this case we need to verify that the syscall numbers in opal/include/opal/sys/cma.h are valid for the architecture. This verification is done by attempting to use CMA while including the internal header. Signed-off-by: Nathan Hjelm (cherry picked from commit 4a2bd833026b71064480362bc256f9d6654c18e1) Signed-off-by: Nathan Hjelm --- config/opal_check_cma.m4 | 78 +++++++++++++++++++++++++++++++++++-- opal/include/opal/sys/cma.h | 5 +++ 2 files changed, 79 insertions(+), 4 deletions(-) diff --git a/config/opal_check_cma.m4 b/config/opal_check_cma.m4 index 8309d8b36d3..8ae5797dcf4 100644 --- a/config/opal_check_cma.m4 +++ b/config/opal_check_cma.m4 @@ -19,19 +19,89 @@ # check if cma support is wanted. AC_DEFUN([OPAL_CHECK_CMA],[ if test -z "$ompi_check_cma_happy" ; then - OPAL_VAR_SCOPE_PUSH([ompi_check_cma_need_defs ompi_check_cma_kernel_version]) + OPAL_VAR_SCOPE_PUSH([ompi_check_cma_need_defs ompi_check_cma_kernel_version ompi_check_cma_CFLAGS]) - ompi_check_cma_happy="no" AC_ARG_WITH([cma], [AC_HELP_STRING([--with-cma], - [Build Cross Memory Attach support (default: no)])]) + [Build Cross Memory Attach support (default: autodetect)])]) # 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 test $ompi_check_cma_need_defs = 1 ; then + ompi_check_cma_CFLAGS="$CFLAGS" + # Need some extra include paths to locate the appropriate headers + CFLAGS="$CFLAGS -I${srcdir} -I${srcdir}/opal/include" + AC_MSG_CHECKING([if internal syscall numbers for Linux CMA work]) + AC_RUN_IFELSE([AC_LANG_PROGRAM([[ +#include +#include +#include +#include + +#include +#include +#include + +#include "opal/include/opal/sys/cma.h" + +static void do_check (pid_t pid, int *in, int *out) +{ + int check[4] = {0, 0, 0, 0}, i; + struct iovec rem_iov = {out, sizeof (check)}; + struct iovec loc_iov = {check, sizeof (check)}; + ssize_t rc; + + rc = process_vm_readv (pid, &loc_iov, 1, &rem_iov, 1, 0); + if (sizeof (check) != rc) { + exit (1); + } + + for (i = 0 ; i < 4 ; ++i) { + if (check[i] != i) { + exit (1); + } + + check[i] = i * 2; + } + + rem_iov.iov_base = in; + rc = process_vm_writev (pid, &loc_iov, 1, &rem_iov, 1, 0); + if (sizeof (check) != rc) { + exit (1); + } + + exit (0); +} +]],[[ + int i, in[4] = {-1, -1, -1, -1}, out[4] = {0, 1, 2, 3}; + + do_check (getpid (), in, out); + + for (i = 0 ; i < 4 ; ++i) { + if (in[i] != 2 * i) { + return 1; + } + } + + /* all good */ + return 0; +]])], + [AC_MSG_RESULT([yes]) + ompi_check_cma_happy="yes"], + [AC_MSG_RESULT([no]) + ompi_check_cma_happy="no"], + [AC_MSG_RESULT([no (cross-compiling)]) + ompi_check_cma_happy="no"]) + CFLAGS="$ompi_check_cma_CFLAGS" + else + ompi_check_cma_happy="yes" + fi + # 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 + if test "x$with_cma" = "xyes" || test "$ompi_check_cma_happy" = "yes" ; then ompi_check_cma_happy="yes" AC_DEFINE_UNQUOTED([OPAL_CMA_NEED_SYSCALL_DEFS], [$ompi_check_cma_need_defs], diff --git a/opal/include/opal/sys/cma.h b/opal/include/opal/sys/cma.h index cbbcbe01479..92980637b0f 100644 --- a/opal/include/opal/sys/cma.h +++ b/opal/include/opal/sys/cma.h @@ -1,5 +1,7 @@ /* * Copyright (c) 2011-2012 IBM Corporation. All rights reserved. + * Copyright (c) 2016 Los Alamos National Security, LLC. All rights + * reserved. * */ @@ -14,7 +16,10 @@ #ifndef OPAL_SYS_CMA_H #define OPAL_SYS_CMA_H 1 +#if !defined(OPAL_ASSEMBLY_ARCH) +/* need opal_config.h for the assembly architecture */ #include "opal_config.h" +#endif #include "opal/sys/architecture.h" From ce2a8fde4a7e1d12bcba3082a0f0e6d665f580af Mon Sep 17 00:00:00 2001 From: Jeff Squyres Date: Tue, 23 Aug 2016 07:26:47 -0700 Subject: [PATCH 10/10] opal_check_cma: make consistent with rest of configury Split the CMA test into two parts so that the back-end test only has to be run once. Fail with --with-cma is specified and cannot be provided. Remove a few useless quotes. Change $ompi_check_cma_need_defs and $ompi_check_cma_happy to be numeric values. Finally, remove a bunch of tabs. Signed-off-by: Jeff Squyres (cherry picked from commit 997431696ac91015ef71a69ad8b6ad47abd42c6f) Signed-off-by: Nathan Hjelm --- config/opal_check_cma.m4 | 98 +++++++++++++++++++++++----------------- 1 file changed, 56 insertions(+), 42 deletions(-) diff --git a/config/opal_check_cma.m4 b/config/opal_check_cma.m4 index 8ae5797dcf4..2930debf911 100644 --- a/config/opal_check_cma.m4 +++ b/config/opal_check_cma.m4 @@ -18,23 +18,45 @@ # -------------------------------------------------------- # check if cma support is wanted. AC_DEFUN([OPAL_CHECK_CMA],[ - 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_CFLAGS]) - - AC_ARG_WITH([cma], - [AC_HELP_STRING([--with-cma], - [Build Cross Memory Attach support (default: autodetect)])]) - - # 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 test $ompi_check_cma_need_defs = 1 ; then - ompi_check_cma_CFLAGS="$CFLAGS" - # Need some extra include paths to locate the appropriate headers - CFLAGS="$CFLAGS -I${srcdir} -I${srcdir}/opal/include" - AC_MSG_CHECKING([if internal syscall numbers for Linux CMA work]) - AC_RUN_IFELSE([AC_LANG_PROGRAM([[ + AC_ARG_WITH([cma], + [AC_HELP_STRING([--with-cma], + [Build Cross Memory Attach support (default: autodetect)])]) + + # We only need to do the back-end test once + if test -z "$opal_check_cma_happy" ; then + OPAL_CHECK_CMA_BACKEND + fi + + AS_IF([test $opal_check_cma_happy -eq 1], + [$2], + [if test "$with_cma" = "yes"; then + AC_MSG_WARN([--with-cma support requested, but not available]) + AC_MSG_ERROR([Cannot continue]) + fi + $3]) +]) + +AC_DEFUN([OPAL_CHECK_CMA_BACKEND], +[ + OPAL_VAR_SCOPE_PUSH([opal_check_cma_need_defs opal_check_cma_kernel_version opal_check_cma_CFLAGS opal_check_cma_msg]) + + # Some systems have process_cm_readv() in libc, which means CMA is + # supported. Other systems do not have process_cm_readv() in + # libc, but have support for it in the kernel if we invoke it + # directly. Check for both. + AC_CHECK_HEADERS([sys/prctl.h]) + + AC_CHECK_FUNC([process_vm_readv], [opal_check_cma_need_defs=0], + [opal_check_cma_need_defs=1]) + AC_DEFINE_UNQUOTED([OPAL_CMA_NEED_SYSCALL_DEFS], + [$opal_check_cma_need_defs], + [Need CMA syscalls defined]) + if test $opal_check_cma_need_defs -eq 1 ; then + opal_check_cma_CFLAGS=$CFLAGS + # Need some extra include paths to locate the appropriate headers + CFLAGS="$CFLAGS -I${srcdir} -I${srcdir}/opal/include" + AC_MSG_CHECKING([if internal syscall numbers for Linux CMA work]) + AC_RUN_IFELSE([AC_LANG_PROGRAM([[ #include #include #include @@ -88,31 +110,23 @@ static void do_check (pid_t pid, int *in, int *out) /* all good */ return 0; ]])], - [AC_MSG_RESULT([yes]) - ompi_check_cma_happy="yes"], - [AC_MSG_RESULT([no]) - ompi_check_cma_happy="no"], - [AC_MSG_RESULT([no (cross-compiling)]) - ompi_check_cma_happy="no"]) - CFLAGS="$ompi_check_cma_CFLAGS" - else - ompi_check_cma_happy="yes" - fi - - # If the user specifically requests CMA go ahead and enable it even - # if the glibc version does not support process_vm_readv - if test "x$with_cma" = "xyes" || test "$ompi_check_cma_happy" = "yes" ; then - ompi_check_cma_happy="yes" - AC_DEFINE_UNQUOTED([OPAL_CMA_NEED_SYSCALL_DEFS], - [$ompi_check_cma_need_defs], - [Need CMA syscalls defined]) - AC_CHECK_HEADERS([sys/prctl.h]) - fi - - OPAL_VAR_SCOPE_POP - - OPAL_SUMMARY_ADD([[Transports]],[[Shared memory/Linux CMA]],[$1],[$ompi_check_cma_happy]) + [AC_MSG_RESULT([yes]) + opal_check_cma_happy=1], + [AC_MSG_RESULT([no]) + opal_check_cma_happy=0], + [AC_MSG_RESULT([no (cross-compiling)]) + opal_check_cma_happy=0]) + CFLAGS=$opal_check_cma_CFLAGS + else + # If we didn't need the defs, then we have process_vm_readv(), + # and CMA is happy. + opal_check_cma_happy=1 fi - AS_IF([test "$ompi_check_cma_happy" = "yes"], [$2], [$3]) + OPAL_VAR_SCOPE_POP + + AS_IF([test $opal_check_cma_happy -eq 1], + [opal_check_cma_msg=yes], + [opal_check_cma_msg=no]) + OPAL_SUMMARY_ADD([[Transports]],[[Shared memory/Linux CMA]],[$1],[$opal_check_cma_msg]) ])