diff --git a/orte/mca/plm/base/base.h b/orte/mca/plm/base/base.h index a5bea6a9f5..d56cfdc507 100644 --- a/orte/mca/plm/base/base.h +++ b/orte/mca/plm/base/base.h @@ -87,6 +87,7 @@ ORTE_DECLSPEC void orte_plm_base_setup_job_complete(int fd, short args, void *cb ORTE_DECLSPEC void orte_plm_base_complete_setup(int fd, short args, void *cbdata); ORTE_DECLSPEC void orte_plm_base_daemons_reported(int fd, short args, void *cbdata); ORTE_DECLSPEC void orte_plm_base_daemons_launched(int fd, short args, void *cbdata); +ORTE_DECLSPEC void orte_plm_base_vm_ready(int fd, short args, void *cbdata); ORTE_DECLSPEC void orte_plm_base_launch_apps(int fd, short args, void *cbdata); ORTE_DECLSPEC void orte_plm_base_post_launch(int fd, short args, void *cbdata); ORTE_DECLSPEC void orte_plm_base_registered(int fd, short args, void *cbdata); diff --git a/orte/mca/plm/base/plm_base_launch_support.c b/orte/mca/plm/base/plm_base_launch_support.c index 09c3fac871..00f8bbfac5 100644 --- a/orte/mca/plm/base/plm_base_launch_support.c +++ b/orte/mca/plm/base/plm_base_launch_support.c @@ -112,7 +112,7 @@ void orte_plm_base_daemons_reported(int fd, short args, void *cbdata) /* progress the job */ caddy->jdata->state = ORTE_JOB_STATE_DAEMONS_REPORTED; - ORTE_ACTIVATE_JOB_STATE(caddy->jdata, ORTE_JOB_STATE_MAP); + ORTE_ACTIVATE_JOB_STATE(caddy->jdata, ORTE_JOB_STATE_VM_READY); /* cleanup */ OBJ_RELEASE(caddy); @@ -130,6 +130,18 @@ void orte_plm_base_daemons_launched(int fd, short args, void *cbdata) OBJ_RELEASE(caddy); } +void orte_plm_base_vm_ready(int fd, short args, void *cbdata) +{ + orte_state_caddy_t *caddy = (orte_state_caddy_t*)cbdata; + + /* progress the job */ + caddy->jdata->state = ORTE_JOB_STATE_VM_READY; + ORTE_ACTIVATE_JOB_STATE(caddy->jdata, ORTE_JOB_STATE_MAP); + + /* cleanup */ + OBJ_RELEASE(caddy); +} + void orte_plm_base_setup_job(int fd, short args, void *cbdata) { int rc; diff --git a/orte/mca/plm/plm_types.h b/orte/mca/plm/plm_types.h index 99da8e4540..f7334043b2 100644 --- a/orte/mca/plm/plm_types.h +++ b/orte/mca/plm/plm_types.h @@ -104,12 +104,13 @@ typedef int32_t orte_job_state_t; #define ORTE_JOB_STATE_LAUNCH_DAEMONS 6 /* ready to launch daemons */ #define ORTE_JOB_STATE_DAEMONS_LAUNCHED 7 /* daemons for this job have been launched */ #define ORTE_JOB_STATE_DAEMONS_REPORTED 8 /* all launched daemons have reported */ -#define ORTE_JOB_STATE_LAUNCH_APPS 9 /* ready to launch apps */ -#define ORTE_JOB_STATE_RUNNING 10 /* all procs have been fork'd */ -#define ORTE_JOB_STATE_SUSPENDED 11 /* job has been suspended */ -#define ORTE_JOB_STATE_REGISTERED 12 /* all procs registered for sync */ -#define ORTE_JOB_STATE_READY_FOR_DEBUGGERS 13 /* job ready for debugger init after spawn */ -#define ORTE_JOB_STATE_LOCAL_LAUNCH_COMPLETE 14 /* all local procs have attempted launch */ +#define ORTE_JOB_STATE_VM_READY 9 /* the VM is ready for operation */ +#define ORTE_JOB_STATE_LAUNCH_APPS 10 /* ready to launch apps */ +#define ORTE_JOB_STATE_RUNNING 11 /* all procs have been fork'd */ +#define ORTE_JOB_STATE_SUSPENDED 12 /* job has been suspended */ +#define ORTE_JOB_STATE_REGISTERED 13 /* all procs registered for sync */ +#define ORTE_JOB_STATE_READY_FOR_DEBUGGERS 14 /* job ready for debugger init after spawn */ +#define ORTE_JOB_STATE_LOCAL_LAUNCH_COMPLETE 15 /* all local procs have attempted launch */ /* * Define a "boundary" so we can easily and quickly determine diff --git a/orte/mca/state/hnp/state_hnp.c b/orte/mca/state/hnp/state_hnp.c index 930391892c..c52daaad96 100644 --- a/orte/mca/state/hnp/state_hnp.c +++ b/orte/mca/state/hnp/state_hnp.c @@ -90,6 +90,7 @@ static orte_job_state_t launch_states[] = { ORTE_JOB_STATE_ALLOCATE, ORTE_JOB_STATE_DAEMONS_LAUNCHED, ORTE_JOB_STATE_DAEMONS_REPORTED, + ORTE_JOB_STATE_VM_READY, ORTE_JOB_STATE_MAP, ORTE_JOB_STATE_SYSTEM_PREP, ORTE_JOB_STATE_LAUNCH_APPS, @@ -108,6 +109,7 @@ static orte_state_cbfunc_t launch_callbacks[] = { orte_ras_base_allocate, orte_plm_base_daemons_launched, orte_plm_base_daemons_reported, + orte_plm_base_vm_ready, orte_rmaps_base_map_job, orte_plm_base_complete_setup, orte_plm_base_launch_apps, diff --git a/orte/util/error_strings.c b/orte/util/error_strings.c index 9af759466e..63ac896516 100644 --- a/orte/util/error_strings.c +++ b/orte/util/error_strings.c @@ -217,6 +217,8 @@ const char *orte_job_state_to_str(orte_job_state_t state) return "DAEMONS LAUNCHED"; case ORTE_JOB_STATE_DAEMONS_REPORTED: return "ALL DAEMONS REPORTED"; + case ORTE_JOB_STATE_VM_READY: + return "VM READY"; case ORTE_JOB_STATE_LAUNCH_APPS: return "PENDING APP LAUNCH"; case ORTE_JOB_STATE_RUNNING: