From 17315bf3602e26fe5f9b95a3320bee9b60c7b911 Mon Sep 17 00:00:00 2001 From: Nathan Hjelm Date: Wed, 27 Mar 2013 21:17:53 +0000 Subject: [PATCH] Now that the entire codebase has been updated to use the MCA framework system remove the last calls to the MCA parameter system. This commit was SVN r28242. --- ompi/runtime/ompi_mpi_init.c | 16 ++++------------ opal/runtime/opal_init.c | 5 +++++ orte/mca/ess/base/ess_base_std_orted.c | 19 +++++++++---------- 3 files changed, 18 insertions(+), 22 deletions(-) diff --git a/ompi/runtime/ompi_mpi_init.c b/ompi/runtime/ompi_mpi_init.c index 7b27dc2e9b..5c555642ec 100644 --- a/ompi/runtime/ompi_mpi_init.c +++ b/ompi/runtime/ompi_mpi_init.c @@ -342,7 +342,6 @@ int ompi_mpi_init(int argc, char **argv, int requested, int *provided) size_t nprocs; char *error = NULL; struct timeval ompistart, ompistop; - char *event_val = NULL; bool rte_setup = false; ompi_rte_collective_t *coll; char *cmd=NULL, *av=NULL; @@ -381,10 +380,10 @@ int ompi_mpi_init(int argc, char **argv, int requested, int *provided) select/poll -- but we know that MPI processes won't be using pty's with the event engine, so it's ok to relax this constraint and let any fd-monitoring mechanism be used. */ - ret = mca_base_param_reg_string_name("opal", "event_include", - "Internal opal MCA param: tell opal_init() to use a specific mechanism in libevent", - false, false, "all", &event_val); + + ret = mca_base_var_find("opal", "event", "*", "event_include"); if (ret >= 0) { + char *allvalue = "all"; /* We have to explicitly "set" the MCA param value here because libevent initialization will re-register the MCA param and therefore override the default. Setting the value @@ -397,14 +396,7 @@ int ompi_mpi_init(int argc, char **argv, int requested, int *provided) environment variable, just so that it won't be inherited by any spawned processes and potentially cause unintented side-effects with launching RTE tools... */ - if (0 == strcmp("all", event_val)) { - mca_base_param_set_string(ret, "all"); - } - } - - if( NULL != event_val ) { - free(event_val); - event_val = NULL; + mca_base_var_set_value(ret, allvalue, 4, MCA_BASE_VAR_SOURCE_DEFAULT, NULL); } if (ompi_enable_timing && 0 == OMPI_PROC_MY_NAME->vpid) { diff --git a/opal/runtime/opal_init.c b/opal/runtime/opal_init.c index d3ff4fdb18..cb32866c4b 100644 --- a/opal/runtime/opal_init.c +++ b/opal/runtime/opal_init.c @@ -326,6 +326,11 @@ opal_init_util(int* pargc, char*** pargv) goto return_error; } + if (OPAL_SUCCESS != (ret = mca_base_framework_register(&opal_event_base_framework, 0))) { + error = "opal_event_register"; + goto return_error; + } + return OPAL_SUCCESS; return_error: diff --git a/orte/mca/ess/base/ess_base_std_orted.c b/orte/mca/ess/base/ess_base_std_orted.c index 85106c8ff2..ea8d134246 100644 --- a/orte/mca/ess/base/ess_base_std_orted.c +++ b/orte/mca/ess/base/ess_base_std_orted.c @@ -103,11 +103,13 @@ int orte_ess_base_orted_setup(char **hosts) char log_file[PATH_MAX]; char *jobidstring; char *error = NULL; - char *plm_to_use; orte_job_t *jdata; orte_proc_t *proc; orte_app_context_t *app; orte_node_t *node; + char *param; + + plm_in_use = false; /* setup callback for SIGPIPE */ setup_sighandler(SIGPIPE, &epipe_handler, epipe_signal_callback); @@ -211,16 +213,13 @@ int orte_ess_base_orted_setup(char **hosts) * open and select something -only- if we are given * a specific module to use */ - mca_base_param_reg_string_name("plm", NULL, - "Which plm component to use (empty = none)", - false, false, - NULL, &plm_to_use); + (void) mca_base_var_env_name("plm", ¶m); - if (NULL == plm_to_use) { - plm_in_use = false; - } else { - plm_in_use = true; - + plm_in_use = !!(getenv(param)); + free (param); + + if (plm_in_use) { + if (ORTE_SUCCESS != (ret = mca_base_framework_open(&orte_plm_base_framework, 0))) { ORTE_ERROR_LOG(ret); error = "orte_plm_base_open";