Coarrays in the Context of XcalableMP
109
Fig. 3 Software stack for
coarray features
3.4.1 Fortran Wrapper
Each set of Fortran wrapper procedures has a generic name and dozens of
corresponding specific names. For example, the object code contains a call to a
function with the generic name xmpf_coarray_get_generic. If the data is a
two-dimensional array of the 16-byte complex type, the Fortran compiler selects the
corresponding specific name xmpf_coarray_get2d_z16 at compile time and
generates the object code by calling a ULR function by the specific name.
The Fortran wrapper accepts Fortran array notations as the arguments and the
result variable and converts these notations into structures that can be handled in
a runtime library written in C. The Fortran wrapper also converts a C pointer to a
Fortran pointer with the shape using the Cray pointer.
The Fortran wrapper calls ULR procedures basically and calls MPI library
functions directly for collective communications.
3.4.2 Upper-layer Runtime (ULR) Library
The major role of ULR is performing the algorithms for coarray data allocation/registration (Sect. 3.2) and PUT/GET communications (Sect. 3.3). Additionally,
for atomic communications caused by intrinsic subroutines ATOMIC_DEFINE
and ATOMIC_REF, ULR calls the corresponding function of LLR after address
calculation.
3.4.3 Lower-layer Runtime (LLR) Library
The LLR basically abstracts the difference between the communication libraries.
The only exception is the allocation and registration of coarray data. Major functions
are shown below.
• Functions to allocate and register coarray variables, and functions to register
coarray variables that are already allocated. They are alternatively used in the
Précédent

- 116/265

Suivant