From b5459e9da6541695b3e43abf6b7129b9fa5118e0 Mon Sep 17 00:00:00 2001 From: Jeff Squyres Date: Tue, 5 Apr 2005 18:18:27 +0000 Subject: [PATCH] Convert the rest of the GPR tests to use loading DSO's and function pointers instead of direct function invocations. This commit was SVN r5180. --- test/mca/gpr/Makefile.am | 9 ----- test/mca/gpr/gpr_mem_leaks.c | 49 ++++++++++++----------- test/mca/gpr/gpr_overwrite.c | 46 ++++++++++++--------- test/mca/gpr/gpr_put_get.c | 59 ++++++++++++++------------- test/mca/gpr/gpr_triggers.c | 77 ++++++++++++++++++++---------------- 5 files changed, 129 insertions(+), 111 deletions(-) diff --git a/test/mca/gpr/Makefile.am b/test/mca/gpr/Makefile.am index 3dd0f66cbf..9c9e99fa73 100644 --- a/test/mca/gpr/Makefile.am +++ b/test/mca/gpr/Makefile.am @@ -31,12 +31,6 @@ check_PROGRAMS = \ TESTS = \ $(check_PROGRAMS) -if OMPI_BUILD_gpr_replica_DSO -replica = $(top_builddir)/src/mca/gpr/replica/mca_gpr_replica.la -else -replica = $(top_builddir)/src/mca/gpr/replica/libmca_gpr_replica.la -endif - gpr_internal_fns_SOURCES = gpr_internal_fns.c gpr_internal_fns_LDADD = \ $(top_builddir)/src/libmpi.la \ @@ -58,20 +52,17 @@ gpr_overwrite_DEPENDENCIES = $(gpr_overwrite_LDADD) gpr_put_get_SOURCES = gpr_put_get.c gpr_put_get_LDADD = \ $(top_builddir)/src/libmpi.la \ - $(replica) \ $(top_builddir)/test/support/libsupport.a gpr_put_get_DEPENDENCIES = $(gpr_put_get_LDADD) gpr_threads_SOURCES = gpr_threads.c gpr_threads_LDADD = \ $(top_builddir)/src/libmpi.la \ - $(replica) \ $(top_builddir)/test/support/libsupport.a gpr_threads_DEPENDENCIES = $(gpr_threads_LDADD) gpr_triggers_SOURCES = gpr_triggers.c gpr_triggers_LDADD = \ $(top_builddir)/src/libmpi.la \ - $(replica) \ $(top_builddir)/test/support/libsupport.a gpr_triggers_DEPENDENCIES = $(gpr_triggers_LDADD) diff --git a/test/mca/gpr/gpr_mem_leaks.c b/test/mca/gpr/gpr_mem_leaks.c index ce995e83b2..2cd74948bb 100644 --- a/test/mca/gpr/gpr_mem_leaks.c +++ b/test/mca/gpr/gpr_mem_leaks.c @@ -31,6 +31,7 @@ #include "include/orte_schema.h" #include "support.h" +#include "components.h" #include "class/orte_pointer_array.h" #include "dps/dps.h" @@ -52,6 +53,11 @@ int main(int argc, char **argv) int32_t i, cnt; char *names[15], *keys[5]; orte_gpr_value_t **values, *val; + test_component_handle_t handle; + mca_gpr_base_component_t *gpr_component = NULL; + orte_gpr_base_module_t *gpr_module = NULL; + bool allow, have; + int priority; test_init("test_gpr_replica"); @@ -70,12 +76,13 @@ int main(int argc, char **argv) if (!ompi_output_init()) { return OMPI_ERROR; } - + /* - * If threads are supported - assume that we are using threads - and reset otherwise. + * If threads are supported - assume that we are using threads - + * and reset otherwise. */ ompi_set_using_threads(OMPI_HAVE_THREAD_SUPPORT); - + /* For malloc debugging */ ompi_malloc_init(); @@ -88,7 +95,6 @@ int main(int argc, char **argv) if (ORTE_SUCCESS != (rc = orte_proc_info())) { return rc; } - orte_process_info.seed = true; orte_process_info.my_name = (orte_process_name_t*)malloc(sizeof(orte_process_name_t)); @@ -104,20 +110,20 @@ int main(int argc, char **argv) exit (1); } - if (ORTE_SUCCESS == orte_gpr_base_open()) { - fprintf(test_out, "GPR started\n"); - } else { - fprintf(test_out, "GPR could not start\n"); - exit (1); + /* Open the gpr replica component and initialize a module */ + if (OMPI_SUCCESS != + test_component_open("gpr", "replica", &handle, + (mca_base_component_t**) &gpr_component) || + NULL == gpr_component) { + fprintf(test_out, "Could not open replica\n"); + exit(1); } - - if (ORTE_SUCCESS == orte_gpr_base_select()) { - fprintf(test_out, "GPR replica selected\n"); - } else { - fprintf(test_out, "GPR replica could not be selected\n"); - exit (1); + gpr_module = gpr_component->gpr_init(&allow, &have, &priority); + if (NULL == gpr_module) { + fprintf(test_out, "replica component did not return a module\n"); + exit(1); } - + if (ORTE_SUCCESS == orte_dps_open()) { fprintf(test_out, "DPS started\n"); } else { @@ -142,7 +148,7 @@ int main(int argc, char **argv) (val->keyvals[i])->type = ORTE_UINT32; (val->keyvals[i])->value.ui32 = (uint32_t)i; } - if (ORTE_SUCCESS != (rc = orte_gpr.put(1, &val))) { + if (ORTE_SUCCESS != (rc = gpr_module->put(1, &val))) { fprintf(test_out, "gpr_test: put 1 value/multiple keyval failed with error code %s\n", ORTE_ERROR_NAME(rc)); test_failure("gpr_test: put 1 value/multiple keyval failed"); @@ -152,7 +158,7 @@ int main(int argc, char **argv) fprintf(test_out, "gpr_test: put 1 value/multiple keyval passed\n"); } OBJ_RELEASE(val); - + fprintf(stderr, "do a get\n"); names[0] = strdup("dummy0"); names[1] = NULL; @@ -161,7 +167,7 @@ int main(int argc, char **argv) keys[2] = strdup("stupid-test-5"); keys[3] = strdup("stupid-test-8"); keys[4] = NULL; - if (ORTE_SUCCESS != (rc = orte_gpr.get(ORTE_GPR_KEYS_OR | ORTE_GPR_TOKENS_OR, + if (ORTE_SUCCESS != (rc = gpr_module->get(ORTE_GPR_KEYS_OR | ORTE_GPR_TOKENS_OR, "test-put-segment", names, keys, &cnt, &values))) { @@ -199,7 +205,7 @@ int main(int argc, char **argv) (val->keyvals[0])->value.strptr = strdup("try-string-value"); for (i = 0; i < 10; i++) { fprintf(stderr, "\tputting copy %d\n", i); - if (ORTE_SUCCESS != (rc = orte_gpr.put(1, &val))) { + if (ORTE_SUCCESS != (rc = gpr_module->put(1, &val))) { fprintf(test_out, "gpr_test: put multiple copies of one keyval in a container failed with error code %s\n", ORTE_ERROR_NAME(rc)); test_failure("gpr_test: put multiple copies of one keyval in a container failed"); @@ -211,10 +217,9 @@ int main(int argc, char **argv) fprintf(stderr, "generate a trigger event\n"); - fprintf(stderr, "now finalize and see if all memory cleared\n"); + test_component_close(&handle); orte_dps_close(); - orte_gpr_base_close(); orte_sys_info_finalize(); orte_proc_info_finalize(); mca_base_close(); diff --git a/test/mca/gpr/gpr_overwrite.c b/test/mca/gpr/gpr_overwrite.c index 973b8ba285..62ecfcdfd8 100644 --- a/test/mca/gpr/gpr_overwrite.c +++ b/test/mca/gpr/gpr_overwrite.c @@ -23,6 +23,7 @@ #include #include "support.h" +#include "components.h" #include "util/proc_info.h" #include "util/sys_info.h" @@ -40,6 +41,9 @@ /* output files needed by the test */ static FILE *test_out=NULL; +/* GPR module used by this test */ +static orte_gpr_base_module_t *gpr_module = NULL; + /** * Struct for holding information */ @@ -122,6 +126,10 @@ int main(int argc, char **argv) ompi_list_t nodes; test_node_t *node; int i, rc; + test_component_handle_t handle; + mca_gpr_base_component_t *gpr_component = NULL; + bool allow, have; + int priority; /* test_out = fopen( "test_gpr_replica_out", "w+" ); */ test_out = stderr; @@ -138,12 +146,13 @@ int main(int argc, char **argv) if (!ompi_output_init()) { return OMPI_ERROR; } - + /* - * If threads are supported - assume that we are using threads - and reset otherwise. + * If threads are supported - assume that we are using threads - + * and reset otherwise. */ ompi_set_using_threads(OMPI_HAVE_THREAD_SUPPORT); - + /* For malloc debugging */ ompi_malloc_init(); @@ -157,7 +166,6 @@ int main(int argc, char **argv) return rc; } - orte_process_info.seed = true; orte_process_info.my_name = (orte_process_name_t*)malloc(sizeof(orte_process_name_t)); orte_process_info.my_name->cellid = 0; @@ -172,18 +180,18 @@ int main(int argc, char **argv) exit (1); } - if (ORTE_SUCCESS == orte_gpr_base_open()) { - fprintf(test_out, "GPR started\n"); - } else { - fprintf(test_out, "GPR could not start\n"); - exit (1); + /* Open the gpr replica component and initialize a module */ + if (OMPI_SUCCESS != + test_component_open("gpr", "replica", &handle, + (mca_base_component_t**) &gpr_component) || + NULL == gpr_component) { + fprintf(test_out, "Could not open replica\n"); + exit(1); } - - if (ORTE_SUCCESS == orte_gpr_base_select()) { - fprintf(test_out, "GPR replica selected\n"); - } else { - fprintf(test_out, "GPR replica could not be selected\n"); - exit (1); + gpr_module = gpr_component->gpr_init(&allow, &have, &priority); + if (NULL == gpr_module) { + fprintf(test_out, "replica component did not return a module\n"); + exit(1); } if (ORTE_SUCCESS == orte_dps_open()) { @@ -217,7 +225,7 @@ int main(int argc, char **argv) fprintf(test_out, "initial put of values successful\n"); } - orte_gpr.dump_all(0); + gpr_module->dump_all(0); fprintf(test_out, "changing values for overwrite test\n"); /* change the arch, state, and slots_inuse values */ @@ -240,15 +248,15 @@ int main(int argc, char **argv) fprintf(test_out, "second put of values successful\n"); } - orte_gpr.dump_all(0); + gpr_module->dump_all(0); fprintf(stderr, "now finalize and see if all memory cleared\n"); while (NULL != (node = (test_node_t*)ompi_list_remove_first(&nodes))) { OBJ_RELEASE(node); } OBJ_DESTRUCT(&nodes); + test_component_close(&handle); orte_dps_close(); - orte_gpr_base_close(); orte_sys_info_finalize(); orte_proc_info_finalize(); mca_base_close(); @@ -371,7 +379,7 @@ int test_overwrite(ompi_list_t* nodes) } /* try the insert */ - rc = orte_gpr.put(num_values, values); + rc = gpr_module->put(num_values, values); for (j=0; j < num_values; j++) { OBJ_RELEASE(values[j]); diff --git a/test/mca/gpr/gpr_put_get.c b/test/mca/gpr/gpr_put_get.c index 99aa0563b5..82eb762dda 100644 --- a/test/mca/gpr/gpr_put_get.c +++ b/test/mca/gpr/gpr_put_get.c @@ -34,6 +34,7 @@ #include "include/orte_schema.h" #include "support.h" +#include "components.h" #include "class/orte_pointer_array.h" #include "dps/dps.h" @@ -59,6 +60,11 @@ int main(int argc, char **argv) char *names[15], *keys[5]; orte_gpr_keyval_t **kvals; orte_gpr_value_t **values, *val; + test_component_handle_t handle; + mca_gpr_base_component_t *gpr_component = NULL; + orte_gpr_base_module_t *gpr_module = NULL; + bool allow, have; + int priority; test_init("test_gpr_replica"); @@ -80,12 +86,13 @@ int main(int argc, char **argv) if (!ompi_output_init()) { return OMPI_ERROR; } - + /* - * If threads are supported - assume that we are using threads - and reset otherwise. + * If threads are supported - assume that we are using threads - + * and reset otherwise. */ ompi_set_using_threads(OMPI_HAVE_THREAD_SUPPORT); - + /* For malloc debugging */ ompi_malloc_init(); @@ -98,7 +105,6 @@ int main(int argc, char **argv) if (ORTE_SUCCESS != (rc = orte_proc_info())) { return rc; } - orte_process_info.seed = true; orte_process_info.my_name = (orte_process_name_t*)malloc(sizeof(orte_process_name_t)); @@ -114,18 +120,18 @@ int main(int argc, char **argv) exit (1); } - if (ORTE_SUCCESS == orte_gpr_base_open()) { - fprintf(test_out, "GPR started\n"); - } else { - fprintf(test_out, "GPR could not start\n"); - exit (1); + /* Open the gpr replica component and initialize a module */ + if (OMPI_SUCCESS != + test_component_open("gpr", "replica", &handle, + (mca_base_component_t**) &gpr_component) || + NULL == gpr_component) { + fprintf(test_out, "Could not open replica\n"); + exit(1); } - - if (ORTE_SUCCESS == orte_gpr_base_select()) { - fprintf(test_out, "GPR replica selected\n"); - } else { - fprintf(test_out, "GPR replica could not be selected\n"); - exit (1); + gpr_module = gpr_component->gpr_init(&allow, &have, &priority); + if (NULL == gpr_module) { + fprintf(test_out, "replica component did not return a module\n"); + exit(1); } if (ORTE_SUCCESS == orte_dps_open()) { @@ -150,7 +156,7 @@ int main(int argc, char **argv) (val->keyvals[0])->key = strdup("stupid-value-next-one"); (val->keyvals[0])->type = ORTE_INT32; (val->keyvals[0])->value.i32 = 654321; - if (ORTE_SUCCESS != (rc = orte_gpr_replica_put(1, &val))) { + if (ORTE_SUCCESS != (rc = gpr_module->put(1, &val))) { fprintf(test_out, "gpr_test: put of 1 value/1 keyval failed with error code %s\n", ORTE_ERROR_NAME(rc)); test_failure("gpr_test: put of 1 value/1 keyval failed"); @@ -178,7 +184,7 @@ int main(int argc, char **argv) (val->keyvals[i])->type = ORTE_UINT32; (val->keyvals[i])->value.ui32 = (uint32_t)i; } - if (ORTE_SUCCESS != (rc = orte_gpr_replica_put(1, &val))) { + if (ORTE_SUCCESS != (rc = gpr_module->put(1, &val))) { fprintf(test_out, "gpr_test: put 1 value/multiple keyval failed with error code %s\n", ORTE_ERROR_NAME(rc)); test_failure("gpr_test: put 1 value/multiple keyval failed"); @@ -206,7 +212,7 @@ int main(int argc, char **argv) (val->keyvals[i])->type = ORTE_UINT32; (val->keyvals[i])->value.ui32 = (uint32_t)i; } - if (ORTE_SUCCESS != (rc = orte_gpr_replica_put(1, &val))) { + if (ORTE_SUCCESS != (rc = gpr_module->put(1, &val))) { fprintf(test_out, "gpr_test: put 1 value/multiple keyval in second container failed with error code %s\n", ORTE_ERROR_NAME(rc)); test_failure("gpr_test: put 1 value/multiple keyval in second container failed"); @@ -218,7 +224,7 @@ int main(int argc, char **argv) OBJ_RELEASE(val); fprintf(stderr, "dump\n"); - if (ORTE_SUCCESS != (rc = orte_gpr.dump_all(0))) { + if (ORTE_SUCCESS != (rc = gpr_module->dump_all(0))) { fprintf(test_out, "gpr_test: dump failed with error code %s\n", ORTE_ERROR_NAME(rc)); test_failure("gpr_test: dump failed"); @@ -233,7 +239,7 @@ int main(int argc, char **argv) names[1] = NULL; keys[0] = strdup("stupid-test-1"); keys[1] = NULL; - if (ORTE_SUCCESS != (rc = orte_gpr_replica_get(ORTE_GPR_KEYS_OR | ORTE_GPR_TOKENS_OR, + if (ORTE_SUCCESS != (rc = gpr_module->get(ORTE_GPR_KEYS_OR | ORTE_GPR_TOKENS_OR, "test-put-segment", names, keys, &cnt, &values))) { @@ -269,7 +275,7 @@ int main(int argc, char **argv) keys[2] = strdup("stupid-test-5"); keys[3] = strdup("stupid-test-8"); keys[4] = NULL; - if (ORTE_SUCCESS != (rc = orte_gpr_replica_get(ORTE_GPR_KEYS_OR | ORTE_GPR_TOKENS_OR, + if (ORTE_SUCCESS != (rc = gpr_module->get(ORTE_GPR_KEYS_OR | ORTE_GPR_TOKENS_OR, "test-put-segment", names, keys, &cnt, &values))) { @@ -317,7 +323,7 @@ int main(int argc, char **argv) (val->keyvals[0])->value.strptr = strdup("try-string-value"); for (i = 0; i < 10; i++) { fprintf(stderr, "\tputting copy %d\n", i); - if (ORTE_SUCCESS != (rc = orte_gpr_replica_put(1, &val))) { + if (ORTE_SUCCESS != (rc = gpr_module->put(1, &val))) { fprintf(test_out, "gpr_test: put multiple copies of one keyval in a container failed with error code %s\n", ORTE_ERROR_NAME(rc)); test_failure("gpr_test: put multiple copies of one keyval in a container failed"); @@ -327,7 +333,7 @@ int main(int argc, char **argv) } OBJ_RELEASE(val); - orte_gpr.dump_all(0); + gpr_module->dump_all(0); fprintf(stderr, "put with no tokens puts in every container\n"); val = OBJ_NEW(orte_gpr_value_t); @@ -341,7 +347,7 @@ int main(int argc, char **argv) (val->keyvals[0])->key = strdup("stupid-value-next-one"); (val->keyvals[0])->type = ORTE_STRING; (val->keyvals[0])->value.strptr = strdup("try-string-value"); - if (ORTE_SUCCESS != (rc = orte_gpr_replica_put(1, &val))) { + if (ORTE_SUCCESS != (rc = gpr_module->put(1, &val))) { fprintf(test_out, "gpr_test: put with no tokens failed - returned %s\n", ORTE_ERROR_NAME(rc)); test_failure("gpr_test: put with no tokens failed"); @@ -351,12 +357,11 @@ int main(int argc, char **argv) } OBJ_RELEASE(val); - orte_gpr.dump_all(0); - + gpr_module->dump_all(0); fprintf(stderr, "now finalize and see if all memory cleared\n"); + test_component_close(&handle); orte_dps_close(); - orte_gpr_base_close(); orte_sys_info_finalize(); orte_proc_info_finalize(); mca_base_close(); diff --git a/test/mca/gpr/gpr_triggers.c b/test/mca/gpr/gpr_triggers.c index 4cc8f19faf..2eee6bd665 100644 --- a/test/mca/gpr/gpr_triggers.c +++ b/test/mca/gpr/gpr_triggers.c @@ -33,6 +33,7 @@ #include "include/orte_constants.h" #include "support.h" +#include "components.h" #include "class/orte_pointer_array.h" #include "dps/dps.h" @@ -53,6 +54,9 @@ /* output files needed by the test */ static FILE *test_out=NULL; +/* GPR module under test */ +static orte_gpr_base_module_t *gpr_module = NULL; + static char *cmd_str="diff ./test_gpr_replica_out ./test_gpr_replica_out_std"; static void test_cbfunc1(orte_gpr_notify_data_t *data, void *user_tag); @@ -69,6 +73,10 @@ static int test2(void); int main(int argc, char **argv) { int rc=0; + test_component_handle_t handle; + mca_gpr_base_component_t *gpr_component = NULL; + bool allow, have; + int priority; test_init("test_gpr_replica_trigs"); @@ -90,12 +98,13 @@ int main(int argc, char **argv) if (!ompi_output_init()) { exit(1); } - + /* - * If threads are supported - assume that we are using threads - and reset otherwise. + * If threads are supported - assume that we are using threads - + * and reset otherwise. */ ompi_set_using_threads(OMPI_HAVE_THREAD_SUPPORT); - + /* For malloc debugging */ ompi_malloc_init(); @@ -119,18 +128,18 @@ int main(int argc, char **argv) exit (1); } - if (ORTE_SUCCESS == orte_gpr_base_open()) { - fprintf(test_out, "GPR started\n"); - } else { - fprintf(test_out, "GPR could not start\n"); - exit (1); + /* Open the gpr replica component and initialize a module */ + if (OMPI_SUCCESS != + test_component_open("gpr", "replica", &handle, + (mca_base_component_t**) &gpr_component) || + NULL == gpr_component) { + fprintf(test_out, "Could not open replica\n"); + exit(1); } - - if (ORTE_SUCCESS == orte_gpr_base_select()) { - fprintf(test_out, "GPR replica selected\n"); - } else { - fprintf(test_out, "GPR replica could not be selected\n"); - exit (1); + gpr_module = gpr_component->gpr_init(&allow, &have, &priority); + if (NULL == gpr_module) { + fprintf(test_out, "replica component did not return a module\n"); + exit(1); } if (ORTE_SUCCESS == orte_dps_open()) { @@ -241,7 +250,7 @@ static int test1(void) fprintf(test_out, "putting counters on registry\n"); /* put the counters on the registry */ - if (ORTE_SUCCESS != (rc = orte_gpr.put(1, &values))) { + if (ORTE_SUCCESS != (rc = gpr_module->put(1, &values))) { ORTE_ERROR_LOG(rc); OBJ_DESTRUCT(&value); return rc; @@ -278,7 +287,7 @@ static int test1(void) } values = &value; - if (ORTE_SUCCESS != (rc = orte_gpr.put(1, &values))) { + if (ORTE_SUCCESS != (rc = gpr_module->put(1, &values))) { ORTE_ERROR_LOG(rc); OBJ_DESTRUCT(&value); return rc; @@ -312,7 +321,7 @@ static int test1(void) (value.keyvals[2])->value.i32 = 2348; values = &value; - if (ORTE_SUCCESS != (rc = orte_gpr.put(1, &values))) { + if (ORTE_SUCCESS != (rc = gpr_module->put(1, &values))) { ORTE_ERROR_LOG(rc); OBJ_DESTRUCT(&value); return rc; @@ -407,20 +416,20 @@ static int test1(void) trigs = &trig; /* enter things as three different subscriptions */ - rc = orte_gpr.subscribe( + rc = gpr_module->subscribe( ORTE_GPR_TRIG_CMP_LEVELS | ORTE_GPR_TRIG_MONITOR_ONLY, 2, subscriptions, 1, &trigs, sub); - rc = orte_gpr.subscribe( + rc = gpr_module->subscribe( ORTE_GPR_TRIG_CMP_LEVELS | ORTE_GPR_TRIG_MONITOR_ONLY, 2, &(subscriptions[2]), 1, &trigs, sub); - rc = orte_gpr.subscribe( + rc = gpr_module->subscribe( ORTE_GPR_TRIG_CMP_LEVELS | ORTE_GPR_TRIG_MONITOR_ONLY, 1, &(subscriptions[4]), 1, &trigs, @@ -435,7 +444,7 @@ static int test1(void) } } - orte_gpr.dump_triggers(0); + gpr_module->dump_triggers(0); return ORTE_SUCCESS; fprintf(test_out, "incrementing until trigger\n"); @@ -469,14 +478,14 @@ static int test1(void) for (i=0; i < 10; i++) { fprintf(test_out, "\tincrement %s\n", keys[1]); - if (ORTE_SUCCESS != (rc = orte_gpr.increment_value(&value))) { + if (ORTE_SUCCESS != (rc = gpr_module->increment_value(&value))) { ORTE_ERROR_LOG(rc); OBJ_DESTRUCT(&value); return rc; } } - orte_gpr.dump_all(0); + gpr_module->dump_all(0); OBJ_DESTRUCT(&value); return ORTE_SUCCESS; @@ -525,7 +534,7 @@ int test2(void) fprintf(test_out, "putting level test counter on registry\n"); /* put the counters on the registry */ - if (ORTE_SUCCESS != (rc = orte_gpr.put(1, &values))) { + if (ORTE_SUCCESS != (rc = gpr_module->put(1, &values))) { ORTE_ERROR_LOG(rc); OBJ_DESTRUCT(&value); return rc; @@ -579,13 +588,13 @@ int test2(void) trigs = &trig; /* enter subscription */ - rc = orte_gpr.subscribe( + rc = gpr_module->subscribe( ORTE_GPR_TRIG_AT_LEVEL | ORTE_GPR_TRIG_MONITOR_ONLY, 1, &subscription, 1, &trigs, &sub); - orte_gpr.dump_triggers(0); + gpr_module->dump_triggers(0); /* cleanup */ OBJ_RELEASE(subscription); @@ -622,14 +631,14 @@ int test2(void) for (i=0; i < 10; i++) { fprintf(test_out, "\tincrement level-counter\n"); - if (ORTE_SUCCESS != (rc = orte_gpr.increment_value(&value))) { + if (ORTE_SUCCESS != (rc = gpr_module->increment_value(&value))) { ORTE_ERROR_LOG(rc); OBJ_DESTRUCT(&value); return rc; } } - orte_gpr.dump_all(0); + gpr_module->dump_all(0); OBJ_DESTRUCT(&value); return ORTE_SUCCESS; @@ -640,40 +649,40 @@ void test_cbfunc1(orte_gpr_notify_data_t *data, void *tag) { fprintf(test_out, "\n\n\nTRIGGER FIRED AND RECEIVED AT CALLBACK 1\n"); - orte_gpr.dump_notify_data(data, 0); + gpr_module->dump_notify_data(data, 0); } void test_cbfunc2(orte_gpr_notify_data_t *data, void *tag) { fprintf(test_out, "\n\n\nTRIGGER FIRED AND RECEIVED AT CALLBACK 2\n"); - orte_gpr.dump_notify_data(data, 0); + gpr_module->dump_notify_data(data, 0); } void test_cbfunc3(orte_gpr_notify_data_t *data, void *tag) { fprintf(test_out, "\n\n\nTRIGGER FIRED AND RECEIVED AT CALLBACK 3\n"); - orte_gpr.dump_notify_data(data, 0); + gpr_module->dump_notify_data(data, 0); } void test_cbfunc4(orte_gpr_notify_data_t *data, void *tag) { fprintf(test_out, "\n\n\nTRIGGER FIRED AND RECEIVED AT CALLBACK 4\n"); - orte_gpr.dump_notify_data(data, 0); + gpr_module->dump_notify_data(data, 0); } void test_cbfunc5(orte_gpr_notify_data_t *data, void *tag) { fprintf(test_out, "\n\n\nTRIGGER FIRED AND RECEIVED AT CALLBACK 5\n"); - orte_gpr.dump_notify_data(data, 0); + gpr_module->dump_notify_data(data, 0); } void test_cbfunc6(orte_gpr_notify_data_t *data, void *tag) { fprintf(test_out, "\n\n\nTRIGGER FIRED AND RECEIVED AT CALLBACK 6\n"); - orte_gpr.dump_notify_data(data, 0); + gpr_module->dump_notify_data(data, 0); }