From 27b9bcfafd89b861fe5bff1009b96c46bb10cfec Mon Sep 17 00:00:00 2001 From: Samuel Gutierrez Date: Thu, 3 Nov 2011 02:14:47 +0000 Subject: [PATCH] update ess alps configuration file to include CNOS and PMI checks. some of the features committed here aren't being used, but they will be. also update orte_check_pmi.m4 to include missing call to action-if-not-found if --with-pmi is not specified or is disabled. This commit was SVN r25422. --- orte/config/orte_check_pmi.m4 | 14 ++++---- orte/mca/ess/alps/configure.m4 | 61 ++++++++++++++++++++++++++++------ 2 files changed, 58 insertions(+), 17 deletions(-) diff --git a/orte/config/orte_check_pmi.m4 b/orte/config/orte_check_pmi.m4 index 1e26b79cac..9771263af8 100644 --- a/orte/config/orte_check_pmi.m4 +++ b/orte/config/orte_check_pmi.m4 @@ -6,7 +6,7 @@ # 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, +# 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. @@ -14,9 +14,9 @@ # Copyright (c) 2011 Los Alamos National Security, LLC. All rights # reserved. # $COPYRIGHT$ -# +# # Additional copyrights may follow -# +# # $HEADER$ # @@ -47,10 +47,9 @@ AC_DEFUN([ORTE_CHECK_PMI],[ AC_MSG_CHECKING([if user requested PMI support]) AS_IF([test "$with_pmi" = "no"], [AC_MSG_RESULT([no]) - orte_want_pmi_support=no - orte_use_cray_pmi2_ext=0], + orte_use_cray_pmi2_ext=0 + $3], [AC_MSG_RESULT([yes]) - orte_want_pmi_support=yes AC_MSG_CHECKING([if PMI support installed]) # cannot use OMPI_CHECK_PACKAGE as its backend header # support appends "include" to the path, which won't @@ -95,7 +94,8 @@ AC_DEFUN([ORTE_CHECK_PMI],[ # will use some of the functions in it. AC_MSG_CHECKING([if PMI2 extensions installed]) AS_IF([test -f "$with_pmi/include/pmi2.h"], - [orte_use_pmi2_ext=1], + [orte_use_pmi2_ext=1 + AC_MSG_RESULT(yes)], [AC_MSG_RESULT([no]) AC_MSG_WARN([PMI2 extensions requested (via --with-cray-pmi2-ext) but not found.]) AC_MSG_ERROR([Aborting.]) diff --git a/orte/mca/ess/alps/configure.m4 b/orte/mca/ess/alps/configure.m4 index b6c907b6d4..e2662e4e6d 100644 --- a/orte/mca/ess/alps/configure.m4 +++ b/orte/mca/ess/alps/configure.m4 @@ -6,15 +6,17 @@ # 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, +# 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-2010 Cisco Systems, Inc. All rights reserved. +# Copyright (c) 2011 Los Alamos National Security, LLC. +# All rights reserved. # $COPYRIGHT$ -# +# # Additional copyrights may follow -# +# # $HEADER$ # @@ -31,12 +33,51 @@ AC_DEFUN([MCA_orte_ess_alps_PRIORITY], [10]) AC_DEFUN([MCA_orte_ess_alps_CONFIG],[ AC_CONFIG_FILES([orte/mca/ess/alps/Makefile]) - AC_CHECK_HEADERS([catamount/cnos_mpi_os.h], [], - [AC_CHECK_HEADERS([cnos_mpi_os.h], [], [$2], - [AC_INCLUDES_DEFAULT])], - [AC_INCLUDES_DEFAULT]) + AC_CHECK_HEADERS([catamount/cnos_mpi_os.h], + [orte_mca_ess_alps_have_cnos=1], + [AC_CHECK_HEADERS([cnos_mpi_os.h], + [orte_mca_ess_alps_have_cnos=1], + [orte_mca_ess_alps_have_cnos=0], + [AC_INCLUDES_DEFAULT])], + [AC_INCLUDES_DEFAULT]) - ORTE_CHECK_ALPS([ess_alps], - [AC_CHECK_FUNC([cnos_get_rank], [$1], [$2])], - [$2]) + dnl one last check to make certain that we have all the right CNOS stuff to + dnl continue with CNOS support + AS_IF([test "$orte_mca_ess_alps_have_cnos" = "1"], + [AC_CHECK_FUNC([cnos_get_rank], + [orte_mca_ess_alps_have_cnos=1], + [orte_mca_ess_alps_have_cnos=0])]) + + dnl now check for PMI support + ORTE_CHECK_PMI([ess_alps], + [orte_mca_ess_alps_have_pmi=1], + [orte_mca_ess_alps_have_pmi=0]) + + dnl was ess alps requested? + ORTE_CHECK_ALPS([ess_alps], + [orte_mca_ess_alps_happy="yes"], + [orte_mca_ess_alps_happy="no"]) + + dnl cannot continue if we don't have CNOS or PMI + AS_IF([test "$orte_mca_ess_alps_happy" = "yes" -a "$orte_mca_ess_alps_have_cnos" = "0" -a "$orte_mca_ess_alps_have_pmi" = "0"], + [AC_MSG_WARN([Alps support requested (via --with-alps) but adequate support was not found.]) + AC_MSG_ERROR([Cannot continue.])]) + + dnl cannot continue if we have both CNOS and PMI. this will probably + dnl never happen, but it can't hurt to also check for this case. + AS_IF([test "$orte_mca_ess_alps_happy" = "yes" -a "$orte_mca_ess_alps_have_cnos" = "1" -a "$orte_mca_ess_alps_have_pmi" = "1"], + [AC_MSG_WARN([Alps support requested (via --with-alps) but CNOS and PMI support was found.]) + AC_MSG_ERROR([Cannot continue.])]) + + AC_DEFINE_UNQUOTED([ORTE_MCA_ESS_ALPS_HAVE_CNOS], + [$orte_mca_ess_alps_have_cnos], + [Whether we have CNOS support in alps ess or not]) + + AC_DEFINE_UNQUOTED([ORTE_MCA_ESS_ALPS_HAVE_PMI], + [$orte_mca_ess_alps_have_pmi], + [Whether we have PMI support in alps ess or not]) + + AS_IF([test "$orte_mca_ess_alps_happy" = "yes"], + [$1], + [$2]) ])dnl