XcalableMP Programming Model and Language
67
call sub2(x)
end subroutine
10 subroutine sub2(a)
!$xmp nodes p(2)
!$xmp template t(10)
!$xmp distribute t(block) onto p
real a(10)
15 !$xmp align a(i) with t(i)
:
end subroutine
To handle a parameter or dummy argument as a global data in the callee
procedure, the programmer need to explicitly distribute it with an align directive
(Fig. 52).
If no align directive is specified in the callee procedure for a parameter or
dummy argument that is declared as a global data in the caller procedure, it is
handled as if it were declared in the callee procedure as a local data on each node,
as follows (Fig. 53).
Fig. 52 Passing a global
argument to a global
parameter
Précédent

- 75/265

Suivant