next up previous contents
Next: Collapsing Dimensions Up: Data Distribution Previous: Example

Other Pitfalls

Clearly one cannot ALIGN a regular array WITH an allocatable:

      REAL, DIMENSION(:)              :: X
      REAL, DIMENSION(:), ALLOCATABLE :: A
!HPF$ ALIGN X(:) WITH A(:)                  ! WRONG

Another pitfall,

      REAL, DIMENSION(:), ALLOCATABLE :: A, B
!HPF$ ALIGN A(:) WITH B(:)                  
     ALLOCATE(B(100),stat=ierr)
     ALLOCATE(A(50),stat=ierr)

because, A and B are not conformable as suggested by ALIGN statement, however,

      REAL, DIMENSION(:), ALLOCATABLE :: A, B
!HPF$ ALIGN A(i) WITH B(i)                  
     ALLOCATE(B(100),stat=ierr)
     ALLOCATE(A(50),stat=ierr)

would be OK as the ALIGN statement does not imply conformance (no `: 's).

Here A cannot be larger than B.

For more information, click here gif

Now try this question gif


next up previous contents
Next: Collapsing Dimensions Up: Data Distribution Previous: Example

Adam Marshall ©University of Liverpool, 1996
Fri Dec 6 18:56:08 GMT 1996
Not for commercial use.