Does anybody know if ifort actually pays attention to the locality specifiers in do concurrent ? Unless I’ve misunderstood the standard (quite possible), the following should not compile, but does:
module m_demo
implicit none
contains
function demo_f(a,b)
real, contiguous, intent(in) :: a(:), b(:)
real :: demo_f(size(a))
do concurrent (integer :: i = 1:size(a)) default(none)
demo_f(i) = sin(a(i)) + exp(b(i))
end do
end function
end module
If I use the -parallel -qopt-report=3 options do get ifort to automatically parallelize do concurrent, I see in the optimization report a section like:
remark #17109: LOOP WAS AUTO-PARALLELIZED
remark #17101: parallel loop shared={ } private={ } firstprivate={ ? i } lastprivate={ } firstlastprivate={ } reduction={ }
And I’ve noticed that even if I add shared() or local() or local_init() clauses to the do concurrent statement, it always puts all the variables in firstprivate in the optimization report.
Is this is a bug, or if my expectations are wrong? Thanks.