As the comments and the function name indicate, the function returns the internal global num of a thread, not the num of a thread within a team, which is what the current function do by returning the value of kmp_nth global var. This patch fixes that by returning the kmp_all_nth value.
Details
Details
- Reviewers
tlwilmar AndreyChurbanov - Commits
- rG76d428546083: Fix for the __kmpc_global_num_threads function to return the value of the…
rOMP290272: Fix for the __kmpc_global_num_threads function to return the value of the…
rL290272: Fix for the __kmpc_global_num_threads function to return the value of the…
Diff Detail
Diff Detail
- Repository
- rL LLVM
Event Timeline
Comment Actions
LGTM
Yonghong, you are right, the kmp_all_nth counts all threads created by the runtime library, whereas kmp_nth counts only active threads those belong to OMP teams.