(j3.2006) (SC22WG5.5932) cobounds inside a CHANGE TEAM

Bader, Reinhold Reinhold.Bader
Sat Aug 12 05:22:56 EDT 2017


Hello John,

yes, it was my understanding that the cobounds should retain their values
across
the CHANGE TEAM statement. Since I could not find the TS' words on this in
the 
2015 draft any more, I now also rechecked your N2127. On page 21 you say
that 
cobounds are readjusted for "big" (the coarray declared outside the CHANGE
team) ... 
so there seems to be potential for confusion. I didn't notice the glitch
when I read
the drafts for this - sorry!

Also, while cosubscript values remain the same inside the CHANGE TEAM, the
resulting
image index and therefore the addressed objects are always relative to the
new team - 
otherwise the ic[i, TEAM=...] notation would not be needed. The associating
entity is
meant for remapping cobounds and corank, and (from the language point of
view)
independent of the team (although the programmer had better define a
reasonable
layout for her/his own sake).

Cheers
Reinhold

> -----Urspr?ngliche Nachricht-----
> Von: j3-bounces at mailman.j3-fortran.org [mailto:j3-bounces at mailman.j3-
> fortran.org] Im Auftrag von John Reid
> Gesendet: Freitag, 11. August 2017 16:38
> An: fortran standards email list for J3 <j3 at mailman.j3-fortran.org>
> Betreff: Re: (j3.2006) (SC22WG5.5932) cobounds inside a CHANGE TEAM
> 
> Reinhold,
> 
> The cosubscripts of ic are not altered by entering the CHANGE TEAM
> construct, so the lower cobound remains 2. For cosubscripts relative to
the
> new team, an associating entity is needed.
> 
> Cheers,
> 
> John
> 
> 
> 
> Bader, Reinhold wrote:
> > Dear J3/WG5,
> >
> >
> >
> > consider the following code:
> >
> >
> >
> > PROGRAM co
> >
> >   INTEGER :: ic[2:*]
> >
> >   INTEGER :: mt
> >
> >   TYPE(team_type) :: t
> >
> >
> >
> >   mt = ... ! determine which team the image belongs to
> >
> >   FORM TEAM ( mt, t )
> >
> >   CHANGE TEAM ( t )
> >
> >       WRITE(*,*)  LCOBOUND(ic, 1)
> >
> >   END TEAM
> >
> > END PROGRAM
> >
> >
> >
> > Based on TS 18508 (N2074) [10:29-30], I would expect that all images
> > print "2". However, this edit was rejected (see 16-176r1), and I have
> > not been able to
> >
> > deduce this result from the current draft. Is something missing here?
> >
> >
> >
> > Regards
> >
> > Reinhold
> >
> >
> >
> > _______________________________________________
> > J3 mailing list
> > J3 at mailman.j3-fortran.org
> > http://mailman.j3-fortran.org/mailman/listinfo/j3
> >
> _______________________________________________
> J3 mailing list
> J3 at mailman.j3-fortran.org
> http://mailman.j3-fortran.org/mailman/listinfo/j3
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 7773 bytes
Desc: not available
Url : http://mailman.j3-fortran.org/pipermail/j3/attachments/20170812/bd191b5c/attachment.bin 



More information about the J3 mailing list