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