next up previous contents
Next: The Owner-Computes Rule Up: Data Distribution Previous: Commentary

 

Distribution of Allocatables

Distribution of allocatable arrays is based on exactly the same concepts as for distributing regular arrays except that the distribution is performed immediately after the allocation has been performed, for example,

    REAL, ALLOCATABLE, DIMENSION(:,:) :: A
    INTEGER                           :: ierr
!HPF$ PROCESSORS, DIMENSION(10,10)    :: P
!HPF$ DISTRIBUTE (BLOCK,CYCLIC)       :: A
      ...
     ALLOCATE(A(100,20),stat=ierr)
!---> A automatically distributed here
!     block size in dim=1 is 10 elements
!     ...
     DEALLOCATE(A)
    END

The blocksize is determined immediately after allocation.

Once allocated, these arrays behave in the same way as regular arrays. The array is effectively undistributed at deallocation.

Now try this question gif

Return to corresponding overview page gif


next up previous contents
Next: The Owner-Computes Rule Up: Data Distribution Previous: Commentary

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