*
*             GLU1T  : SAMPLE PROGRAM OF GLU1 AND GSLV1
*                           H.HASEGAWA, OCT.  4 1991
*
      PROGRAM GLU1T
      PARAMETER ( N=3, N1=10, EPS=3.52D-15 )
      REAL    A(N1,N1), B(N1), WK1(N), WK2(N)
      INTEGER IP(N1)
*
      A( 1, 1 ) = 1 
      A( 1, 2 ) = 1 
      A( 1, 3 ) = 1 
*
      A( 2, 1 ) = 2 
      A( 2, 2 ) = 0 
      A( 2, 3 ) = -1 
*
      A( 3, 1 ) = 0 
      A( 3, 2 ) = 1 
      A( 3, 3 ) = 2 
*
      B( 1 ) = 3
      B( 2 ) = 1
      B( 3 ) = 0
*
      WRITE ( 6, * ) 'SOLVE   A X      = B '
      DO 10 I = 1, N
         WRITE ( 6, * ) ( A(I,J), J=1,N ), B(I)
 10   CONTINUE 
*
*             SOLVES SIMULTANEOUS LINEAR EQUATIONS
c$$$      CALL GLU2( A, N, N1, EPS, WK1, WK2, IP, IR )
      CALL GLU4( A, N, N1, EPS, WK1, WK2, IP, IR )
      IF( IR.EQ.0 )  THEN
         CALL GSLV4( A, N, N1, B, IP )
         WRITE ( 6, * )' SOLUTION '
         DO 100 I = 1, N
            WRITE ( 6, * ) B(I)
 100     CONTINUE 
      ELSE
         WRITE(6,*) ' ERROR OCCURED IR : ', IR
      END IF
*
      STOP
      END
