The DISTRIBUTE directive specifies a simple mapping pattern of data objects across processors. There are two major types of mapping patterns that can be specified using this directive, block and cyclic.
The DISTRIBUTE directive takes one of the following forms:
Elements of a given dimension of an array are distributed in approximately equal-sized blocks, one block to a processor.
The expr must be a specification expression whose value is a positive integer n such that, for every d-object, n x p >= d (equivalently, n >= |d/p|). The d is the extent of the corresponding dimension of the d-object and p is the corresponding dimension of the processors arrangement onto which the d-object is to be distributed.
Elements of a given dimension of an array are distributed to processors in round-robin fashion.
The expr must be a specification expression whose value is a positive integer.
Specifies serial (non-distributed) mapping for a dimension of an array.
The length of the list must equal the rank of d-object.
Rules and Behavior
Each dimension of an array is distributed independently. This means that BLOCK and CYCLIC mapping patterns can be combined. (For more information, see the Compaq Fortran User Manual for Tru64 UNIX and Linux Alpha Systems.)
The DISTRIBUTE directive can appear only in the specification part of a scoping unit.
If an ONTO clause is present, d-target must name a processor arrangement declared in a PROCESSORS directive.
If both a format-list and d-target appear, the number of elements of the format-list that are not an asterisk (*) must equal the rank of the named processor arrangement.
If d-target appears without a format-list, the rank of each d-object must equal the rank of the named processor arrangement.
An asterisk (*) appearing before a left parenthesis "(" or following ONTO, specifies a descriptive mapping. This constitutes an assertion about the current mapping of a dummy argument on entry to a subprogram, rather than a request for a desired mapping of that dummy argument.
Consider the following example:
!HPF$ DISTRIBUTE GO_BOARD(CYCLIC,*)
The * specifies that GO_BOARD is not to be distributed along its second axis; an entire row is to be distributed as one object.
For More Information: