1
1
It turns out that we were improperly allocating an array if -np was not passed. Also, we were not really using this array for anything. So this gets rid of the array and performs some minor cleanup.

This commit was SVN r11934.

The following Trac tickets were found above:
  Ticket 452 --> https://svn.open-mpi.org/trac/ompi/ticket/452
Этот коммит содержится в:
Tim Prins 2006-10-02 15:03:43 +00:00
родитель 7494a7a83f
Коммит 53b116d309

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

@ -123,12 +123,6 @@ struct globals_t {
} orterun_globals;
static bool globals_init = false;
struct proc_info_t {
bool reported;
int32_t exit_status;
};
struct proc_info_t *proc_infos = NULL;
opal_cmd_line_init_t cmd_line_init[] = {
/* Various "obvious" options */
@ -288,7 +282,7 @@ static void dump_aborted_procs(orte_jobid_t jobid);
int orterun(int argc, char *argv[])
{
orte_app_context_t **apps;
int rc, i, num_apps, array_size, j;
int rc, i, num_apps, array_size;
int id, iparam;
orte_proc_state_t cb_states;
orte_job_state_t exit_state;
@ -320,11 +314,10 @@ int orterun(int argc, char *argv[])
exit(1);
}
num_apps = 0;
for (j = i = 0; i < array_size; ++i) {
for (i = 0; i < array_size; ++i) {
apps[num_apps] = (orte_app_context_t *)
orte_pointer_array_get_item(apps_pa, i);
if (NULL != apps[num_apps]) {
j += apps[num_apps]->num_procs;
num_apps++;
}
}
@ -335,16 +328,6 @@ int orterun(int argc, char *argv[])
true, orterun_basename);
exit(1);
}
proc_infos = (struct proc_info_t*)malloc(sizeof(struct proc_info_t) * j);
if (NULL == proc_infos) {
opal_show_help("help-orterun.txt", "orterun:call-failed",
true, orterun_basename, "system", "malloc returned NULL", errno);
exit(1);
}
for (i = 0; i < j; ++i) {
proc_infos[i].reported = false;
proc_infos[i].exit_status = 0;
}
/* Intialize our Open RTE environment */
/* Set the flag telling orte_init that I am NOT a
@ -516,7 +499,6 @@ int orterun(int argc, char *argv[])
OBJ_RELEASE(apps_pa);
orte_finalize();
free(orterun_basename);
free(proc_infos);
return rc;
}
@ -616,13 +598,8 @@ static void dump_aborted_procs(orte_jobid_t jobid)
continue;
}
}
if (rank_found && exit_status_set) {
proc_infos[rank].exit_status = exit_status;
}
if (rank_found && !proc_infos[rank].reported) {
proc_infos[rank].reported = true;
if (rank_found) {
if (WIFSIGNALED(exit_status)) {
if (9 == WTERMSIG(exit_status)) {
++num_killed;