1
1

Add an intermediate state when the VM is ready so that third party tools can take action prior to mapping/launching apps

This commit was SVN r26902.
Этот коммит содержится в:
Ralph Castain 2012-07-28 15:33:09 +00:00
родитель 3273e9c658
Коммит 94d11e04fd
5 изменённых файлов: 25 добавлений и 7 удалений

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

@ -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);

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

@ -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;

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

@ -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

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

@ -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,

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

@ -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: