1
1

Pass the prefix dir to the remote orted when doing tree-based spawns

This commit was SVN r18280.
Этот коммит содержится в:
Ralph Castain 2008-04-24 18:38:24 +00:00
родитель 2c736873bb
Коммит 09b6758f8c
2 изменённых файлов: 25 добавлений и 4 удалений

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

@ -765,6 +765,7 @@ static int remote_spawn(opal_buffer_t *launch)
int local_exec_index;
char **argv = NULL;
char *param, *rml_uri;
char *prefix;
int argc;
int rc;
bool remote_sh = false, remote_csh = false;
@ -772,7 +773,8 @@ static int remote_spawn(opal_buffer_t *launch)
bool failed_launch = true;
pid_t pid;
int num_children;
orte_std_cntr_t n;
nodes = (char**)orte_daemonmap.addr;
vpid=ORTE_PROC_MY_NAME->vpid;
@ -784,6 +786,13 @@ 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);
@ -857,7 +866,7 @@ static int remote_spawn(opal_buffer_t *launch)
/* do the ssh launch - this will exit if it fails */
ssh_child(argc, argv, vpid,
proc_vpid_index, local_exec_index, NULL, bin_base,
proc_vpid_index, local_exec_index, prefix, bin_base,
lib_base, remote_sh, remote_csh);
} else { /* father */
@ -1060,7 +1069,13 @@ int orte_plm_rsh_launch(orte_job_t *jdata)
ORTE_ERROR_LOG(rc);
OBJ_RELEASE(launch_cmd);
goto cleanup;
}
}
/* pack the prefix since this will be needed by the next wave */
if (ORTE_SUCCESS != (rc = opal_dss.pack(launch_cmd, &prefix_dir, 1, OPAL_STRING))) {
ORTE_ERROR_LOG(rc);
OBJ_RELEASE(launch_cmd);
goto cleanup;
}
if (ORTE_SUCCESS != (rc = orte_odls.get_add_procs_data(launch_cmd, active_job))) {
ORTE_ERROR_LOG(rc);
OBJ_RELEASE(launch_cmd);

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

@ -301,7 +301,7 @@ static int process_commands(orte_process_name_t* sender,
int32_t signal;
orte_jobid_t job;
orte_rml_tag_t target_tag;
char *contact_info;
char *contact_info, *prefix;
opal_buffer_t *answer;
orte_rml_cmd_flag_t rml_cmd;
orte_job_t *jdata;
@ -377,6 +377,12 @@ static int process_commands(orte_process_name_t* sender,
ORTE_NAME_PRINT(ORTE_PROC_MY_NAME));
}
/* launch the local processes */
/* 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;
}
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",