missing variable in OpenMP clause?

Alfio Lazzaro alaz... at cray.com
Tue Jan 22 16:09:22 CET 2013


I'm trying to compile the CP2K trunk (revision 12663) with the Intel 
compiler and OpenMP.
I get an error

error #6752: Since the OpenMP* DEFAULT(NONE) clause applies, the PRIVATE, 
SHARED, REDUCTION, FIRSTPRIVATE, or LASTPRIVATE attribute must be 
explicitly specified for every variable.   [CNT] 

in the file pw_methods.F. There are 3 offending lines, which are like this 
one:

!$omp parallel do private (ig,arg) default(none) shared(sf,r)
       DO ig = 1, cnt

The compiler complains that we need to add cnt in shared (?) since the 
default(none) is applied...

I found another problem also in the file d3_poly.F. The offending part is:

!$OMP 
THREADPRIVATE(module_initialized,a_mono_exp2,a_mono_exp3,a_reduce_idx3,a_deriv_idx3,a_mono_mult2,a_mono_mult3,a_mono_mult3a
    LOGICAL, SAVE, PRIVATE :: module_initialized=.FALSE.
    INTEGER, SAVE, DIMENSION(2,cached_dim2) :: a_mono_exp2
    INTEGER, SAVE, DIMENSION(3,cached_dim3) :: a_mono_exp3
    INTEGER, SAVE, DIMENSION(cached_dim3)   :: a_reduce_idx3
    INTEGER, SAVE, DIMENSION(3,cached_dim3) :: a_deriv_idx3
    INTEGER, SAVE, DIMENSION(cached_dim2,cached_dim2) :: a_mono_mult2
    INTEGER, SAVE, DIMENSION(cached_dim3,cached_dim3) :: a_mono_mult3
    INTEGER, SAVE, DIMENSION(4,cached_dim3) :: a_mono_mult3a

If I'm not wrong, the OMP THREADPRIVATE should be after the declaration of 
the variables.

Alfio
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.cp2k.org/archives/cp2k-user/attachments/20130122/692a782d/attachment.html>


More information about the CP2K-user mailing list