Re: Co-Array Fortran



gary.l.scott@xxxxxxxx wrote:
...
from walter spector

"a(i) = b(i) + c(i)[np]


The A and B references are local. But C is a coarray, and so would
load values from coarray process 'np'. (Which may or may not be local
-
depending on the value of np.) "

the last sentence seems to imply that with a [np] reference present,
it could denote either a local or remote reference depending on the
value. that superficially seem to conflict.

We are saying the same thing.

Upon startup, there are some fixed number of 'images' of the program
executing simultaneously. Each image has a complete (co)array C. C is not
'distributed'. If C is 100 elements long, it is 100 elements long on
EACH of the images. In this sense coarrays are like MPI programming.
Each image has its own version of the array.

So if, say, some image wants data from coarray C on image #10, it
would execute:

a(i) = b(i) + c(i)[10]

If, per chance, image #10 executed the above statement, the communication
would be to its own version of coarray C. Otherwise, the communication
would be a remote version of C (on image #10.)

Does that make sense?

Walt
.



Relevant Pages

  • Re: Co-Array Fortran
    ... important to know with certainty whether a coarray is local or not. ... A co-array element is local if and only if either: ... There is no on the reference ... it could denote either a local or remote reference depending on the ...
    (comp.lang.fortran)
  • Re: Co-Array Fortran
    ... load values from coarray process 'np'. ... it could denote either a local or remote reference depending on the ... executing simultaneously. ...
    (comp.lang.fortran)
  • Re: Referencing Coarrays
    ... then the whole coarray is passed. ... That's what I've been suspecting; but I'm surprised then that one ... ambiguity of "CALL MyFunc" put additional burden on the compiler to ... denotes that some communication happens behind the scenes. ...
    (comp.lang.fortran)