2014-10-14 20:28:36 +04:00
# -*- shell-script ; indent-tabs-mode:nil -*-
2011-10-05 21:14:24 +04:00
#
# 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.
2011-11-03 06:14:47 +04:00
# Copyright (c) 2004-2005 High Performance Computing Center Stuttgart,
2011-10-05 21:14:24 +04:00
# University of Stuttgart. All rights reserved.
# Copyright (c) 2004-2005 The Regents of the University of California.
# All rights reserved.
2015-03-13 14:48:31 +03:00
# Copyright (c) 2009-2015 Cisco Systems, Inc. All rights reserved.
2014-10-10 02:25:26 +04:00
# Copyright (c) 2011-2014 Los Alamos National Security, LLC. All rights
2011-10-05 21:14:24 +04:00
# reserved.
2019-02-21 22:33:35 +03:00
# Copyright (c) 2014-2019 Intel, Inc. All rights reserved.
2018-02-23 19:14:02 +03:00
# Copyright (c) 2014-2018 Research Organization for Information Science
# and Technology (RIST). All rights reserved.
2016-05-27 06:53:32 +03:00
# Copyright (c) 2016 IBM Corporation. All rights reserved.
2011-10-05 21:14:24 +04:00
# $COPYRIGHT$
2011-11-03 06:14:47 +04:00
#
2011-10-05 21:14:24 +04:00
# Additional copyrights may follow
2011-11-03 06:14:47 +04:00
#
2011-10-05 21:14:24 +04:00
# $HEADER$
#
2014-10-24 05:35:18 +04:00
# define an internal function for checking the existence
# and validity of a PMI library
#
2015-02-27 21:48:28 +03:00
# OPAL_CHECK_PMI_LIB(installdir, libdir, pmi, function, [action-if-slurm], [action-if-valid], [action-if-not-valid])
2014-10-24 05:35:18 +04:00
# --------------------------------------------------------
AC_DEFUN([OPAL_CHECK_PMI_LIB],
[
# save flags
2015-02-27 21:48:28 +03:00
opal_check_$3_save_CPPFLAGS=$CPPFLAGS
opal_check_$3_save_LDFLAGS=$LDFLAGS
opal_check_$3_save_LIBS=$LIBS
opal_check_$3_hdr_happy=
opal_check_$3_mycppflags=
2014-10-24 05:35:18 +04:00
# check for the header
2018-02-23 19:14:02 +03:00
AS_IF([test -n "$1"],
2018-02-26 03:46:26 +03:00
[AC_MSG_CHECKING([for $3.h in $1])
AS_IF([test -f $1/$3.h && test -r $1/$3.h],
2014-10-24 05:35:18 +04:00
[AC_MSG_RESULT([found])
2018-02-26 03:46:26 +03:00
opal_check_$3_mycppflags="-I$1"],
2014-10-24 05:35:18 +04:00
[AC_MSG_RESULT([not found])
2018-02-26 03:46:26 +03:00
AC_MSG_CHECKING([for $3.h in $1/include])
AS_IF([test -f $1/include/$3.h && test -r $1/include/$3.h],
2018-02-23 19:14:02 +03:00
[AC_MSG_RESULT([found])
2018-02-26 03:46:26 +03:00
opal_check_$3_mycppflags="-I$1/include"],
2018-02-23 19:14:02 +03:00
[AC_MSG_RESULT([not found])
2018-02-26 03:46:26 +03:00
AC_MSG_CHECKING([for $3.h in $1/include/slurm])
AS_IF([test -f $1/include/slurm/$3.h && test -r $1/include/slurm/$3.h],
[AC_MSG_RESULT([found])
opal_check_$3_mycppflags="-I$1/include/slurm"
$5],
[AC_MSG_RESULT([not found])
opal_check_$3_hdr_happy=no])])])],
2018-02-23 19:14:02 +03:00
[AC_MSG_CHECKING([for $3.h in /usr/include])
2018-02-26 03:46:26 +03:00
AS_IF([test -f /usr/include/$3.h && test -r /usr/include/$3.h],
2018-02-23 19:14:02 +03:00
[AC_MSG_RESULT([found])],
[AC_MSG_RESULT([not found])
AC_MSG_CHECKING([for $3.h in /usr/include/slurm])
2018-02-26 03:46:26 +03:00
AS_IF([test -f /usr/include/slurm/$3.h && test -r /usr/include/slurm/$3.h],
2018-02-23 19:14:02 +03:00
[AC_MSG_RESULT([found])
opal_check_$3_mycppflags="-I/usr/include/slurm"
$5],
[AC_MSG_RESULT([not found])
opal_check_$3_hdr_happy=no])])])
2015-02-27 21:48:28 +03:00
AS_IF([test "$opal_check_$3_hdr_happy" != "no"],
[CPPFLAGS="$CPPFLAGS $opal_check_$3_mycppflags"
AC_CHECK_HEADER([$3.h],
[opal_check_$3_hdr_happy=yes
$3_CPPFLAGS="$opal_check_$3_mycppflags"],
[opal_check_$3_hdr_happy=no])])
# check for library and function
opal_check_$3_lib_happy=
LIBS="$LIBS -l$3"
# check for the library in the given location in case
# an exact path was given
2018-02-23 19:14:02 +03:00
AS_IF([test -z "$1" && test -z "$2"],
[AC_CHECK_LIB([$3], [$4],
[opal_check_$3_lib_happy=yes],
2015-02-27 21:48:28 +03:00
[opal_check_$3_lib_happy=no])],
2018-02-23 19:14:02 +03:00
[AS_IF([test -n "$2"],
[AC_MSG_CHECKING([for lib$3 in $2])
files=`ls $2/lib$3.* 2> /dev/null | wc -l`
AS_IF([test "$files" -gt "0"],
[AC_MSG_RESULT([found])
LDFLAGS="$LDFLAGS -L$2"
AC_CHECK_LIB([$3], [$4],
[opal_check_$3_lib_happy=yes
$3_LDFLAGS=-L$2
$3_rpath=$2],
[opal_check_$3_lib_happy=no])],
[opal_check_$3_lib_happy=no
AC_MSG_RESULT([not found])])],
[AC_MSG_CHECKING([for lib$3 in $1/lib])
files=`ls $1/lib/lib$3.* 2> /dev/null | wc -l`
AS_IF([test "$files" -gt "0"],
[AC_MSG_RESULT([found])
LDFLAGS="$LDFLAGS -L$1/lib"
AC_CHECK_LIB([$3], [$4],
[opal_check_$3_lib_happy=yes
$3_LDFLAGS=-L$1/lib
$3_rpath=$1/lib],
[opal_check_$3_lib_happy=no])],
[# check for presence of lib64 directory - if found, see if the
# desired library is present and matches our build requirements
AC_MSG_CHECKING([for lib$3 in $1/lib64])
files=`ls $1/lib64/lib$3.* 2> /dev/null | wc -l`
AS_IF([test "$files" -gt "0"],
[AC_MSG_RESULT([found])
LDFLAGS="$LDFLAGS -L$1/lib64"
AC_CHECK_LIB([$3], [$4],
[opal_check_$3_lib_happy=yes
$3_LDFLAGS=-L$1/lib64
$3_rpath=$1/lib64],
[opal_check_$3_lib_happy=no])],
[opal_check_$3_lib_happy=no
AC_MSG_RESULT([not found])])])])])
2014-10-24 05:35:18 +04:00
# restore flags
2015-02-27 21:48:28 +03:00
CPPFLAGS=$opal_check_$3_save_CPPFLAGS
LDFLAGS=$opal_check_$3_save_LDFLAGS
LIBS=$opal_check_$3_save_LIBS
2014-10-24 05:35:18 +04:00
2015-02-27 21:48:28 +03:00
AS_IF([test "$opal_check_$3_hdr_happy" = "yes" && test "$opal_check_$3_lib_happy" = "yes"],
[$6], [$7])
2014-10-24 05:35:18 +04:00
])
2014-10-27 23:24:52 +03:00
# OPAL_CHECK_PMI()
2011-10-05 21:14:24 +04:00
# --------------------------------------------------------
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_DEFUN([OPAL_CHECK_PMI],[
2018-02-23 19:14:02 +03:00
OPAL_VAR_SCOPE_PUSH([check_pmi_install_dir check_pmi_lib_dir default_pmi_libloc slurm_pmi_found])
2014-10-24 05:35:18 +04:00
2011-10-13 00:59:25 +04:00
AC_ARG_WITH([pmi],
2014-01-28 02:50:37 +04:00
[AC_HELP_STRING([--with-pmi(=DIR)],
[Build PMI support, optionally adding DIR to the search path (default: no)])],
2014-10-24 05:35:18 +04:00
[], with_pmi=no)
2011-10-13 00:59:25 +04:00
2015-02-27 21:48:28 +03:00
AC_ARG_WITH([pmi-libdir],
2017-10-17 10:54:28 +03:00
[AC_HELP_STRING([--with-pmi-libdir=DIR],
[Look for libpmi or libpmi2 in the given directory DIR, DIR/lib or DIR/lib64])])
2015-02-27 21:48:28 +03:00
2014-10-27 23:24:52 +03:00
check_pmi_install_dir=
2015-02-27 21:48:28 +03:00
check_pmi_lib_dir=
default_pmi_libloc=
2014-10-27 23:24:52 +03:00
slurm_pmi_found=
2019-02-21 22:33:35 +03:00
opal_enable_pmix=no
2014-11-01 14:02:23 +03:00
2011-10-13 00:59:25 +04:00
AC_MSG_CHECKING([if user requested PMI support])
2014-10-10 01:00:40 +04:00
AS_IF([test "$with_pmi" = "no"],
2011-10-13 00:59:25 +04:00
[AC_MSG_RESULT([no])
2011-11-03 06:14:47 +04:00
$3],
2011-10-13 00:59:25 +04:00
[AC_MSG_RESULT([yes])
2014-05-01 18:24:56 +04:00
# cannot use OPAL_CHECK_PACKAGE as its backend header
2011-10-13 00:59:25 +04:00
# support appends "include" to the path, which won't
# work with slurm :-(
2018-02-23 19:14:02 +03:00
AS_IF([test -n "$with_pmi" && test "$with_pmi" != "yes"],
[check_pmi_install_dir=$with_pmi])
AS_IF([test -n "$with_pmi_libdir"],
[check_pmi_lib_dir=$with_pmi_libdir])
2014-10-24 05:35:18 +04:00
2014-10-07 21:18:59 +04:00
# check for pmi-1 lib */
2014-10-27 23:24:52 +03:00
slurm_pmi_found=no
OPAL_CHECK_PMI_LIB([$check_pmi_install_dir],
2016-05-27 06:53:32 +03:00
[$check_pmi_lib_dir],
2014-10-24 05:35:18 +04:00
[pmi], [PMI_Init],
2014-11-01 14:02:23 +03:00
[slurm_pmi_found=yes],
2014-10-27 23:24:52 +03:00
[opal_enable_pmi1=yes
opal_pmi1_LIBS="-lpmi"
AC_SUBST(opal_pmi1_LIBS)],
[opal_enable_pmi1=no])
AS_IF([test "$opal_enable_pmi1" = "yes"],
2018-02-23 19:14:02 +03:00
[AS_IF([test "$slurm_pmi_found" = "yes"],
2016-05-27 06:53:32 +03:00
[opal_pmi1_CPPFLAGS="$pmi_CPPFLAGS"
2015-02-27 21:48:28 +03:00
AC_SUBST(opal_pmi1_CPPFLAGS)])
2018-02-23 19:14:02 +03:00
AS_IF([test "$slurm_pmi_found" = "yes"],
2016-05-27 06:53:32 +03:00
[opal_pmi1_LDFLAGS="$pmi_LDFLAGS"
2014-10-27 23:24:52 +03:00
AC_SUBST(opal_pmi1_LDFLAGS)
opal_pmi1_rpath="$pmi_rpath"
AC_SUBST(opal_pmi1_rpath)])])
2014-11-01 14:02:23 +03:00
2014-10-07 21:18:59 +04:00
# check for pmi2 lib */
2014-10-27 23:24:52 +03:00
slurm_pmi_found=no
OPAL_CHECK_PMI_LIB([$check_pmi_install_dir],
2015-02-27 21:48:28 +03:00
[$check_pmi_lib_dir],
2014-10-24 05:35:18 +04:00
[pmi2], [PMI2_Init],
2014-11-01 14:02:23 +03:00
[slurm_pmi_found=yes],
2014-10-27 23:24:52 +03:00
[opal_enable_pmi2=yes
opal_pmi2_LIBS="-lpmi2"
AC_SUBST(opal_pmi2_LIBS)],
[opal_enable_pmi2=no])
AS_IF([test "$opal_enable_pmi2" = "yes"],
2018-02-23 19:14:02 +03:00
[AS_IF([test "$slurm_pmi_found" = "yes"],
2016-05-27 06:53:32 +03:00
[opal_pmi2_CPPFLAGS="$pmi2_CPPFLAGS"
2015-02-27 21:48:28 +03:00
AC_SUBST(opal_pmi2_CPPFLAGS)])
2018-02-23 19:14:02 +03:00
AS_IF([test "$slurm_pmi_found" = "yes"],
2016-05-27 06:53:32 +03:00
[opal_pmi2_LDFLAGS="$pmi2_LDFLAGS"
2014-10-27 23:24:52 +03:00
AC_SUBST(opal_pmi2_LDFLAGS)
2015-08-11 18:43:45 +03:00
opal_pmi2_rpath="$pmi2_rpath"
2014-10-27 23:24:52 +03:00
AC_SUBST(opal_pmi2_rpath)])])
2014-11-01 14:02:23 +03:00
2019-02-21 22:33:35 +03:00
# check for pmix lib installed by slurm */
slurm_pmix_found=no
OPAL_CHECK_PMIX_LIB([$check_pmi_install_dir],
[$check_pmi_lib_dir],
[opal_enable_pmix=yes],
[opal_enable_pmix=no])
2014-10-07 21:18:59 +04:00
# since support was explicitly requested, then we should error out
# if we didn't find the required support
2016-05-27 06:53:32 +03:00
AC_MSG_CHECKING([can PMI support be built])
2019-02-21 22:33:35 +03:00
AS_IF([test "$opal_enable_pmi1" != "yes" && test "$opal_enable_pmi2" != "yes" && test "$opal_enable_pmix" != "yes"],
2015-02-27 21:48:28 +03:00
[AC_MSG_RESULT([no])
2019-02-21 22:33:35 +03:00
AC_MSG_WARN([PMI support requested (via --with-pmi) but neither pmi.h,])
AC_MSG_WARN([pmi2.h or pmix.h were found under locations:])
2015-02-27 21:48:28 +03:00
AC_MSG_WARN([ $check_pmi_install_dir])
AC_MSG_WARN([ $check_pmi_install_dir/slurm])
2014-10-07 21:18:59 +04:00
AC_MSG_WARN([Specified path: $with_pmi])
2019-02-21 22:33:35 +03:00
AC_MSG_WARN([OR neither libpmi, libpmi2, or libpmix were found under:])
2015-02-27 21:48:28 +03:00
AC_MSG_WARN([ $check_pmi_lib_dir/lib])
AC_MSG_WARN([ $check_pmi_lib_dir/lib64])
AC_MSG_WARN([Specified path: $with_pmi_libdir])
2014-10-27 23:24:52 +03:00
AC_MSG_ERROR([Aborting])],
[AC_MSG_RESULT([yes])])
2013-06-21 19:28:14 +04:00
])
2015-03-13 14:48:31 +03:00
OPAL_VAR_SCOPE_POP
2011-10-05 21:14:24 +04:00
])
2014-10-10 02:25:26 +04:00
2019-02-21 22:33:35 +03:00
# define an internal function for checking the existence
# and validity of an external PMIx library
#
# OPAL_CHECK_PMIX_LIB(installdir, libdir, [action-if-valid], [action-if-not-valid])
AC_DEFUN([OPAL_CHECK_PMIX_LIB],[
2019-02-22 00:28:10 +03:00
OPAL_VAR_SCOPE_PUSH([opal_external_pmix_save_CPPFLAGS opal_external_pmix_save_LDFLAGS opal_external_pmix_save_LIBS])
2019-02-21 22:33:35 +03:00
opal_external_pmix_happy=no
# Make sure we have the headers and libs in the correct location
AC_MSG_CHECKING([for pmix.h in $1])
files=`ls $1/pmix.h 2> /dev/null | wc -l`
AS_IF([test "$files" -gt 0],
[AC_MSG_RESULT([found])
opal_external_pmix_header_happy=yes],
[AC_MSG_RESULT([not found])
AC_MSG_CHECKING([for pmix.h in $1/include])
files=`ls $1/include/pmix.h 2> /dev/null | wc -l`
AS_IF([test "$files" -gt 0],
[AC_MSG_RESULT([found])
opal_external_pmix_header_happy=yes],
[AC_MSG_RESULT([not found])
opal_external_pmix_header_happy=no])])
AS_IF([test "$opal_external_pmix_header_happy" = "yes"],
[AS_IF([test -n "$2"],
[AC_MSG_CHECKING([libpmix.* in $2])
files=`ls $2/libpmix.* 2> /dev/null | wc -l`
AS_IF([test "$files" -gt 0],
[AC_MSG_RESULT([found])
pmix_ext_install_libdir=$2],
[AC_MSG_RESULT([not found])
AC_MSG_CHECKING([libpmix.* in $2/lib64])
files=`ls $2/lib64/libpmix.* 2> /dev/null | wc -l`
AS_IF([test "$files" -gt 0],
[AC_MSG_RESULT([found])
pmix_ext_install_libdir=$2/lib64],
[AC_MSG_RESULT([not found])
AC_MSG_CHECKING([libpmix.* in $2/lib])
files=`ls $2/lib/libpmix.* 2> /dev/null | wc -l`
AS_IF([test "$files" -gt 0],
[AC_MSG_RESULT([found])
pmix_ext_install_libdir=$2/lib],
[AC_MSG_RESULT([not found])
AC_MSG_ERROR([Cannot continue])])])])],
[# check for presence of lib64 directory - if found, see if the
# desired library is present and matches our build requirements
AC_MSG_CHECKING([libpmix.* in $1/lib64])
files=`ls $1/lib64/libpmix.* 2> /dev/null | wc -l`
AS_IF([test "$files" -gt 0],
[AC_MSG_RESULT([found])
pmix_ext_install_libdir=$1/lib64],
[AC_MSG_RESULT([not found])
AC_MSG_CHECKING([libpmix.* in $1/lib])
files=`ls $1/lib/libpmix.* 2> /dev/null | wc -l`
AS_IF([test "$files" -gt 0],
[AC_MSG_RESULT([found])
pmix_ext_install_libdir=$1/lib],
[AC_MSG_RESULT([not found])
AC_MSG_ERROR([Cannot continue])])])])
# check the version
opal_external_pmix_save_CPPFLAGS=$CPPFLAGS
opal_external_pmix_save_LDFLAGS=$LDFLAGS
opal_external_pmix_save_LIBS=$LIBS
# if the pmix_version.h file does not exist, then
# this must be from a pre-1.1.5 version OMPI does
# NOT support anything older than v1.2.5
AC_MSG_CHECKING([PMIx version])
CPPFLAGS="-I$1/include $CPPFLAGS"
AS_IF([test "x`ls $1/include/pmix_version.h 2> /dev/null`" = "x"],
[AC_MSG_RESULT([version file not found - assuming v1.1.4])
opal_external_pmix_version_found=1
opal_external_pmix_happy=no
opal_external_pmix_version=internal],
[AC_MSG_RESULT([version file found])
opal_external_pmix_version_found=0])
# if it does exist, then we need to parse it to find
# the actual release series
AS_IF([test "$opal_external_pmix_version_found" = "0"],
[AC_MSG_CHECKING([version 4x])
AC_PREPROC_IFELSE([AC_LANG_PROGRAM([
#include <pmix_version.h>
#if (PMIX_VERSION_MAJOR < 4L)
#error "not version 4 or above"
#endif
], [])],
[AC_MSG_RESULT([found])
opal_external_pmix_version=4x
opal_external_pmix_version_found=1
opal_external_pmix_happy=yes],
[AC_MSG_RESULT([not found])])])
AS_IF([test "$opal_external_pmix_version_found" = "0"],
[AC_MSG_CHECKING([version 3x or above])
AC_PREPROC_IFELSE([AC_LANG_PROGRAM([
#include <pmix_version.h>
#if (PMIX_VERSION_MAJOR != 3L)
#error "not version 3"
#endif
], [])],
[AC_MSG_RESULT([found])
opal_external_pmix_version=3x
opal_external_pmix_version_found=1
opal_external_pmix_happy=yes],
[AC_MSG_RESULT([not found])])])
AS_IF([test "$opal_external_pmix_version_found" = "0"],
[AC_MSG_CHECKING([version 2x])
AC_PREPROC_IFELSE([AC_LANG_PROGRAM([
#include <pmix_version.h>
#if (PMIX_VERSION_MAJOR != 2L)
#error "not version 2"
#endif
], [])],
[AC_MSG_RESULT([found])
opal_external_pmix_version=2x
opal_external_pmix_version_found=1
opal_external_pmix_happy=yes],
[AC_MSG_RESULT([not found])])])
AS_IF([test "$opal_external_pmix_version_found" = "0"],
[AC_MSG_CHECKING([version 1x])
AC_PREPROC_IFELSE([AC_LANG_PROGRAM([
#include <pmix_version.h>
#if (PMIX_VERSION_MAJOR != 1L && PMIX_VERSION_MINOR != 2L)
#error "not version 1.2.x"
#endif
], [])],
[AC_MSG_RESULT([found])
opal_external_pmix_version=1x
opal_external_pmix_version_found=1
opal_external_have_pmix1=1
opal_external_pmix_happy=yes],
[AC_MSG_RESULT([not found])])])
AS_IF([test "x$opal_external_pmix_version" = "x"],
[AC_MSG_WARN([External PMIx support detected, but version])
AC_MSG_WARN([information of the external lib could not])
AC_MSG_WARN([be detected])
opal_external_pmix_happy=no])
CPPFLAGS=$opal_external_pmix_save_CPPFLAGS
LDFLAGS=$opal_external_pmix_save_LDFLAGS
LIBS=$opal_external_pmix_save_LIBS
])
AS_IF([test "$opal_external_pmix_happy" = "yes"],
[$3], [$4])
2019-02-22 00:28:10 +03:00
OPAL_VAR_SCOPE_POP
2019-02-21 22:33:35 +03:00
])
2015-12-16 02:26:13 +03:00
AC_DEFUN([OPAL_CHECK_PMIX],[
2015-12-28 11:25:41 +03:00
AC_ARG_WITH([pmix],
[AC_HELP_STRING([--with-pmix(=DIR)],
[Build PMIx support. DIR can take one of three values: "internal", "external", or a valid directory name. "internal" (or no DIR value) forces Open MPI to use its internal copy of PMIx. "external" forces Open MPI to use an external installation of PMIx. Supplying a valid directory name also forces Open MPI to use an external installation of PMIx, and adds DIR/include, DIR/lib, and DIR/lib64 to the search path for headers and libraries. Note that Open MPI does not support --without-pmix.])])
2017-10-17 10:54:28 +03:00
AC_ARG_WITH([pmix-libdir],
[AC_HELP_STRING([--with-pmix-libdir=DIR],
[Look for libpmix the given directory DIR, DIR/lib or DIR/lib64])])
2015-12-28 11:25:41 +03:00
AS_IF([test "$with_pmix" = "no"],
[AC_MSG_WARN([Open MPI requires PMIx support. It can be built])
AC_MSG_WARN([with either its own internal copy of PMIx, or with])
AC_MSG_WARN([an external copy that you supply.])
AC_MSG_ERROR([Cannot continue])])
2017-11-25 22:48:19 +03:00
opal_external_have_pmix1=0
2019-02-21 22:33:35 +03:00
AS_IF([test "$opal_enable_pmix" = "no"],
[AC_MSG_CHECKING([if user requested internal PMIx support($with_pmix)])
2017-09-13 07:40:41 +03:00
opal_external_pmix_happy=no
2019-02-21 22:33:35 +03:00
pmix_ext_install_libdir=
pmix_ext_install_dir=
AS_IF([test "$with_pmix" = "internal"],
[AC_MSG_RESULT([yes])
opal_external_pmix_happy=no
2018-07-19 21:02:03 +03:00
opal_external_pmix_version=internal
2019-02-21 22:33:35 +03:00
opal_enable_pmix=yes],
2018-07-19 21:02:03 +03:00
2019-02-21 22:33:35 +03:00
[AC_MSG_RESULT([no])
# check for external pmix lib */
AS_IF([test -z "$with_pmix" || test "$with_pmix" = "yes" || test "$with_pmix" = "external"],
[pmix_ext_install_dir=/usr],
[pmix_ext_install_dir=$with_pmix])
AS_IF([test -n "$with_pmix_libdir"],
[pmix_ext_install_libdir=$with_pmix_libdir])
OPAL_CHECK_PMIX_LIB([$pmix_ext_install_dir],
[$pmix_ext_install_libdir],
[opal_external_pmix_happy=yes
opal_enable_pmix=yes],
[opal_external_pmix_happy=no])])
# Final check - if they explicitly pointed us at an external
# installation that wasn't acceptable, then error out
AS_IF([test -n "$with_pmix" && test "$with_pmix" != "yes" && test "$with_pmix" != "external" && test "$with_pmix" != "internal" && test "$opal_external_pmix_happy" = "no"],
[AC_MSG_WARN([External PMIx support requested, but either the version])
AC_MSG_WARN([of the external lib was not supported or the required])
AC_MSG_WARN([header/library files were not found])
AC_MSG_ERROR([Cannot continue])])
# Final check - if they didn't point us explicitly at an external version
# but we found one anyway, use the internal version if it is higher
AS_IF([test "$opal_external_pmix_version" != "internal" && (test -z "$with_pmix" || test "$with_pmix" = "yes")],
[AS_IF([test "$opal_external_pmix_version" != "3x"],
[AC_MSG_WARN([discovered external PMIx version is less than internal version 3.x])
AC_MSG_WARN([using internal PMIx])
opal_external_pmix_version=internal
opal_external_pmix_happy=no])])
])
AS_IF([test "$opal_enable_pmix" = "yes"],
[AC_MSG_CHECKING([PMIx version to be used])
AS_IF([test "$opal_external_pmix_happy" = "yes"],
[AC_MSG_RESULT([external($opal_external_pmix_version)])
AS_IF([test "$pmix_ext_install_dir" != "/usr"],
[opal_external_pmix_CPPFLAGS="-I$pmix_ext_install_dir/include"
opal_external_pmix_LDFLAGS=-L$pmix_ext_install_libdir])
opal_external_pmix_LIBS=-lpmix],
[AC_MSG_RESULT([internal])])])
2016-05-27 06:53:32 +03:00
2017-11-25 22:48:19 +03:00
AC_DEFINE_UNQUOTED([OPAL_PMIX_V1],[$opal_external_have_pmix1],
[Whether the external PMIx library is v1])
2018-07-10 20:41:09 +03:00
2018-10-09 16:42:08 +03:00
AS_IF([test "$opal_external_pmix_happy" = "yes"],
[AS_IF([test "$opal_external_pmix_version" = "1x"],
[OPAL_SUMMARY_ADD([[Miscellaneous]],[[PMIx support]], [opal_pmix], [External (1.2.5) WARNING - DYNAMIC OPS NOT SUPPORTED])],
[OPAL_SUMMARY_ADD([[Miscellaneous]],[[PMIx support]], [opal_pmix], [External ($opal_external_pmix_version)])])],
[OPAL_SUMMARY_ADD([[Miscellaneous]], [[PMIx support]], [opal_pmix], [Internal])])
2015-12-16 02:26:13 +03:00
])