[Omp] Threadprivate variables and nested parallelism
Marina Kraeva
kraeva at iastate.edu
Tue Dec 12 09:06:57 PST 2006
Hello,
I could not find in API 2.5 what will happen if a threadprivate variable
is referenced within a nested parallel region, other than this:
The values of data in the threadprivate objects of threads other than
the initial thread are guaranteed to persist between two consecutive
active parallel regions only if all the following conditions hold:
• Neither parallel region is nested inside another parallel region.
I would think that each thread of the initial team (created for the
nesting parallel region) will create a new team, and the threadprivate
copy of this thread will become shared among threads in the new team in
the nested parallel region (so there will be NT shared variables, where
NT is the number of threads in the nesting parallel region).
Am I correct assuming this? Can I count on this behavior or it's undefined?
Thank you,
Marina Kraeva.
More information about the Omp
mailing list