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