4e79a51395
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.
128 строки
4.0 KiB
C
128 строки
4.0 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$
|
|
*/
|
|
/** @file:
|
|
*/
|
|
|
|
#ifndef MCA_SOH_BASE_H
|
|
#define MCA_SOH_BASE_H
|
|
|
|
/*
|
|
* includes
|
|
*/
|
|
#include "orte_config.h"
|
|
#include "include/orte_constants.h"
|
|
#include "include/orte_types.h"
|
|
|
|
#include "opal/class/opal_list.h"
|
|
#include "dps/dps_types.h"
|
|
#include "mca/mca.h"
|
|
/* #include "mca/ns/ns_types.h" */
|
|
#include "mca/soh/soh.h"
|
|
|
|
|
|
/*
|
|
* Global functions for MCA overall collective open and close
|
|
*/
|
|
#if defined(c_plusplus) || defined(__cplusplus)
|
|
extern "C" {
|
|
#endif
|
|
|
|
OMPI_DECLSPEC int orte_soh_base_open(void);
|
|
OMPI_DECLSPEC int orte_soh_base_select(void);
|
|
OMPI_DECLSPEC int orte_soh_base_close(void);
|
|
|
|
int orte_soh_base_get_proc_soh(orte_proc_state_t *state,
|
|
int *status,
|
|
orte_process_name_t *proc);
|
|
|
|
int orte_soh_base_set_proc_soh(orte_process_name_t *proc,
|
|
orte_proc_state_t state,
|
|
int status);
|
|
|
|
int orte_soh_base_get_node_soh_not_available(orte_node_state_t *state,
|
|
orte_cellid_t cell,
|
|
char *nodename);
|
|
|
|
int orte_soh_base_set_node_soh_not_available(orte_cellid_t cell,
|
|
char *nodename,
|
|
orte_node_state_t state);
|
|
|
|
int orte_soh_base_get_job_soh(orte_job_state_t *state,
|
|
orte_jobid_t jobid);
|
|
|
|
int orte_soh_base_set_job_soh(orte_jobid_t jobid,
|
|
orte_job_state_t state);
|
|
|
|
int orte_soh_base_begin_monitoring_not_available(orte_jobid_t job);
|
|
|
|
|
|
int orte_soh_base_module_finalize_not_available (void);
|
|
|
|
/*
|
|
* DATA TYPE PACKING FUNCTIONS
|
|
*/
|
|
int orte_soh_base_pack_exit_code(orte_buffer_t *buffer, void *src,
|
|
size_t num_vals, orte_data_type_t type);
|
|
|
|
int orte_soh_base_pack_node_state(orte_buffer_t *buffer, void *src,
|
|
size_t num_vals, orte_data_type_t type);
|
|
|
|
int orte_soh_base_pack_proc_state(orte_buffer_t *buffer, void *src,
|
|
size_t num_vals, orte_data_type_t type);
|
|
|
|
int orte_soh_base_pack_job_state(orte_buffer_t *buffer, void *src,
|
|
size_t num_vals, orte_data_type_t type);
|
|
|
|
/*
|
|
* DATA TYPE UNPACKING FUNCTIONS
|
|
*/
|
|
int orte_soh_base_unpack_exit_code(orte_buffer_t *buffer, void *dest,
|
|
size_t *num_vals, orte_data_type_t type);
|
|
|
|
int orte_soh_base_unpack_node_state(orte_buffer_t *buffer, void *dest,
|
|
size_t *num_vals, orte_data_type_t type);
|
|
|
|
int orte_soh_base_unpack_proc_state(orte_buffer_t *buffer, void *dest,
|
|
size_t *num_vals, orte_data_type_t type);
|
|
|
|
int orte_soh_base_unpack_job_state(orte_buffer_t *buffer, void *dest,
|
|
size_t *num_vals, orte_data_type_t type);
|
|
|
|
/*
|
|
* globals that might be needed
|
|
*/
|
|
|
|
OMPI_DECLSPEC extern int orte_soh_base_output;
|
|
OMPI_DECLSPEC extern orte_soh_base_module_t orte_soh; /* holds selected module's function pointers */
|
|
OMPI_DECLSPEC extern bool orte_soh_base_selected;
|
|
|
|
typedef struct orte_soh_base_t {
|
|
int soh_output;
|
|
opal_list_t soh_components;
|
|
} orte_soh_base_t;
|
|
|
|
OMPI_DECLSPEC extern orte_soh_base_t orte_soh_base;
|
|
|
|
|
|
/*
|
|
* external API functions will be documented in the mca/soh/soh.h file
|
|
*/
|
|
|
|
#if defined(c_plusplus) || defined(__cplusplus)
|
|
}
|
|
#endif
|
|
#endif
|