diff --git a/orte/mca/ess/base/ess_base_std_orted.c b/orte/mca/ess/base/ess_base_std_orted.c index 859fbe8a0c..a4cd60a9a4 100644 --- a/orte/mca/ess/base/ess_base_std_orted.c +++ b/orte/mca/ess/base/ess_base_std_orted.c @@ -58,24 +58,39 @@ #include "orte/mca/ess/base/base.h" +static bool plm_in_use; + int orte_ess_base_orted_setup(void) { int ret; char *error = NULL; + char *plm_to_use; /* some environments allow remote launches - e.g., ssh - so - * open the PLM and select something + * open the PLM and select something -only- if we are given + * a specific module to use */ - if (ORTE_SUCCESS != (ret = orte_plm_base_open())) { - ORTE_ERROR_LOG(ret); - error = "orte_plm_base_open"; - goto error; - } + mca_base_param_reg_string_name("plm", NULL, + "Which plm component to use (empty = none)", + false, false, + NULL, &plm_to_use); - if (ORTE_SUCCESS != (ret = orte_plm_base_select())) { - ORTE_ERROR_LOG(ret); - error = "orte_plm_base_select"; - goto error; + if (NULL == plm_to_use) { + plm_in_use = false; + } else { + plm_in_use = true; + + if (ORTE_SUCCESS != (ret = orte_plm_base_open())) { + ORTE_ERROR_LOG(ret); + error = "orte_plm_base_open"; + goto error; + } + + if (ORTE_SUCCESS != (ret = orte_plm_base_select())) { + ORTE_ERROR_LOG(ret); + error = "orte_plm_base_select"; + goto error; + } } /* Setup the communication infrastructure */ @@ -135,6 +150,21 @@ int orte_ess_base_orted_setup(void) goto error; } + /* Now provide a chance for the PLM + * to perform any module-specific init functions. This + * needs to occur AFTER the communications are setup + * as it may involve starting a non-blocking recv + * Do this only if a specific PLM was given to us - the + * orted has no need of the proxy PLM at all + */ + if (plm_in_use) { + if (ORTE_SUCCESS != (ret = orte_plm.init())) { + ORTE_ERROR_LOG(ret); + error = "orte_plm_init"; + goto error; + } + } + /* setup my session directory */ OPAL_OUTPUT_VERBOSE((2, orte_debug_output, "%s setting up session dir with\n\ttmpdir: %s\n\thost %s", @@ -275,7 +305,9 @@ int orte_ess_base_orted_finalize(void) orte_iof_base_close(); /* finalize selected modules */ - orte_plm_base_close(); + if (plm_in_use) { + orte_plm_base_close(); + } orte_errmgr_base_close(); /* now can close the rml and its friendly group comm */ diff --git a/orte/mca/plm/alps/plm_alps_module.c b/orte/mca/plm/alps/plm_alps_module.c index 660d002c13..9447801c16 100644 --- a/orte/mca/plm/alps/plm_alps_module.c +++ b/orte/mca/plm/alps/plm_alps_module.c @@ -272,7 +272,7 @@ static int plm_alps_launch_job(orte_job_t *jdata) orte_plm_base_orted_append_basic_args(&argc, &argv, "alps", &proc_vpid_index, - NULL, false); + false); /* tell the new daemons the base of the name list so they can compute * their own name on the other end diff --git a/orte/mca/plm/base/plm_base_launch_support.c b/orte/mca/plm/base/plm_base_launch_support.c index 8b25144900..2f5648584c 100644 --- a/orte/mca/plm/base/plm_base_launch_support.c +++ b/orte/mca/plm/base/plm_base_launch_support.c @@ -731,7 +731,6 @@ int orte_plm_base_setup_orted_cmd(int *argc, char ***argv) int orte_plm_base_orted_append_basic_args(int *argc, char ***argv, char *ess, int *proc_vpid_index, - int *node_name_index, bool heartbeat) { char *param = NULL; @@ -769,7 +768,7 @@ int orte_plm_base_orted_append_basic_args(int *argc, char ***argv, opal_argv_append(argc, argv, param); free(param); } - if (heartbeat) { + if (heartbeat && 0 < orte_heartbeat_rate) { /* tell the daemon to do a heartbeat */ opal_argv_append(argc, argv, "--heartbeat"); asprintf(¶m, "%d", orte_heartbeat_rate); @@ -821,13 +820,6 @@ int orte_plm_base_orted_append_basic_args(int *argc, char ***argv, opal_argv_append(argc, argv, param); free(param); - /* Node Name */ - if(NULL != node_name_index) { - opal_argv_append(argc, argv, "--nodename"); - *node_name_index = *argc; - opal_argv_append(argc, argv, "