2015-02-03 09:33:13 +03:00
dnl -*- shell-script -*-
dnl
dnl Copyright (c) 2004-2005 The Trustees of Indiana University and Indiana
dnl University Research and Technology
dnl Corporation. All rights reserved.
dnl Copyright (c) 2004-2005 The University of Tennessee and The University
dnl of Tennessee Research Foundation. All rights
dnl reserved.
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.
2016-04-20 18:38:57 +03:00
dnl Copyright (c) 2009-2016 Cisco Systems, Inc. All rights reserved.
2015-02-03 09:33:13 +03:00
dnl Copyright (c) 2015 Research Organization for Information Science
dnl and Technology (RIST). All rights reserved.
2016-03-01 21:01:51 +03:00
dnl Copyright (c) 2016 Los Alamos National Security, LLC. All rights
dnl reserved.
2015-02-03 09:33:13 +03:00
dnl $COPYRIGHT$
dnl
dnl Additional copyrights may follow
dnl
dnl $HEADER$
dnl
2014-11-26 00:35:04 +03:00
# ORTE_CHECK_ALPS_CLE4([action-if-found], [action-if-not-found])
# --------------------------------------------------------
AC_DEFUN([ORTE_CHECK_ALPS_CLE4],[
#
# if we've gotten here, its because we are building on a CLE 4 system
#
orte_check_alps_cle4_libdir_happy="no"
orte_check_alps_cle4_dir_happy="no"
AC_MSG_CHECKING([Checking for ALPS components on a CLE 4 system with alps $with_alps])
AC_ARG_WITH([alps-libdir],
[AC_HELP_STRING([--with-alps-libdir=DIR],
[Location of alps libraries (alpslli, alpsutil) (default: /usr/lib/alps (/opt/cray/xe-sysroot/default/user on eslogin nodes))])])
#
# check to see if Open MPI is being built on a CLE 4 eslogin node
#
AS_IF([test -f /etc/opt/cray/release/ESLrelease],
[default_alps_dir="/opt/cray/xe-sysroot/default/usr"],
[default_alps_dir="/usr"])
AS_IF([test -z "$with_alps_libdir"],
2015-02-03 09:33:13 +03:00
[AS_IF([test "$with_alps" != "yes" && test "$with_alps" != "auto"],
2014-11-26 00:35:04 +03:00
[AS_IF([test -d "$with_alps_libdir/lib64"],
[orte_check_alps_libdir="$with_alps_libdir/lib64"],
[orte_check_alps_libdir="$with_alps_libdir/lib"])],
[ orte_check_alps_libdir="$default_alps_dir/lib/alps"])
],[])
2015-02-03 09:33:13 +03:00
AS_IF([test "$with_alps" = "yes" || test "$with_alps" = "auto"],
2014-11-26 00:35:04 +03:00
[orte_check_alps_dir=$default_alps_dir],
[orte_check_alps_dir=$with_alps])
AC_MSG_CHECKING([if $orte_check_alps_libdir/libalps.a is present])
AS_IF([test -f "$orte_check_alps_libdir/libalps.a"],
[orte_check_alps_libdir_cle4_happy="yes"],
[orte_check_alps_libdir_cle4_happy="no",
AC_MSG_RESULT([no])])
AC_MSG_CHECKING([if $orte_check_alps_dir/include/alps/apInfo.h is present])
AS_IF([test -f "$orte_check_alps_dir/include/alps/apInfo.h"],
[orte_check_alps_dir_cle4_happy="yes"],
[orte_check_alps_dir_cle4_happy="no"
AC_MSG_RESULT([no])])
2015-02-03 09:33:13 +03:00
AS_IF([test "$orte_check_alps_libdir_cle4_happy" = "yes" && test "$orte_check_alps_dir_cle4_happy" = "yes"],
2014-11-26 00:35:04 +03:00
[CRAY_ALPSLLI_CFLAGS="-I$orte_check_alps_dir/include"
CRAY_ALPSLLI_LIBS="-L$orte_check_alps_libdir -lalpslli -lalpsutil"
CRAY_ALPSLLI_STATIC_LIBS="-L$orte_check_alps_libdir -lalpslli -lalpsutil"
$1],
[$2])
])
2008-10-28 20:22:29 +03:00
2009-10-24 05:04:35 +04:00
# ORTE_CHECK_ALPS(prefix, [action-if-found], [action-if-not-found])
2008-10-28 20:22:29 +03:00
# --------------------------------------------------------
2009-10-24 05:04:35 +04:00
AC_DEFUN([ORTE_CHECK_ALPS],[
2016-03-01 21:01:51 +03:00
if test -z "$orte_check_cray_alps_happy"; then
2012-01-18 00:41:50 +04:00
2012-08-20 19:26:58 +04:00
AC_ARG_WITH([alps],
[AC_HELP_STRING([--with-alps(=DIR|yes|no)],
2014-11-26 00:35:04 +03:00
[Build with ALPS scheduler component, optionally adding DIR/include, DIR/lib, and DIR/lib64 to the search path for headers and libraries (default: auto)])],[],with_alps=auto)
2014-04-18 21:49:16 +04:00
2014-11-26 00:35:04 +03:00
if test -f /etc/opt/cray/release/clerelease; then
cle_level=`awk -F. '{print [$]1}' /etc/opt/cray/release/clerelease`
2012-08-15 02:04:39 +04:00
else
2014-11-26 00:35:04 +03:00
cle_level="unknown"
2012-08-20 19:26:58 +04:00
fi
2013-02-01 03:42:28 +04:00
2014-11-26 00:35:04 +03:00
AC_MSG_CHECKING([for ALPS support cle level $cle_level])
2015-02-03 09:33:13 +03:00
AS_IF([test "$cle_level" = "4" && test "$with_alps" != "no"],
2014-11-26 00:35:04 +03:00
[ORTE_CHECK_ALPS_CLE4([orte_check_cray_alps_happy="yes"],
[orte_check_cray_alps_happy="no"])],
[AS_IF([test "$with_alps" = "no"],
[AC_MSG_RESULT([no])
$3],
2015-02-03 09:33:13 +03:00
[AS_IF([test "$with_alps" = "auto" || test "$with_alps" = "yes"],
2014-11-26 00:35:04 +03:00
[PKG_CHECK_MODULES_STATIC([CRAY_ALPSLLI], [cray-alpslli],
[orte_check_cray_alps_happy="yes"],
[orte_check_cray_alps_happy="no"]
[AS_IF([test "$with_alps" = "yes"],
[AC_MSG_WARN([ALPS support requested but pkg-config failed.])
AC_MSG_WARN([Need to explicitly indicate ALPS directory])
AC_MSG_WARN([on the configure line using --with-alps option.])
AC_MSG_ERROR([Aborting])],[])]
)
PKG_CHECK_MODULES_STATIC([CRAY_ALPSUTIL], [cray-alpsutil],
[orte_check_cray_alps_happy="yes"],
[orte_check_cray_alps_happy="no"]
[AS_IF([test "$with_alps" = "yes"],
[AC_MSG_WARN([ALPS support requested but pkg-config failed.])
AC_MSG_WARN([Need to explicitly indicate ALPS directory])
AC_MSG_WARN([on the configure line using --with-alps option.])
AC_MSG_ERROR([Aborting])],[])]
)
PKG_CHECK_MODULES_STATIC([CRAY_ALPS], [cray-alps],
[orte_check_cray_alps_happy="yes"],
[orte_check_cray_alps_happy="no"]
[AS_IF([test "$with_alps" = "yes"],
[AC_MSG_WARN([ALPS support requested but pkg-config failed.])
AC_MSG_WARN([Need to explicitly indicate ALPS directory])
AC_MSG_WARN([on the configure line using --with-alps option.])
AC_MSG_ERROR([Aborting])],[])]
)
2015-12-07 18:43:20 +03:00
PKG_CHECK_MODULES_STATIC([CRAY_WLM_DETECT], [cray-wlm_detect],
[orte_check_cray_alps_happy="yes"
AC_DEFINE_UNQUOTED([CRAY_WLM_DETECT],[1],
[defined to 1 if cray wlm available, 0 otherwise])
],
[orte_check_cray_alps_happy="no"]
[AS_IF([test "$with_alps" = "yes"],
[AC_MSG_WARN([ALPS support requested but pkg-config failed.])
AC_MSG_WARN([Need to explicitly indicate ALPS directory])
AC_MSG_WARN([on the configure line using --with-alps option.])
AC_MSG_ERROR([Aborting])],[])]
)
2014-11-26 00:35:04 +03:00
],
[AC_MSG_WARN([See ./configure --help for how to control Open MPI])
AC_MSG_WARN([configuration for ALPS on CLE 5 and higher systems])
AC_MSG_ERROR([Aborting])])
])
])
AC_MSG_RESULT([orte_check_cray_alps_happy = $orte_check_cray_alps_happy])
2015-02-03 09:33:13 +03:00
AS_IF([test "$orte_check_cray_alps_happy" = "yes" && test "$enable_static" = "yes"],
2014-11-26 00:35:04 +03:00
[CRAY_ALPSLLI_LIBS = $CRAY_ALPSLLI_STATIC_LIBS
CRAY_ALPSUTIL_LIBS = $CRAY_ALPSUTIL_STATIC_LIBS],
[])
2016-04-20 18:38:57 +03:00
OPAL_SUMMARY_ADD([[Resource Managers]],[[Cray Alps]],[$1],[$orte_check_cray_alps_happy])
2014-04-18 21:49:16 +04:00
fi
2014-11-26 00:35:04 +03:00
AS_IF([test "$orte_check_cray_alps_happy" = "yes"],
2016-03-01 21:01:51 +03:00
[$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])
2012-01-20 02:10:03 +04:00
])