A distribution directive provides control over the distribution of an array. Specifications are block distribution, scattered distribution, block-scattered distribution, or no distribution. The relative weight of distribution along each axis indicates the distribution ratio among axes. The distribution ratio is defined as the ratio of the number of partitions along different axes.
A distribution-directive is:
DISTRIBUTE distribution-spec-list
A distribution-spec is:
array-name ( axis-descriptor-list )
An axis-descriptor is one of:
A weight is:
scalar-integer-constant
A size is:
scalar-integer-constant
The number of axis-descriptors in a distribution-spec must equal the rank of the array specified by array-name in the distribution-spec. Each distribution-spec specifies distribution information for the array given by array-name. The array is distributed with the attributes specified by the axis-descriptor-list of that distribution-spec. Each axis-descriptor defines the attributes of the corresponding dimension that is to be distributed. The keywords BLOCK, CYCLIC, BLOCK_CYCLIC, and ``:'' control the distribution style. For each axis-descriptor in the list:
The keyword CYCLIC specifies a scattered-distribution that has also been called an interleaving partitioning. It is a powerful distribution method to balance loads for irregular computation structures.
The distributions shown in Figures (a) and
(b) are examples of
block distributions: each processor contains a contiguous subarray
of the specified array.
Figure
(a) illustrates a cyclic distribution
in which columns of an array are distributed onto four processors
so that each processor, starting from a different offset, contains every
fourth column. Figure
(b) shows a distribution that is cyclic
in both dimensions onto four processors arranged in a 2 x 2 square.
Figure
shows the combination distribution with block
and cyclic.