Goodbye poe, long live LoadLeveler...
This commit was SVN r12140.
Этот коммит содержится в:
родитель
668902c780
Коммит
5d31332f97
@ -1,50 +0,0 @@
|
||||
#
|
||||
# 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$
|
||||
#
|
||||
# Additional copyrights may follow
|
||||
#
|
||||
# $HEADER$
|
||||
#
|
||||
|
||||
# Use the top-level Makefile.options
|
||||
|
||||
|
||||
|
||||
sources = \
|
||||
ras_poe.h \
|
||||
ras_poe_component.c \
|
||||
ras_poe_module.c
|
||||
|
||||
# Make the output library in this directory, and name it either
|
||||
# mca_<type>_<name>.la (for DSO builds) or libmca_<type>_<name>.la
|
||||
# (for static builds).
|
||||
|
||||
if OMPI_BUILD_ras_poe_DSO
|
||||
component_noinst =
|
||||
component_install = mca_ras_poe.la
|
||||
else
|
||||
component_noinst = libmca_ras_poe.la
|
||||
component_install =
|
||||
endif
|
||||
|
||||
mcacomponentdir = $(libdir)/openmpi
|
||||
mcacomponent_LTLIBRARIES = $(component_install)
|
||||
mca_ras_poe_la_SOURCES = $(sources)
|
||||
mca_ras_poe_la_LDFLAGS = -module -avoid-version
|
||||
mca_ras_poe_la_LIBADD = \
|
||||
$(top_ompi_builddir)/orte/liborte.la \
|
||||
$(top_ompi_builddir)/opal/libopal.la
|
||||
|
||||
noinst_LTLIBRARIES = $(component_noinst)
|
||||
libmca_ras_poe_la_SOURCES =$(sources)
|
||||
libmca_ras_poe_la_LDFLAGS = -module -avoid-version
|
@ -1,40 +0,0 @@
|
||||
# -*- 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$
|
||||
#
|
||||
# Additional copyrights may follow
|
||||
#
|
||||
# $HEADER$
|
||||
#
|
||||
|
||||
# MCA_ras_poe_CONFIG([action-if-found], [action-if-not-found])
|
||||
# -----------------------------------------------------------
|
||||
|
||||
AC_DEFUN([MCA_ras_poe_CONFIG],[
|
||||
# POE used to be only supported on AIX. Now we support it on
|
||||
# AIX and some IBM Linux Machines.
|
||||
# We only need executables (no header files or libraries), but
|
||||
# those can be found (or not) at run-time. So if we're on AIX,
|
||||
# or Linux build this component.
|
||||
AC_MSG_CHECKING([if on AIX or Linux])
|
||||
case $host_os in
|
||||
linux* | aix3* | aix4* | aix5*)
|
||||
happy=yes
|
||||
;;
|
||||
*)
|
||||
happy=no
|
||||
;;
|
||||
esac
|
||||
AC_MSG_RESULT([$happy])
|
||||
AS_IF([test "$happy" = "yes"], [$1], [$2])
|
||||
])
|
@ -1,24 +0,0 @@
|
||||
# -*- 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$
|
||||
#
|
||||
# Additional copyrights may follow
|
||||
#
|
||||
# $HEADER$
|
||||
#
|
||||
|
||||
# Specific to this module
|
||||
|
||||
PARAM_INIT_FILE=ras_poe.c
|
||||
PARAM_CONFIG_HEADER_FILE="ras_poe.h"
|
||||
PARAM_CONFIG_FILES="Makefile"
|
@ -1,48 +0,0 @@
|
||||
/*
|
||||
* Copyright (c) 2004-2005 The Trustees of Indiana University and Indiana
|
||||
* University Research and Technology
|
||||
* Corporation. All rights reserved.
|
||||
* Copyright (c) 2004-2006 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$
|
||||
*
|
||||
* Additional copyrights may follow
|
||||
*
|
||||
* $HEADER$
|
||||
*/
|
||||
/**
|
||||
* @file
|
||||
*
|
||||
* Resource Allocation (POE)
|
||||
*/
|
||||
#ifndef ORTE_RAS_POE_H
|
||||
#define ORTE_RAS_POE_H
|
||||
|
||||
#include "orte/mca/ras/ras.h"
|
||||
#if defined(c_plusplus) || defined(__cplusplus)
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
|
||||
/**
|
||||
* RAS Component
|
||||
*/
|
||||
struct orte_ras_poe_component_t {
|
||||
orte_ras_base_component_t super;
|
||||
int priority;
|
||||
};
|
||||
typedef struct orte_ras_poe_component_t orte_ras_poe_component_t;
|
||||
|
||||
ORTE_DECLSPEC extern orte_ras_poe_component_t mca_ras_poe_component;
|
||||
ORTE_DECLSPEC extern orte_ras_base_module_t orte_ras_poe_module;
|
||||
|
||||
#if defined(c_plusplus) || defined(__cplusplus)
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
@ -1,107 +0,0 @@
|
||||
/*
|
||||
* 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$
|
||||
*
|
||||
* Additional copyrights may follow
|
||||
*
|
||||
* $HEADER$
|
||||
*/
|
||||
|
||||
#include "orte_config.h"
|
||||
#include "orte/orte_constants.h"
|
||||
#include "opal/mca/base/base.h"
|
||||
#include "opal/mca/base/mca_base_param.h"
|
||||
#include "orte/mca/ras/ras.h"
|
||||
#include "orte/mca/ras/base/base.h"
|
||||
#include "orte/util/proc_info.h"
|
||||
#include "opal/util/output.h"
|
||||
#include "ras_poe.h"
|
||||
|
||||
/*
|
||||
* Local functions
|
||||
*/
|
||||
|
||||
static int orte_ras_poe_open(void);
|
||||
static int orte_ras_poe_close(void);
|
||||
static orte_ras_base_module_t* orte_ras_poe_init(int* priority);
|
||||
|
||||
|
||||
orte_ras_poe_component_t mca_ras_poe_component = {
|
||||
{
|
||||
/* First, the mca_base_component_t struct containing meta
|
||||
information about the component itself */
|
||||
|
||||
{
|
||||
/* Indicate that we are a ras v1.3.0 component (which also
|
||||
implies a specific MCA version) */
|
||||
|
||||
ORTE_RAS_BASE_VERSION_1_3_0,
|
||||
"poe", /* MCA component name */
|
||||
ORTE_MAJOR_VERSION, /* MCA component major version */
|
||||
ORTE_MINOR_VERSION, /* MCA component minor version */
|
||||
ORTE_RELEASE_VERSION, /* MCA component release version */
|
||||
orte_ras_poe_open, /* component open */
|
||||
orte_ras_poe_close /* component close */
|
||||
},
|
||||
|
||||
/* Next the MCA v1.0.0 component meta data */
|
||||
{
|
||||
/* Whether the component is checkpointable or not */
|
||||
false
|
||||
},
|
||||
|
||||
orte_ras_poe_init
|
||||
}
|
||||
};
|
||||
|
||||
/**
|
||||
* component open/close/init function
|
||||
*/
|
||||
static int orte_ras_poe_open(void)
|
||||
{
|
||||
mca_base_component_t *c = &mca_ras_poe_component.super.ras_version;
|
||||
|
||||
mca_base_param_reg_int(c, "priority",
|
||||
"Priority of the poe ras component",
|
||||
false , false, 100, &mca_ras_poe_component.priority);
|
||||
|
||||
return ORTE_SUCCESS;
|
||||
}
|
||||
|
||||
static orte_ras_base_module_t *orte_ras_poe_init(int* priority)
|
||||
{
|
||||
/* if we are not an HNP, then we must not be selected */
|
||||
if (!orte_process_info.seed) {
|
||||
return NULL;
|
||||
}
|
||||
|
||||
*priority = mca_ras_poe_component.priority;
|
||||
|
||||
if ( NULL != getenv("LOADL_PROCESSOR_LIST") ) {
|
||||
opal_output(orte_ras_base.ras_output,
|
||||
"ras:poe: available for selection with priority %d",
|
||||
mca_ras_poe_component.priority);
|
||||
return &orte_ras_poe_module;
|
||||
}
|
||||
|
||||
opal_output(orte_ras_base.ras_output,
|
||||
"ras:poe: NOT available for selection");
|
||||
return NULL;
|
||||
}
|
||||
|
||||
/**
|
||||
* Close all subsystems.
|
||||
*/
|
||||
static int orte_ras_poe_close(void)
|
||||
{
|
||||
return ORTE_SUCCESS;
|
||||
}
|
@ -1,129 +0,0 @@
|
||||
/*
|
||||
* 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$
|
||||
*
|
||||
* Additional copyrights may follow
|
||||
*
|
||||
* $HEADER$
|
||||
*/
|
||||
#include "orte_config.h"
|
||||
#include "orte/orte_constants.h"
|
||||
|
||||
#include <errno.h>
|
||||
#include <unistd.h>
|
||||
#include <string.h>
|
||||
|
||||
#include "opal/util/argv.h"
|
||||
|
||||
#include "orte/dss/dss.h"
|
||||
|
||||
#include "orte/mca/ras/poe/ras_poe.h"
|
||||
#include "orte/mca/ras/base/ras_private.h"
|
||||
|
||||
static int orte_ras_poe_allocate(orte_jobid_t jobid, opal_list_t *attributes)
|
||||
{
|
||||
char *poe_node_str;
|
||||
char **names;
|
||||
int i, ret, nnode;
|
||||
opal_list_t nodes_list;
|
||||
orte_ras_node_t *node;
|
||||
opal_list_item_t* item;
|
||||
orte_jobid_t *jptr;
|
||||
orte_attribute_t *attr;
|
||||
|
||||
poe_node_str = getenv("LOADL_PROCESSOR_LIST");
|
||||
if (NULL == poe_node_str) {
|
||||
return ORTE_ERR_NOT_FOUND;
|
||||
}
|
||||
|
||||
/* check the attributes to see if we are supposed to use the parent
|
||||
* jobid's allocation. This can occur if we are doing a dynamic
|
||||
* process spawn and don't want to go through the allocator again
|
||||
*/
|
||||
if (NULL != (attr = orte_rmgr.find_attribute(attributes, ORTE_RMGR_USE_PARENT_ALLOCATION))) {
|
||||
/* attribute was given - just reallocate to the new jobid */
|
||||
if (ORTE_SUCCESS != (ret = orte_dss.get((void**)&jptr, attr->value, ORTE_JOBID))) {
|
||||
ORTE_ERROR_LOG(ret);
|
||||
return ret;
|
||||
}
|
||||
if (ORTE_SUCCESS != (ret = orte_ras_base_reallocate(*jptr, jobid))) {
|
||||
ORTE_ERROR_LOG(ret);
|
||||
return ret;
|
||||
}
|
||||
return ORTE_SUCCESS;
|
||||
}
|
||||
|
||||
/* poe_node_str is something like "nodeA nodeA nodeB nodeB" */
|
||||
|
||||
names = opal_argv_copy(opal_argv_split(poe_node_str, ' '));
|
||||
nnode = opal_argv_count(names);
|
||||
|
||||
/* iterate through all the nodes listed. If a single node is listed more than once,
|
||||
* it means that we have multiple slots allocated on that node */
|
||||
OBJ_CONSTRUCT(&nodes_list, opal_list_t);
|
||||
for (i = 0; i < nnode; i++) {
|
||||
/* check for duplicated nodes */
|
||||
for (item = opal_list_get_first(&nodes_list);
|
||||
opal_list_get_end(&nodes_list) != item;
|
||||
item = opal_list_get_next(item)) {
|
||||
node = (orte_ras_node_t*) item;
|
||||
if (0 == strcmp(node->node_name, names[i])) {
|
||||
++node->node_slots;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if(opal_list_get_end(&nodes_list) == item) {
|
||||
/* we did not find a duplicate, so add a new item to the list */
|
||||
node = OBJ_NEW(orte_ras_node_t);
|
||||
if (NULL == node) {
|
||||
return ORTE_ERR_OUT_OF_RESOURCE;
|
||||
}
|
||||
node->node_name = strdup(names[i]);
|
||||
node->node_arch = NULL;
|
||||
node->node_state = ORTE_NODE_STATE_UP;
|
||||
node->node_cellid = 0;
|
||||
node->node_slots_inuse = 0;
|
||||
node->node_slots_max = 0;
|
||||
node->node_slots = 1;
|
||||
opal_list_append(&nodes_list, &node->super);
|
||||
}
|
||||
}
|
||||
ret = orte_ras_base_node_insert(&nodes_list);
|
||||
ret = orte_ras_base_allocate_nodes(jobid, &nodes_list);
|
||||
|
||||
while (NULL != (item = opal_list_remove_first(&nodes_list))) {
|
||||
OBJ_RELEASE(item);
|
||||
}
|
||||
OBJ_DESTRUCT(&nodes_list);
|
||||
return ret;
|
||||
}
|
||||
|
||||
static int orte_ras_poe_deallocate(orte_jobid_t jobid)
|
||||
{
|
||||
return ORTE_SUCCESS;
|
||||
}
|
||||
|
||||
static int orte_ras_poe_finalize(void)
|
||||
{
|
||||
return ORTE_SUCCESS;
|
||||
}
|
||||
|
||||
orte_ras_base_module_t orte_ras_poe_module = {
|
||||
orte_ras_poe_allocate,
|
||||
orte_ras_base_node_insert,
|
||||
orte_ras_base_node_query,
|
||||
orte_ras_base_node_query_alloc,
|
||||
orte_ras_base_node_lookup,
|
||||
orte_ras_poe_deallocate,
|
||||
orte_ras_poe_finalize
|
||||
};
|
Загрузка…
Ссылка в новой задаче
Block a user