1
1

plm/alps: add wlm detect infrastructure

Signed-off-by: Howard Pritchard <howardp@lanl.gov>
Этот коммит содержится в:
Howard Pritchard 2015-12-07 07:43:20 -08:00
родитель 04fc4060db
Коммит 9548b8a9e8
5 изменённых файлов: 58 добавлений и 10 удалений

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

@ -129,7 +129,18 @@ AC_DEFUN([ORTE_CHECK_ALPS],[
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],
[orte_check_cray_alps_happy="yes"
AC_DEFINE_UNQUOTED([CRAY_WLM_DETECT],[1],
[defined to 1 if cray wlm available, 0 otherwise])
],
[orte_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])
@ -146,10 +157,10 @@ AC_DEFUN([ORTE_CHECK_ALPS],[
AS_IF([test "$orte_check_cray_alps_happy" = "yes"],
[$1_LDFLAGS="$CRAY_ALPSLLI_LIBS $CRAY_ALPSUTIL_LIBS"
$1_CPPFLAGS="$CRAY_ALPSLLI_CFLAGS $CRAY_ALPSUTIL_CFLAGS $CRAY_ALPS_CFLAGS"
$1_LIBS="$CRAY_ALPSLLI_LIBS $CRAY_ALPSUTIL_LIBS"
$1_WRAPPER_EXTRA_LDFLAGS="$CRAY_ALPSLLI_LIBS $CRAY_ALPSUTIL_LIBS"
$1_WRAPPER_EXTRA_LIBS="$CRAY_ALPSLLI_LIBS $CRAY_ALPSUTIL_LIBS"],
$1_CPPFLAGS="$CRAY_ALPSLLI_CFLAGS $CRAY_ALPSUTIL_CFLAGS $CRAY_ALPS_CFLAGS $CRAY_WLM_DETECT_CFLAGS"
$1_LIBS="$CRAY_ALPSLLI_LIBS $CRAY_ALPSUTIL_LIBS $CRAY_WLM_DETECT_LIBS"
$1_WRAPPER_EXTRA_LDFLAGS="$CRAY_ALPSLLI_LIBS $CRAY_ALPSUTIL_LIBS $CRAY_WLM_DETECT_LIBS"
$1_WRAPPER_EXTRA_LIBS="$CRAY_ALPSLLI_LIBS $CRAY_ALPSUTIL_LIBS $CRAY_WLM_DETECT_LIBS"],
[])
fi

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

@ -10,6 +10,8 @@
# Copyright (c) 2004-2005 The Regents of the University of California.
# All rights reserved.
# Copyright (c) 2008-2010 Cisco Systems, Inc. All rights reserved.
# Copyright (c) 2015 Los Alamos National Security, LLC. All rights
# reserved.
# $COPYRIGHT$
#
# Additional copyrights may follow
@ -39,8 +41,13 @@ endif
mcacomponentdir = $(ortelibdir)
mcacomponent_LTLIBRARIES = $(component_install)
mca_plm_alps_la_SOURCES = $(sources)
mca_plm_alps_la_LDFLAGS = -module -avoid-version
mca_plm_alps_la_CPPFLAGS = $(plm_alps_CPPFLAGS)
mca_plm_alps_la_LDFLAGS = -module -avoid-version $(plm_alps_LDFLAGS)
mca_plm_alps_la_LIBADD = $(plm_alps_LIBS) \
$(ORTE_TOP_BUILDDIR)/orte/mca/common/alps/lib@ORTE_LIB_PREFIX@mca_common_alps.la
noinst_LTLIBRARIES = $(component_noinst)
libmca_plm_alps_la_SOURCES =$(sources)
libmca_plm_alps_la_LDFLAGS = -module -avoid-version
libmca_plm_alps_la_CPPFLAGS = $(plm_alps_CPPFLAGS)
libmca_plm_alps_la_LDFLAGS = -module -avoid-version $(plm_alps_LDFLAGS)
libmca_plm_alps_la_LIBADD = $(plm_alps_LIBS)

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

@ -27,5 +27,11 @@ AC_DEFUN([MCA_orte_plm_alps_CONFIG],[
ORTE_CHECK_ALPS([plm_alps], [plm_alps_happy="yes"], [plm_alps_happy="no"])
AS_IF([test "$plm_alps_happy" = "yes"], [$1], [$2])
AS_IF([test "$plm_alps_happy" = "yes"],
[$1
AC_SUBST([plm_alps_CPPFLAGS])
AC_SUBST([plm_alps_LDFLAGS])
AC_SUBST([plm_alps_LIBS])],
[$2])
])dnl

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

@ -23,6 +23,9 @@
#include "orte/mca/mca.h"
#include "orte/mca/plm/plm.h"
#if CRAY_WLM_DETECT
#include "wlm_detect.h"
#endif
BEGIN_C_DECLS

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

@ -136,8 +136,29 @@ static int plm_alps_open(void)
static int orte_plm_alps_component_query(mca_base_module_t **module, int *priority)
{
*priority = mca_plm_alps_component.priority;
*module = (mca_base_module_t *) &orte_plm_alps_module;
int alps_wlm_active = 1;
#if CRAY_WLM_DETECT
char slurm[]="SLURM";
if(!strcmp(slurm,wlm_detect_get_active())) {
alps_wlm_active = 0;
}
#endif
if (alps_wlm_active) {
*priority = mca_plm_alps_component.priority;
*module = (mca_base_module_t *) &orte_plm_alps_module;
OPAL_OUTPUT_VERBOSE((1, orte_plm_base_framework.framework_output,
"%s plm:alps: available for selection",
ORTE_NAME_PRINT(ORTE_PROC_MY_NAME)));
} else {
*priority = 0;
*module = NULL;
OPAL_OUTPUT_VERBOSE((1, orte_plm_base_framework.framework_output,
"%s plm:alps: not available, slurm present",
ORTE_NAME_PRINT(ORTE_PROC_MY_NAME)));
}
return ORTE_SUCCESS;
}