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

! This program requires both shift and remap 


      PROGRAM MAIN
      REAL X(7:833), Y(3:815)
!HPF$ PROCESSORS P(4)
!HPF$ TEMPLATE TX(1:2507),TY(1:2447)
!HPF$ DISTRIBUTE TX(CYCLIC) ONTO P
!HPF$ DISTRIBUTE TY(CYCLIC) ONTO P 
!HPF$ ALIGN X(i) WITH TX(3*i+8) 
!HPF$ ALIGN Y(i) WITH TY(3*i+2) 


      FORALL (i=7:833) X(i) = 0
      FORALL (i=3:815) Y(i) = i 
      FORALL (i=12:746:3) X(i) = Y(1*i-7) + Y(2*i-8) 

      PRINT *, (X(i),i=7,833) 
      END 
