Skip to content

Commit

Permalink
Now that the entire codebase has been updated to use the MCA framework
Browse files Browse the repository at this point in the history
system remove the last calls to the MCA parameter system.
  • Loading branch information
hjelmn committed Mar 20, 2013
1 parent 6450f9a commit ac96dfa
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 23 deletions.
16 changes: 4 additions & 12 deletions ompi/runtime/ompi_mpi_init.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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
Expand All @@ -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) {
Expand Down
5 changes: 5 additions & 0 deletions opal/runtime/opal_init.c
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
21 changes: 10 additions & 11 deletions orte/mca/ess/base/ess_base_std_orted.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down Expand Up @@ -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";
Expand Down

0 comments on commit ac96dfa

Please sign in to comment.