In every 'modex' block I use coll->id = orte_process_info.peer_modex; id and in every 'barrier' block I use coll->id = orte_process_info.peer_init_barrier; id.

P.s. In general (as I wrote in first letter), I use 'modex' term for following code: coll = OBJ_NEW(orte_grpcomm_collective_t); coll->id = orte_process_info.peer_modex; if (ORTE_SUCCESS != (ret = orte_grpcomm.modex(coll))) { error = "orte_grpcomm_modex failed"; goto error; } /* wait for modex to complete - this may be moved anywhere in mpi_init * so long as it occurs prior to calling a function that needs * the modex info! */ while (coll->active) { opal_progress(); /* block in progress pending events */ } OBJ_RELEASE(coll);

I made several experiments with this code and the following one is
of interest: if I add sequence of two additional blocks, 'barrier'
and 'modex', right after 'modex' block, thenompi_mpi_init()
hangs in opal_progress() of the last 'modex' block.