2005-05-01 00:47:35 +00:00
|
|
|
/*
|
|
|
|
* 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$
|
|
|
|
*/
|
|
|
|
/** @file:
|
|
|
|
*
|
2005-05-01 00:53:00 +00:00
|
|
|
* The OpenRTE Schema.
|
2005-05-01 00:47:35 +00:00
|
|
|
*/
|
|
|
|
|
2005-05-01 00:53:00 +00:00
|
|
|
#ifndef ORTE_SCHEMA_BASE_H_
|
|
|
|
#define ORTE_SCHEMA_BASE_H_
|
2005-05-01 00:47:35 +00:00
|
|
|
|
|
|
|
/*
|
|
|
|
* includes
|
|
|
|
*/
|
|
|
|
#include "orte_config.h"
|
|
|
|
|
|
|
|
#include "include/orte_constants.h"
|
|
|
|
#include "include/orte_types.h"
|
|
|
|
|
2005-07-03 22:45:48 +00:00
|
|
|
#include "opal/threads/mutex.h"
|
|
|
|
#include "opal/threads/condition.h"
|
2005-05-01 00:47:35 +00:00
|
|
|
|
2005-07-03 16:22:16 +00:00
|
|
|
#include "opal/class/opal_list.h"
|
2005-05-01 00:47:35 +00:00
|
|
|
|
|
|
|
#include "mca/mca.h"
|
|
|
|
#include "mca/base/base.h"
|
|
|
|
#include "mca/base/mca_base_param.h"
|
|
|
|
|
2005-05-01 00:53:00 +00:00
|
|
|
#include "mca/ns/ns_types.h"
|
|
|
|
|
|
|
|
#include "mca/schema/schema.h"
|
2005-05-01 00:47:35 +00:00
|
|
|
|
|
|
|
/*
|
|
|
|
* Global functions for MCA overall collective open and close
|
|
|
|
*/
|
|
|
|
#if defined(c_plusplus) || defined(__cplusplus)
|
|
|
|
extern "C" {
|
|
|
|
#endif
|
|
|
|
|
2005-05-01 00:53:00 +00:00
|
|
|
OMPI_DECLSPEC int orte_schema_base_open(void);
|
|
|
|
OMPI_DECLSPEC int orte_schema_base_select(void);
|
|
|
|
OMPI_DECLSPEC int orte_schema_base_close(void);
|
2005-05-01 00:47:35 +00:00
|
|
|
|
|
|
|
/* general usage functions */
|
2005-05-01 00:53:00 +00:00
|
|
|
int orte_schema_base_get_proc_tokens(char ***tokens, size_t* num_tokens, orte_process_name_t *proc);
|
|
|
|
int orte_schema_base_get_node_tokens(char ***tokens, size_t* num_tokens, orte_cellid_t cellid, char *nodename);
|
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
|
|
|
int orte_schema_base_get_job_tokens(char ***tokens, size_t* num_tokens, orte_jobid_t jobid);
|
2005-05-01 00:53:00 +00:00
|
|
|
int orte_schema_base_get_cell_tokens(char ***tokens, size_t* num_tokens, orte_cellid_t cellid);
|
|
|
|
int orte_schema_base_get_job_segment_name(char **name, orte_jobid_t jobid);
|
|
|
|
int orte_schema_base_extract_jobid_from_segment_name(orte_jobid_t *jobid, char *name);
|
2005-05-06 17:00:06 +00:00
|
|
|
int orte_schema_base_store_my_info(void);
|
2005-06-24 16:59:37 +00:00
|
|
|
int orte_schema_base_get_std_trigger_name(char **name,
|
|
|
|
char *trigger,
|
|
|
|
orte_jobid_t jobid);
|
|
|
|
int orte_schema_base_get_std_subscription_name(char **name,
|
|
|
|
char *subscription,
|
|
|
|
orte_jobid_t jobid);
|
2005-05-01 00:47:35 +00:00
|
|
|
|
|
|
|
|
|
|
|
#if defined(c_plusplus) || defined(__cplusplus)
|
|
|
|
}
|
|
|
|
#endif
|
|
|
|
|
|
|
|
/*
|
|
|
|
* globals that might be needed inside the gpr
|
|
|
|
*/
|
2005-05-01 00:53:00 +00:00
|
|
|
extern int orte_schema_base_output;
|
|
|
|
extern bool orte_schema_base_selected;
|
2005-07-03 16:22:16 +00:00
|
|
|
extern opal_list_t orte_schema_base_components_available;
|
2005-05-01 00:53:00 +00:00
|
|
|
extern mca_schema_base_component_t orte_schema_base_selected_component;
|
|
|
|
extern bool orte_schema_initialized;
|
2005-05-01 00:47:35 +00:00
|
|
|
|
|
|
|
#endif
|