(j3.2006) a question on cobounds
Malcolm Cohen
malcolm
Mon Jul 27 21:00:54 EDT 2009
Jim Xia wrote:
>
> > > subroutine foo (n)
> > > integer, intent(in) :: n
> > > integer W(n)[*] !<-- we made it
> clear
> > > this is not allowed
> > > * integer, save :: U(10)[N,*] !<-- but do we intend to
> allow
> > > this? I have difficulties in finding constraints/rules that
> forbid this*
> > >
> >
> > This is allowed. The array U has the same size on all images, and the
> > size is known at compile time. The [N,*] only affects how the image
> > numbers are computed in references within the subroutine. This case is
> > discussed at [92:24-26].
>
>
> Are different N values on different images allowed?
Good catch; the cobounds are required to be the same on every image for
allocatable coarrays by [128:12-13], but I see no such requirement here,
nor is it generally possible (there are no synchronisation points where
the cobounds could be compared between images).
If there is no cobound requirement in this case, what purpose does the
requirement on allocatable ones serve? Enforcement of good programming
practice?
Cheers,
--
.......................Malcolm Cohen, Nihon NAG, Tokyo.
More information about the J3
mailing list