
! ***** This is level 1 program *****

! Actual load = 800001

! This program requires shift communication 

      PROGRAM MAIN 
      REAL X(-51:800039), Y(-23:800038) 
!HPF$ PROCESSORS P(2) 
!HPF$ TEMPLATE TX(-46:800131),TY(-30:800147) 
!HPF$ DISTRIBUTE TX(BLOCK) ONTO P 
!HPF$ DISTRIBUTE TY(BLOCK) ONTO P 
!HPF$ ALIGN X(i) WITH TX(1*i+9) 
!HPF$ ALIGN Y(i) WITH TY(1*i+2) 

      FORALL (i=-51:800039:1) X(i) = 0 
      FORALL (i=-23:800038:1) Y(i) = i 
      call pcrc_clock(0)

      do itemp=1, 100

      FORALL (i=1:800001:1) X(i) = Y(1*i+5) + Y(1*i+2) 

      enddo

      call pcrc_clock(1)

      PRINT 111, (X(i),i=1,40) 
111   FORMAT(1x,10f7.2) 
      END 
!  The parameters in order: 
!  p,lx,ly,ux,uy,l,u,s,d1,d2,ax,ay,a1,a2,ltx,utx,lty,uty,bx,by,b1,b2 
!  2 -51 -23 800039 800038 1 800001 1 1 1 1 1 1 1 -46 800131 -30 800147 9 2 5 2 


!  Some selected output values for X(i)=1,40:
!       9    11    13    15    17    19    21    23    25    27
!      29    31    33    35    37    39    41    43    45    47
!      49    51    53    55    57    59    61    63    65    67
!      69    71    73    75    77    79    81    83    85    87
!  
