Remove stale orte_vm_launch param. Add a param that allows users to specify envars to forward/set so they can do it in the MCA param file instead of only via mpirun cmd line.
This commit was SVN r25580.
Этот коммит содержится в:
родитель
15facc4ba6
Коммит
7510339725
@ -64,7 +64,3 @@ A ppr pattern was specified, but the topology information
|
||||
for the following node is missing:
|
||||
|
||||
Node: %s
|
||||
|
||||
Please ensure that vm launch mode is enabled, either via the
|
||||
-vm option to mpirun or using the orte_vm_launch MCA
|
||||
parameter.
|
||||
|
@ -173,12 +173,12 @@ bool orte_report_child_jobs_separately;
|
||||
struct timeval orte_child_time_to_exit;
|
||||
bool orte_abort_non_zero_exit;
|
||||
|
||||
/* VM control */
|
||||
bool orte_vm_launch = false;
|
||||
|
||||
/* length of stat history to keep */
|
||||
int orte_stat_history_size;
|
||||
|
||||
/* envars to forward */
|
||||
char *orte_forward_envars = NULL;
|
||||
|
||||
#endif /* !ORTE_DISABLE_FULL_RTE */
|
||||
|
||||
int orte_debug_output = -1;
|
||||
|
@ -647,12 +647,12 @@ ORTE_DECLSPEC extern bool orte_report_child_jobs_separately;
|
||||
ORTE_DECLSPEC extern struct timeval orte_child_time_to_exit;
|
||||
ORTE_DECLSPEC extern bool orte_abort_non_zero_exit;
|
||||
|
||||
/* VM control */
|
||||
ORTE_DECLSPEC extern bool orte_vm_launch;
|
||||
|
||||
/* length of stat history to keep */
|
||||
ORTE_DECLSPEC extern int orte_stat_history_size;
|
||||
|
||||
/* envars to forward */
|
||||
ORTE_DECLSPEC extern char *orte_forward_envars;
|
||||
|
||||
#endif /* ORTE_DISABLE_FULL_SUPPORT */
|
||||
|
||||
END_C_DECLS
|
||||
|
@ -434,15 +434,14 @@ int orte_register_params(void)
|
||||
orte_child_time_to_exit.tv_sec = value;
|
||||
orte_child_time_to_exit.tv_usec = 0;
|
||||
|
||||
mca_base_param_reg_int_name("orte", "vm_launch",
|
||||
"Launch daemons on all nodes at start to form a virtual machine for subsequent jobs",
|
||||
false, false, (int)false, &value);
|
||||
orte_vm_launch = OPAL_INT_TO_BOOL(value);
|
||||
|
||||
mca_base_param_reg_int_name("orte", "stat_history_size",
|
||||
"Number of stat samples to keep",
|
||||
false, false, 1, &orte_stat_history_size);
|
||||
|
||||
mca_base_param_reg_string_name("orte", "forward_envars",
|
||||
"Comma-delimited environmental variables to forward, can include value to set",
|
||||
false, false, NULL, &orte_forward_envars);
|
||||
|
||||
#endif /* ORTE_DISABLE_FULL_SUPPORT */
|
||||
|
||||
return ORTE_SUCCESS;
|
||||
|
@ -1469,8 +1469,7 @@ static int create_app(int argc, char* argv[], orte_app_context_t **app_ptr,
|
||||
opal_setenv("OMPI_MCA_pubsub_orte_server", ompi_server, true, &app->env);
|
||||
}
|
||||
|
||||
/* Did the user request to export any environment variables? */
|
||||
|
||||
/* Did the user request to export any environment variables on the cmd line? */
|
||||
if (opal_cmd_line_is_taken(&cmd_line, "x")) {
|
||||
j = opal_cmd_line_get_ninsts(&cmd_line, "x");
|
||||
for (i = 0; i < j; ++i) {
|
||||
@ -1495,6 +1494,33 @@ static int create_app(int argc, char* argv[], orte_app_context_t **app_ptr,
|
||||
}
|
||||
}
|
||||
|
||||
/* Did the user request to export any environment variables via MCA param? */
|
||||
if (NULL != orte_forward_envars) {
|
||||
char **vars;
|
||||
vars = opal_argv_split(orte_forward_envars, ',');
|
||||
for (i=0; NULL != vars[i]; i++) {
|
||||
if (NULL != strchr(vars[i], '=')) {
|
||||
/* user supplied a value */
|
||||
opal_argv_append_nosize(&app->env, vars[i]);
|
||||
} else {
|
||||
/* get the value from the environ */
|
||||
value = getenv(vars[i]);
|
||||
if (NULL != value) {
|
||||
if (NULL != strchr(value, '=')) {
|
||||
opal_argv_append_nosize(&app->env, value);
|
||||
} else {
|
||||
asprintf(&value2, "%s=%s", vars[i], value);
|
||||
opal_argv_append_nosize(&app->env, value2);
|
||||
free(value2);
|
||||
}
|
||||
} else {
|
||||
opal_output(0, "Warning: could not find environment variable \"%s\"\n", param);
|
||||
}
|
||||
}
|
||||
}
|
||||
opal_argv_free(vars);
|
||||
}
|
||||
|
||||
/* If the user specified --path, store it in the user's app
|
||||
environment via the OMPI_exec_path variable. */
|
||||
if (NULL != orterun_globals.path) {
|
||||
|
Загрузка…
x
Ссылка в новой задаче
Block a user