1
1
openmpi/config/orte_check_alps.m4

113 строки
4.6 KiB
Plaintext
Исходник Обычный вид История

# -*- shell-script -*-
#
# 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 Cisco Systems, Inc. All rights reserved.
# $COPYRIGHT$
#
# Additional copyrights may follow
#
# $HEADER$
#
# ORTE_CHECK_ALPS(prefix, [action-if-found], [action-if-not-found])
# --------------------------------------------------------
AC_DEFUN([ORTE_CHECK_ALPS],[
if test -z "$orte_check_alps_happy"; then
# require that we check for pmi support request first so
# we can get the static library ordering correct
Per the meeting on moving the BTLs to OPAL, move the ORTE database "db" framework to OPAL so the relocated BTLs can access it. Because the data is indexed by process, this requires that we define a new "opal_identifier_t" that corresponds to the orte_process_name_t struct. In order to support multiple run-times, this is defined in opal/mca/db/db_types.h as a uint64_t without identifying the meaning of any part of that data. A few changes were required to support this move: 1. the PMI component used to identify rte-related data (e.g., host name, bind level) and package them as a unit to reduce the number of PMI keys. This code was moved up to the ORTE layer as the OPAL layer has no understanding of these concepts. In addition, the component locally stored data based on process jobid/vpid - this could no longer be supported (see below for the solution). 2. the hash component was updated to use the new opal_identifier_t instead of orte_process_name_t as its index for storing data in the hash tables. Previously, we did a hash on the vpid and stored the data in a 32-bit hash table. In the revised system, we don't see a separate "vpid" field - we only have a 64-bit opaque value. The orte_process_name_t hash turned out to do nothing useful, so we now store the data in a 64-bit hash table. Preliminary tests didn't show any identifiable change in behavior or performance, but we'll have to see if a move back to the 32-bit table is required at some later time. 3. the db framework was a "select one" system. However, since the PMI component could no longer use its internal storage system, the framework has now been changed to a "select many" mode of operation. This allows the hash component to handle all internal storage, while the PMI component only handles pushing/pulling things from the PMI system. This was something we had planned for some time - when fetching data, we first check internal storage to see if we already have it, and then automatically go to the global system to look for it if we don't. Accordingly, the framework was provided with a custom query function used during "select" that lets you seperately specify the "store" and "fetch" ordering. 4. the ORTE grpcomm and ess/pmi components, and the nidmap code, were updated to work with the new db framework and to specify internal/global storage options. No changes were made to the MPI layer, except for modifying the ORTE component of the OMPI/rte framework to support the new db framework. This commit was SVN r28112.
2013-02-26 21:50:04 +04:00
AC_REQUIRE([OPAL_CHECK_PMI])
AC_ARG_WITH([alps],
[AC_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: no)])])
OMPI_CHECK_WITHDIR([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)])])
# 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"
#
# check to see where alps is installed, it wandered to a new location starting with CLE 5.0
#
if test -f "/usr/lib/alps/libalps.a" ; then
using_cle5_install="no"
else
using_cle5_install="yes"
fi
if test "$with_alps" = "no" -o -z "$with_alps" ; then
orte_check_alps_happy="no"
else
# Only need to do these tests once - this macro is invoked
# from multiple different components' configure.m4 scripts
orte_check_alps_happy="yes"
orte_check_alps_libdir="$with_alps_libdir"
if test -z "$orte_check_alps_libdir" ; then
if test "$with_alps" != "yes" ; then
AS_IF([test -d "$with_alps/lib64"],
[orte_check_alps_libdir="$with_alps/lib64"],
[orte_check_alps_libdir="$with_alps/lib"])
else
if test "$using_cle5_install" = "yes"; then
orte_check_alps_libdir="/opt/cray/alps/default/lib64"
else
orte_check_alps_libdir="/usr/lib/alps"
fi
fi
fi
if test "$with_alps" = "yes" ; then
AS_IF([test "$using_cle5_install" = "yes"],
[orte_check_alps_dir="/opt/cray/alps/default"],
[orte_check_alps_dir="/usr"])
else
orte_check_alps_dir="$with_alps"
fi
if test -z "$orte_check_alps_pmi_happy"; then
# if pmi support is requested, then OPAL_CHECK_PMI
# will have added the -lpmi flag to LIBS. We then need
# to add a couple of alps libs to support static
# builds
if test "$opal_enable_pmi" = 1 ; then
AC_MSG_CHECKING([for alps libraries in "$orte_check_alps_libdir"])
# libalpslli and libalpsutil are needed by libpmi to compile statically
AS_IF([test -f "$orte_check_alps_libdir/libalpslli.a" -a -f "$orte_check_alps_libdir/libalpsutil.a"],
[AC_MSG_RESULT([found])
orte_check_alps_pmi_happy=yes],
[AC_MSG_WARN([PMI support for Alps requested but not found])
AC_MSG_ERROR([Cannot continue])])
fi
fi
fi
fi
# Set LIBS, CPPFLAGS, and LDFLAGS here so they always get set
if test "$orte_check_alps_happy" = "yes" -a "$opal_enable_pmi" = 1 ; then
$1_LIBS="-lalpslli -lalpsutil"
fi
$1_CPPFLAGS="-I$orte_check_alps_dir/include"
$1_LDFLAGS="-L$orte_check_alps_libdir"
AS_IF([test "$orte_check_alps_happy" = "yes"],
[$2],
[$3])
])