1
1

Improve support for Cray's CLE 5

cmr=v1.8.1

This commit was SVN r31426.
Этот коммит содержится в:
Nathan Hjelm 2014-04-18 17:49:16 +00:00
родитель 530f22c403
Коммит 99812c8c07
2 изменённых файлов: 63 добавлений и 49 удалений

Просмотреть файл

@ -1,4 +1,4 @@
# -*- Mode: Shell ; indent-tabs-mode:nil -*-
# -*- Mode: shell-script ; indent-tabs-mode:nil -*-
#
# Copyright (c) 2004-2005 The Trustees of Indiana University and Indiana
# University Research and Technology
@ -12,7 +12,7 @@
# All rights reserved.
# Copyright (c) 2006 QLogic Corp. All rights reserved.
# Copyright (c) 2009 Cisco Systems, Inc. All rights reserved.
# Copyright (c) 2011-2012 Los Alamos National Security, LLC.
# Copyright (c) 2011-2014 Los Alamos National Security, LLC.
# All rights reserved.
# $COPYRIGHT$
#
@ -37,63 +37,61 @@
# --with-ugni=/opt/cray/ugni/default --with-ugni-includedir=/opt/cray/gni-headers/default/include
AC_DEFUN([OMPI_CHECK_UGNI], [
AC_ARG_WITH([ugni], [AC_HELP_STRING([--with-ugni(=DIR)],
[Build GNI (Cray Gemini) support, optionally adding DIR/include, DIR/lib, and DIR/lib64 to the search path for headers and libraries])])
if test -z "$ompi_check_ugni_happy" ; then
OPAL_VAR_SCOPE_PUSH([ompi_check_ugni_dir ompi_check_ugni_libdir])
ompi_check_ugni_happy="no"
dnl does the path exist?
OMPI_CHECK_WITHDIR([ugni], [$with_ugni], [.])
AC_ARG_WITH([ugni], [AC_HELP_STRING([--with-ugni(=DIR)],
[Build uGNI support, optionally adding DIR/include, DIR/lib, and DIR/lib64 to the search path for headers and libraries])])
AC_ARG_WITH([ugni-libdir], [AC_HELP_STRING([--with-ugni-libdir=DIR],
[Search for GNI (Cray Gemini) libraries in DIR])])
OMPI_CHECK_WITHDIR([ugni-libdir], [$with_ugni_libdir], [libugni.*])
dnl does the path exist?
OMPI_CHECK_WITHDIR([ugni], [$with_ugni], [.])
AC_ARG_WITH([ugni-includedir],
[AC_HELP_STRING([--with-ugni-includedir=DIR],
[Search for GNI (Cray Gemini) headers in DIR])])
OMPI_CHECK_WITHDIR([ugni-includedir], [$with_ugni_includedir], [gni_pub.h])
AC_ARG_WITH([ugni-libdir], [AC_HELP_STRING([--with-ugni-libdir=DIR],
[Search for uGNI libraries in DIR])])
OMPI_CHECK_WITHDIR([ugni-libdir], [$with_ugni_libdir], [libugni.*])
AS_IF([test "$with_ugni_includedir" != "" -a "$with_ugni_includedir" != "yes" -a "$with_ugni_includedir" != "no"],
[$1_CPPFLAGS="$$1_CPPFLAGS -I$with_ugni_includedir"])
AC_ARG_WITH([ugni-includedir],
[AC_HELP_STRING([--with-ugni-includedir=DIR], [Search for uGNI headers in DIR])])
OMPI_CHECK_WITHDIR([ugni-includedir], [$with_ugni_includedir], [gni_pub.h])
ompi_check_ugni_$1_save_CPPFLAGS="$CPPFLAGS"
ompi_check_ugni_$1_save_LDFLAGS="$LDFLAGS"
ompi_check_ugni_$1_save_LIBS="$LIBS"
AS_IF([test "$with_ugni_includedir" != "" -a "$with_ugni_includedir" != "yes" -a "$with_ugni_includedir" != "no"],
[ompi_check_ugni_CPPFLAGS="-I$with_ugni_includedir"])
AS_IF([test "$with_ugni" != "no"], [
AS_IF([test ! -z "$with_ugni" -a "$with_ugni" != "yes"], [
ompi_check_ugni_dir="$with_ugni"])
AS_IF([test ! -z "$with_ugni_libdir" -a "$with_ugni_libdir" != "yes"], [
ompi_check_ugni_libdir="$with_ugni_libdir"])
if test "$with_ugni" != "no" ; then
if test -n "$with_ugni" -a "$with_ugni" != "yes" ; then
ompi_check_ugni_dir="$with_ugni"
fi
if test -n "$with_ugni_libdir" -a "$with_ugni_libdir" != "yes" ; then
ompi_check_ugni_libdir="$with_ugni_libdir"
fi
OMPI_CHECK_PACKAGE([$1],
[ugni.h],
[ugni],
[GNI_CdmCreate],
[],
[$ompi_check_ugni_dir],
[$ompi_check_ugni_libdir],
[ompi_check_ugni_happy="yes"],
[ompi_check_ugni_happy="no"])],
[ompi_check_ugni_happy="no"])
ompi_check_ugni_$1_save_CPPFLAGS="$CPPFLAGS"
ompi_check_ugni_$1_save_LDFLAGS="$LDFLAGS"
ompi_check_ugni_$1_save_LIBS="$LIBS"
LIBS="$LIBS $$1_LIBS"
LDFLAGS="$LDFLAGS $$1_LDFLAGS"
CPPFLAGS="$CPPFLAGS $ompi_check_ugni_CPPFLAGS"
AS_IF([test "$ompi_check_ugni_happy" = "yes"],
[AC_CHECK_FUNCS([GNI_GetJobResInfo])])
OMPI_CHECK_PACKAGE([ompi_check_ugni], [ugni.h], [ugni], [GNI_CdmCreate],
[], [$ompi_check_ugni_dir], [$ompi_check_ugni_libdir], [ompi_check_ugni_happy="yes"], [])
CPPFLAGS="$ompi_check_ugni_$1_save_CPPFLAGS"
LDFLAGS="$ompi_check_ugni_$1_save_LDFLAGS"
LIBS="$ompi_check_ugni_$1_save_LIBS"
CPPFLAGS="$ompi_check_ugni_$1_save_CPPFLAGS"
LDFLAGS="$ompi_check_ugni_$1_save_LDFLAGS"
LIBS="$ompi_check_ugni_$1_save_LIBS"
dnl XXX not sure if this is true, but will assume so...
AS_IF([test "$ompi_check_ugni_happy" = "yes" -a "$enable_progress_threads" = "yes"],
[AC_MSG_WARN([GNI driver does not currently support progress threads. Disabling.])
ompi_check_ugni_happy="no"])
if test -n "$with_ugni" -a "$ompi_check_ugni_happy" = "no" ; then
AC_MSG_ERROR([GNI support requested but not found. Cannot continue.])
fi
fi
OPAL_VAR_SCOPE_POP
fi
AS_IF([test "$ompi_check_ugni_happy" = "yes"],
[$2],
[AS_IF([test ! -z "$with_ugni" -a "$with_ugni" != "no"],
[AC_MSG_ERROR([GNI support requested but not found. Cannot continue.])])
$3])
if test "$ompi_check_ugni_happy" = "yes" ; then
$1_CPPFLAGS="$$1_CPPFLAGS $ompi_check_ugni_CPPFLAGS"
$1_LDFLAGS="$$1_LDFLAGS $ompi_check_ugni_LDFLAGS"
$1_LIBS="$$1_LIBS $ompi_check_ugni_LIBS"
$2
else
$3
fi
])

Просмотреть файл

@ -35,6 +35,10 @@ AC_DEFUN([ORTE_CHECK_ALPS],[
[AC_HELP_STRING([--with-alps-libdir=DIR],
[Location of alps libraries (alpslli, alpsutil) (default: /usr/lib/alps)])])
AC_ARG_WITH([wlm_detect],
[AC_HELP_STRING([--with-wlm_detect(=DIR)],
[Location of wlm_detect library needed by PMI on CLE 5 systems (default: /opt/cray/wlm_detect/default)])])
# save the CPPFLAGS so we can check for alps/apInfo.h without adding $with_alps/include to the global path
orte_check_alps_$1_save_CPPFLAGS="$CPPFLAGS"
@ -46,6 +50,12 @@ AC_DEFUN([ORTE_CHECK_ALPS],[
using_cle5_install="no"
else
using_cle5_install="yes"
if test -z "$with_wlm_detect" ; then
with_wlm_detect="/opt/cray/wlm_detect/default"
fi
# libpmi requires libugni for static linking on CLE 5. WTH!
OMPI_CHECK_UGNI($1,[orte_check_alps_happy=yes],[orte_check_alps_happy=no])
fi
if test "$with_alps" = "no" -o -z "$with_alps" ; then
@ -106,6 +116,12 @@ AC_DEFUN([ORTE_CHECK_ALPS],[
$1_CPPFLAGS="-I$orte_check_alps_dir/include"
$1_LDFLAGS="-L$orte_check_alps_libdir"
# Add CLE 5 library dependencies
if test "using_cle5_install" = "yes" ; then
$1_LIBS="$$1_LIBS -lwlm_detect"
$1_LDFLAGS="$$1_LDFLAGS -L$with_wlm_detect"
fi
AS_IF([test "$orte_check_alps_happy" = "yes"],
[$2],
[$3])