1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193
|
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.
dnl Copyright (c) 2009-2020 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) 2019 Intel, Inc. All rights reserved.
dnl Copyright (c) 2020 Triad National Security, LLC. All rights
dnl reserved.
dnl Copyright (c) 2021 Nanook Consulting. All rights reserved.
dnl $COPYRIGHT$
dnl
dnl Additional copyrights may follow
dnl
dnl $HEADER$
dnl
# PRTE_CHECK_ALPS_CLE4([action-if-found], [action-if-not-found])
# --------------------------------------------------------
AC_DEFUN([PRTE_CHECK_ALPS_CLE4],[
#
# if we've gotten here, its because we are building on a CLE 4 system
#
prte_check_alps_cle4_libdir_happy="no"
prte_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],
[AS_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"],
[AS_IF([test "$with_alps" != "yes" && test "$with_alps" != "auto"],
[AS_IF([test -d "$with_alps_libdir/lib64"],
[prte_check_alps_libdir="$with_alps_libdir/lib64"],
[prte_check_alps_libdir="$with_alps_libdir/lib"])],
[ prte_check_alps_libdir="$default_alps_dir/lib/alps"])
],[])
AS_IF([test "$with_alps" = "yes" || test "$with_alps" = "auto"],
[prte_check_alps_dir=$default_alps_dir],
[prte_check_alps_dir=$with_alps])
AC_MSG_CHECKING([if $prte_check_alps_libdir/libalps.a is present])
AS_IF([test -f "$prte_check_alps_libdir/libalps.a"],
[prte_check_alps_libdir_cle4_happy="yes"],
[prte_check_alps_libdir_cle4_happy="no",
AC_MSG_RESULT([no])])
AC_MSG_CHECKING([if $prte_check_alps_dir/include/alps/apInfo.h is present])
AS_IF([test -f "$prte_check_alps_dir/include/alps/apInfo.h"],
[prte_check_alps_dir_cle4_happy="yes"],
[prte_check_alps_dir_cle4_happy="no"
AC_MSG_RESULT([no])])
AS_IF([test "$prte_check_alps_libdir_cle4_happy" = "yes" && test "$prte_check_alps_dir_cle4_happy" = "yes"],
[CRAY_ALPSLLI_CFLAGS="-I$prte_check_alps_dir/include"
CRAY_ALPSLLI_LIBS="-L$prte_check_alps_libdir -lalpslli -lalpsutil"
CRAY_ALPSLLI_STATIC_LIBS="-L$prte_check_alps_libdir -lalpslli -lalpsutil"
$1],
[$2])
])
# PRTE_CHECK_ALPS(prefix, [action-if-found], [action-if-not-found])
# --------------------------------------------------------
AC_DEFUN([PRTE_CHECK_ALPS],[
if test -z "$prte_check_cray_alps_happy"; then
AC_ARG_WITH([alps],
[AS_HELP_STRING([--with-alps(=DIR|yes|no)],
[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)
if test -f /etc/opt/cray/release/clerelease; then
cle_level=`awk -F. '{print [$]1}' /etc/opt/cray/release/clerelease`
else
cle_level="unknown"
fi
AC_MSG_CHECKING([for ALPS support cle level $cle_level])
AS_IF([test "$cle_level" = "4" && test "$with_alps" != "no"],
[PRTE_CHECK_ALPS_CLE4([prte_check_cray_alps_happy="yes"],
[prte_check_cray_alps_happy="no"])],
[AS_IF([test "$with_alps" = "no"],
[AC_MSG_RESULT([no])
$3],
[AS_IF([test "$with_alps" = "auto" || test "$with_alps" = "yes"],
[PKG_CHECK_MODULES_STATIC([CRAY_ALPSLLI], [cray-alpslli],
[prte_check_cray_alps_happy="yes"],
[prte_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],
[prte_check_cray_alps_happy="yes"],
[prte_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],
[prte_check_cray_alps_happy="yes"],
[prte_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_WLM_DETECT], [cray-wlm_detect],
[prte_check_cray_alps_happy="yes"
AC_DEFINE_UNQUOTED([CRAY_WLM_DETECT],[1],
[defined to 1 if cray wlm available, 0 otherwise])
],
[prte_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_UGNI], [cray-ugni],
[prte_check_cray_alps_happy="yes"
AC_DEFINE_UNQUOTED([CRAY_UGNI],[1],
[defined to 1 if cray uGNI available, 0 otherwise])
],
[prte_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])],[])]
)
],
[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([prte_check_cray_alps_happy = $prte_check_cray_alps_happy])
AS_IF([test "$prte_check_cray_alps_happy" = "yes"],
[prte_have_cray_alps=1],
[prte_have_cray_alps=0])
AC_DEFINE_UNQUOTED([PRTE_HAVE_CRAY_ALPS],
[$prte_have_cray_alps],
[defined to 1 if cray alps env, 0 otherwise])
AS_IF([test "$prte_check_cray_alps_happy" = "yes" && test "$enable_static" = "yes"],
[CRAY_ALPSLLI_LIBS = $CRAY_ALPSLLI_STATIC_LIBS
CRAY_ALPSUTIL_LIBS = $CRAY_ALPSUTIL_STATIC_LIBS],
[])
PRTE_SUMMARY_ADD([Resource Managers], [Cray Alps], [], [$prte_check_cray_alps_happy])
fi
AS_IF([test "$prte_check_cray_alps_happy" = "yes"],
[$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 $CRAY_UGNI_LIBS"
$2],
[$3])
])
|