Skip to content

Commit a068b94

Browse files
committed
Merge pull request #1595 from hjelmn/sparse_group_fix
ompi/group: fix sparse group proc reference counting
2 parents 3913777 + 1783d94 commit a068b94

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

ompi/group/group_init.c

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -275,7 +275,11 @@ static void ompi_group_destruct(ompi_group_t *group)
275275
the proc counts are not increased during the constructor,
276276
either). */
277277

278-
ompi_group_decrement_proc_count (group);
278+
#if OMPI_GROUP_SPARSE
279+
if (OMPI_GROUP_IS_DENSE(group))
280+
/* sparse groups do not increment proc reference counters */
281+
#endif
282+
ompi_group_decrement_proc_count (group);
279283

280284
/* release thegrp_proc_pointers memory */
281285
if (NULL != group->grp_proc_pointers) {

0 commit comments

Comments
 (0)