Ensure the pack/unpacks match for tree-spawn
This commit was SVN r18282.
Этот коммит содержится в:
родитель
09b6758f8c
Коммит
4c2c6c9bd8
@ -778,6 +778,16 @@ static int remote_spawn(opal_buffer_t *launch)
|
||||
nodes = (char**)orte_daemonmap.addr;
|
||||
vpid=ORTE_PROC_MY_NAME->vpid;
|
||||
|
||||
/* extract the prefix from the launch buffer */
|
||||
n = 1;
|
||||
if (ORTE_SUCCESS != (rc = opal_dss.unpack(launch, &prefix, &n, OPAL_STRING))) {
|
||||
ORTE_ERROR_LOG(rc);
|
||||
return rc;
|
||||
}
|
||||
|
||||
/* rewind the buffer for use by our children */
|
||||
launch->unpack_ptr = launch->base_ptr;
|
||||
|
||||
/* setup the launch cmd */
|
||||
launch_cmd = OBJ_NEW(opal_buffer_t);
|
||||
opal_dss.copy_payload(launch_cmd, launch);
|
||||
@ -786,13 +796,6 @@ static int remote_spawn(opal_buffer_t *launch)
|
||||
"%s plm:rsh: remote spawn called",
|
||||
ORTE_NAME_PRINT(ORTE_PROC_MY_NAME)));
|
||||
|
||||
/* extract the prefix from the launch buffer */
|
||||
n = 1;
|
||||
if (ORTE_SUCCESS != (rc = opal_dss.unpack(launch, &prefix, &n, OPAL_STRING))) {
|
||||
ORTE_ERROR_LOG(rc);
|
||||
return rc;
|
||||
}
|
||||
|
||||
/* clear out any previous child info */
|
||||
while (NULL != (item = opal_list_remove_first(&mca_plm_rsh_component.children))) {
|
||||
OBJ_RELEASE(item);
|
||||
|
@ -305,6 +305,7 @@ static int process_commands(orte_process_name_t* sender,
|
||||
opal_buffer_t *answer;
|
||||
orte_rml_cmd_flag_t rml_cmd;
|
||||
orte_job_t *jdata;
|
||||
char *save_buf;
|
||||
|
||||
/* unpack the command */
|
||||
n = 1;
|
||||
@ -376,20 +377,22 @@ static int process_commands(orte_process_name_t* sender,
|
||||
opal_output(0, "%s orted_cmd: received add_and_spawn",
|
||||
ORTE_NAME_PRINT(ORTE_PROC_MY_NAME));
|
||||
}
|
||||
/* launch the local processes */
|
||||
/* save our current buffer location */
|
||||
save_buf = buffer->unpack_ptr;
|
||||
/* unpack the prefix and throw it away - we don't need it here */
|
||||
n = 1;
|
||||
if (ORTE_SUCCESS != (ret = opal_dss.unpack(buffer, &prefix, &n, OPAL_STRING))) {
|
||||
ORTE_ERROR_LOG(ret);
|
||||
goto CLEANUP;
|
||||
}
|
||||
/* launch the local processes */
|
||||
if (ORTE_SUCCESS != (ret = orte_odls.launch_local_procs(buffer))) {
|
||||
OPAL_OUTPUT_VERBOSE((1, orte_debug_output,
|
||||
"%s orted:comm:add_procs failed to launch on error %s",
|
||||
ORTE_NAME_PRINT(ORTE_PROC_MY_NAME), ORTE_ERROR_NAME(ret)));
|
||||
}
|
||||
/* rewind the buffer so the plm can reuse it */
|
||||
buffer->unpack_ptr = buffer->base_ptr;
|
||||
buffer->unpack_ptr = save_buf;
|
||||
/* if the PLM supports remote spawn, pass it all along */
|
||||
if (NULL != orte_plm.remote_spawn) {
|
||||
if (ORTE_SUCCESS != (ret = orte_plm.remote_spawn(buffer))) {
|
||||
|
Загрузка…
Ссылка в новой задаче
Block a user