(j3.2006) paper 17-242r1 - locality

Bill Long longb
Fri Oct 27 19:07:25 EDT 2017


In paper 17-242r1 we changed C1129 to read

C1129 If the locality-spec DEFAULT ( NONE ) appears in a DO CONCURRENT
statement, a variable that is a local or construct entity of a scope
containing the DO CONCURRENT construct, and that appears in the block
of the construct, shall have its locality explicitly specified.


How about an (admittedly pathological) example

subroutine sub
  integer x(1)
 do concurrent (i=1:1) default(none) shared(x)
    x(i) = 0
    do concurrent (j = 1:1) default (none)
       x(j) = 1
    end do
 end do
 print *, x
end subroutine sub

Question: Is a locality spec, such as "shared(x)?, required on the second do concurrent statement?  The code above appears to satisfy the requirements of the constraint - the locality of X is explicitly specified (on the outer do concurrent).  Or did we intend to say  ??shall have it locality explicitly specified ON THAT DO CONCURRENT STATEMENT.??   [CAPS to emphasize added text.] 


Cheers,
Bill

Bill Long                                                                       longb at cray.com
Principal Engineer, Fortran Technical Support &   voice:  651-605-9024
Bioinformatics Software Development                      fax:  651-605-9143
Cray Inc./ 2131 Lindau Lane/  Suite 1000/  Bloomington, MN  55425





More information about the J3 mailing list