From cc57840b53f5d0c8a58b235b3466460ebb2d83fc Mon Sep 17 00:00:00 2001 From: Josh Hursey Date: Mon, 5 Dec 2011 15:40:46 +0000 Subject: [PATCH] Fix ess/tool so that it does not segv when using the rsh PLM. Just have it use the base function directly to avoid similar problems with finalizing other components. This commit was SVN r25571. --- orte/mca/ess/tool/ess_tool_module.c | 28 ++++++---------------------- 1 file changed, 6 insertions(+), 22 deletions(-) diff --git a/orte/mca/ess/tool/ess_tool_module.c b/orte/mca/ess/tool/ess_tool_module.c index ad36e63bb1..769e815d42 100644 --- a/orte/mca/ess/tool/ess_tool_module.c +++ b/orte/mca/ess/tool/ess_tool_module.c @@ -31,6 +31,7 @@ #include "orte/util/show_help.h" #include "orte/mca/plm/base/base.h" +#include "orte/mca/plm/base/plm_private.h" #include "orte/mca/plm/plm.h" #include "orte/mca/errmgr/errmgr.h" #include "orte/util/proc_info.h" @@ -71,38 +72,21 @@ static int rte_init(void) error = "orte_ess_base_std_prolog"; goto error; } - + /* If we are a tool with no name, then responsibility for * defining the name falls to the PLM component for our - * respective environment - hence, we have to open the PLM - * first and select that component. Note that ONLY the - * HNP ever uses a PLM component, so we ONLY use the PLM - * here to set our name and then close it + * respective environment. + * Just call the base function for this. * * NOTE: Tools with names - i.e., tools consisting of a * distributed set of processes - will select and use * the appropriate enviro-specific module and -not- this one! */ - if (ORTE_SUCCESS != (ret = orte_plm_base_open())) { + if (ORTE_SUCCESS != (ret = orte_plm_base_set_hnp_name())) { ORTE_ERROR_LOG(ret); - error = "orte_plm_base_open"; + error = "orte_plm_base_set_hnp_name"; goto error; } - - if (ORTE_SUCCESS != (ret = orte_plm_base_select())) { - ORTE_ERROR_LOG(ret); - error = "orte_plm_base_select"; - goto error; - } - if (ORTE_SUCCESS != (ret = orte_plm.set_hnp_name())) { - ORTE_ERROR_LOG(ret); - error = "orte_plm_set_hnp_name"; - goto error; - } - /* close the plm since we opened it to set our - * name, but have no further use for it - */ - orte_plm_base_close(); /* do the rest of the standard tool init */ if (ORTE_SUCCESS != (ret = orte_ess_base_tool_setup())) {