Do concurrent: can loop variable be specified in `local`?

Further to my last post,
I tried Gfortran 14.1.0 with a locality-spec, but it was not accepted.
My locality code is:

  subroutine do_local_test
   use numerot
   implicit none
    real :: RA, RB, RC
    integer i

    ra = 0
    rb = 0
    rc = 0

    do concurrent ( i = 1:size(A) ) REDUCE (+ : RA,RB,RC )
      RA = RA + A(i)**2
      RB = RB + B(i)**2
      RC = RC + C(i)**2
    end do

    RA = sqrt (RA)
    RB = sqrt (RB) * 2
    RC = sqrt (RC) * 3
    
    call add_ticks (5,n)
    print*,RA+RB+RC, dsec, dtick,' DO REDUCE'

  end subroutine do_local_test

Perhaps my compiler options were not compatible (with my standard conforming code ?)
Does anyone have experience with using locality-spec ?

1 Like