next up previous contents
Next: Scalar Arguments Up: HPF and Procedures Previous: Array Arguments Example 2

 

Collapsing Dimensions

If a dimension has a scalar index it is collapsed. Consider,

!HPF$ DISTRIBUTE (BLOCK,BLOCK) :: A, B
     ...
    CALL Xubbie(A(i,:),b(i,:))
     ...
    SUBROUTINE Xubbie(x,y)
     REAL, DIMENSION(:) :: x, y
     !HPF$ DISTRIBUTE (BLOCK) :: x, y

This code fragment demonstrates a further example of `accidental' remapping. Here the actual arguments are 1D sections of 2D objects. As the original objects are distributed over a 2D grid, the 1D dummy arguments will only be mapped over a 1D slice of the processor array. The problem arises because the procedure specifies that the dummy arguments are distributed over the default processor grid (which may well contain all the processors).

For example, if the system is executing on a 16-processor grid, which is either viewed as a linear chain of 16 processors or as a tex2html_wrap_inline29656 square gridgif, then A(i,:) and b(i,:) will be distributed onto a 4 processor slice (of the tex2html_wrap_inline29656 grid,) but the dummy arguments x and y will be distributed over the whole 16-processor chain. Due to the lack of intent specification, two remappings will take place, one on entry and one on exit.

Return to corresponding overview page gif


next up previous contents
Next: Scalar Arguments Up: HPF and Procedures Previous: Array Arguments Example 2

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