Reputation: 207
What does it mean in OpenMP that
Nested parallel regions are serialized by default
Does it mean threads do it continuously? I also can not underestend this part:
A throw executed inside a parallel region must cause execution to resume within
the dynamic extent of the same structured block, and it must be caught by the
same thread that threw the exception.
Upvotes: 2
Views: 909
Reputation: 329
As explained here (scroll down to "17.1 Nested parallelism", by default a nested parallel region will not be parallelized, thus run sequentially. Nested thread creation is possible using either OMP_NESTED=true
(as environment variable) or omp_set_nested(1)
(in your code).
EDIT: also see this answer to a similar question.
Upvotes: 2