[Openmp-commits] [openmp] [OpenMP] Address __kmp_dist_for_static_init issue (PR #129902)

Sergio Afonso via Openmp-commits openmp-commits at lists.llvm.org
Fri Mar 7 08:28:19 PST 2025


skatrak wrote:

@hansangbae thank you for checking this. Your suggestion is not working for me, unfortunately. It's somehow picking up another team of threads, because `nteams` is not affected by `num_teams` clauses in the way it should (we're calling `__kmpc_push_num_teams_51` to set the number of teams prior to calling `__kmpc_fork_teams`, in case that has something to do with it).

Interestingly, on a 24-core CPU, I get `nteams=24` by default and when passing the `num_teams(1)` clause. If I pass `num_teams(2)`, then `nteams=12`, `num_teams(3) -> nteams=8`, etc.

Also, `team_id=0` always, so it doesn't properly calculate the iteration range of each thread, so every team executes the same chunk of iterations.

https://github.com/llvm/llvm-project/pull/129902


More information about the Openmp-commits mailing list