next up previous contents
Next: The SHADOW Directive Up: Approved Extensions for Data Mapping Previous: New Distribution Formats

The RANGE Directive

 

The RANGE attribute is used to restrict the possible distribution formats for an object or template that has the DYNAMIC attribute or a transcriptive distribution format (including pointers).

H811 range-directive is RANGE ranger range-attr-stuff
H812 ranger is object-name
or template-name
H813 range-attr-stuff is range-distribution-list
H814 range-distribution is ( range-attr-list )
H815 range-attr is range-dist-format
or ALL
H816 range-dist-format is BLOCK [ ( ) ]
or CYCLIC [ ( ) ]
or GEN_BLOCK
or INDIRECT
or *

Since the length of each range-attr-list is the same as the rank of the ranger, each range-attr, R, in each range-distribution corresponds positionally to a dimension D of the ranger. This dimension D in turn either corresponds (though not necessarily positionally) to an axis A of the template with which the ranger is ultimately aligned, or corresponds to no axis in that template.

With this notation, a RANGE attribute on a ranger is equivalent to the following restriction:

For at least one range-distribution in the range-distribution-list, every range-attr, R, must either

This compatibility must be maintained by any DISTRIBUTE or REDISTRIBUTE directive in which the ranger appears as a distributee, or if the ranger has the POINTER attribute and is transcriptively distributed, for any target with which the ranger becomes associated.

A distribution format of

  1. BLOCK is compatible with a range-dist-format of BLOCK, BLOCK() or CYCLIC();
  2. BLOCK(n) is compatible with a range-dist-format of BLOCK(), or CYCLIC();
  3. CYCLIC is compatible with a range-dist-format of CYCLIC or CYCLIC();
  4. CYCLIC(n) is compatible with a range-dist-format of CYCLIC();
  5. GEN_BLOCK(a) is compatible with a range-dist-format of GEN_BLOCK;
  6. INDIRECT(a) is compatible with a range-dist-format of INDIRECT;
  7. * is compatible with a range-dist-format of *.

All distribution formats are compatible with a range-dist-format of ALL.

Note that the possibility of a RANGE directive of the form

!HPF$ RANGE range-attr-stuff-list :: ranger-list

is covered by syntax rule H301 for a combined-directive using combined-attribute-extended as defined in rule H801.

!HPF$    DISTRIBUTE T(BLOCK)
!HPF$    ALIGN A(I,J) WITH T(I)

         CALL SUB(A)
            ....

         SUBROUTINE SUB(X)
!HPF$    INHERIT X
!HPF$    RANGE X (BLOCK, *), (CYCLIC, *)

Since the ultimate align target of X, the inherited template T in this case, does not have a second dimension, only a * or ALL can be used in the second dimension of each range-distribution on for X.

         REAL A(100, 100, 100)
!HPF$    DISTRIBUTE A(BLOCK, *, CYCLIC)

         CALL SUB( A(:,:,1) )          ! Conforming
         CALL SUB( A(:,1,:) )          ! Nonconforming
         CALL SUB( A(1,:,:) )          ! Nonconforming
            ....

         SUBROUTINE SUB(X)
         REAL X(:, :)
!HPF$    INHERIT X
!HPF$    RANGE X (BLOCK, *)

Given the range directive in the subroutine SUB, only the first call to SUB is conforming. However, all three calls can be made conforming if the range directive above is replaced by the following directive:

!HPF$    RANGE (BLOCK, *), (BLOCK, CYCLIC), (*, CYCLIC) :: X


next up previous contents
Next: The SHADOW Directive Up: Approved Extensions for Data Mapping Previous: New Distribution Formats