2004-08-15 03:33:13 +00:00
|
|
|
/* -*- C -*-
|
|
|
|
*
|
2004-11-22 01:38:40 +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.
|
2004-11-28 20:09:25 +00:00
|
|
|
* Copyright (c) 2004-2005 High Performance Computing Center Stuttgart,
|
|
|
|
* University of Stuttgart. All rights reserved.
|
2005-03-24 12:43:37 +00:00
|
|
|
* Copyright (c) 2004-2005 The Regents of the University of California.
|
|
|
|
* All rights reserved.
|
2004-11-22 01:38:40 +00:00
|
|
|
* $COPYRIGHT$
|
|
|
|
*
|
|
|
|
* Additional copyrights may follow
|
|
|
|
*
|
2004-08-15 03:33:13 +00:00
|
|
|
* $HEADER$
|
|
|
|
*/
|
|
|
|
/** @file:
|
|
|
|
*
|
|
|
|
* The Open MPI General Purpose Registry - Replica component
|
|
|
|
*
|
|
|
|
*/
|
|
|
|
|
|
|
|
/*
|
|
|
|
* includes
|
|
|
|
*/
|
2005-03-14 20:57:21 +00:00
|
|
|
#include "orte_config.h"
|
|
|
|
|
2005-05-24 13:39:15 +00:00
|
|
|
#include "class/orte_bitmap.h"
|
2005-07-03 16:06:07 +00:00
|
|
|
#include "opal/class/opal_object.h"
|
2005-07-03 23:31:27 +00:00
|
|
|
#include "opal/util/output.h"
|
2005-03-14 20:57:21 +00:00
|
|
|
#include "util/proc_info.h"
|
|
|
|
|
|
|
|
#include "mca/rml/rml.h"
|
2004-08-15 03:33:13 +00:00
|
|
|
|
|
|
|
#include "gpr_replica.h"
|
2005-03-14 20:57:21 +00:00
|
|
|
#include "mca/gpr/replica/api_layer/gpr_replica_api.h"
|
|
|
|
#include "mca/gpr/replica/communications/gpr_replica_comm.h"
|
2005-03-24 15:45:44 +00:00
|
|
|
#include "mca/errmgr/errmgr.h"
|
2004-08-15 03:33:13 +00:00
|
|
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
* Struct of function pointers that need to be initialized
|
|
|
|
*/
|
2005-03-14 20:57:21 +00:00
|
|
|
OMPI_COMP_EXPORT mca_gpr_base_component_t mca_gpr_replica_component = {
|
2004-08-15 03:33:13 +00:00
|
|
|
{
|
|
|
|
MCA_GPR_BASE_VERSION_1_0_0,
|
|
|
|
|
|
|
|
"replica", /* MCA module name */
|
Major simplifications to component versioning:
- After long discussions and ruminations on how we run components in
LAM/MPI, made the decision that, by default, all components included
in Open MPI will use the version number of their parent project
(i.e., OMPI or ORTE). They are certaint free to use a different
number, but this simplification makes the common cases easy:
- components are only released when the parent project is released
- it is easy (trivial?) to distinguish which version component goes
with with version of the parent project
- removed all autogen/configure code for templating the version .h
file in components
- made all ORTE components use ORTE_*_VERSION for version numbers
- made all OMPI components use OMPI_*_VERSION for version numbers
- removed all VERSION files from components
- configure now displays OPAL, ORTE, and OMPI version numbers
- ditto for ompi_info
- right now, faking it -- OPAL and ORTE and OMPI will always have the
same version number (i.e., they all come from the same top-level
VERSION file). But this paves the way for the Great Configure
Reorganization, where, among other things, each project will have
its own version number.
So all in all, we went from a boatload of version numbers to
[effectively] three. That's pretty good. :-)
This commit was SVN r6344.
2005-07-04 20:12:36 +00:00
|
|
|
ORTE_MAJOR_VERSION, /* MCA module major version */
|
|
|
|
ORTE_MINOR_VERSION, /* MCA module minor version */
|
|
|
|
ORTE_RELEASE_VERSION, /* MCA module release version */
|
2005-03-14 20:57:21 +00:00
|
|
|
orte_gpr_replica_open, /* module open */
|
|
|
|
orte_gpr_replica_close /* module close */
|
2004-08-15 03:33:13 +00:00
|
|
|
},
|
|
|
|
{
|
|
|
|
false /* checkpoint / restart */
|
|
|
|
},
|
2005-03-14 20:57:21 +00:00
|
|
|
orte_gpr_replica_init, /* module init */
|
|
|
|
orte_gpr_replica_finalize /* module shutdown */
|
2004-08-15 03:33:13 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
/*
|
|
|
|
* setup the function pointers for the module
|
|
|
|
*/
|
2005-03-14 20:57:21 +00:00
|
|
|
static orte_gpr_base_module_t orte_gpr_replica_module = {
|
|
|
|
/* INIT */
|
|
|
|
orte_gpr_replica_module_init,
|
|
|
|
/* BLOCKING OPERATIONS */
|
|
|
|
orte_gpr_replica_get,
|
|
|
|
orte_gpr_replica_put,
|
2005-08-01 16:38:15 +00:00
|
|
|
orte_gpr_base_put_1,
|
|
|
|
orte_gpr_base_put_N,
|
2005-03-14 20:57:21 +00:00
|
|
|
orte_gpr_replica_delete_entries,
|
|
|
|
orte_gpr_replica_delete_segment,
|
|
|
|
orte_gpr_replica_index,
|
|
|
|
/* NON-BLOCKING OPERATIONS */
|
|
|
|
orte_gpr_replica_get_nb,
|
|
|
|
orte_gpr_replica_put_nb,
|
|
|
|
orte_gpr_replica_delete_entries_nb,
|
|
|
|
orte_gpr_replica_delete_segment_nb,
|
|
|
|
orte_gpr_replica_index_nb,
|
|
|
|
/* GENERAL OPERATIONS */
|
|
|
|
orte_gpr_replica_preallocate_segment,
|
2005-05-16 21:01:09 +00:00
|
|
|
orte_gpr_base_xfer_payload,
|
2005-03-14 20:57:21 +00:00
|
|
|
/* ARITHMETIC OPERATIONS */
|
|
|
|
orte_gpr_replica_increment_value,
|
|
|
|
orte_gpr_replica_decrement_value,
|
|
|
|
/* SUBSCRIBE OPERATIONS */
|
|
|
|
orte_gpr_replica_subscribe,
|
2005-08-01 16:38:15 +00:00
|
|
|
orte_gpr_base_subscribe_1,
|
|
|
|
orte_gpr_base_subscribe_N,
|
|
|
|
orte_gpr_base_define_trigger,
|
2005-03-14 20:57:21 +00:00
|
|
|
orte_gpr_replica_unsubscribe,
|
2005-06-24 16:59:37 +00:00
|
|
|
orte_gpr_replica_cancel_trigger,
|
2005-03-14 20:57:21 +00:00
|
|
|
/* COMPOUND COMMANDS */
|
|
|
|
orte_gpr_replica_begin_compound_cmd,
|
|
|
|
orte_gpr_replica_stop_compound_cmd,
|
|
|
|
orte_gpr_replica_exec_compound_cmd,
|
|
|
|
/* DIAGNOSTIC OPERATIONS */
|
|
|
|
orte_gpr_replica_dump_all,
|
|
|
|
orte_gpr_replica_dump_segments,
|
|
|
|
orte_gpr_replica_dump_triggers,
|
2005-06-24 16:59:37 +00:00
|
|
|
orte_gpr_replica_dump_subscriptions,
|
2005-08-01 16:38:15 +00:00
|
|
|
orte_gpr_replica_dump_local_triggers,
|
|
|
|
orte_gpr_replica_dump_local_subscriptions,
|
2005-03-28 22:37:54 +00:00
|
|
|
orte_gpr_replica_dump_callbacks,
|
|
|
|
orte_gpr_replica_dump_notify_msg,
|
|
|
|
orte_gpr_replica_dump_notify_data,
|
2005-05-01 00:53:00 +00:00
|
|
|
orte_gpr_replica_dump_value,
|
2005-03-14 20:57:21 +00:00
|
|
|
/* CLEANUP OPERATIONS */
|
|
|
|
orte_gpr_replica_cleanup_job,
|
|
|
|
orte_gpr_replica_cleanup_proc
|
2004-08-15 03:33:13 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
/*
|
|
|
|
* Whether or not we allowed this component to be selected
|
|
|
|
*/
|
|
|
|
static bool initialized = false;
|
|
|
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
* globals needed within replica component
|
|
|
|
*/
|
2005-03-14 20:57:21 +00:00
|
|
|
orte_gpr_replica_t orte_gpr_replica;
|
|
|
|
|
|
|
|
orte_gpr_replica_globals_t orte_gpr_replica_globals;
|
|
|
|
|
2005-06-24 16:59:37 +00:00
|
|
|
/* instantiate the classes */
|
|
|
|
#include "mca/gpr/replica/gpr_replica_class_instances.h"
|
2004-11-20 19:12:43 +00:00
|
|
|
|
2005-03-14 20:57:21 +00:00
|
|
|
int orte_gpr_replica_open(void)
|
2004-08-15 03:33:13 +00:00
|
|
|
{
|
2005-03-14 20:57:21 +00:00
|
|
|
int id, tmp;
|
2004-08-28 01:59:56 +00:00
|
|
|
|
|
|
|
id = mca_base_param_register_int("gpr", "replica", "debug", NULL, 0);
|
2005-03-14 20:57:21 +00:00
|
|
|
mca_base_param_lookup_int(id, &tmp);
|
|
|
|
if (tmp) {
|
|
|
|
orte_gpr_replica_globals.debug = true;
|
|
|
|
} else {
|
|
|
|
orte_gpr_replica_globals.debug = false;
|
|
|
|
}
|
|
|
|
|
|
|
|
id = mca_base_param_register_int("gpr", "replica", "isolate", NULL, 0);
|
|
|
|
mca_base_param_lookup_int(id, &tmp);
|
|
|
|
if (tmp) {
|
|
|
|
orte_gpr_replica_globals.isolate = true;
|
|
|
|
} else {
|
|
|
|
orte_gpr_replica_globals.isolate = false;
|
|
|
|
}
|
2004-08-28 01:59:56 +00:00
|
|
|
|
2005-03-14 20:57:21 +00:00
|
|
|
return ORTE_SUCCESS;
|
2004-08-15 03:33:13 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
/*
|
2005-03-14 20:57:21 +00:00
|
|
|
* close function
|
2004-08-15 03:33:13 +00:00
|
|
|
*/
|
2005-03-14 20:57:21 +00:00
|
|
|
int orte_gpr_replica_close(void)
|
2004-08-15 03:33:13 +00:00
|
|
|
{
|
2005-03-14 20:57:21 +00:00
|
|
|
return ORTE_SUCCESS;
|
2004-08-15 03:33:13 +00:00
|
|
|
}
|
|
|
|
|
2005-03-14 20:57:21 +00:00
|
|
|
orte_gpr_base_module_t *orte_gpr_replica_init(bool *allow_multi_user_threads, bool *have_hidden_threads, int *priority)
|
2004-08-15 03:33:13 +00:00
|
|
|
{
|
2005-05-24 13:39:15 +00:00
|
|
|
int rc;
|
|
|
|
|
Not as bad as this all may look. Tim and I made a significant change to the way we handle the startup of the oob, the seed, etc. We have made it backwards-compatible so that mpirun2 and singleton operations remain working. We had to adjust the name server and gpr as well, plus the process_info structure.
This also includes a checkpoint update to openmpi.c and ompid.c. I have re-enabled the ompid compile.
This latter raises an important point. The trunk compiles the programs like ompid just fine under Linux. It also does just fine for OSX under the dynamic libraries. However, we are seeing errors when compiling under OSX for the static case - the linker seems to have trouble resolving some variable names, even though linker diagnostics show the variables as being defined. Thus, a warning to Mac users that you may have to locally turn things off if you are trying to do static compiles. We ask, however, that you don't commit those changes that turn things off for everyone else - instead, let's try to figure out why the static compile is having a problem, and let everyone else continue to work.
Thanks
Ralph
This commit was SVN r2534.
2004-09-08 03:59:06 +00:00
|
|
|
/* If we are to host a replica, then we want to be selected, so do all the
|
2004-08-15 03:33:13 +00:00
|
|
|
setup and return the module */
|
|
|
|
|
2005-05-05 19:14:51 +00:00
|
|
|
if (NULL == orte_process_info.gpr_replica_uri) {
|
2005-03-14 20:57:21 +00:00
|
|
|
|
2005-06-24 16:59:37 +00:00
|
|
|
/* Return a module (choose an arbitrary, positive priority --
|
|
|
|
it's only relevant compared to other ns components). If
|
|
|
|
we're not the seed, then we don't want to be selected, so
|
|
|
|
return NULL. */
|
|
|
|
|
|
|
|
*priority = 50;
|
|
|
|
|
|
|
|
/* We allow multi user threads but don't have any hidden threads */
|
|
|
|
|
|
|
|
*allow_multi_user_threads = true;
|
|
|
|
*have_hidden_threads = false;
|
|
|
|
|
|
|
|
/* setup the thread locks and condition variables */
|
2005-07-03 22:45:48 +00:00
|
|
|
OBJ_CONSTRUCT(&orte_gpr_replica_globals.mutex, opal_mutex_t);
|
2005-06-24 16:59:37 +00:00
|
|
|
|
|
|
|
/* initialize the registry head */
|
|
|
|
if (ORTE_SUCCESS != (rc = orte_pointer_array_init(&(orte_gpr_replica.segments),
|
2005-07-18 18:49:00 +00:00
|
|
|
orte_gpr_array_block_size,
|
|
|
|
orte_gpr_array_max_size,
|
|
|
|
orte_gpr_array_block_size))) {
|
2005-06-24 16:59:37 +00:00
|
|
|
ORTE_ERROR_LOG(rc);
|
|
|
|
return NULL;
|
|
|
|
}
|
|
|
|
orte_gpr_replica.num_segs = 0;
|
2005-03-14 20:57:21 +00:00
|
|
|
|
2005-06-24 16:59:37 +00:00
|
|
|
if (ORTE_SUCCESS != (rc = orte_pointer_array_init(&(orte_gpr_replica.triggers),
|
2005-07-18 18:49:00 +00:00
|
|
|
orte_gpr_array_block_size,
|
|
|
|
orte_gpr_array_max_size,
|
|
|
|
orte_gpr_array_block_size))) {
|
2005-06-24 16:59:37 +00:00
|
|
|
ORTE_ERROR_LOG(rc);
|
|
|
|
return NULL;
|
|
|
|
}
|
|
|
|
orte_gpr_replica.num_trigs = 0;
|
2005-03-14 20:57:21 +00:00
|
|
|
|
2005-06-24 16:59:37 +00:00
|
|
|
if (ORTE_SUCCESS != (rc = orte_pointer_array_init(&(orte_gpr_replica.subscriptions),
|
2005-07-18 18:49:00 +00:00
|
|
|
orte_gpr_array_block_size,
|
|
|
|
orte_gpr_array_max_size,
|
|
|
|
orte_gpr_array_block_size))) {
|
2005-06-24 16:59:37 +00:00
|
|
|
ORTE_ERROR_LOG(rc);
|
|
|
|
return NULL;
|
|
|
|
}
|
|
|
|
orte_gpr_replica.num_subs = 0;
|
2005-03-14 20:57:21 +00:00
|
|
|
|
2005-06-24 16:59:37 +00:00
|
|
|
/* initialize the callback list head */
|
2005-07-03 16:22:16 +00:00
|
|
|
OBJ_CONSTRUCT(&orte_gpr_replica.callbacks, opal_list_t);
|
2005-06-24 16:59:37 +00:00
|
|
|
orte_gpr_replica.processing_callbacks = false;
|
|
|
|
|
|
|
|
/* initialize the local subscription and trigger trackers */
|
|
|
|
if (ORTE_SUCCESS != (rc = orte_pointer_array_init(
|
|
|
|
&(orte_gpr_replica_globals.local_subscriptions),
|
2005-07-18 18:49:00 +00:00
|
|
|
orte_gpr_array_block_size,
|
|
|
|
orte_gpr_array_max_size,
|
|
|
|
orte_gpr_array_block_size))) {
|
2005-06-24 16:59:37 +00:00
|
|
|
ORTE_ERROR_LOG(rc);
|
|
|
|
return NULL;
|
|
|
|
}
|
|
|
|
orte_gpr_replica_globals.num_local_subs = 0;
|
2005-07-18 18:49:00 +00:00
|
|
|
|
|
|
|
if (ORTE_SUCCESS != (rc = orte_pointer_array_init(
|
|
|
|
&(orte_gpr_replica_globals.local_triggers),
|
|
|
|
orte_gpr_array_block_size,
|
|
|
|
orte_gpr_array_max_size,
|
|
|
|
orte_gpr_array_block_size))) {
|
|
|
|
ORTE_ERROR_LOG(rc);
|
|
|
|
return NULL;
|
|
|
|
}
|
|
|
|
orte_gpr_replica_globals.num_local_trigs = 0;
|
2005-03-14 20:57:21 +00:00
|
|
|
|
|
|
|
/* initialize the search arrays for temporarily storing search results */
|
2005-06-24 16:59:37 +00:00
|
|
|
if (ORTE_SUCCESS != (rc = orte_pointer_array_init(&(orte_gpr_replica_globals.sub_ptrs),
|
2005-07-18 18:49:00 +00:00
|
|
|
100, orte_gpr_array_max_size, 100))) {
|
2005-06-24 16:59:37 +00:00
|
|
|
ORTE_ERROR_LOG(rc);
|
|
|
|
return NULL;
|
|
|
|
}
|
|
|
|
|
2005-05-24 13:39:15 +00:00
|
|
|
if (ORTE_SUCCESS != (rc = orte_pointer_array_init(&(orte_gpr_replica_globals.srch_cptr),
|
2005-07-18 18:49:00 +00:00
|
|
|
100, orte_gpr_array_max_size, 100))) {
|
2005-05-24 13:39:15 +00:00
|
|
|
ORTE_ERROR_LOG(rc);
|
|
|
|
return NULL;
|
|
|
|
}
|
2005-06-24 16:59:37 +00:00
|
|
|
orte_gpr_replica_globals.num_srch_cptr = 0;
|
|
|
|
|
2005-07-16 23:08:15 +00:00
|
|
|
if (ORTE_SUCCESS != (rc = orte_pointer_array_init(&(orte_gpr_replica_globals.overwritten),
|
2005-07-18 18:49:00 +00:00
|
|
|
20, orte_gpr_array_max_size, 20))) {
|
2005-07-16 23:08:15 +00:00
|
|
|
ORTE_ERROR_LOG(rc);
|
|
|
|
return NULL;
|
|
|
|
}
|
|
|
|
orte_gpr_replica_globals.num_overwritten = 0;
|
|
|
|
|
2005-05-24 13:39:15 +00:00
|
|
|
if (ORTE_SUCCESS != (rc = orte_pointer_array_init(&(orte_gpr_replica_globals.srch_ival),
|
2005-07-18 18:49:00 +00:00
|
|
|
100, orte_gpr_array_max_size, 100))) {
|
2005-05-24 13:39:15 +00:00
|
|
|
ORTE_ERROR_LOG(rc);
|
2005-03-14 20:57:21 +00:00
|
|
|
return NULL;
|
|
|
|
}
|
2005-06-24 16:59:37 +00:00
|
|
|
orte_gpr_replica_globals.num_srch_ival = 0;
|
|
|
|
|
2005-06-08 19:40:38 +00:00
|
|
|
if (ORTE_SUCCESS != (rc = orte_pointer_array_init(&(orte_gpr_replica_globals.acted_upon),
|
2005-07-18 18:49:00 +00:00
|
|
|
100, orte_gpr_array_max_size, 100))) {
|
2005-06-08 19:40:38 +00:00
|
|
|
ORTE_ERROR_LOG(rc);
|
|
|
|
return NULL;
|
|
|
|
}
|
2005-06-24 16:59:37 +00:00
|
|
|
orte_gpr_replica_globals.num_acted_upon = 0;
|
2005-05-24 13:39:15 +00:00
|
|
|
|
2005-06-08 19:40:38 +00:00
|
|
|
if (ORTE_SUCCESS != (rc = orte_bitmap_init(&(orte_gpr_replica_globals.srch_itag), 64))) {
|
2005-05-24 13:39:15 +00:00
|
|
|
ORTE_ERROR_LOG(rc);
|
2005-03-14 20:57:21 +00:00
|
|
|
return NULL;
|
|
|
|
}
|
|
|
|
|
|
|
|
if (orte_gpr_replica_globals.debug) {
|
2005-07-03 23:31:27 +00:00
|
|
|
opal_output(0, "nb receive setup");
|
2005-03-14 20:57:21 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
/* Return the module */
|
|
|
|
|
|
|
|
initialized = true;
|
|
|
|
return &orte_gpr_replica_module;
|
|
|
|
} else {
|
|
|
|
return NULL;
|
|
|
|
}
|
|
|
|
}
|
2004-08-19 15:14:29 +00:00
|
|
|
|
2004-08-15 03:33:13 +00:00
|
|
|
|
2005-03-14 20:57:21 +00:00
|
|
|
int orte_gpr_replica_module_init(void)
|
|
|
|
{
|
|
|
|
/* issue the non-blocking receive */
|
|
|
|
if (!orte_gpr_replica_globals.isolate) {
|
2005-03-24 15:45:44 +00:00
|
|
|
int rc = orte_rml.recv_buffer_nb(ORTE_RML_NAME_ANY, ORTE_RML_TAG_GPR, 0, orte_gpr_replica_recv, NULL);
|
|
|
|
if(rc < 0) {
|
|
|
|
ORTE_ERROR_LOG(rc);
|
|
|
|
return rc;
|
|
|
|
}
|
2004-08-15 03:33:13 +00:00
|
|
|
}
|
2005-03-14 20:57:21 +00:00
|
|
|
return ORTE_SUCCESS;
|
2004-08-15 03:33:13 +00:00
|
|
|
}
|
2005-03-14 20:57:21 +00:00
|
|
|
|
2004-08-15 03:33:13 +00:00
|
|
|
|
|
|
|
/*
|
|
|
|
* finalize routine
|
|
|
|
*/
|
2005-03-14 20:57:21 +00:00
|
|
|
int orte_gpr_replica_finalize(void)
|
2004-08-15 03:33:13 +00:00
|
|
|
{
|
2005-05-01 00:53:00 +00:00
|
|
|
size_t i, j;
|
2005-03-14 20:57:21 +00:00
|
|
|
orte_gpr_replica_segment_t** seg;
|
2005-06-24 16:59:37 +00:00
|
|
|
orte_gpr_replica_trigger_t** trig;
|
2005-03-14 20:57:21 +00:00
|
|
|
orte_gpr_replica_callbacks_t* cb;
|
|
|
|
|
|
|
|
if (orte_gpr_replica_globals.debug) {
|
2005-07-03 23:31:27 +00:00
|
|
|
opal_output(0, "finalizing gpr replica");
|
2004-09-03 13:54:34 +00:00
|
|
|
}
|
2004-08-27 15:36:53 +00:00
|
|
|
|
2005-03-14 20:57:21 +00:00
|
|
|
seg = (orte_gpr_replica_segment_t**)(orte_gpr_replica.segments)->addr;
|
2005-06-24 16:59:37 +00:00
|
|
|
for (i=0, j=0; j < orte_gpr_replica.num_segs &&
|
|
|
|
i < (orte_gpr_replica.segments)->size; i++) {
|
2005-03-14 20:57:21 +00:00
|
|
|
if (NULL != seg[i]) {
|
2005-06-24 16:59:37 +00:00
|
|
|
j++;
|
2005-03-14 20:57:21 +00:00
|
|
|
OBJ_RELEASE(seg[i]);
|
|
|
|
}
|
|
|
|
}
|
2005-03-31 21:32:12 +00:00
|
|
|
OBJ_RELEASE(orte_gpr_replica.segments);
|
2005-03-14 20:57:21 +00:00
|
|
|
|
2005-06-24 16:59:37 +00:00
|
|
|
trig = (orte_gpr_replica_trigger_t**)(orte_gpr_replica.triggers)->addr;
|
|
|
|
for (i=0, j=0; j < orte_gpr_replica.num_trigs &&
|
|
|
|
i < (orte_gpr_replica.triggers)->size; i++) {
|
2005-03-14 20:57:21 +00:00
|
|
|
if (NULL != trig[i]) {
|
2005-06-24 16:59:37 +00:00
|
|
|
j++;
|
2005-03-14 20:57:21 +00:00
|
|
|
OBJ_RELEASE(trig[i]);
|
|
|
|
}
|
|
|
|
}
|
2005-03-31 21:32:12 +00:00
|
|
|
OBJ_RELEASE(orte_gpr_replica.triggers);
|
2005-03-14 20:57:21 +00:00
|
|
|
|
2005-07-03 16:22:16 +00:00
|
|
|
while (NULL != (cb = (orte_gpr_replica_callbacks_t*)opal_list_remove_first(&orte_gpr_replica.callbacks))) {
|
2005-03-14 20:57:21 +00:00
|
|
|
OBJ_RELEASE(cb);
|
|
|
|
}
|
|
|
|
OBJ_DESTRUCT(&orte_gpr_replica.callbacks);
|
2004-09-03 13:54:34 +00:00
|
|
|
|
2004-08-15 03:33:13 +00:00
|
|
|
|
2005-03-14 20:57:21 +00:00
|
|
|
/* clean up the globals */
|
|
|
|
|
2005-03-31 21:32:12 +00:00
|
|
|
if (NULL != orte_gpr_replica_globals.srch_cptr) {
|
|
|
|
OBJ_RELEASE(orte_gpr_replica_globals.srch_cptr);
|
|
|
|
}
|
|
|
|
|
2005-07-16 23:08:15 +00:00
|
|
|
if (NULL != orte_gpr_replica_globals.overwritten) {
|
|
|
|
OBJ_RELEASE(orte_gpr_replica_globals.overwritten);
|
|
|
|
}
|
|
|
|
|
2005-03-31 21:32:12 +00:00
|
|
|
if (NULL != orte_gpr_replica_globals.srch_ival) {
|
|
|
|
OBJ_RELEASE(orte_gpr_replica_globals.srch_ival);
|
|
|
|
}
|
|
|
|
|
2005-06-08 19:40:38 +00:00
|
|
|
if (NULL != orte_gpr_replica_globals.acted_upon) {
|
|
|
|
OBJ_RELEASE(orte_gpr_replica_globals.acted_upon);
|
|
|
|
}
|
|
|
|
|
2004-08-15 03:33:13 +00:00
|
|
|
/* All done */
|
2005-03-14 20:57:21 +00:00
|
|
|
if (orte_gpr_replica_globals.isolate) {
|
|
|
|
return ORTE_SUCCESS;
|
|
|
|
}
|
|
|
|
|
|
|
|
orte_rml.recv_cancel(ORTE_RML_NAME_ANY, ORTE_RML_TAG_GPR);
|
|
|
|
return ORTE_SUCCESS;
|
2004-08-15 03:33:13 +00:00
|
|
|
}
|