100
H. Iwashita and M. Nakao
possible to calculate the address of the remote coarray with no prior inter-image
communication.
Requirement for the Implementation Static coarrays must be allocated and made
accessible remotely before execution of the user program and made inaccessible
remotely and be freed after execution of the user program. In contrast, allocatable
coarrays must be allocated and made accessible remotely when the ALLOCATE
statement is encountered and made inaccessible remotely and freed when the
DEALLOCATE statement is encountered or the exit point of the scope to which the
corresponding ALLOCATE statement is encountered.
2.3 Communication
Coarray features in XMP include three types of communications between images,
i.e., reference and definition to remote coarrays, collective communications (intrinsic subroutines CO_SUM, CO_MAX, CO_MIN, and CO_BROADCAST), and atomic
operations (ATOMIC_DEFINE and ATOMIC_REF). Collective communications
and atomic operations are similar to those in MPI library. Communications for
reference and definition to remote coarrays are characteristic for coarray features.
PUT communication is caused by an assignment statement with a coindexed
variable as the left-hand side expression, e.g.,
a(i,j)[k] = alpha * b(i,j) + c(i,j)
This statement causes the PUT communication to the array element a(i,j) on
image k with the value of the left-hand side. Using the Fortran array assignment
statement, array-to-array PUT communication can be written easily, e.g., the
following statement causes M×N-element PUT communication:
a(1:M,1:N)[k] = alpha * b(1:M,1:N) + c(1:M,1:N)
GET communication is caused by referencing the coindexed object, which is
represented by a coarray variable with cosubscripts enclosed by square brackets,
e.g., s[1,2] and a(i,j)[k], where s and a are scalar and two-dimensional
array coarrays, respectively. A coindexed object can appear in almost any expression, including array expressions.
Requirement for the Implementation In order to implement definition/reference
to a coindexed variable/object, PUT/GET one-sided communication is suitable
for use. In order to avoid costly processing, such as a remote procedure call,
remote direct memory access-based (RDMA-based) implementation is desirable. In
PUT/GET communication for large data, redundant multiple memory copies should
carefully be avoided for all software layers, the communication library, the runtime,
the Fortran library, and the object.
H. Iwashita and M. Nakao
possible to calculate the address of the remote coarray with no prior inter-image
communication.
Requirement for the Implementation Static coarrays must be allocated and made
accessible remotely before execution of the user program and made inaccessible
remotely and be freed after execution of the user program. In contrast, allocatable
coarrays must be allocated and made accessible remotely when the ALLOCATE
statement is encountered and made inaccessible remotely and freed when the
DEALLOCATE statement is encountered or the exit point of the scope to which the
corresponding ALLOCATE statement is encountered.
2.3 Communication
Coarray features in XMP include three types of communications between images,
i.e., reference and definition to remote coarrays, collective communications (intrinsic subroutines CO_SUM, CO_MAX, CO_MIN, and CO_BROADCAST), and atomic
operations (ATOMIC_DEFINE and ATOMIC_REF). Collective communications
and atomic operations are similar to those in MPI library. Communications for
reference and definition to remote coarrays are characteristic for coarray features.
PUT communication is caused by an assignment statement with a coindexed
variable as the left-hand side expression, e.g.,
a(i,j)[k] = alpha * b(i,j) + c(i,j)
This statement causes the PUT communication to the array element a(i,j) on
image k with the value of the left-hand side. Using the Fortran array assignment
statement, array-to-array PUT communication can be written easily, e.g., the
following statement causes M×N-element PUT communication:
a(1:M,1:N)[k] = alpha * b(1:M,1:N) + c(1:M,1:N)
GET communication is caused by referencing the coindexed object, which is
represented by a coarray variable with cosubscripts enclosed by square brackets,
e.g., s[1,2] and a(i,j)[k], where s and a are scalar and two-dimensional
array coarrays, respectively. A coindexed object can appear in almost any expression, including array expressions.
Requirement for the Implementation In order to implement definition/reference
to a coindexed variable/object, PUT/GET one-sided communication is suitable
for use. In order to avoid costly processing, such as a remote procedure call,
remote direct memory access-based (RDMA-based) implementation is desirable. In
PUT/GET communication for large data, redundant multiple memory copies should
carefully be avoided for all software layers, the communication library, the runtime,
the Fortran library, and the object.
