Subject: hpff-interpret: Re: owners of "shadow elements"

From: [email-masked] (Carl Offner)
Date: Fri, 10 Jan 1997 08:13:38 -0500

---------------------------------------------------------------------------
[email-masked] is a mailing list for corrections,
clarifications, and interpretations related to High Performance Fortran.
Instructions for adding or deleting yourself from this list appear at the
bottom of this message.
---------------------------------------------------------------------------

The purpose of the SHADOW directive is simply to give information
to the compiler.  It does not change the meaning of which processor
owns which element of an array.  Shadow elements are not really
visible to the programmer, and are managed completely by the compiler.
So for instance in the example given:

      REAL A(10),B(10)
!HPF$ PROCESSORS P(2)
!HPF$ DISTRIBUTE (BLOCK) ONTO P :: A,B
!HPF$ SHADOW A(1:0)

!HPF$ INDEPENDENT
      DO I=1,10
!HPF$ ON HOME(A(I))
        B(I) = A(I)
      ENDDO

There is no requirement that the compiler keep the shadow elements
up to date.  The shadow elements are simply there for the compiler
to use if and when a nearest-neighbor computation occurs (and
in the example given, there isn't one).  When the compiler needs
to use shadow elements, of course it is responsible for initializing
them correctly.

So the short answer is no, the proposed interpretation is not
correct, and SHADOW does not affect the meaning of ON, at least
in this case.

		--Carl Offner
---------------------------------------------------------------------------
To (un)subscribe to this list, send mail to
[email-masked].
Leave the subject line blank, and in the body put the line
(un)subscribe <email-address>
---------------------------------------------------------------------------