1
1

Merge pull request #6415 from rhc54/topic/sing

Remove stale singularity/schizo component
Этот коммит содержится в:
Ralph Castain 2019-02-20 18:47:57 -08:00 коммит произвёл GitHub
родитель 13a8e42108 2f15379171
Коммит d2f8737f5a
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 4AEE18F83AFDEB23
7 изменённых файлов: 0 добавлений и 314 удалений

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

@ -1,60 +0,0 @@
# -*- shell-script ; indent-tabs-mode:nil -*-
#
# Copyright (c) 2016 Intel, Inc. All rights reserved.
# $COPYRIGHT$
#
# Additional copyrights may follow
#
# $HEADER$
#
# OPAL_CHECK_SINGULARITY(prefix, [action-if-found], [action-if-not-found])
# --------------------------------------------------------
AC_DEFUN([OPAL_CHECK_SINGULARITY],[
OPAL_VAR_SCOPE_PUSH([spath have_singularity])
AC_ARG_WITH([singularity],
[AC_HELP_STRING([--with-singularity(=DIR)],
[Build support for the Singularity container, optionally adding DIR to the search path])])
spath=
AC_MSG_CHECKING([if Singularity support is to be built])
AS_IF([test "$with_singularity" = "no"],
[AC_MSG_RESULT([no])
have_singularity=no],
[AC_MSG_RESULT([yes])
AS_IF([test -z "$with_singularity" || test "$with_singularity" = "yes"],
[ # look for the singularity command in the default path
AC_CHECK_PROG([SINGULARITY], [singularity], [singularity])
AS_IF([test "$SINGULARITY" != ""],
[have_singularity=yes],
[AS_IF([test "$with_singularity" = "yes"],
[AC_MSG_WARN([Singularity support requested, but required executable])
AC_MSG_WARN(["singularity" not found in default locations])
AC_MSG_ERROR([Cannot continue])])
have_singularity=no])],
[ AC_MSG_CHECKING([for existence of $with_singularity/bin])
# look for the singularity command in the bin subdirectory
AS_IF([test ! -d "$with_singularity/bin"],
[AC_MSG_RESULT([not found])
AC_MSG_WARN([Directory $with_singularity/bin not found])
AC_MSG_ERROR([Cannot continue])],
[AC_MSG_RESULT([found])])
save_path=$PATH
PATH=$with_singularity/bin:$PATH
AC_CHECK_PROG([SINGULARITY], [singularity], [singularity])
AS_IF([test "$SINGULARITY" != ""],
[have_singularity=yes
spath=$with_singularity/bin],
[have_singlarity=no
AC_MSG_WARN([Singularity support requested, but required executable])
AC_MSG_WARN(["singularity" not found in either default or specified path])
AC_MSG_ERROR([Cannot continue])])
PATH=$save_path
]
)])
AC_DEFINE_UNQUOTED(OPAL_SINGULARITY_PATH, "$spath", [Path to Singularity binaries])
AS_IF([test "$have_singularity" = "yes"],
[$2], [$3])
OPAL_VAR_SCOPE_POP
])

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

@ -1,37 +0,0 @@
#
# Copyright (c) 2016 Intel, Inc. All rights reserved.
# Copyright (c) 2017 IBM Corporation. All rights reserved.
# $COPYRIGHT$
#
# Additional copyrights may follow
#
# $HEADER$
#
sources = \
schizo_singularity_component.c \
schizo_singularity.h \
schizo_singularity.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_schizo_singularity_DSO
component_noinst =
component_install = mca_schizo_singularity.la
else
component_noinst = libmca_schizo_singularity.la
component_install =
endif
mcacomponentdir = $(ortelibdir)
mcacomponent_LTLIBRARIES = $(component_install)
mca_schizo_singularity_la_SOURCES = $(sources)
mca_schizo_singularity_la_LDFLAGS = -module -avoid-version
mca_schizo_singularity_la_LIBADD = $(top_builddir)/orte/lib@ORTE_LIB_PREFIX@open-rte.la
noinst_LTLIBRARIES = $(component_noinst)
libmca_schizo_singularity_la_SOURCES = $(sources)
libmca_schizo_singularity_la_LDFLAGS = -module -avoid-version

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

@ -1,19 +0,0 @@
# -*- shell-script -*-
#
# Copyright (c) 2016 Intel, Inc. All rights reserved.
# $COPYRIGHT$
#
# Additional copyrights may follow
#
# $HEADER$
#
# MCA_schizo_singularity_CONFIG([action-if-found], [action-if-not-found])
# -----------------------------------------------------------
AC_DEFUN([MCA_orte_schizo_singularity_CONFIG],[
AC_CONFIG_FILES([orte/mca/schizo/singularity/Makefile])
OPAL_CHECK_SINGULARITY([schizo_singularity], [schizo_singularity_happy="yes"], [schizo_singularity_happy="no"])
AS_IF([test "$schizo_singularity_happy" = "yes"], [$1], [$2])
])dnl

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

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

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

@ -1,109 +0,0 @@
/*
* Copyright (c) 2016-2018 Intel, Inc. All rights reserved.
* $COPYRIGHT$
*
* Additional copyrights may follow
*
* $HEADER$
*
*/
#include "orte_config.h"
#include "orte/types.h"
#include "opal/types.h"
#ifdef HAVE_UNISTD_H
#include <unistd.h>
#endif
#include <ctype.h>
#include "opal/util/argv.h"
#include "opal/util/basename.h"
#include "opal/util/opal_environ.h"
#include "opal/util/os_dirpath.h"
#include "opal/util/path.h"
#include "orte/runtime/orte_globals.h"
#include "orte/util/name_fns.h"
#include "orte/mca/schizo/base/base.h"
#include "schizo_singularity.h"
static int setup_fork(orte_job_t *jdata, orte_app_context_t *context);
orte_schizo_base_module_t orte_schizo_singularity_module = {
.setup_fork = setup_fork
};
static int setup_fork(orte_job_t *jdata, orte_app_context_t *app)
{
int i;
bool takeus = false;
char *t2, *pth, *newenv;
if (NULL != orte_schizo_base.personalities &&
NULL != jdata->personality) {
/* see if we are included */
for (i=0; NULL != jdata->personality[i]; i++) {
if (0 == strcmp(jdata->personality[i], "singularity")) {
takeus = true;
break;
}
}
}
if (!takeus) {
/* even if they didn't specify, check to see if
* this involves a singularity container */
if (0 != strcmp(app->argv[0],"singularity")) {
/* guess not! */
return ORTE_ERR_TAKE_NEXT_OPTION;
}
}
opal_output_verbose(1, orte_schizo_base_framework.framework_output,
"%s schizo:singularity: configuring app environment %s",
ORTE_NAME_PRINT(ORTE_PROC_MY_NAME), app->argv[0]);
/* Make sure we prepend the path Singularity was called by incase that
* path is not defined on the nodes */
if (0 < strlen(OPAL_SINGULARITY_PATH)) {
if (0 > opal_asprintf(&pth, "%s/singularity", OPAL_SINGULARITY_PATH) ) {
/* Something bad happened, let's move on */
return ORTE_ERR_TAKE_NEXT_OPTION;
}
} else {
/* since we allow for detecting singularity's presence, it
* is possible that we found it in the PATH, but not in a
* standard location. Check for that here */
pth = opal_path_findv("singularity", X_OK, app->env, NULL);
if (NULL == pth) {
/* cannot execute */
return ORTE_ERR_TAKE_NEXT_OPTION;
}
}
/* find the path and prepend it with the path to Singularity */
for (i = 0; NULL != app->env && NULL != app->env[i]; ++i) {
/* add to PATH */
if (0 == strncmp("PATH=", app->env[i], 5)) {
t2 = opal_dirname(pth);
if (0 < opal_asprintf(&newenv, "%s:%s", t2, app->env[i] + 5) ) {
opal_setenv("PATH", newenv, true, &app->env);
free(newenv);
}
free(t2);
break;
}
}
free(pth);
/* set the singularity cache dir, unless asked not to do so */
if (!orte_get_attribute(&app->attributes, ORTE_APP_NO_CACHEDIR, NULL, OPAL_BOOL)) {
/* Set the Singularity sessiondir to exist within the OMPI sessiondir */
opal_setenv("SINGULARITY_SESSIONDIR", orte_process_info.job_session_dir, true, &app->env);
/* No need for Singularity to clean up after itself if OMPI will */
opal_setenv("SINGULARITY_NOSESSIONCLEANUP", "1", true, &app->env);
}
return ORTE_SUCCESS;
}

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

@ -1,29 +0,0 @@
/*
* Copyright (c) 2016 Intel, Inc. All rights reserved.
* $COPYRIGHT$
*
* Additional copyrights may follow
*
* $HEADER$
*/
#ifndef _MCA_SCHIZO_SINGULARITY_H_
#define _MCA_SCHIZO_SINGULARITY_H_
#include "orte_config.h"
#include "orte/types.h"
#include "opal/mca/base/base.h"
#include "orte/mca/schizo/schizo.h"
BEGIN_C_DECLS
ORTE_MODULE_DECLSPEC extern orte_schizo_base_component_t mca_schizo_singularity_component;
extern orte_schizo_base_module_t orte_schizo_singularity_module;
END_C_DECLS
#endif /* MCA_SCHIZO_SINGULARITY_H_ */

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

@ -1,53 +0,0 @@
/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil -*- */
/*
* Copyright (c) 2016 Intel, Inc. All rights reserved.
* $COPYRIGHT$
*
* Additional copyrights may follow
*
* $HEADER$
*/
#include "orte_config.h"
#include "orte/types.h"
#include "opal/types.h"
#include "opal/util/show_help.h"
#include "orte/runtime/orte_globals.h"
#include "orte/mca/schizo/schizo.h"
#include "schizo_singularity.h"
static int component_query(mca_base_module_t **module, int *priority);
/*
* Struct of function pointers and all that to let us be initialized
*/
orte_schizo_base_component_t mca_schizo_singularity_component = {
.base_version = {
MCA_SCHIZO_BASE_VERSION_1_0_0,
.mca_component_name = "singularity",
MCA_BASE_MAKE_VERSION(component, ORTE_MAJOR_VERSION, ORTE_MINOR_VERSION,
ORTE_RELEASE_VERSION),
.mca_query_component = component_query,
},
.base_data = {
/* The component is checkpoint ready */
MCA_BASE_METADATA_PARAM_CHECKPOINT
},
};
static int component_query(mca_base_module_t **module, int *priority)
{
/* if we are an app, ignore us */
if (ORTE_PROC_IS_APP) {
*module = NULL;
*priority = 0;
return ORTE_ERROR;
}
*module = (mca_base_module_t*)&orte_schizo_singularity_module;
*priority = 5;
return ORTE_SUCCESS;
}