1
1
openmpi/orte/mca/schizo/base/schizo_base_stubs.c

95 строки
2.9 KiB
C
Исходник Обычный вид История

2015-01-26 07:16:45 +03:00
/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil -*- */
/*
2015-06-24 06:59:57 +03:00
* Copyright (c) 2015 Intel, Inc. All rights reserved.
2015-01-26 07:16:45 +03:00
* $COPYRIGHT$
2015-06-24 06:59:57 +03:00
*
2015-01-26 07:16:45 +03:00
* Additional copyrights may follow
2015-06-24 06:59:57 +03:00
*
2015-01-26 07:16:45 +03:00
* $HEADER$
*/
#include "orte_config.h"
#include "orte/constants.h"
#include "opal/class/opal_list.h"
#include "orte/mca/schizo/base/base.h"
2015-01-26 07:16:45 +03:00
int orte_schizo_base_parse_cli(char *personality,
int argc, int start, char **argv)
2015-01-26 07:16:45 +03:00
{
int rc;
orte_schizo_base_active_module_t *mod;
2015-01-26 07:16:45 +03:00
if (NULL == personality) {
opal_output(0, "NULL PERSONALITY");
return ORTE_ERR_NOT_SUPPORTED;
2015-01-26 07:16:45 +03:00
}
2015-06-24 06:59:57 +03:00
OPAL_LIST_FOREACH(mod, &orte_schizo_base.active_modules, orte_schizo_base_active_module_t) {
if (0 == strcmp(personality, mod->component->mca_component_name)) {
if (NULL != mod->module->parse_cli) {
rc = mod->module->parse_cli(personality, argc, start, argv);
return rc;
}
2015-01-26 07:16:45 +03:00
}
}
return ORTE_ERR_NOT_SUPPORTED;
2015-01-26 07:16:45 +03:00
}
int orte_schizo_base_parse_env(char *personality,
char *path,
opal_cmd_line_t *cmd_line,
char *server,
char **srcenv,
char ***dstenv)
2015-01-26 07:16:45 +03:00
{
int rc;
orte_schizo_base_active_module_t *mod;
2015-01-26 07:16:45 +03:00
OPAL_LIST_FOREACH(mod, &orte_schizo_base.active_modules, orte_schizo_base_active_module_t) {
if (0 == strcmp(personality, mod->component->mca_component_name)) {
if (NULL != mod->module->parse_env) {
rc = mod->module->parse_env(personality, path, cmd_line, server, srcenv, dstenv);
return rc;
2015-01-26 07:16:45 +03:00
}
}
}
return ORTE_ERR_NOT_SUPPORTED;
2015-01-26 07:16:45 +03:00
}
int orte_schizo_base_setup_fork(orte_job_t *jdata,
orte_app_context_t *context)
2015-01-26 07:16:45 +03:00
{
int rc;
orte_schizo_base_active_module_t *mod;
2015-06-24 06:59:57 +03:00
OPAL_LIST_FOREACH(mod, &orte_schizo_base.active_modules, orte_schizo_base_active_module_t) {
if (0 == strcmp(jdata->personality, mod->component->mca_component_name)) {
if (NULL != mod->module->setup_fork) {
rc = mod->module->setup_fork(jdata, context);
return rc;
2015-01-26 07:16:45 +03:00
}
}
}
return ORTE_ERR_NOT_SUPPORTED;
2015-01-26 07:16:45 +03:00
}
int orte_schizo_base_setup_child(orte_job_t *jdata,
orte_proc_t *child,
orte_app_context_t *app)
2015-01-26 07:16:45 +03:00
{
int rc;
orte_schizo_base_active_module_t *mod;
2015-01-26 07:16:45 +03:00
OPAL_LIST_FOREACH(mod, &orte_schizo_base.active_modules, orte_schizo_base_active_module_t) {
if (0 == strcmp(jdata->personality, mod->component->mca_component_name)) {
if (NULL != mod->module->setup_child) {
rc = mod->module->setup_child(jdata, child, app);
return rc;
}
2015-01-26 07:16:45 +03:00
}
}
return ORTE_ERR_NOT_SUPPORTED;
2015-01-26 07:16:45 +03:00
}