next up previous contents
Next: Collapsing Dimensions Up: Alignment and 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: Alignment and Distribution Previous: Example

©University of Liverpool, 1997
Wed May 28 23:37:18 BST 1997
Not for commercial use.