From owner-hpff-interpret  Thu Feb 13 02:56:36 1997
Received: (from daemon@localhost) by cs.rice.edu (8.8.5/8.7.1) id CAA15524 for hpff-interpret-out; Thu, 13 Feb 1997 02:56:36 -0600 (CST)
Received: from TYO9.gate.nec.co.jp (TYO9.gate.nec.co.jp [203.180.98.35]) by cs.rice.edu (8.8.5/8.7.1) with ESMTP id CAA15519 for <hpff-interpret@cs.rice.edu>; Thu, 13 Feb 1997 02:56:30 -0600 (CST)
Received: from mailsv.nec.co.jp ([133.200.254.203]) by TYO9.gate.nec.co.jp (8.8.5+2.7Wbeta5/3.4Wb-NEC-TYO9) with ESMTP id RAA04784 for <hpff-interpret@cs.rice.edu>; Thu, 13 Feb 1997 17:56:27 +0900 (JST)
Received: from mailsv.bs1.fc.nec.co.jp (venus.d2.bs1.fc.nec.co.jp [133.203.2.164]) by mailsv.nec.co.jp (8.8.5+2.7Wbeta5/3.4W-97020710) with ESMTP
	id RAA12068 for <hpff-interpret@cs.rice.edu>; Thu, 13 Feb 1997 17:56:21 +0900 (JST)
Received: from c1mail.lang1.bs1.fc.nec.co.jp by mailsv.bs1.fc.nec.co.jp (8.7.3+2.6Wbeta5/6.4JAIN)
	id RAA02082; Thu, 13 Feb 1997 17:55:34 +0900 (JST)
Received: from c1mpc.lang1.bs1.fc.nec.co.jp by c1mail.lang1.bs1.fc.nec.co.jp (8.8.4+2.7Wbeta4/6.4J.6)
	id RAA00518; Thu, 13 Feb 1997 17:57:33 +0900 (JST)
Received: by c1mpc.lang1.bs1.fc.nec.co.jp (5.67+1.6W/6.4J.6)
	id AA02477; Thu, 13 Feb 97 17:57:58 JST
Date: Thu, 13 Feb 97 17:57:58 JST
From: hayashi@lang1.bs1.fc.nec.co.jp (Yasuharu Hayashi)
Message-Id: <9702130857.AA02477@c1mpc.lang1.bs1.fc.nec.co.jp>
To: hpff-interpret@cs.rice.edu
Subject: hpff-interpret: About the remapping of a dummy in the subprogram.
Sender: owner-hpff-interpret
Precedence: bulk

---------------------------------------------------------------------------
hpff-interpret@cs.rice.edu 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.
---------------------------------------------------------------------------



Dear HPFF:

I have two questions about the remapping of the dummy argument 
whose associated actual argument has the DYNAMIC attribute.

High Performance Fortran Language Specification Version2.0 on
p.149,l.1 says;
  
  The effect of any redistribution of the dummy after the procedure
  returns to the caller is dependent on the attribute of the actual
  argument.  If the actual argument associated with the dummy has also
  been declared DYNAMIC, then any explicit remapping of the
  dummy is visible in the caller after the procedure returns.    


EXAMPLE1:

      PROGRAM SAMPLE1
      INTERFACE
        SUBROUTINE SUB(B)
         REAL B(10)
!HPF$    PROCESSORS P(2)
!HPF$    DYNAMIC,DISTRIBUTE (BLOCK) ONTO P :: B
        ENDSUBROUTINE 
      ENDINTERFACE
      REAL A(10),B(10)
!HPF$ PROCESSORS P(2)
!HPF$ DYNAMIC,ALIGN (I) WITH B(I)       :: A
!HPF$ DYNAMIC,DISTRIBUTE (BLOCK) ONTO P :: B
         :
      CALL SUB(B)
         :
      END

      SUBROUTINE SUB(B)
      REAL B(10)
!HPF$ PROCESSORS P(2)
!HPF$ DYNAMIC,DISTRIBUTE (BLOCK) ONTO P :: B
        :
!HPF$ REDISTRIBUTE (CYCLIC) ONTO P :: B
      RETURN
      END

In EXAMPLE1, when the subroutine SUB returns and the caller 
resumes execution, the array A is remapped to maintain the alignment 
with the array B because the distribution of B was changed in the 
subroutine SUB.
Is it true?


EXAMPLE2;

      PROGRAM SAMPLE2
      INTERFACE
        SUBROUTINE SUB2(A,B)
         REAL A(10),B(10)
!HPF$    PROCESSORS P(2)
!HPF$    DISTRIBUTE (BLOCK) ONTO P :: A,B
!HPF$    DYNAMIC :: A
        ENDSUBROUTINE
      ENDINTERFACE
      REAL A(10),B(10)
!HPF$ PROCESSORS P(2)
!HPF$ DYNAMIC,ALIGN (I) WITH B(I)       :: A
!HPF$ DYNAMIC,DISTRIBUTE (BLOCK) ONTO P :: B
         :
      CALL SUB2(A,B)
         :
      END

      SUBROUTINE SUB2(A,B)
      REAL A(10),B(10)
!HPF$ PROCESSORS P(2)
!HPF$ DISTRIBUTE (BLOCK) ONTO P :: A,B
!HPF$ DYNAMIC :: A
        :
!HPF$ REDISTRIBUTE (CYCLIC) ONTO P :: A
      RETURN
      END

In EXAMPLE2, the REDISTRIBUTE directive to A in the subroutine SUB2
is not HPF conforming because it is impossible to
maintain both the alignment of the array A with the array B and 
the remapping of the array A in the subroutine SUB2 
when the subroutine SUB2 returns and the caller resumes execution.
Is it true?

Thanks,
Yasuharu Hayashi


-------------------------------------------------------------------
                            #          
       Yasuharu  Hayashi    #   NEC Corporation
                            #   hayashi@lang1.bs1.fc.nec.co.jp     
-------------------------------------------------------------------



---------------------------------------------------------------------------
To (un)subscribe to this list, send mail to
hpff-interpret-request@cs.rice.edu.
Leave the subject line blank, and in the body put the line
(un)subscribe <email-address>
---------------------------------------------------------------------------

