      SUBROUTINE GATHER(N,A,B,INDEX)

      REAL             A(N),B(*)
      INTEGER INDEX(N)
C
C  GATHER - Gathers a vector from a source vector
C
      DO 100 I=1,N
      A(I)=B(INDEX(I))
 100  CONTINUE

      END
