Skip to content

Commit 75ea1df

Browse files
committed
group: defer the insertion of ompi_group_all_failed_procs to group_table
The two pre-defined groups: group_null and group_empty must be the 0th and 1st group in the group_table, for MPI_Group_f2c to be able to convert fortran group index to c_group. However, prior to this patch ompi_group_all_failed_procs was inserted to group table as the 0th group, which broke MPI_Group_f2c. This patch moved the insertion of ompi_group_all_failed_procs to after group_null and group_empty. Signed-off-by: Wei Zhang <wzam@amazon.com>
1 parent 5435430 commit 75ea1df

File tree

1 file changed

+11
-10
lines changed

1 file changed

+11
-10
lines changed

ompi/group/group_init.c

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -419,16 +419,6 @@ int ompi_group_init(void)
419419
return OMPI_ERROR;
420420
}
421421

422-
#if OPAL_ENABLE_FT_MPI
423-
/* Setup global list of failed processes */
424-
ompi_group_all_failed_procs = OBJ_NEW(ompi_group_t);
425-
ompi_group_all_failed_procs->grp_proc_count = 0;
426-
ompi_group_all_failed_procs->grp_my_rank = MPI_UNDEFINED;
427-
ompi_group_all_failed_procs->grp_proc_pointers = NULL;
428-
ompi_group_all_failed_procs->grp_flags |= OMPI_GROUP_DENSE;
429-
ompi_group_all_failed_procs->grp_flags |= OMPI_GROUP_INTRINSIC;
430-
#endif
431-
432422
/* add MPI_GROUP_NULL to table */
433423
OBJ_CONSTRUCT(&ompi_mpi_group_null, ompi_group_t);
434424
ompi_mpi_group_null.group.grp_proc_count = 0;
@@ -445,6 +435,17 @@ int ompi_group_init(void)
445435
ompi_mpi_group_empty.group.grp_flags |= OMPI_GROUP_DENSE;
446436
ompi_mpi_group_empty.group.grp_flags |= OMPI_GROUP_INTRINSIC;
447437

438+
#if OPAL_ENABLE_FT_MPI
439+
/* Setup global list of failed processes */
440+
ompi_group_all_failed_procs = OBJ_NEW(ompi_group_t);
441+
ompi_group_all_failed_procs->grp_proc_count = 0;
442+
ompi_group_all_failed_procs->grp_my_rank = MPI_UNDEFINED;
443+
ompi_group_all_failed_procs->grp_proc_pointers = NULL;
444+
ompi_group_all_failed_procs->grp_flags |= OMPI_GROUP_DENSE;
445+
ompi_group_all_failed_procs->grp_flags |= OMPI_GROUP_INTRINSIC;
446+
#endif
447+
448+
448449
ompi_mpi_instance_append_finalize (ompi_group_finalize);
449450

450451
return OMPI_SUCCESS;

0 commit comments

Comments
 (0)