2005-05-01 00:47:35 +00:00
|
|
|
/*
|
2005-11-05 19:57:48 +00:00
|
|
|
* Copyright (c) 2004-2005 The Trustees of Indiana University and Indiana
|
|
|
|
* University Research and Technology
|
|
|
|
* Corporation. All rights reserved.
|
2006-08-23 03:32:36 +00:00
|
|
|
* Copyright (c) 2004-2006 The University of Tennessee and The University
|
2005-11-05 19:57:48 +00:00
|
|
|
* of Tennessee Research Foundation. All rights
|
|
|
|
* reserved.
|
2005-05-01 00:47:35 +00:00
|
|
|
* 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"
|
2006-02-12 01:33:29 +00:00
|
|
|
#include "orte/orte_constants.h"
|
|
|
|
#include "orte/orte_constants.h"
|
2005-05-01 00:47:35 +00:00
|
|
|
|
2005-07-03 23:31:27 +00:00
|
|
|
#include "opal/util/output.h"
|
2005-05-01 00:47:35 +00:00
|
|
|
|
2006-02-12 01:33:29 +00:00
|
|
|
#include "orte/mca/schema/base/base.h"
|
2005-05-01 00:47:35 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
* 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.
|
|
|
|
*/
|
|
|
|
|
2005-07-04 18:24:58 +00:00
|
|
|
#include "orte/mca/schema/base/static-components.h"
|
2005-05-01 00:47:35 +00:00
|
|
|
|
|
|
|
/*
|
|
|
|
* globals
|
|
|
|
*/
|
|
|
|
|
2006-08-20 15:54:04 +00:00
|
|
|
orte_schema_base_module_t orte_schema = {
|
2005-05-01 00:53:00 +00:00
|
|
|
orte_schema_base_get_proc_tokens,
|
|
|
|
orte_schema_base_get_node_tokens,
|
Add a job_info segment to the system that holds a container for each job. Within each container is a keyval indicating the job state (i.e., all procs at stage1, finalized, etc.). This provides a rough state-of-health for the job.
This required a little fiddling with a number of areas. Biggest problem was that it uncovered a potential for an infinite loop to be created in the registry. If a callback function modified the registry, the registry checked the triggers to see if anything had fired. Well, if the original callback was due to a trigger firing, that condition hadn't changed - so the trigger fired again....which caused the callback to be called, which modified the registry, which checked the triggers, etc. etc.
Triggers are now checked and then "flagged" as being "in process" so that the registry will NOT recheck that trigger until all callbacks have been processed. Tried doing this with subscriptions as well, but that caused a problem - when we release processes from a stagegate, they (at the moment) immediately place data on the registry that should cause a subscription to fire. Unfortunately, the system will just hang if that subscription doesn't get processed. So, I have left the subscription system alone - any callback function that modifies the registry in a fashion that will fire a subscription will indeed fire that subscription. We'll have to see if this causes problems - it shouldn't, but a careless user could lock things up if the callback generates a callback to itself.
Also fixed the code that placed a process' RML contact info on the registry to eliminate the leading '/' from the string.
This commit was SVN r6684.
2005-07-29 14:11:19 +00:00
|
|
|
orte_schema_base_get_job_tokens,
|
2005-05-01 00:53:00 +00:00
|
|
|
orte_schema_base_get_cell_tokens,
|
|
|
|
orte_schema_base_get_job_segment_name,
|
2005-05-06 17:00:06 +00:00
|
|
|
orte_schema_base_extract_jobid_from_segment_name,
|
2005-06-24 16:59:37 +00:00
|
|
|
orte_schema_base_store_my_info,
|
|
|
|
orte_schema_base_get_std_trigger_name,
|
2005-08-07 13:26:49 +00:00
|
|
|
orte_schema_base_check_std_trigger_name,
|
|
|
|
orte_schema_base_extract_jobid_from_std_trigger_name,
|
2005-06-24 16:59:37 +00:00
|
|
|
orte_schema_base_get_std_subscription_name
|
2005-05-01 00:53:00 +00:00
|
|
|
};
|
2005-05-01 00:47:35 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/*
|
2005-05-01 00:53:00 +00:00
|
|
|
* Global variables for framework
|
2005-05-01 00:47:35 +00:00
|
|
|
*/
|
2005-05-01 00:53:00 +00:00
|
|
|
int orte_schema_base_output;
|
|
|
|
bool orte_schema_base_selected = false;
|
2005-07-03 16:22:16 +00:00
|
|
|
opal_list_t orte_schema_base_components_available;
|
2005-05-01 00:53:00 +00:00
|
|
|
mca_schema_base_component_t orte_schema_base_selected_component;
|
|
|
|
bool orte_schema_initialized = false;
|
2005-05-01 00:47:35 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Function for finding and opening either all MCA components, or the one
|
|
|
|
* that was specifically requested via a MCA parameter.
|
|
|
|
*/
|
2005-05-01 00:53:00 +00:00
|
|
|
int orte_schema_base_open(void)
|
2005-05-01 00:47:35 +00:00
|
|
|
{
|
|
|
|
int param, value;
|
|
|
|
|
2005-05-01 00:53:00 +00:00
|
|
|
if (!orte_schema_initialized) {
|
|
|
|
/* Debugging / verbose output */
|
|
|
|
|
2005-08-15 18:25:35 +00:00
|
|
|
param = mca_base_param_reg_int_name("schema_base", "verbose",
|
|
|
|
"Verbosity level for the schema framework",
|
|
|
|
false, false, 0, &value);
|
2005-05-01 00:53:00 +00:00
|
|
|
if (value != 0) {
|
2005-07-03 23:31:27 +00:00
|
|
|
orte_schema_base_output = opal_output_open(NULL);
|
2005-05-01 00:53:00 +00:00
|
|
|
} else {
|
|
|
|
orte_schema_base_output = -1;
|
|
|
|
}
|
2005-05-01 00:47:35 +00:00
|
|
|
|
2005-05-01 00:53:00 +00:00
|
|
|
/* Open up all available components */
|
|
|
|
|
2006-02-12 01:33:29 +00:00
|
|
|
if (ORTE_SUCCESS !=
|
2005-08-15 18:25:35 +00:00
|
|
|
mca_base_components_open("schema", orte_schema_base_output,
|
|
|
|
mca_schema_base_static_components,
|
2005-05-01 00:53:00 +00:00
|
|
|
&orte_schema_base_components_available, true)) {
|
|
|
|
return ORTE_ERROR;
|
|
|
|
}
|
|
|
|
|
|
|
|
orte_schema_initialized = true;
|
2005-05-01 00:47:35 +00:00
|
|
|
}
|
2005-05-01 00:53:00 +00:00
|
|
|
|
2005-05-01 00:47:35 +00:00
|
|
|
/* All done */
|
|
|
|
|
|
|
|
return ORTE_SUCCESS;
|
|
|
|
}
|