next up previous contents
Next: Examples of Dummy Distributions Up: HPF and Procedures Previous: Prescriptive Distribution

 

Descriptive Distribution

Assert that alignment and distribution is as specified, minimises communications. For example,

    SUBROUTINE Subby(A,B,RES)
     IMPLICIT NONE
     REAL, DIMENSION(:,:), INTENT(IN)   :: A, B
     REAL, DIMENSION(:,:), INTENT(OUT)  :: RES
!HPF$ PROCESSORS, DIMENSION(2,2)        :: P
!HPF$ TEMPLATE, DIMENSION(4,6)          :: T
!HPF$ DISTRIBUTE *(BLOCK,BLOCK) ONTO *P :: T
!HPF$ ALIGN (:,:) WITH *T(:,:)          :: A, B, RES
       ...
    END SUBROUTINE Subby

Here, the directives are asserting that the distribution already is as specified in the directives. The *, when applied to an object or distribution method, says that this is how things already are. So

  !HPF$ DISTRIBUTE *(BLOCK,BLOCK) ONTO *P :: T

says ``the TEMPLATE T is already distributed (BLOCK,BLOCK) on to the processor grid P''. The compiler is bound to check that this is indeed the case and, if it is not, it must perform the relevant remapping to make it so. The HPFF have modified their language specification to say that if the mapping is not as asserted in the procedure then an explicit interface must be provided to allow remapping to take place.

Because these descriptive mapping assertions give the compiler knowledge about where data is located, it is recommended that this style of directives are used.

Specifying an interface is highly recommended and the mapping directives which apply to the dummy arguments should be included.

Return to corresponding overview page gif




next up previous contents
Next: Examples of Dummy Distributions Up: HPF and Procedures Previous: Prescriptive Distribution

©University of Liverpool, 1997
Wed May 28 20:20:27 BST 1997
Not for commercial use.