       program SH
C      ===============================================================
C      array assignments with shifts
C      taken from the Livermore Loops, kernel 7
C      ===============================================================
C      please send comments to haupt@npac.syr.edu

       parameter ( N = 1000000)
       real, dimension(N) :: X, Y, Z, U
       real Q, R, T
       integer k
CHPF$   processors p(8)
CHPF$   template d(1000000)
CHPF$   distribute d(block) onto p
CHPF$   align (:) with d(:) :: X, Y, Z, U
   
C     start_timer
C            call pcrc_clock(0)

C            Initialisation of scalars
            Q = 10.0
    	    R = 1.5
    	    T = 3.77
C           Initialization loop
    	    U = 7.0
            X = 8.0
            Y = 9.0
            Z = 10.0

            do it=1,5
C****************************************************************************
C***  KERNEL 7      EQUATION OF STATE FRAGMENT
C****************************************************************************
C
C
	    forall (k=1:N-6)   
     &   X(k)=     U(k) + R*( Z(k) + R*Y(k)) +
     &        T*( U(k+3) + R*( U(k+2) + R*U(k+1)) +
     &        T*( U(k+6) + Q*( U(k+5) + Q*U(k+4))))
C
C
C****************************************************************************
          enddo
c         stop_timer
C            call pcrc_clock(1)

      print *,' ' 
      print *,'*******************************'
      print *,'         PARKBENCH '
      print *,' LOW LEVEL HPF BENCHMARK SUITE'
      print *,'         AS  KERNEL'
      print *,' PROBLEM SIZE: N =', N
      print *,' FINAL RESULT = ', X(N-6)
      print *,' EXPECTED VALUE FOR SIZE 1000000' 
      print *,' IS  11211.0 +/- 0.1'
      print *,'*******************************'

c     print execution time

      STOP
      END





