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

Bill Long longb
Sun Oct 29 23:02:00 EDT 2017


Hi Malcolm,

Thanks for the quick reply.  I agree that this is the only interpretation that makes sense.  Sometimes developers writing test cases for their features come up with strange end cases that cast doubt on what seems obvious. So some clarification in the standard would probably be helpful. 

Cheers,
Bill


> On Oct 27, 2017, at 8:05 PM, Malcolm Cohen <malcolm at nag-j.co.jp> wrote:
> 
> I think that adding those words makes no real difference.  It?s the plain meaning of the constraint already.
>  
> It would not hurt to add them though, and would slightly reduce misreading possibilities.  I?ve made a note to myself to that effect for when I?m doing that paper.  (Not soon.)
>  
> Cheers,
>  
> From: Bill Long
> Sent: Saturday, October 28, 2017 8:07 AM
> To: fortran standards email list for J3
> Subject: (j3.2006) paper 17-242r1 - locality
>  
> 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
> 
> 
> _______________________________________________
> J3 mailing list
> J3 at mailman.j3-fortran.org
> http://mailman.j3-fortran.org/mailman/listinfo/j3
> 
> 
> 
> Disclaimer
> 
> The Numerical Algorithms Group Ltd is a company registered in England and Wales with company number 1249803. The registered office is: Wilkinson House, Jordan Hill Road, Oxford OX2 8DR, United Kingdom.
> 
> This e-mail has been scanned for all viruses and malware, and may have been automatically archived by Mimecast Ltd, an innovator in Software as a Service (SaaS) for business.
> 
> _______________________________________________
> J3 mailing list
> J3 at mailman.j3-fortran.org
> http://mailman.j3-fortran.org/mailman/listinfo/j3

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