1
1
openmpi/orte/mca/schema/base/schema_base_open.c
Ralph Castain e583f6a97f Add a couple of new functions to the schema framework to check if a trigger is a "standard" trigger or not, and to extract a jobid from a standard trigger. Both functions will be used in a later commit.
Ensure that the seed set_my_name function sets all the right initial info in the name services' structures.

This commit was SVN r6760.
2005-08-07 13:26:49 +00:00

100 строки
2.8 KiB
C

/*
* 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$
*/
#include "orte_config.h"
#include "include/orte_constants.h"
#include "include/constants.h"
#include "opal/util/output.h"
#include "mca/schema/base/base.h"
/*
* The following file was created by configure. It contains extern
* statements and the definition of an array of pointers to each
* component's public mca_base_module_t struct.
*/
#include "orte/mca/schema/base/static-components.h"
/*
* globals
*/
OMPI_DECLSPEC orte_schema_base_module_t orte_schema = {
orte_schema_base_get_proc_tokens,
orte_schema_base_get_node_tokens,
orte_schema_base_get_job_tokens,
orte_schema_base_get_cell_tokens,
orte_schema_base_get_job_segment_name,
orte_schema_base_extract_jobid_from_segment_name,
orte_schema_base_store_my_info,
orte_schema_base_get_std_trigger_name,
orte_schema_base_check_std_trigger_name,
orte_schema_base_extract_jobid_from_std_trigger_name,
orte_schema_base_get_std_subscription_name
};
/*
* Global variables for framework
*/
int orte_schema_base_output;
orte_schema_base_module_t orte_schema;
bool orte_schema_base_selected = false;
opal_list_t orte_schema_base_components_available;
mca_schema_base_component_t orte_schema_base_selected_component;
bool orte_schema_initialized = false;
/**
* Function for finding and opening either all MCA components, or the one
* that was specifically requested via a MCA parameter.
*/
int orte_schema_base_open(void)
{
int param, value;
if (!orte_schema_initialized) {
/* Debugging / verbose output */
param = mca_base_param_register_int("schema", "base", "verbose",
NULL, 0);
mca_base_param_lookup_int(param, &value);
if (value != 0) {
orte_schema_base_output = opal_output_open(NULL);
} else {
orte_schema_base_output = -1;
}
/* Open up all available components */
if (OMPI_SUCCESS !=
mca_base_components_open("schema", 0, mca_schema_base_static_components,
&orte_schema_base_components_available, true)) {
return ORTE_ERROR;
}
orte_schema_initialized = true;
}
/* All done */
return ORTE_SUCCESS;
}