Properly ensure that cmd line MCA params override environmental MCA params for procs local to mpirun.
Actually, the problem was that we were simply -adding- any enviro MCA params to whatever had been found on the cmd line. Thus, duplicate MCA param directives were winding up duplicated in the environment. Some shells took the first one in the environ array - others took the last! So we could get completely different behavior based on the whims of the shell. This commit fixes trac:1373 This commit was SVN r18836. The following Trac tickets were found above: Ticket 1373 --> https://svn.open-mpi.org/trac/ompi/ticket/1373
Этот коммит содержится в:
родитель
23da11fdcc
Коммит
51da9f2980
@ -381,9 +381,6 @@ int orterun(int argc, char *argv[])
|
||||
exit(ORTE_ERROR_DEFAULT_EXIT_CODE);
|
||||
}
|
||||
|
||||
/* save the environment for launch purposes */
|
||||
orte_launch_environ = opal_argv_copy(environ);
|
||||
|
||||
#if OPAL_ENABLE_FT == 1
|
||||
/* Disable OPAL CR notifications for this tool */
|
||||
opal_cr_set_enabled(false);
|
||||
@ -406,6 +403,9 @@ int orterun(int argc, char *argv[])
|
||||
return rc;
|
||||
}
|
||||
|
||||
/* save the environment for launch purposes */
|
||||
orte_launch_environ = opal_argv_copy(environ);
|
||||
|
||||
/* we are an hnp, so update the contact info field for later use */
|
||||
orte_process_info.my_hnp_uri = orte_rml.get_contact_info();
|
||||
|
||||
@ -1462,7 +1462,18 @@ static int create_app(int argc, char* argv[], orte_app_context_t **app_ptr,
|
||||
app->env = opal_argv_copy(*app_env);
|
||||
for (i = 0; NULL != environ[i]; ++i) {
|
||||
if (0 == strncmp("OMPI_", environ[i], 5)) {
|
||||
opal_argv_append_nosize(&app->env, environ[i]);
|
||||
/* check for duplicate in app->env - this
|
||||
* would have been placed there by the
|
||||
* cmd line processor. By convention, we
|
||||
* always let the cmd line override the
|
||||
* environment
|
||||
*/
|
||||
param = strdup(environ[i]);
|
||||
value = strchr(param, '=');
|
||||
*value = '\0';
|
||||
value++;
|
||||
opal_setenv(param, value, false, &app->env);
|
||||
free(param);
|
||||
}
|
||||
}
|
||||
|
||||
|
Загрузка…
x
Ссылка в новой задаче
Block a user