2005-05-01 04:47:35 +04:00
|
|
|
/*
|
2005-11-05 22:57:48 +03:00
|
|
|
* Copyright (c) 2004-2005 The Trustees of Indiana University and Indiana
|
|
|
|
* University Research and Technology
|
|
|
|
* Corporation. All rights reserved.
|
|
|
|
* Copyright (c) 2004-2005 The University of Tennessee and The University
|
|
|
|
* of Tennessee Research Foundation. All rights
|
|
|
|
* reserved.
|
2005-05-01 04:47:35 +04: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$
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef ORTE_SCHEMA_H
|
|
|
|
#define ORTE_SCHEMA_H
|
|
|
|
|
|
|
|
#include "orte_config.h"
|
|
|
|
|
2006-02-12 04:33:29 +03:00
|
|
|
#include "opal/mca/mca.h"
|
|
|
|
#include "orte/mca/ns/ns_types.h"
|
2005-05-01 04:47:35 +04:00
|
|
|
|
2006-02-12 04:33:29 +03:00
|
|
|
#include "orte/mca/schema/schema_types.h"
|
2005-05-01 04:47:35 +04:00
|
|
|
|
2005-05-12 00:21:10 +04:00
|
|
|
#if defined(c_plusplus) || defined(__cplusplus)
|
|
|
|
extern "C" {
|
|
|
|
#endif
|
|
|
|
|
2005-05-01 04:47:35 +04:00
|
|
|
/*
|
|
|
|
* Convenience functions for accessing ORTE data
|
|
|
|
*/
|
|
|
|
typedef int (*orte_schema_get_proc_tokens_fn_t)(
|
|
|
|
char ***tokens,
|
2006-08-15 23:54:10 +04:00
|
|
|
orte_std_cntr_t* num_tokens,
|
2005-05-01 04:47:35 +04:00
|
|
|
orte_process_name_t *proc);
|
|
|
|
|
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 18:11:19 +04:00
|
|
|
typedef int (*orte_schema_get_job_tokens_fn_t)(
|
|
|
|
char ***tokens,
|
2006-08-15 23:54:10 +04:00
|
|
|
orte_std_cntr_t* num_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 18:11:19 +04:00
|
|
|
orte_jobid_t jobid);
|
|
|
|
|
2005-05-01 04:47:35 +04:00
|
|
|
typedef int (*orte_schema_get_node_tokens_fn_t)(
|
|
|
|
char ***tokens,
|
2006-08-15 23:54:10 +04:00
|
|
|
orte_std_cntr_t* num_tokens,
|
2005-05-01 04:47:35 +04:00
|
|
|
orte_cellid_t cellid,
|
|
|
|
char *nodename);
|
|
|
|
|
|
|
|
typedef int (*orte_schema_get_cell_tokens_fn_t)(
|
|
|
|
char ***tokens,
|
2006-08-15 23:54:10 +04:00
|
|
|
orte_std_cntr_t* num_tokens,
|
2005-05-01 04:47:35 +04:00
|
|
|
orte_cellid_t cellid);
|
|
|
|
|
|
|
|
typedef int (*orte_schema_get_job_segment_name_fn_t)(char **name, orte_jobid_t jobid);
|
|
|
|
|
|
|
|
typedef int (*orte_schema_extract_jobid_from_segment_name_fn_t)(orte_jobid_t *jobid, char *name);
|
2005-05-01 04:53:00 +04:00
|
|
|
|
2005-05-06 21:00:06 +04:00
|
|
|
typedef int (*orte_schema_store_my_info_fn_t)(void);
|
|
|
|
|
2005-06-24 20:59:37 +04:00
|
|
|
typedef int (*orte_schema_get_std_trigger_name_fn_t)(char **name,
|
|
|
|
char *trigger,
|
|
|
|
orte_jobid_t jobid);
|
|
|
|
|
2005-08-07 17:26:49 +04:00
|
|
|
typedef int (*orte_schema_extract_jobid_from_std_trigger_name_fn_t)(orte_jobid_t *jobid,
|
|
|
|
char *trigger);
|
|
|
|
|
|
|
|
typedef bool (*orte_schema_check_std_trigger_name_fn_t)(char *name, char *trigger);
|
|
|
|
|
2005-06-24 20:59:37 +04:00
|
|
|
typedef int (*orte_schema_get_std_subscription_name_fn_t)(char **name,
|
|
|
|
char *subscription,
|
|
|
|
orte_jobid_t jobid);
|
|
|
|
|
|
|
|
|
2005-05-01 04:47:35 +04:00
|
|
|
/*
|
2005-05-01 04:53:00 +04:00
|
|
|
* Ver 1.0.0
|
2005-05-01 04:47:35 +04:00
|
|
|
*/
|
2005-05-01 04:53:00 +04:00
|
|
|
struct orte_schema_base_module_1_0_0_t {
|
2005-05-01 04:47:35 +04:00
|
|
|
orte_schema_get_proc_tokens_fn_t get_proc_tokens;
|
|
|
|
orte_schema_get_node_tokens_fn_t 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 18:11:19 +04:00
|
|
|
orte_schema_get_job_tokens_fn_t get_job_tokens;
|
2005-05-01 04:47:35 +04:00
|
|
|
orte_schema_get_cell_tokens_fn_t get_cell_tokens;
|
|
|
|
orte_schema_get_job_segment_name_fn_t get_job_segment_name;
|
|
|
|
orte_schema_extract_jobid_from_segment_name_fn_t extract_jobid_from_segment_name;
|
2005-05-06 21:00:06 +04:00
|
|
|
orte_schema_store_my_info_fn_t store_my_info;
|
2005-06-24 20:59:37 +04:00
|
|
|
orte_schema_get_std_trigger_name_fn_t get_std_trigger_name;
|
2005-08-07 17:26:49 +04:00
|
|
|
orte_schema_check_std_trigger_name_fn_t check_std_trigger_name;
|
|
|
|
orte_schema_extract_jobid_from_std_trigger_name_fn_t extract_jobid_from_std_trigger_name;
|
2005-06-24 20:59:37 +04:00
|
|
|
orte_schema_get_std_subscription_name_fn_t get_std_subscription_name;
|
2005-05-01 04:53:00 +04:00
|
|
|
};
|
2005-05-01 04:47:35 +04:00
|
|
|
|
2005-05-01 04:53:00 +04:00
|
|
|
|
|
|
|
typedef struct orte_schema_base_module_1_0_0_t orte_schema_base_module_1_0_0_t;
|
|
|
|
typedef orte_schema_base_module_1_0_0_t orte_schema_base_module_t;
|
2005-05-01 04:47:35 +04:00
|
|
|
|
|
|
|
/*
|
2005-05-01 04:53:00 +04:00
|
|
|
* SCHEMA Component
|
2005-05-01 04:47:35 +04:00
|
|
|
*/
|
2005-05-01 04:53:00 +04:00
|
|
|
|
|
|
|
typedef orte_schema_base_module_t* (*orte_schema_base_component_init_fn_t)(
|
|
|
|
bool *allow_multi_user_threads,
|
|
|
|
bool *have_hidden_threads,
|
|
|
|
int *priority);
|
|
|
|
|
|
|
|
typedef int (*orte_schema_base_component_finalize_fn_t)(void);
|
|
|
|
|
|
|
|
/*
|
|
|
|
* the standard component data structure
|
|
|
|
*/
|
|
|
|
|
|
|
|
struct mca_schema_base_component_1_0_0_t {
|
|
|
|
mca_base_component_t schema_version;
|
|
|
|
mca_base_component_data_1_0_0_t schema_data;
|
|
|
|
|
|
|
|
orte_schema_base_component_init_fn_t schema_init;
|
|
|
|
orte_schema_base_component_finalize_fn_t schema_finalize;
|
|
|
|
};
|
|
|
|
typedef struct mca_schema_base_component_1_0_0_t mca_schema_base_component_1_0_0_t;
|
|
|
|
typedef mca_schema_base_component_1_0_0_t mca_schema_base_component_t;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
* Macro for use in components that are of type schema v1.0.0
|
|
|
|
*/
|
|
|
|
#define ORTE_SCHEMA_BASE_VERSION_1_0_0 \
|
|
|
|
/* schema v1.0 is chained to MCA v1.0 */ \
|
|
|
|
MCA_BASE_VERSION_1_0_0, \
|
|
|
|
/* schema v1.0 */ \
|
|
|
|
"schema", 1, 0, 0
|
|
|
|
|
2006-08-20 19:54:04 +04:00
|
|
|
ORTE_DECLSPEC extern orte_schema_base_module_t orte_schema;
|
2005-05-01 04:53:00 +04:00
|
|
|
|
2005-05-12 00:21:10 +04:00
|
|
|
#if defined(c_plusplus) || defined(__cplusplus)
|
|
|
|
}
|
|
|
|
#endif
|
2005-05-01 04:47:35 +04:00
|
|
|
|
|
|
|
#endif
|