130
A. Tabuchi et al.
Fig. 6 XACC code with OpenACC loop construct with reduction clause
Note that while a gmove directive with acc and coarray features can perform communication both between accelerators and between accelerator and host
memory that may be on different nodes, other directives with acc can perform
communication only between accelerators.
Example
In lines 2–5 of Fig. 7, the directives declare a global array a. In line 6, the shadow
directive allocates the shadow areas of a. In line 8, the enter data directive
transfers a with the shadow areas from host memory to accelerator memory. In line
9, the reflect directive updates the shadow areas of the distributed array a on
accelerator memory on all nodes.
2.4 Coarrays
In XACC, programmers can specify one-sided communication (i.e., put and get
operation) for data on accelerator memory using coarray features. A combination of
Précédent

- 137/265

Suivant