Do 'sections' synchronize?

General OpenMP discussion

Do 'sections' synchronize?

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


#pragma omp parallel sections
#pragma omp parallel section


Will the next line after the 'sections' block execute before all of the sections have completed?

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.
Posts: 1025
Joined: Wed Jan 16, 2008 7:21 am

Return to Using OpenMP

Who is online

Users browsing this forum: No registered users and 2 guests