check for POE support
This commit was SVN r5438.
Этот коммит содержится в:
родитель
ad861063c8
Коммит
6569d5d569
@ -1 +1,2 @@
|
||||
angskun
|
||||
zchen
|
||||
|
@ -16,4 +16,5 @@
|
||||
#
|
||||
|
||||
PARAM_INIT_FILE=pls_poe_component.c
|
||||
PARAM_CONFIG_HEADER_FILE="pls_poe_config.h"
|
||||
PARAM_CONFIG_FILES="Makefile"
|
||||
|
65
src/mca/pls/poe/configure.stub
Обычный файл
65
src/mca/pls/poe/configure.stub
Обычный файл
@ -0,0 +1,65 @@
|
||||
# -*- shell-script -*-
|
||||
#
|
||||
# Copyright (c) 2004-2005 The Trustees of Indiana University.
|
||||
# All rights reserved.
|
||||
# Copyright (c) 2004-2005 The Trustees of the University of Tennessee.
|
||||
# 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$
|
||||
#
|
||||
# Additional copyrights may follow
|
||||
#
|
||||
# $HEADER$
|
||||
#
|
||||
|
||||
#
|
||||
# Main function. This will be invoked in the middle of the templated
|
||||
# configure script.
|
||||
#
|
||||
AC_DEFUN([MCA_CONFIGURE_STUB],[
|
||||
#
|
||||
# Make a best effort to see if we are on a POE system.
|
||||
#
|
||||
|
||||
OMPI_HAVE_POE=0
|
||||
|
||||
AC_ARG_WITH(poe,
|
||||
AC_HELP_STRING([--with-poe=DIR],
|
||||
[directory where the Parallel Operating Environment(POE) was installed]))
|
||||
|
||||
if test "$with_poe" != "no"; then
|
||||
if test "$with_poe" = "yes"; then
|
||||
AC_PATH_PROG(OMPI_POE,poe)
|
||||
elif test -d "$with_poe"; then
|
||||
AC_PATH_PROG(OMPI_POE,poe,,$with_poe)
|
||||
elif test -z "$with_poe"; then
|
||||
AC_PATH_PROG(OMPI_POE,poe)
|
||||
fi
|
||||
|
||||
if test ! -z "$OMPI_POE"; then
|
||||
OMPI_HAVE_POE=1
|
||||
fi
|
||||
fi
|
||||
|
||||
|
||||
if test "$OMPI_HAVE_POE" = "1"; then
|
||||
AC_PATH_PROG(LSLPP,lslpp)
|
||||
if test ! -z "$LSLPP"; then
|
||||
AC_MSG_CHECKING([POE Version])
|
||||
OMPI_POE_VERSION=`$LSLPP -q -c -L ppe.poe | cut -f 3 -d ':'`
|
||||
AC_MSG_RESULT($OMPI_POE_VERSION)
|
||||
else
|
||||
OMPI_POE_VERSION="unknown"
|
||||
fi
|
||||
else
|
||||
AC_MSG_ERROR([*** Connot find working POE])
|
||||
fi
|
||||
|
||||
AC_DEFINE_UNQUOTED(OMPI_HAVE_POE, $OMPI_HAVE_POE, [Whether we have POE support or not])
|
||||
AC_DEFINE(OMPI_POE_VERSION, $OMPI_POE_VERSION, [POE Version])
|
||||
AC_DEFINE(OMPI_POE, $OMPI_POE, [POE execution name])
|
||||
|
||||
])dnl
|
@ -26,15 +26,28 @@
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Globally exported variable
|
||||
*/
|
||||
|
||||
OMPI_COMP_EXPORT extern orte_pls_base_component_1_0_0_t
|
||||
orte_pls_poe_component;
|
||||
OMPI_COMP_EXPORT extern orte_pls_base_module_1_0_0_t
|
||||
orte_pls_poe_module;
|
||||
OMPI_COMP_EXPORT extern int orte_pls_poe_param_priorty;
|
||||
/*
|
||||
* Module open / close
|
||||
*/
|
||||
int orte_pls_poe_component_open(void);
|
||||
int orte_pls_poe_component_close(void);
|
||||
orte_pls_base_module_t* orte_pls_poe_component_init(int *priority);
|
||||
|
||||
/**
|
||||
* PLS Component
|
||||
*/
|
||||
struct orte_pls_poe_component_t {
|
||||
orte_pls_base_component_t super;
|
||||
int priority;
|
||||
char* path;
|
||||
};
|
||||
typedef struct orte_pls_poe_component_t orte_pls_poe_component_t;
|
||||
|
||||
|
||||
ORTE_DECLSPEC extern orte_pls_poe_component_t mca_pls_poe_component;
|
||||
ORTE_DECLSPEC extern orte_pls_base_module_t orte_pls_poe_module;
|
||||
|
||||
|
||||
|
||||
#if defined(c_plusplus) || defined(__cplusplus)
|
||||
}
|
||||
|
@ -25,6 +25,7 @@
|
||||
#include "include/orte_constants.h"
|
||||
#include "mca/pls/pls.h"
|
||||
#include "pls_poe.h"
|
||||
#include "util/path.h"
|
||||
#include "mca/pls/poe/pls-poe-version.h"
|
||||
#include "mca/base/mca_base_param.h"
|
||||
|
||||
@ -42,20 +43,13 @@ const char *mca_pls_poe_component_version_string =
|
||||
static int param_priority = -1;
|
||||
|
||||
|
||||
/*
|
||||
* Local functions
|
||||
*/
|
||||
static int pls_poe_open(void);
|
||||
static struct orte_pls_base_module_1_0_0_t *pls_poe_init(int *priority);
|
||||
|
||||
|
||||
/*
|
||||
* Instantiate the public struct with all of our public information
|
||||
* and pointers to our public functions in it
|
||||
*/
|
||||
|
||||
orte_pls_base_component_1_0_0_t mca_pls_poe_component = {
|
||||
|
||||
orte_pls_poe_component_t mca_pls_poe_component = {
|
||||
{
|
||||
/* First, the mca_component_t struct containing meta information
|
||||
about the component itself */
|
||||
|
||||
@ -74,7 +68,7 @@ orte_pls_base_component_1_0_0_t mca_pls_poe_component = {
|
||||
|
||||
/* Component open and close functions */
|
||||
|
||||
pls_poe_open,
|
||||
orte_pls_poe_component_open,
|
||||
NULL
|
||||
},
|
||||
|
||||
@ -88,11 +82,12 @@ orte_pls_base_component_1_0_0_t mca_pls_poe_component = {
|
||||
|
||||
/* Initialization / querying functions */
|
||||
|
||||
pls_poe_init
|
||||
orte_pls_poe_component_init
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
static int pls_poe_open(void)
|
||||
static int orte_pls_poe_component_open(void)
|
||||
{
|
||||
param_priority =
|
||||
mca_base_param_register_int("pls", "poe", "priority", NULL, 75);
|
||||
@ -101,11 +96,13 @@ static int pls_poe_open(void)
|
||||
}
|
||||
|
||||
|
||||
static struct orte_pls_base_module_1_0_0_t *pls_poe_init(int *priority)
|
||||
orte_pls_base_module_t *orte_pls_poe_component_init(int *priority)
|
||||
{
|
||||
/* Are we runing under POE? */
|
||||
|
||||
|
||||
|
||||
return NULL;
|
||||
extern char **environ;
|
||||
mca_pls_poe_component.path = ompi_path_findv("poe", 0, environ, NULL);
|
||||
if (NULL == mca_pls_poe_component.path) {
|
||||
return NULL;
|
||||
}
|
||||
*priority = mca_pls_poe_component.priority;
|
||||
return &orte_pls_poe_module;
|
||||
}
|
||||
|
Загрузка…
Ссылка в новой задаче
Block a user