[Openmp-commits] [PATCH] D56804: Fix thread_limits to work properly for teams construct
Andrey Churbanov via Phabricator via Openmp-commits
openmp-commits at lists.llvm.org
Thu Feb 7 09:39:08 PST 2019
AndreyChurbanov added inline comments.
Comment at: runtime/src/kmp.h:1851
+ int thread_limit; /* internal control for thread-limit-var */
int max_active_levels; /* internal control for max_active_levels */
> AndreyChurbanov wrote:
> > protze.joachim wrote:
> > > Is this entry necessary? From my understanding of the spec, one copy per cg or thread should be sufficient.
> > Maybe you are correct, but the specification says it is per-task ICV. So this looks a safer way to go. E.g. in future the setter routine can be added.
> The spec does not litteraly say per-task ICV. The scope is "data environment".
> data environment: The variables associated with the execution of a given //region//.
> Since the value can only be set/changed on a per-cg base, this should be sufficient.
I lean to agreeing with you that thread-limit-var is rather per-contention-group. Regardless that each task has its own data environment, and spec says "There is one copy of this ICV per data environment", skipping per-task thread-limit-var ICV might be feasible. Though not easy, as the push / pop operations for CG-root structures need to be revised then.
CHANGES SINCE LAST ACTION
More information about the Openmp-commits