@@ -3230,6 +3230,12 @@ int mca_coll_ftagree_era_inter(void *contrib,
3230
3230
contriblh [1 ] = * (int * )contrib ;
3231
3231
}
3232
3232
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
+ */
3233
3239
ompi_comm_set (& shadowcomm , /* new comm */
3234
3240
comm , /* old comm */
3235
3241
ompi_group_size (uniongrp ), /* local_size */
@@ -3238,13 +3244,14 @@ int mca_coll_ftagree_era_inter(void *contrib,
3238
3244
NULL , /* remote procs */
3239
3245
NULL , /* attrs */
3240
3246
comm -> error_handler , /* error handler */
3241
- NULL , /* local group */
3242
- uniongrp , /* remote group */
3247
+ uniongrp , /* local group */
3248
+ NULL , /* remote group */
3243
3249
0 ); /* flags */
3244
3250
3245
3251
ompi_group_free (& uniongrp );
3246
3252
shadowcomm -> c_contextid = comm -> c_contextid ;
3247
3253
shadowcomm -> c_epoch = comm -> c_epoch ;
3254
+ shadowcomm -> c_index = comm -> c_index ;
3248
3255
snprintf (shadowcomm -> c_name , MPI_MAX_OBJECT_NAME , "SHADOW OF %s" , & comm -> c_name [0 ]);
3249
3256
shadowcomm -> any_source_offset = comm -> any_source_offset ;
3250
3257
shadowcomm -> agreement_specific = comm -> agreement_specific ;
0 commit comments