      PROGRAM v3
      INTEGER nproc0
      PARAMETER (nproc0 = 4)
      INTEGER N
      PARAMETER (N = 16)
      INTEGER ia (N)
      INTEGER i, j, k
      INTEGER a (4), b (4)
      INTEGER c, d
C     DECOMPOSITION dd (16)
C     DISTRIBUTE dd (BLOCK)
C     ALIGN a WITH dd
C     ALIGN b WITH dd
      INTEGER Tllb1
      INTEGER Tlub1
      INTEGER minLoc1, maxLoc1, minLoc2, maxLoc2, coord(3)
      COMMON /g_to_l/minLoc1, maxLoc1, minLoc2, maxLoc2, coord
      INTEGER proclist(8)
      INTEGER TT0temp
      INTEGER TT1temp
      INTEGER TT2temp
      INTEGER TT3temp (1)
      INTEGER TT4temp (4)
      INTEGER TT5temp (4)
      CALL EXP_init_1 (4, 4)
      proclist(1)=-1
      TT0temp = 1
      DO i = 1, 4
      a (i) = (i + minLoc1 - 1)
      END DO
      CALL adjust_local_bounds (1, N - 1, Tllb1, Tlub1, 1, 4)
      TT0temp = 1
      TT2temp = 1
      DO i = Tllb1, Tlub1
      TT3temp (1) = ((i + minLoc1 - 1) + 1 - 1) / 4
      TT4temp (TT2temp) = KXGDPR (TT3temp)
      TT5temp (TT2temp) = ((i + minLoc1 - 1) + 1 - (4 * TT3temp (1)))
      TT2temp = TT2temp + 1
      
      END DO
      TT2temp = TT2temp - 1
      TT1temp = IFSCHEDULE (TT5temp, TT4temp, TT2temp)
      
      CALL IFGATHER (TT1temp, TT5temp, a)
      
      DO i = Tllb1, Tlub1
      b (i) = TT5temp (TT0temp)
      TT0temp = TT0temp + 1
      END DO
      DO 7000 i = 1, N / nproc0
      CALL kmulti (6)
      WRITE (6, *) 'a(', i, ')', '=', a (i), '||', 'b(', i, ')', '=', b 
     &(i)
      CALL kflush (6)
7000  CONTINUE
      STOP
      END
