Skip to content

Configure summary and enable CMA by default #2216

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 10 commits into from
Nov 7, 2016
92 changes: 50 additions & 42 deletions config/ompi_check_mxm.m4
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@ 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 (c) 2016 Cisco Systems, Inc. All rights reserved.
dnl $COPYRIGHT$
dnl
dnl Additional copyrights may follow
Expand All @@ -16,51 +19,50 @@ dnl
# LDFLAGS, LIBS} as needed and runs action-if-found if there is
# support, otherwise executes action-if-not-found
AC_DEFUN([OMPI_CHECK_MXM],[
AC_ARG_WITH([mxm],
[AC_HELP_STRING([--with-mxm(=DIR)],
[Build Mellanox Messaging support, optionally adding
DIR/include and DIR/lib or DIR/lib64 to the search path for headers and libraries])])
AC_ARG_WITH([mxm-libdir],
[AC_HELP_STRING([--with-mxm-libdir=DIR],
[Search for Mellanox MXM libraries in DIR])])
OPAL_CHECK_WITHDIR([mxm-libdir], [$with_mxm_libdir], [libmxm.*])
if test -z "$ompi_check_mxm_happy" ; then
AC_ARG_WITH([mxm],
[AC_HELP_STRING([--with-mxm(=DIR)],
[Build Mellanox Messaging support, optionally adding
DIR/include and DIR/lib or DIR/lib64 to the search path for headers and libraries])])
AC_ARG_WITH([mxm-libdir],
[AC_HELP_STRING([--with-mxm-libdir=DIR],
[Search for Mellanox MXM libraries in DIR])])
OPAL_CHECK_WITHDIR([mxm-libdir], [$with_mxm_libdir], [libmxm.*])

ompi_check_mxm_$1_save_CPPFLAGS="$CPPFLAGS"
ompi_check_mxm_$1_save_LDFLAGS="$LDFLAGS"
ompi_check_mxm_$1_save_LIBS="$LIBS"
ompi_check_mxm_$1_save_CPPFLAGS="$CPPFLAGS"
ompi_check_mxm_$1_save_LDFLAGS="$LDFLAGS"
ompi_check_mxm_$1_save_LIBS="$LIBS"

AS_IF([test "$with_mxm" != "no"],
[AS_IF([test ! -z "$with_mxm" && test "$with_mxm" != "yes"],
[
AS_IF([test "$with_mxm" != "no"],
[AS_IF([test ! -z "$with_mxm" && test "$with_mxm" != "yes"],
[
ompi_check_mxm_dir="$with_mxm"
])
AS_IF([test ! -z "$with_mxm_libdir" && test "$with_mxm_libdir" != "yes"],
[ompi_check_mxm_libdir="$with_mxm_libdir"])
])
AS_IF([test ! -z "$with_mxm_libdir" && test "$with_mxm_libdir" != "yes"],
[ompi_check_mxm_libdir="$with_mxm_libdir"])

OPAL_CHECK_PACKAGE([$1],
[mxm/api/mxm_api.h],
[mxm],
[mxm_cleanup],
[],
[$ompi_check_mxm_dir],
[$ompi_check_mxm_libdir],
[ompi_check_mxm_happy="yes"],
[ompi_check_mxm_happy="no"])],
[ompi_check_mxm_happy="no"])
OPAL_CHECK_PACKAGE([ompi_check_mxm],
[mxm/api/mxm_api.h],
[mxm],
[mxm_cleanup],
[],
[$ompi_check_mxm_dir],
[$ompi_check_mxm_libdir],
[ompi_check_mxm_happy="yes"],
[ompi_check_mxm_happy="no"])],
[ompi_check_mxm_happy="no"])

CPPFLAGS="$ompi_check_mxm_$1_save_CPPFLAGS"
LDFLAGS="$ompi_check_mxm_$1_save_LDFLAGS"
LIBS="$ompi_check_mxm_$1_save_LIBS"


CPPFLAGS="$ompi_check_mxm_$1_save_CPPFLAGS"
LDFLAGS="$ompi_check_mxm_$1_save_LDFLAGS"
LIBS="$ompi_check_mxm_$1_save_LIBS"

AC_MSG_CHECKING(for MXM version compatibility)
AC_REQUIRE_CPP
old_CFLAGS="$CFLAGS"
CFLAGS="$CFLAGS -I$ompi_check_mxm_dir/include"
AC_COMPILE_IFELSE(
AC_MSG_CHECKING(for MXM version compatibility)
AC_REQUIRE_CPP
old_CFLAGS="$CFLAGS"
CFLAGS="$CFLAGS -I$ompi_check_mxm_dir/include"
AC_COMPILE_IFELSE(
[AC_LANG_PROGRAM([[#include <mxm/api/mxm_version.h>]],
[[
[[
#ifndef MXM_VERSION
#error "MXM Version is less than 2.1, please upgrade"
#endif
Expand All @@ -72,13 +74,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"])
OPAL_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])
Expand Down
81 changes: 45 additions & 36 deletions config/ompi_check_psm.m4
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,11 @@ 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
dnl reserved.
dnl Copyright (c) 2016 Intel Corporation. All rights reserved.
dnl
dnl $COPYRIGHT$
Expand All @@ -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"])])

OPAL_SUMMARY_ADD([[Transports]],[[Intel TrueScale (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])
Expand Down
82 changes: 45 additions & 37 deletions config/ompi_check_psm2.m4
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,12 @@
# 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.
# Copyright (c) 2016 Los Alamos National Security, LLC. All rights
# reserved.
# $COPYRIGHT$
#
# Additional copyrights may follow
Expand All @@ -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"])])


OPAL_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])
Expand Down
Loading