(j3.2006) (SC22WG5.5698) AW: coarray dummy arguments

Bader, Reinhold Reinhold.Bader
Fri Apr 1 13:44:53 EDT 2016


Hi Bill, 

> -----Urspr?ngliche Nachricht-----
> Von: j3-bounces at mailman.j3-fortran.org [mailto:j3-bounces at mailman.j3-
> fortran.org] Im Auftrag von Bill Long
> Gesendet: Donnerstag, 31. M?rz 2016 14:44
> An: fortran standards email list for J3
> Cc: WG5
> Betreff: (j3.2006) (SC22WG5.5694) coarray dummy arguments
> 
> Hi Reinhold,
> 
> In your second edit, "after Note 2.34.", change "after" to "before", or made
> the citation [307:5+] and start the edit "after 12.5.2.8p2.".   The Notes should
> all be together at the end of the subclause.

OK. 

> 
> In the same edit as above, at the end of the new text, delete "on the current
> team", since it is possible to access objects on images that are part of a
> different team.

This does not apply for coarray dummy arguments. See TS 18508 [9:23+], 
at least not at the time the procedure starts execution.

> 
> The wording that prohibits the copy-in/copy-out problem is 12.5.2.8p2.

My understanding was that that paragraph is a requirement on the user program that
avoids a situation where the processor would be *obliged* to do copy-in / out. 
It therefore doesn't go far enough.

> 
> For the [312] Note 12.39+, an example of a case that is not already covered by
> existing rules would be helpful.  I found the note confusing.  I'm not sure how
> image control statements would avoid argument aliasing problems.

Consider the following procedure

SUBROUTINE S1(A, IL)
  INTEGER :: A
  INTEGER :: IL
   IL = A
END SUBROUTINE

and the following execution flow on 2 images:

Image 1: 

INTEGER  ::  I[*] = 0
I[2] = I[2] + 1
SYNC IMAGES( [1,2] )

Image 2:

INTEGER :: IL
SYNC IMAGES( [1,2] )
CALL S1(I, IL)

For this case, the image control statements must be outside the subroutine. If A were declared as a coarray
dummy in S1, one could move the SYNC IMAGES on image 2 inside the procedure. 

However I agree that the wording of the note is confusing. I'll either remove the last part of it or change it to be clearer.

Cheers
Reinhold
> 
> Cheers,
> Bill
> 
> 
> 
> On Mar 31, 2016, at 2:56 AM, Bader, Reinhold <Reinhold.Bader at lrz.de> wrote:
> 
> > Dear all,
> >
> > attached please find the draft for an attempt to fix issues with coarray dummy
> arguments that were identified
> > in a coarray-ts discussion quite some time ago. I intend to upload it to the J3
> server unless serious objections arise.
> >
> > Cheers
> > Reinhold
> >
> >
> >
> <coarray_dummy.txt>_______________________________________________
> > J3 mailing list
> > J3 at mailman.j3-fortran.org
> > http://mailman.j3-fortran.org/mailman/listinfo/j3
> 
> Bill Long                                                                       longb at cray.com
> Fortran Technical Support  &                                  voice:  651-605-9024
> Bioinformatics Software Development                     fax:  651-605-9142
> Cray Inc./ Cray Plaza, Suite 210/ 380 Jackson St./ St. Paul, MN 55101
> 
> 
> _______________________________________________
> J3 mailing list
> J3 at mailman.j3-fortran.org
> http://mailman.j3-fortran.org/mailman/listinfo/j3



More information about the J3 mailing list