200
K. Tsugane et al.
code without particle calculation to communicate to the other process, and its data
distribution is annotated by the directives, as shown in Fig. 10. This improves the
readability of the code because it is unnecessary for users to describe the many
arguments on a line such as MPI APIs, thereby facilitating the easy maintenance
of the program and simple parallelization from the original sequential code. For
the global data structure, the communication with the overlapped sleeve area in the
distributed calculation domain can be described in only one line of the reflect
directive, as shown in Fig. 9.
Table 6 shows the delta Source Lines of Code (SLOC) [14] for several implementations. This metric indicates how many lines of code changed from the serial
implementation of GTC-P, which shows modified, added, and deleted lines. Due
to the reasons described above, the amount of code added and modified from the
serial implementation is smaller with the XMP-hybridview implementation than
the MPI implementation. In both of XMP implementations, the deleted lines are
larger than MPI implementation because the explicit memory free is unnecessary
for the distributed array and communication buffer for coarray in the global scope.
In summary, XMP-hybridview implementation increases productivity.
The difference in performance between XMP-hybridview and MPI is attributable
to the increase in the communication size of the reflect directive. The reflect
directive is responsible for the communication designated as the sleeve area by the
width clause, but it cannot update partially the sleeve area. Figure 21 shows that
the two-dimensional array is distributed to two nodes and exchanged the sleeve area
in MPI and XMP implementations. In GTC-P, there is a communication pattern
updated only in inner sleeve area which is represented as the hatching areas in
Fig. 21 (left).
Table 6 Differences in the
delta SLOC from Serial
implementation for several
different implementations of
GTC-P
XMP
Serial MPI
Localview Hybridview
SLOC
4110 5427 5398
5179
Modified
–
170
168
158
Added
–
1319 1303
1112
Deleted
–
2
15
43
Total delta SLOC –
1491 1486
1313
Fig. 21 Updating of the sleeve area with MPI and XMP-localview (left), and XMP-hybridview
(right) in GTC-P. The hatching areas are communicated to nearby node
Précédent

- 205/265

Suivant