XcalableMP Programming Model and Language
47
#pragma xmp gmove
a[9:5] = b[0:5];
XcalableMP Fortran
!$xmp nodes p(4)
!$xmp template t(16)
!$xmp distribute t(block) onto p
integer :: a(16), b(16)
5 !$xmp align a(i) with t(i)
!$xmp align b(i) with t(i)
:
!$xmp gmove
a(10:14) = b(1:5)
In XMP/C, p[0] sends b[0]-b[3] to p[2]-p[3], and p[1] sends b[4] to
p[3]. Similarly, in XMP/Fortran, p(1) sends b(1)-b(4) to p(3)-p(4), and
p(2) sends b(5) to p(4) (Fig. 35).
Fig. 35 Collective gmove (1)
Fig. 36 Collective gmove (2)
Fig. 37 Collective gmove (3)
Précédent

- 55/265

Suivant