diff --git a/ompi/dpm/dpm.c b/ompi/dpm/dpm.c index 435b5ce96ec8329076155b2b5fa20f37891b148a..5382639bfe3784db4eaf46af2769f6f548efe88c 100644 --- a/ompi/dpm/dpm.c +++ b/ompi/dpm/dpm.c @@ -952,6 +952,8 @@ int ompi_dpm_spawn(int count, const char *array_of_commands[], opal_argv_append_unique_nosize(&app->env, params, true); } + opal_argv_append_unique_nosize(&app->env, "OMPI_MCA_async_mpi_finalize=true", true); + /* see if user specified what to do with stdin - defaults to * not forwarding stdin to child processes - job-level key */ diff --git a/orte/mca/regx/base/regx_base_default_fns.c b/orte/mca/regx/base/regx_base_default_fns.c index 4e1645d16b5c679ca9a6edf3ac66bcf983df6146..6f1226f30b941e85cd184cc132f25812ba4f1033 100644 --- a/orte/mca/regx/base/regx_base_default_fns.c +++ b/orte/mca/regx/base/regx_base_default_fns.c @@ -888,6 +888,17 @@ int orte_regx_base_parse_ppn(orte_job_t *jdata, char *regex) opal_list_t trk; int rc = ORTE_SUCCESS; + /* when performing a spawn, bookmark is first placed into the map + * condition is fucntion is called for the second time and map->mapping is round-robin */ + static bool re_enter = false; + + if (re_enter && ORTE_MAPPING_RR >= ORTE_GET_MAPPING_POLICY(jdata->map->mapping) && + jdata->bookmark != NULL && !ORTE_FLAG_TEST(jdata->bookmark, ORTE_NODE_FLAG_MAPPED)) { + OBJ_RETAIN(jdata->bookmark); + ORTE_FLAG_SET(jdata->bookmark, ORTE_NODE_FLAG_MAPPED); + opal_pointer_array_add(jdata->map->nodes, jdata->bookmark); + } + /* split the regex by app_context */ tmp = opal_argv_split(regex, '@'); @@ -971,6 +982,7 @@ int orte_regx_base_parse_ppn(orte_job_t *jdata, char *regex) } } + re_enter = true; return rc; }