Subject: Re: hpff-interpret: Changing semantics

From: "Dr A.C. Marshall" <[email-masked]>
Date: Wed, 12 Jun 1996 15:13:08 +0100 (BST)

---------------------------------------------------------------------------
[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.
---------------------------------------------------------------------------

In the last mail Harvey Richardson said:
|
|> Ah but adding an INDEPENDENT directive may change the semantics of the
|> program if the loop index variable is used before reassignment. The loop
|> variable in  the HPF version will have a different value to the F90 version
|> (either this or the value will be undefined).
|> 
|
|This is wrong :-)
|
|The code has exactly the same interpretation and the final value
|must be correct
|
|so 
|
|HPF$ INDEPENDENT
|     DO i=1,n
|      a(i) = i
|      END DO
|
|Sets i to  max(1,n+1) after the loop.
|

I actually meant INDEPENDENT, NEW directives.

|HPF$ INDEPENDENT,NEW(j)
|     DO i=1,n
|      DO j = 1,n
|       b(i,j) = j*i
|      END DO
|      a(i) = i
|      END DO

Is the compiler also forced to give j the value of max(1,n+1)?

Adam

-- 
     Dr AC Marshall                    | 
     Computing Services Department,    |
     University of Liverpool,          |        WATCH THIS SPACE
     PO Box 147. L69 3BX               | 
     email: [email-masked]            |
     Tel: +44-151-794 3722             |
     Fax: +44-151-794 3759             |

     Take a look at:     HPC Info: http://www.liv.ac.uk/HPC/HPCpage.html
                         Adam Info: http://www.liv.ac.uk/~adamm/HomePage.html
---------------------------------------------------------------------------
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>
---------------------------------------------------------------------------