Do 'sections' synchronize?

General OpenMP discussion

Do 'sections' synchronize?

Postby bimargulies » Mon Sep 29, 2008 7:18 am

Given:

#pragma omp parallel sections
{
#pragma omp parallel section
{
}
...
}

,

Will the next line after the 'sections' block execute before all of the sections have completed?
bimargulies
 
Posts: 7
Joined: Sun Sep 28, 2008 10:30 am

Re: Do 'sections' synchronize?

Postby ejd » Mon Sep 29, 2008 8:43 am

From the OpenMP V2.5 spec, section 2.5.2 sections Construct, Description, page 41:17-18:
There is an implicit barrier at the end of a sections construct, unless a nowait clause is specified.

So for your example, the answer is no, the next line after the 'sections' block will not execute before all the sections have completed.
ejd
 
Posts: 1025
Joined: Wed Jan 16, 2008 7:21 am


Return to Using OpenMP

Who is online

Users browsing this forum: Google [Bot], Yahoo [Bot] and 11 guests