174
H. Sakagami
Fig. 4 IMFLOPS/PEAK measured by the hardware monitor installed on the K computer with
prefetch optimization by prefetch_stride compiler option. Solid and dash lines indicate performances of XMP and MPI codes, respectively. Colors of light gray, gray, and black indicate static
arrays, allocatable arrays, and allocatable arrays with prefetch optimization, respectively
3 Local-View Programming Model
In the local-view programming model, communications among domains are written
by Fortran Coarray assignment statements, with which two types of one-sided
communications for local data, namely put and get, are adopted. For the sake of
simplicity, we focus on the all of X, Y, and Z domain decomposition method in this
section.
3.1 Communications Using Coarray
Just same as the MPI program, DO loop boundaries in the original source code must
be modified and communications must be explicitly written by Coarray assignment
statements. Typical XMP Fortran programs using put communications are shown
in Listing 4, which is corresponding to Listing 3. Division numbers are defined
just as variables, not parameters to easily change them by input data without
recompilations. As Coarray features in Fortran 2008, which is supported by the
XMP/F compiler at that time, do not include reduction operations, the code to
obtain the maximum value of the scalar variable in whole simulation system must
be hand-coded. But Coarray features in Fortran 2015 support reduction operations
by intrinsic subroutines, and these codes are simply replaced with co_max intrinsic
subroutine, which is shown in Listing 5. These intrinsic subroutines are partially
supported by the current XMP/F compiler.
Précédent

- 180/265

Suivant