64
H. Murai et al.
Fig. 50 Remote read from a coarray
XcalableMP Fortran
integer a(10)[ * ]
integer b(10)
if (this_image() == 1) then
5
b(3:5) = a(1:3)[2]
end if
In the above example, in XMP/C, an image 0 gets a[0:3] from an image 1 and
copies it to b[3:3]; in XMP/Fortran, an image 1 gets a(1:3) from an image 2
and copies it to b(3:5) of an image 1. Figure 50 illustrates the get communication
performed in the example.
Hint As illustrated above, get communication involves an extra step to send a
request to the target node. Put communication achieves better performance than
get because there is no such extra step.
5.5 Synchronization
5.5.1 Sync All
XcalableMP C
void xmp_sync_all(int * status)
XcalableMP Fortran
sync all
At “sync all,” each image waits until all issued one-sided communication is
complete and then performs barrier synchronization among the all images.
Précédent

- 72/265

Suivant