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.
Return to corresponding overview page