16
H. Murai et al.
XMP/C
XMP/Fortran
0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21
p[0], p(1)
p[1], p(2)
p[2], p(3)
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22
Fig. 10 Block-cyclic distribution
XcalableMP C
#pragma xmp nodes p[3]
#pragma xmp template t[22]
#pragma xmp distribute t[cyclic(3)] onto p
XcalableMP Fortran
!$xmp nodes p(3)
!$xmp template t(22)
!$xmp distribute t(cyclic(3)) onto p
2.3.4 Gblock Distribution
XcalableMP C
#pragma xmp distribute t[gblock(W)] onto p
XcalableMP Fortran
!$xmp distribute t(gblock(W)) onto p
The target template t is divided into contiguous blocks of size W[0], W[1], · · · ,
in XMP/C, or W(1), W(2), · · · , in XMP/Fortran, and distributed among nodes in
the node array p (Fig. 11). The array W is called a mapping array. The programmer
can specify irregular (uneven) block distribution with the gblock format.
XcalableMP C
#pragma xmp nodes p[3]
#pragma xmp template t[22]
int W[3] = {6, 11, 5};
#pragma xmp distribute t[gblock(W)] onto p
XcalableMP Fortran
!$xmp nodes p(3)
!$xmp template t(22)
integer, parameter :: W(3) = (/6,11,5/)
!$xmp distribute t(gblock(W)) onto p
Précédent

- 24/265

Suivant