openMP nowait with 2 for loops

Hi everyone,

I have a question about openMP:
1
2
3
4
5
6
7
8
9
When I have two for loops like this:

#pragma omp parallel
{
#pragma omp for default(none) nowait
for (int i = 0; i < total; i++) {}

#pragma omp for default(none)
for (int x = 0; x < size - 1; x++) {}


When I have 8 threads working on loop 1, and one of the threads completed, it will go on to loop 2. When it reaches loop 2, will it become one of the eight threads of loop 2, or will that thread 'activate' the second openMP thread-making?
In other words: Will each #pragma omp for cause 8 new threads, or will 8 threads do all the work in these two functions?

Cheers!
Topic archived. No new replies allowed.