@@ -3230,6 +3230,12 @@ int mca_coll_ftagree_era_inter(void *contrib,
32303230 contriblh [1 ] = * (int * )contrib ;
32313231 }
32323232
3233+ /* The 'shadowcomm' is used to perform the agreement on the union of the
3234+ * local and remote groups. We create a 'fake' new communicator that shares
3235+ * the cid/c_index with the original. This is possible because ERA does not
3236+ * use normal MPI messages, but only uses c_index to match agreements
3237+ * from its own BML callbacks.
3238+ */
32333239 ompi_comm_set (& shadowcomm , /* new comm */
32343240 comm , /* old comm */
32353241 ompi_group_size (uniongrp ), /* local_size */
@@ -3238,13 +3244,14 @@ int mca_coll_ftagree_era_inter(void *contrib,
32383244 NULL , /* remote procs */
32393245 NULL , /* attrs */
32403246 comm -> error_handler , /* error handler */
3241- NULL , /* local group */
3242- uniongrp , /* remote group */
3247+ uniongrp , /* local group */
3248+ NULL , /* remote group */
32433249 0 ); /* flags */
32443250
32453251 ompi_group_free (& uniongrp );
32463252 shadowcomm -> c_contextid = comm -> c_contextid ;
32473253 shadowcomm -> c_epoch = comm -> c_epoch ;
3254+ shadowcomm -> c_index = comm -> c_index ;
32483255 snprintf (shadowcomm -> c_name , MPI_MAX_OBJECT_NAME , "SHADOW OF %s" , & comm -> c_name [0 ]);
32493256 shadowcomm -> any_source_offset = comm -> any_source_offset ;
32503257 shadowcomm -> agreement_specific = comm -> agreement_specific ;
0 commit comments