[Omp] Barrier constructs and regions

Shah, Sanjiv sanjiv.shah at intel.com
Thu Jun 16 05:19:19 PDT 2005


hi Michael,

I do not think I said or was trying to say that different constructs can
give rise to the same region.  In fact, I believe they can't.  Oh, I see
what I did wrong.  I wrote "This is a con-forming program" when I meant
to write "This is a non-conforming program".

My apologies for creating additional confusion.  To repeat, this is
non-conforming, IMO.

Sanjiv 


--
Sanjiv, 217-403-4244

-----Original Message-----
From: Michael Suess [mailto:mike_ml at suessnetz.de] 
Sent: Thursday, June 16, 2005 2:51 AM
To: Shah, Sanjiv
Cc: Omp at openmp.org
Subject: Re: [Omp] Barrier constructs and regions

On Wednesday 15 June 2005 16:44, Shah, Sanjiv wrote:
> This is a con-forming program that probably works with most
> implementations, although it's possible some flag an error (like maybe
> ours, I don't remember).
>
> The resons are as you quoted:
>
> "The following restrictions apply to the barrier construct:
> - Each barrier region must be encountered by all threads in a team or
by
> none
> at all
> - The sequence of work-sharing regions and barrier regions encountered
> must be
>   the same for every thread in a team."

Hi Sanjiv,

if I understand your answer correctly, this also means that many
constructs 
can give rise to the same region? Which is something that should
definitely be 
clarified in the spec, since this would have never occurred to me. On
the 
other hand, if this were not so, barriers could never be used when
manually 
dividing work in between threads (with omp_get_thread_num() as shown),
so it 
kind of makes sense. But then, compilers should not warn about it either
:-).

Best regards, Michael




More information about the Omp mailing list