Distributed barrier was found to cause hangs in some test cases. Found
that a section updating the barrier size was improperly shifted to a
different code section during patching. Restored to original
location, all tests run to completion.
Differential Revision: https://reviews.llvm.org/D141618
__kmp_partition_places(team);
}
#endif
+
+ if (team->t.t_nproc > 1 &&
+ __kmp_barrier_gather_pattern[bs_forkjoin_barrier] == bp_dist_bar) {
+ team->t.b->update_num_threads(team->t.t_nproc);
+ __kmp_add_threads_to_team(team, team->t.t_nproc);
+ }
}
if (__kmp_display_affinity && team->t.t_display_affinity != 1) {
parent_team->t.t_stack_id = NULL;
}
#endif
-
- if (team->t.t_nproc > 1 &&
- __kmp_barrier_gather_pattern[bs_forkjoin_barrier] == bp_dist_bar) {
- team->t.b->update_num_threads(team->t.t_nproc);
- __kmp_add_threads_to_team(team, team->t.t_nproc);
- }
}
KMP_MB();