missing variable in OpenMP clause?

216 views
Skip to first unread message

Alfio Lazzaro

unread,
Jan 22, 2013, 10:09:22 AM1/22/13
to cp...@googlegroups.com
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

Iain Bethune

unread,
Jan 23, 2013, 4:03:41 AM1/23/13
to cp...@googlegroups.com
Thanks Alfio,

Those issues are now fixed in svn trunk.

The threadprivate issue is a bit ambiguous in the standard (and gfortran does not complain), so I've moved it after the declarations.

- Iain

--

Iain Bethune
Project Manager, EPCC

Email: ibet...@epcc.ed.ac.uk
Twitter: @IainBethune
Web: http://www2.epcc.ed.ac.uk/~ibethune
Tel/Fax: +44 (0)131 650 5201/6555
Mob: +44 (0)7598317015
Addr: 2404 JCMB, The King's Buildings, Mayfield Road, Edinburgh, EH9 3JZ
> --
> You received this message because you are subscribed to the Google Groups "cp2k" group.
> To view this discussion on the web visit https://groups.google.com/d/msg/cp2k/-/Kcfmg03jpbYJ.
> To post to this group, send email to cp...@googlegroups.com.
> To unsubscribe from this group, send email to cp2k+uns...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/cp2k?hl=en.


--
The University of Edinburgh is a charitable body, registered in
Scotland, with registration number SC005336.

Reply all
Reply to author
Forward
0 new messages