diff --git a/orte/runtime/orte_globals.c b/orte/runtime/orte_globals.c index d0a1129f81..f0262a89c6 100644 --- a/orte/runtime/orte_globals.c +++ b/orte/runtime/orte_globals.c @@ -182,6 +182,9 @@ orte_default_comm_fn_t orte_comm; bool orte_report_child_jobs_separately; struct timeval orte_child_time_to_exit; +/* VM control */ +bool orte_vm_launch = false; + #endif /* !ORTE_DISABLE_FULL_RTE */ int orte_debug_output = -1; diff --git a/orte/runtime/orte_globals.h b/orte/runtime/orte_globals.h index 7d0bf292bc..b33b81ea6f 100644 --- a/orte/runtime/orte_globals.h +++ b/orte/runtime/orte_globals.h @@ -722,6 +722,10 @@ ORTE_DECLSPEC int orte_global_comm(orte_process_name_t *recipient, ORTE_DECLSPEC extern bool orte_report_child_jobs_separately; ORTE_DECLSPEC extern struct timeval orte_child_time_to_exit; + +/* VM control */ +ORTE_DECLSPEC extern bool orte_vm_launch; + #endif /* ORTE_DISABLE_FULL_SUPPORT */ END_C_DECLS diff --git a/orte/runtime/orte_mca_params.c b/orte/runtime/orte_mca_params.c index a6e88ad27a..338be8130d 100644 --- a/orte/runtime/orte_mca_params.c +++ b/orte/runtime/orte_mca_params.c @@ -507,6 +507,11 @@ 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); + #endif /* ORTE_DISABLE_FULL_SUPPORT */ return ORTE_SUCCESS; diff --git a/orte/tools/orterun/orterun.c b/orte/tools/orterun/orterun.c index f64912126b..548568bfa2 100644 --- a/orte/tools/orterun/orterun.c +++ b/orte/tools/orterun/orterun.c @@ -431,7 +431,7 @@ static opal_cmd_line_init_t cmd_line_init[] = { "Max number of times to restart a failed process" }, { "orte", "vm", "launch", '\0', "vm", "vm", 0, - &orterun_globals.launch_vm, OPAL_CMD_LINE_TYPE_BOOL, + NULL, OPAL_CMD_LINE_TYPE_BOOL, "Launch daemons on all nodes at start to create a virtual machine [Default = false]" }, #if OPAL_ENABLE_CRDEBUG == 1 @@ -785,7 +785,7 @@ int orterun(int argc, char *argv[]) } /* if we are launching the vm, now is the time to do so */ - if (orterun_globals.launch_vm) { + if (orte_vm_launch) { int32_t ljob, i; orte_app_context_t *app; @@ -874,7 +874,6 @@ static int init_globals(void) orterun_globals.report_pid = NULL; orterun_globals.report_uri = NULL; orterun_globals.disable_recovery = false; - orterun_globals.launch_vm = false; } /* Reset the other fields every time */ diff --git a/orte/tools/orterun/orterun.h b/orte/tools/orterun/orterun.h index b00c47262f..f783100cbc 100644 --- a/orte/tools/orterun/orterun.h +++ b/orte/tools/orterun/orterun.h @@ -67,7 +67,6 @@ struct orterun_globals_t { char *sstore_load; #endif bool disable_recovery; - bool launch_vm; }; /**