1
1

Ensure that any application-specific selection of ess module doesn't get overridden by what is given to the orted or orterun

Cleanup tool name determination for CM

This commit was SVN r22980.
Этот коммит содержится в:
Ralph Castain 2010-04-15 18:10:50 +00:00
родитель c3e4c40cdf
Коммит 4308922f59
4 изменённых файлов: 42 добавлений и 2 удалений

Просмотреть файл

@ -39,12 +39,14 @@ int orte_ess_env_put(orte_std_cntr_t num_procs,
char* param; char* param;
char* value; char* value;
/* tell the ESS to select the env component */ /* tell the ESS to select the env component - but don't override
* anything that may have been provided elsewhere
*/
if(NULL == (param = mca_base_param_environ_variable("ess",NULL,NULL))) { if(NULL == (param = mca_base_param_environ_variable("ess",NULL,NULL))) {
ORTE_ERROR_LOG(ORTE_ERR_OUT_OF_RESOURCE); ORTE_ERROR_LOG(ORTE_ERR_OUT_OF_RESOURCE);
return ORTE_ERR_OUT_OF_RESOURCE; return ORTE_ERR_OUT_OF_RESOURCE;
} }
opal_setenv(param, "env", true, env); opal_setenv(param, "env", false, env);
free(param); free(param);
/* since we want to pass the name as separate components, make sure /* since we want to pass the name as separate components, make sure

Просмотреть файл

@ -196,6 +196,38 @@ static int rte_init(void)
} }
opal_argv_free(hosts); opal_argv_free(hosts);
} else if (ORTE_PROC_IS_TOOL) { } else if (ORTE_PROC_IS_TOOL) {
/* if we were given a jobid, use it */
mca_base_param_reg_string_name("orte", "ess_jobid", "Process jobid",
true, false, NULL, &tmp);
if (NULL != tmp) {
if (ORTE_SUCCESS != (ret = orte_util_convert_string_to_jobid(&jobid, tmp))) {
ORTE_ERROR_LOG(ret);
error = "convert_jobid";
goto error;
}
free(tmp);
ORTE_PROC_MY_NAME->jobid = jobid;
}
/* if we were given a vpid, use it */
mca_base_param_reg_string_name("orte", "ess_vpid", "Process vpid",
true, false, NULL, &tmp);
if (NULL != tmp) {
if (ORTE_SUCCESS != (ret = orte_util_convert_string_to_vpid(&vpid, tmp))) {
ORTE_ERROR_LOG(ret);
error = "convert_vpid";
goto error;
}
free(tmp);
ORTE_PROC_MY_NAME->vpid = vpid;
}
/* if both were given, then we are done */
if (ORTE_JOBID_INVALID != jobid &&
ORTE_VPID_INVALID != vpid) {
goto tool_done;
}
/* create our own name */ /* create our own name */
if (ORTE_SUCCESS != (ret = orte_plm_base_open())) { if (ORTE_SUCCESS != (ret = orte_plm_base_open())) {
ORTE_ERROR_LOG(ret); ORTE_ERROR_LOG(ret);
@ -218,6 +250,7 @@ static int rte_init(void)
*/ */
orte_plm_base_close(); orte_plm_base_close();
tool_done:
/* do the rest of the standard tool init */ /* do the rest of the standard tool init */
if (ORTE_SUCCESS != (ret = orte_ess_base_tool_setup())) { if (ORTE_SUCCESS != (ret = orte_ess_base_tool_setup())) {
ORTE_ERROR_LOG(ret); ORTE_ERROR_LOG(ret);

Просмотреть файл

@ -301,6 +301,8 @@ int orte_daemon(int argc, char *argv[])
*/ */
orte_launch_environ = opal_argv_copy(environ); orte_launch_environ = opal_argv_copy(environ);
/* purge any ess flag set in the environ when we were launched */
opal_unsetenv("OMPI_MCA_ess", &orte_launch_environ);
/* if orte_daemon_debug is set, let someone know we are alive right /* if orte_daemon_debug is set, let someone know we are alive right
* away just in case we have a problem along the way * away just in case we have a problem along the way

Просмотреть файл

@ -555,6 +555,9 @@ int orterun(int argc, char *argv[])
*/ */
orte_launch_environ = opal_argv_copy(environ); orte_launch_environ = opal_argv_copy(environ);
/* purge an ess flag set externally */
opal_unsetenv("OMPI_MCA_ess", &orte_launch_environ);
#if OPAL_ENABLE_FT_CR == 1 #if OPAL_ENABLE_FT_CR == 1
/* Disable OPAL CR notifications for this tool */ /* Disable OPAL CR notifications for this tool */
opal_cr_set_enabled(false); opal_cr_set_enabled(false);