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

! This program requires remap communication 

      PROGRAM MAIN 
      REAL X(-90:249), Y(-41:643) 
!HPF$ PROCESSORS P(2) 
!HPF$ TEMPLATE TX(-275:763),TY(-121:1991) 
!HPF$ DISTRIBUTE TX(BLOCK) ONTO P 
!HPF$ DISTRIBUTE TY(BLOCK) ONTO P 
!HPF$ ALIGN X(i) WITH TX(3*i+4) 
!HPF$ ALIGN Y(i) WITH TY(3*i+4) 

      FORALL (i=-90:249) X(i) = 0 
      FORALL (i=-41:643) Y(i) = i 
      FORALL (i=-2:189:1) X(i) = Y(3*i+5) + Y(1*i+1) 

      PRINT 111, (X(i),i=-90,249) 
111   FORMAT(1x,f17.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 -90 -41 249 643 -2 189 1 1 1 3 3 3 1 -275 763 -121 1991 4 4 5 1 


!  Some selected output values for X(i)=-2,189,5:
!      -2    18    38    58    78    98   118   138   158   178
!     198   218   238   258   278   298   318   338   358   378
!     398   418   438   458   478   498   518   538   558   578
!     598   618   638   658   678   698   718   738   758
