Skip to content
Browse files

Now that the entire codebase has been updated to use the MCA framework

system remove the last calls to the MCA parameter system.
  • Loading branch information...
1 parent 6450f9a commit ac96dfaa08f1119ba17e55ad7ef35b0448801033 @hjelmn committed Mar 7, 2013
Showing with 19 additions and 23 deletions.
  1. +4 −12 ompi/runtime/ompi_mpi_init.c
  2. +5 −0 opal/runtime/opal_init.c
  3. +10 −11 orte/mca/ess/base/ess_base_std_orted.c
View
16 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) {
View
5 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:
View
21 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);
-
- if (NULL == plm_to_use) {
- plm_in_use = false;
- } else {
- plm_in_use = true;
-
+ (void) mca_base_var_env_name("plm", &param);
+
+ 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";

0 comments on commit ac96dfa

Please sign in to comment.
Something went wrong with that request. Please try again.