[Openmp-commits] [openmp] [OpenMP] Address __kmp_dist_for_static_init issue (PR #129902)
via Openmp-commits
openmp-commits at lists.llvm.org
Thu Mar 13 00:24:05 PDT 2025
jprotze wrote:
The assertion breaks, because of an "optimization" in the kmp code, that always triggers problems:
When encountering nested serialized teams, `t_serialized` encodes their nesting level and no explicit `kmp_base_team` object is allocated for the nested team. So, accessing parent is not the actual parent, but some ancestor. @hansangbae 's suggestion for the fix sounds reasonable. Alternatively, you could be more explicit: `KMP_DEBUG_ASSERT(team->t.t_serialized > 1 || nteams == (kmp_uint32)team->t.t_parent->t.t_nproc);`
Without checking, I would assume that
```
!$omp parallel num_threads(4)
!$omp masked
!$omp teams distribute parallel do if(teams:.false.) if(parallel:.false.)
```
Breaks with your patch. You will compare 4 with 1
https://github.com/llvm/llvm-project/pull/129902
More information about the Openmp-commits
mailing list