next up previous contents
Next: Other Pitfalls Up: Alignment and Distribution Previous: Aligning Allocatable Arrays

 

Example

Given,

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

then,

      ALLOCATE (B(100),stat=ierr)
      ALLOCATE (A(100),stat=ierr)

is OK, as is

      ALLOCATE (B(100),A(100),stat=ierr)

because the align-target, B, exists before A, however,

      ALLOCATE (A(100),stat=ierr)
      ALLOCATE (B(100),stat=ierr)

is not, and neither is,

      ALLOCATE (A(100),B(100),stat=ierr)

because here the allocations take places from left to right.


next up previous contents
Next: Other Pitfalls Up: Alignment and Distribution Previous: Aligning Allocatable Arrays

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