next up previous contents
Next: Solution Up: Procedures Previous: Solution

 

Procedures

What is bad about the procedure in the following code and what will happen as control enters and leaves the procedure:

   PROGRAM Bug_Day
    REAL, DIMENSION(100,100) :: A
    !HPF$ PROCESSORS, DIMENSION(4,4) :: P
    !HPF$ DISTRIBUTE (BLOCK,BLOCK) ONTO P :: A

    INTERFACE
     SUBROUTINE Wombat(X)
      REAL, DIMENSION(100,50) :: X
      !HPF$ PROCESSORS, DIMENSION(4,4) :: P
      !HPF$ DISTRIBUTE *(BLOCK,BLOCK) ONTO *P :: X
     END SUBROUTINE Wombat
    END INTERFACE

    ! ...

    CALL Wombat(A(1:100,51:100))

    ! ...

    CALL Wombat(A(1:100,1:50))

    ! ...

   END PROGRAM Bug_Day

Give two suggestions as to how the problem may be averted.

Go back to Notes gif




next up previous contents
Next: Solution Up: Procedures Previous: Solution

©University of Liverpool, 1997
Thu May 29 10:11:26 BST 1997
Not for commercial use.