next up previous contents
Next: The REALIGN Directive Up: Approved Extensions for Data Mapping Previous: Syntax of Attributed Forms

The REDISTRIBUTE Directive

 

The REDISTRIBUTE directive is similar to the DISTRIBUTE directive but is considered executable. An object or template may be redistributed at any time, provided it has been declared DYNAMIC (see Section 8.5). Any other objects currently ultimately aligned with an array (or template) when it is redistributed are also remapped to reflect the new distribution, in such a way as to preserve alignment relationships

(see Section 3.4). (This can require a lot of computational and communication effort at run time; the programmer must take care when using this feature.)

The DISTRIBUTE directive may appear only in the specification-part of a scoping unit. The REDISTRIBUTE directive may appear only in the execution-part of a scoping unit. The principal difference between DISTRIBUTE and REDISTRIBUTE is that DISTRIBUTE must contain only a specification-expr as the argument to a distribution format such as BLOCK or CYCLIC, whereas in REDISTRIBUTE such an argument may be any integer expression. Another difference is that DISTRIBUTE is an attribute, and so can be combined with other attributes as part of a combined-directive, whereas REDISTRIBUTE is not an attribute (although a REDISTRIBUTE statement may be written in the style of attributed syntax, using ``::'' punctuation).

The syntax of the REDISTRIBUTE directive is:

H802 redistribute-directive is REDISTRIBUTE distributee dist-directive-stuff
or REDISTRIBUTE dist-attribute-stuff :: distributee-list

Note that, although an object may not have both the INHERIT attribute and the DISTRIBUTE attribute, any object--whether or not it has the INHERIT attribute--may appear as a distributee in a REDISTRIBUTE directive, provided that it has the DYNAMIC attribute and that it does not appear as an alignee in a ALIGN or REALIGN directive.

If a range directive (see Section 8.11) has been used to restrict the set of distribution formats allowed for a distributee, then the new mapping must match one of the formats specified in the range directive.

The statement form of a REDISTRIBUTE directive may be considered an abbreviation for an attributed form that happens to mention only one distributee; for example,

!HPF$ REDISTRIBUTE distributee ( dist-format-list ) ONTO dist-target
is equivalent to
!HPF$ REDISTRIBUTE ( dist-format-list ) ONTO dist-target :: distributee


next up previous contents
Next: The REALIGN Directive Up: Approved Extensions for Data Mapping Previous: Syntax of Attributed Forms