Enable spawn of local slave processes - plm module implementation to follow
This commit was SVN r20466.
Этот коммит содержится в:
родитель
f8cd188367
Коммит
13749673ed
@ -51,7 +51,7 @@ int orte_plm_proxy_spawn(orte_job_t *jdata)
|
|||||||
/* setup the buffer */
|
/* setup the buffer */
|
||||||
OBJ_CONSTRUCT(&buf, opal_buffer_t);
|
OBJ_CONSTRUCT(&buf, opal_buffer_t);
|
||||||
|
|
||||||
/* tell the HNP we are sending a launch request */
|
/* tell the recipient we are sending a launch request */
|
||||||
command = ORTE_PLM_LAUNCH_JOB_CMD;
|
command = ORTE_PLM_LAUNCH_JOB_CMD;
|
||||||
if (ORTE_SUCCESS != (rc = opal_dss.pack(&buf, &command, 1, ORTE_PLM_CMD))) {
|
if (ORTE_SUCCESS != (rc = opal_dss.pack(&buf, &command, 1, ORTE_PLM_CMD))) {
|
||||||
ORTE_ERROR_LOG(rc);
|
ORTE_ERROR_LOG(rc);
|
||||||
@ -67,10 +67,7 @@ int orte_plm_proxy_spawn(orte_job_t *jdata)
|
|||||||
|
|
||||||
/* identify who gets this command - the HNP or the local orted */
|
/* identify who gets this command - the HNP or the local orted */
|
||||||
if (jdata->controls & ORTE_JOB_CONTROL_LOCAL_SLAVE) {
|
if (jdata->controls & ORTE_JOB_CONTROL_LOCAL_SLAVE) {
|
||||||
/* for now, this is unsupported */
|
target = ORTE_PROC_MY_DAEMON;
|
||||||
opal_output(0, "LOCAL DAEMON SPAWN IS CURRENTLY UNSUPPORTED");
|
|
||||||
target = ORTE_PROC_MY_HNP;
|
|
||||||
/* target = ORTE_PROC_MY_DAEMON; */
|
|
||||||
} else {
|
} else {
|
||||||
target = ORTE_PROC_MY_HNP;
|
target = ORTE_PROC_MY_HNP;
|
||||||
}
|
}
|
||||||
|
@ -128,13 +128,24 @@ void orte_plm_base_receive_process_msg(int fd, short event, void *data)
|
|||||||
OBJ_CONSTRUCT(&answer, opal_buffer_t);
|
OBJ_CONSTRUCT(&answer, opal_buffer_t);
|
||||||
job = ORTE_JOBID_INVALID;
|
job = ORTE_JOBID_INVALID;
|
||||||
|
|
||||||
/* get the job object */
|
/* unpack the job object */
|
||||||
count = 1;
|
count = 1;
|
||||||
if (ORTE_SUCCESS != (rc = opal_dss.unpack(mev->buffer, &jdata, &count, ORTE_JOB))) {
|
if (ORTE_SUCCESS != (rc = opal_dss.unpack(mev->buffer, &jdata, &count, ORTE_JOB))) {
|
||||||
ORTE_ERROR_LOG(rc);
|
ORTE_ERROR_LOG(rc);
|
||||||
goto ANSWER_LAUNCH;
|
goto ANSWER_LAUNCH;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* if is a LOCAL slave cmd */
|
||||||
|
if (jdata->controls & ORTE_JOB_CONTROL_LOCAL_SLAVE) {
|
||||||
|
/* In this case, I cannot lookup job info. All I do is pass
|
||||||
|
* this along to the local launcher
|
||||||
|
*/
|
||||||
|
if (ORTE_SUCCESS != (rc = orte_plm.spawn(jdata))) {
|
||||||
|
ORTE_ERROR_LOG(rc);
|
||||||
|
goto ANSWER_LAUNCH;
|
||||||
|
}
|
||||||
|
job = jdata->jobid;
|
||||||
|
} else { /* this is a GLOBAL launch cmd */
|
||||||
/* get the parent's job object */
|
/* get the parent's job object */
|
||||||
if (NULL == (parent = orte_get_job_data_object(mev->sender.jobid))) {
|
if (NULL == (parent = orte_get_job_data_object(mev->sender.jobid))) {
|
||||||
ORTE_ERROR_LOG(ORTE_ERR_NOT_FOUND);
|
ORTE_ERROR_LOG(ORTE_ERR_NOT_FOUND);
|
||||||
@ -173,6 +184,7 @@ void orte_plm_base_receive_process_msg(int fd, short event, void *data)
|
|||||||
|
|
||||||
/* return the favor so that any repetitive comm_spawns track each other */
|
/* return the favor so that any repetitive comm_spawns track each other */
|
||||||
parent->bookmark = jdata->bookmark;
|
parent->bookmark = jdata->bookmark;
|
||||||
|
}
|
||||||
|
|
||||||
/* if the child is an ORTE job, wait for the procs to report they are alive */
|
/* if the child is an ORTE job, wait for the procs to report they are alive */
|
||||||
if (!(jdata->controls & ORTE_JOB_CONTROL_NON_ORTE_JOB)) {
|
if (!(jdata->controls & ORTE_JOB_CONTROL_NON_ORTE_JOB)) {
|
||||||
|
Загрузка…
x
Ссылка в новой задаче
Block a user