(j3.2006) 07-276r1

Malcolm Cohen malcolm
Mon Oct 1 21:25:59 EDT 2007


On Sat, 29 Sep 2007 06:25:33 +0900, Aleksandar Donev <donev1 at llnl.gov>  
wrote:
> Apparently Malcolm rejected the edit in 07-267r1:

And with good reason.

> "07-276r1
>   REJECTED.  The problem is not that procedures with dummy coarrays are
>   interoperable, the problem is that coarrays are interoperable.  Make
>   them noninteroperable and the existing wording which requires
>   interoperable dummies would handle this already.  Therefore, fix the
>   initial paragraphs of 15.3.5 and 15.3.6 (07-007r2:p487) instead."
>
> We discussed this at the meeting (am not sure if Malcolm was there) and
> decided that we wanted co-arrays to be interoperable as local arrays.  
> There
> is absolutely no reason to forbid, for example, C_LOC(co_array), and  
> call C
> to do something with co_array, is there?

And ALLOCATABLE arrays are not interoperable either, but somehow we
manage to do useful things with them to/from C.

Just what C variable is

   REAL,BIND(C,NAME='fred') :: x[10,*]

meant to interoperate with?

i.e. the problem is not limited to dummies, it is completely analogous
to ALLOCATABLEs, and we solved it for ALLOCATABLEs by not making them
interoperable too.

> The words as they are, say that explicit-shape co-arrays are  
> interoperable
> with C arrays. The co-rank simply does not matter.

That would be technically wrong then.

Looking at the words for C_LOC, I don't see anything that would be
affected by coarrays not being interoperable.  It says it has to be
contiguous or scalar, and have interoperable type and type params.

> I think this is exactly
> what should be the case, which is why we did not edit 13.3.5/6.

I would still prefer the problem to be fixed properly rather
than only half of it.  And I'd prefer a more fully baked solution.

The very idea of "coarrays being interoperable" MEANS that there is
some C concept that corresponds to the coarray concept.  That just
ain't so right now.

Cheers,
-- 
Malcolm Cohen, Nihon Numerical Algorithms Group KK, Tokyo, Japan.



More information about the J3 mailing list