Subject: allocatable arrays

From: [email-masked] (Vasanth Bala)
Date: Wed, 24 Mar 93 15:36:28 -0500

HPF allows ALIGN operations on allocatable arrays, with the rule that
the alignment definition "only takes effect at the point where the
arrays are created, not where they are declared" (pg. 33 of HPF v1.0
manual).

But if you take the example listed there, and flip the two allocate
statements for A and B, it produces an ambiguous situation:

subroutine millard_fillmore (n, m)

  real, allocatable (:) :: A, B
  align B(i) with A(i+n)
  distribute A(block(m*2))

  allocate (B(13))
  ...
  <s1>  B(i) = B(i-1) + B(i+1)
  ...
  allocate (A(27))
  ...
  <s2>  B(i) = B(i-1) + B(i+1)

return
end

What is the distribution of B at statement <s1> ??

The distribution of B at stmt <s2> is clear, because the moment
A and B are both allocated, the alignment is clear.  Also, if
A is allocated before B, there is no problem.  But if B is
allocated before A as shown above, it is unclear what the distribution
of B should be.

-Vas