1
1

Merge pull request #3213 from hppritcha/topic/remove_loadleveer

orte/ras: remove loadleveler support
Этот коммит содержится в:
Howard Pritchard 2017-04-18 09:18:55 -06:00 коммит произвёл GitHub
родитель 9ebcafd6d6 9350aa5d71
Коммит 3918b7a796
10 изменённых файлов: 0 добавлений и 492 удалений

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

@ -988,10 +988,6 @@ RUN-TIME SYSTEM SUPPORT
Force the building of for the Cray Alps run-time environment. If
Alps support cannot be found, configure will abort.
--with-loadleveler
Force the building of LoadLeveler scheduler support. If LoadLeveler
support cannot be found, configure will abort.
--with-lsf=<directory>
Specify the directory where the LSF libraries and header files are
located. This option is generally only necessary if the LSF headers

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

@ -1,53 +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 (c) 2006-2009 Cisco Systems, Inc. All rights reserved.
# Copyright (c) 2011 IBM Corporation. All rights reserved.
# $COPYRIGHT$
#
# Additional copyrights may follow
#
# $HEADER$
#
# 1. if --with-loadleveler is given, always build
# 2. if --without-loadleveler is given, never build
# 3. if neither is given, build if-and-only-if the OS is Linux or AIX
# ORTE_CHECK_LOADLEVELER(prefix, [action-if-found], [action-if-not-found])
# --------------------------------------------------------
AC_DEFUN([ORTE_CHECK_LOADLEVELER],[
AC_ARG_WITH([loadleveler],
[AC_HELP_STRING([--with-loadleveler],
[Build LoadLeveler scheduler component (default: yes)])])
if test "$with_loadleveler" = "no" ; then
orte_check_loadleveler_happy="no"
elif test "$with_loadleveler" = "" ; then
# unless user asked, only build LoadLeveler component on Linux
# and AIX (these are the platforms that LoadLeveler supports)
case $host in
*-linux*|*-aix*)
orte_check_loadleveler_happy="yes"
;;
*)
orte_check_loadleveler_happy="no"
;;
esac
else
orte_check_loadleveler_happy="yes"
fi
AS_IF([test "$orte_check_loadleveler_happy" = "yes"],
[$2],
[$3])
])

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

@ -22,7 +22,6 @@ with_devel_headers=yes
with_alps=no
with_ftb=no
with_sge=no
with_loadleveler=no
with_xgrid=no
with_slurm=no
with_tm=no

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

@ -22,7 +22,6 @@ with_devel_headers=yes
with_alps=no
with_ftb=no
with_sge=no
with_loadleveler=no
with_xgrid=no
with_slurm=no
with_tm=no

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

@ -1,53 +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 (c) 2010 Cisco Systems, Inc. All rights reserved.
# $COPYRIGHT$
#
# Additional copyrights may follow
#
# $HEADER$
#
AM_CPPFLAGS = $(ras_loadleveler_CPPFLAGS)
sources = \
ras_loadleveler.h \
ras_loadleveler_component.c \
ras_loadleveler_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 MCA_BUILD_orte_ras_loadleveler_DSO
lib =
lib_sources =
component = mca_ras_loadleveler.la
component_sources = $(sources)
else
lib = libmca_ras_loadleveler.la
lib_sources = $(sources)
component =
component_sources =
endif
mcacomponentdir = $(ortelibdir)
mcacomponent_LTLIBRARIES = $(component)
mca_ras_loadleveler_la_SOURCES = $(component_sources)
mca_ras_loadleveler_la_LDFLAGS = -module -avoid-version $(ras_loadleveler_LDFLAGS)
mca_ras_loadleveler_la_LIBADD = $(ras_loadleveler_LIBS)
noinst_LTLIBRARIES = $(lib)
libmca_ras_loadleveler_la_SOURCES = $(lib_sources)
libmca_ras_loadleveler_la_LDFLAGS = -module -avoid-version $(ras_loadleveler_LDFLAGS)
libmca_ras_loadleveler_la_LIBADD = $(ras_loadleveler_LIBS)

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

@ -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 (c) 2009-2010 Cisco Systems, Inc. All rights reserved.
# Copyright (c) 2011-2013 Los Alamos National Security, LLC.
# All rights reserved.
# $COPYRIGHT$
#
# Additional copyrights may follow
#
# $HEADER$
#
# MCA_ras_loadleveler_CONFIG([action-if-found], [action-if-not-found])
# -----------------------------------------------------------
AC_DEFUN([MCA_orte_ras_loadleveler_CONFIG],[
AC_CONFIG_FILES([orte/mca/ras/loadleveler/Makefile])
ORTE_CHECK_LOADLEVELER([ras_loadleveler], [ras_loadleveler_good=1], [ras_loadleveler_good=0])
# if check worked, set wrapper flags if so.
# Evaluate succeed / fail
AS_IF([test "$ras_loadleveler_good" = "1"],
[$1],
[$2])
# set build flags to use in makefile
AC_SUBST([ras_loadleveler_CPPFLAGS])
AC_SUBST([ras_loadleveler_LDFLAGS])
AC_SUBST([ras_loadleveler_LIBS])
])dnl

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

@ -1,7 +0,0 @@
#
# owner/status file
# owner: institution that is responsible for this package
# status: e.g. active, maintenance, unmaintained
#
owner: IBM
status: maintenance

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

@ -1,37 +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$
*/
/**
* @file
*
* Resource Allocation (Loadleveler)
*/
#ifndef ORTE_RAS_LOADLEVELER_H
#define ORTE_RAS_LOADLEVELER_H
#include "orte_config.h"
#include "orte/mca/ras/ras.h"
#include "orte/mca/ras/base/base.h"
BEGIN_C_DECLS
ORTE_DECLSPEC extern orte_ras_base_component_t mca_ras_loadleveler_component;
ORTE_DECLSPEC extern orte_ras_base_module_t orte_ras_loadleveler_module;
END_C_DECLS
#endif

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

@ -1,105 +0,0 @@
/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil -*- */
/*
* Copyright (c) 2004-2008 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 (c) 2015 Los Alamos National Security, LLC. All rights
* reserved.
* $COPYRIGHT$
*
* Additional copyrights may follow
*
* $HEADER$
*/
#include "orte_config.h"
#include "opal/mca/base/base.h"
#include "orte/runtime/orte_globals.h"
#include "orte/util/name_fns.h"
#include "orte/mca/ras/base/ras_private.h"
#include "ras_loadleveler.h"
/*
* Local variables
*/
static int param_priority;
/*
* Local functions
*/
static int orte_ras_loadleveler_register(void);
static int orte_ras_loadleveler_open(void);
static int orte_ras_loadleveler_component_query(mca_base_module_t **module, int *priority);
orte_ras_base_component_t mca_ras_loadleveler_component = {
/* First, the mca_base_component_t struct containing meta
information about the component itself */
.base_version = {
ORTE_RAS_BASE_VERSION_2_0_0,
/* Component name and version */
.mca_component_name = "loadleveler",
MCA_BASE_MAKE_VERSION(component, ORTE_MAJOR_VERSION, ORTE_MINOR_VERSION,
ORTE_RELEASE_VERSION),
/* Component open and close functions */
.mca_open_component = orte_ras_loadleveler_open,
.mca_query_component = orte_ras_loadleveler_component_query,
.mca_register_component_params = orte_ras_loadleveler_register,
},
.base_data = {
/* The component is checkpoint ready */
MCA_BASE_METADATA_PARAM_CHECKPOINT
},
};
static int orte_ras_loadleveler_register(void)
{
/* for now we set the priority lower then the priority of the POE RAS
* so that it is used whenever the LOADL_PROCESSOR_LIST is actually set */
param_priority = 90;
(void) mca_base_component_var_register(&mca_ras_loadleveler_component.base_version,
"priority", "Priority of the loadleveler ras component",
MCA_BASE_VAR_TYPE_INT, NULL, 0, 0,
OPAL_INFO_LVL_9,
MCA_BASE_VAR_SCOPE_READONLY, &param_priority);
return ORTE_SUCCESS;
}
static int orte_ras_loadleveler_open(void)
{
return ORTE_SUCCESS;
}
static int orte_ras_loadleveler_component_query(mca_base_module_t **module, int *priority)
{
/* Are we running under a LOADLEVELER job? */
if (NULL != getenv("LOADL_STEP_ID")) {
*priority = param_priority;
OPAL_OUTPUT_VERBOSE((2, orte_ras_base_framework.framework_output,
"%s ras:loadleveler: available for selection",
ORTE_NAME_PRINT(ORTE_PROC_MY_NAME)));
*module = (mca_base_module_t *) &orte_ras_loadleveler_module;
return ORTE_SUCCESS;
}
/* Sadly, no */
OPAL_OUTPUT_VERBOSE((2, orte_ras_base_framework.framework_output,
"%s ras:loadleveler: NOT available for selection",
ORTE_NAME_PRINT(ORTE_PROC_MY_NAME)));
*module = NULL;
return ORTE_ERROR;
}

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

@ -1,191 +0,0 @@
/*
* Copyright (c) 2004-2009 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 (c) 2006 Cisco Systems, Inc. All rights reserved.
* Copyright (c) 2010-2016 IBM Corporation. All rights reserved.
* $COPYRIGHT$
*
* Additional copyrights may follow
*
* $HEADER$
*/
#include "orte_config.h"
#include <errno.h>
#include <unistd.h>
#include <string.h>
#include "opal/util/argv.h"
#include "opal/util/output.h"
#include "opal/util/net.h"
#include "orte/mca/errmgr/errmgr.h"
#include "orte/runtime/orte_globals.h"
#include "orte/constants.h"
#include "orte/mca/ras/base/ras_private.h"
#include "ras_loadleveler.h"
/*
* Local functions
*/
static int orte_ras_loadleveler_allocate(orte_job_t *jdata, opal_list_t *nodes);
static int orte_ras_loadleveler_finalize(void);
static int orte_ras_loadleveler_discover(opal_list_t *nodelist);
static int ll_getline(FILE *fp, char *input);
#define LL_FILE_MAX_LINE_LENGTH 512
/*
* Global variable
*/
orte_ras_base_module_t orte_ras_loadleveler_module = {
NULL,
orte_ras_loadleveler_allocate,
NULL,
orte_ras_loadleveler_finalize
};
/*
* Discover available (pre-allocated) nodes. Allocate the
* requested number of nodes/process slots to the job.
*/
static int orte_ras_loadleveler_allocate(orte_job_t *jdata, opal_list_t *nodes)
{
int ret = ORTE_SUCCESS;
if (ORTE_SUCCESS != (ret = orte_ras_loadleveler_discover(nodes))) {
ORTE_ERROR_LOG(ret);
return ret;
}
/* If we didn't find anything, then this
* is an unrecoverable error - report it
*/
if (opal_list_is_empty(nodes)) {
opal_output(orte_ras_base_framework.framework_output,
"ras:loadleveler:allocate: No nodes were found in the LOADL_HOSTFILE - %s",
getenv("LOADL_HOSTFILE"));
return ORTE_ERR_NOT_FOUND;
}
return ret;
}
/*
* There's really nothing to do here
*/
static int orte_ras_loadleveler_finalize(void)
{
OPAL_OUTPUT_VERBOSE((1, orte_ras_base_framework.framework_output,
"ras:loadleveler:finalize: success (nothing to do)"));
return ORTE_SUCCESS;
}
/**
* Discover the available resources. Obtain directly from LoadLeveler (and
* therefore have no need to validate) -- ignore hostfile or any other
* user-specified parameters.
*/
static int orte_ras_loadleveler_discover(opal_list_t* nodelist)
{
orte_node_t *node;
opal_list_item_t* item;
FILE *fp;
char *hostname;
char *filename;
char input[LL_FILE_MAX_LINE_LENGTH];
char *ptr;
/* Ignore anything that the user already specified -- we're
getting nodes only from LoadLeveler. */
filename = getenv("LOADL_HOSTFILE");
if(NULL == filename) {
opal_output(orte_ras_base_framework.framework_output,
"ras:loadleveler:allocate:discover: LOADL_HOSTFILE not set. "
"Unable to discover allocated nodes.");
return ORTE_ERROR;
}
fp = fopen(filename, "r");
if (NULL == fp) {
ORTE_ERROR_LOG(ORTE_ERR_FILE_OPEN_FAILURE);
return ORTE_ERR_FILE_OPEN_FAILURE;
}
/* Iterate through all the nodes and make an entry for each */
while (0 != ll_getline(fp, input)) {
hostname = strdup(input);
if( !orte_keep_fqdn_hostnames && !opal_net_isaddr(hostname) ) {
if (NULL != (ptr = strchr(hostname, '.'))) {
*ptr = '\0';
}
}
OPAL_OUTPUT_VERBOSE((1, orte_ras_base_framework.framework_output,
"%s ras:loadleveler:allocate:discover: got hostname %s",
ORTE_NAME_PRINT(ORTE_PROC_MY_NAME), hostname));
/* Remember that LoadLeveler may list the same node more than once.
So we have to check for duplicates. */
for (item = opal_list_get_first(nodelist);
opal_list_get_end(nodelist) != item;
item = opal_list_get_next(item)) {
node = (orte_node_t*) item;
if (0 == strcmp(node->name, hostname)) {
++node->slots;
OPAL_OUTPUT_VERBOSE((1, orte_ras_base_framework.framework_output,
"%s ras:loadleveler:allocate:discover: found -- bumped slots to %d",
ORTE_NAME_PRINT(ORTE_PROC_MY_NAME), node->slots));
break;
}
}
/* Did we find it? */
if (opal_list_get_end(nodelist) == item) {
/* Nope -- didn't find it, so add a new item to the list */
OPAL_OUTPUT_VERBOSE((1, orte_ras_base_framework.framework_output,
"%s ras:loadleveler:allocate:discover: not found -- added to list",
ORTE_NAME_PRINT(ORTE_PROC_MY_NAME)));
node = OBJ_NEW(orte_node_t);
node->name = hostname;
node->state = ORTE_NODE_STATE_UP;
node->slots_inuse = 0;
node->slots_max = 0;
node->slots = 1;
opal_list_append(nodelist, &node->super);
} else {
/* Yes, so we need to free the hostname that came back */
free(hostname);
}
}
fclose(fp);
return ORTE_SUCCESS;
}
static int ll_getline(FILE *fp, char *input)
{
char *ret;
ret = fgets(input, LL_FILE_MAX_LINE_LENGTH, fp);
if (NULL != ret) {
input[strlen(input)-1] = '\0'; /* remove newline */
return 1;
}
return 0;
}