diff --git a/orte/mca/schizo/ompi/schizo_ompi.c b/orte/mca/schizo/ompi/schizo_ompi.c index 02374ebd3a..296cdfaa3b 100644 --- a/orte/mca/schizo/ompi/schizo_ompi.c +++ b/orte/mca/schizo/ompi/schizo_ompi.c @@ -733,6 +733,7 @@ static int setup_fork(orte_job_t *jdata, char *npstring, *firstrankstring; char *num_app_ctx; bool takeus = false; + orte_app_context_t* tmp_app; opal_output_verbose(1, orte_schizo_base_framework.framework_output, "%s schizo:ompi: setup_fork", @@ -941,11 +942,11 @@ static int setup_fork(orte_job_t *jdata, nps = NULL; firstranks = NULL; for (i=0; i < jdata->apps->size; i++) { - if (NULL == (app = (orte_app_context_t*)opal_pointer_array_get_item(jdata->apps, i))) { + if (NULL == (tmp_app = (orte_app_context_t*)opal_pointer_array_get_item(jdata->apps, i))) { continue; } - opal_argv_append_nosize(&nps, ORTE_VPID_PRINT(app->num_procs)); - opal_argv_append_nosize(&firstranks, ORTE_VPID_PRINT(app->first_rank)); + opal_argv_append_nosize(&nps, ORTE_VPID_PRINT(tmp_app->num_procs)); + opal_argv_append_nosize(&firstranks, ORTE_VPID_PRINT(tmp_app->first_rank)); } npstring = opal_argv_join(nps, ' '); firstrankstring = opal_argv_join(firstranks, ' ');