tags:

views:

31

answers:

1

Hi,

I am parallelizing several separated for-loops using OpenMP. While debugging in gdb, I found that the multiple threads are created when the running reaches the first parallel region. The multiple threads exited at the end of running the whole program. This is contrary to what I think about the split-join model of OpenMP, where threads should join together into a master thread and then terminate at the end of each parallel region instead of the end of the whole program.

Am I wrong?

Thanks!

+1  A: 

It is implementation specific, but it is likely that the implementation puts the worker threads in a thread-pool.

Will