[Omp] A question for OpenMP standard

Dieter an Mey anmey at rz.rwth-aachen.de
Mon Mar 26 05:47:41 PDT 2007


"Reprivatization" is legal according to the OpenMP V2.5 specification.

best regards
Dieter

Jiangzhou He schrieb:
> For the following program:
>  
> #pragma omp parallel
>   {
>     int i;
> #pragma omp single private(i)
>     {
>       ......
>     }
>   }
> 
> The /private(i)/ here is useless, but what I'm concerned about is 
> whether it's legal or illegal. I tried it with Intel C Compiler and no 
> error or warning emerges, but compiling it with PathScale C Compiler 
> causes compiling error( /Error: Privatized variable i not SHARED in 
> enclosing parallel region/). I wonder which disposal accords with the 
> the standard. Thanks.
>  
> 
> 
> ------------------------------------------------------------------------
> 
> _______________________________________________
> Omp mailing list
> Omp at openmp.org
> http://openmp.org/mailman/listinfo/omp

-- 
--------------------------------------------------------------------
Dieter an Mey
High Performance Computing               Hochleistungsrechnen
RWTH Aachen University                   Rechen- und Kommunikations-
Center for Computing and Communication   zentrum der RWTH Aachen
phone: ++49-(0)241-80-24377              Seffenter Weg 23
fax:   ++49-(0)241-80-22134              52074 Aachen, Germany
email: anmey at rz.rwth-aachen.de
--------------------------------------------------------------------



More information about the Omp mailing list