      subroutine chk(m,n,lda,a,ipiv,b,info)
      implicit none

      include 'defn.h'

*
*     Main program to test kji-SAXPY and measure its performance
*     -- NPAC, Syracuse University --
*     Modifed Manish Parashar
*     April 1992
*
*      Programmer A. Gaber Mohamed, Ph.D., Jan. 7, 1991
*      NPAC, Syracuse University
*

       double precision a(lda,n), b(n,1)
       double precision emax
       integer ipiv(n)
       integer lda, m, n, info
       integer i,nr

       nr = 1
  
       call dgetrs('N',n,nr,a,lda,ipiv,b,n,info)

       emax = 0.0d0
       do 113 i = 1,n
           emax = dmax1(emax,abs(b(i,1)))
113    continue

       print *,'Max Error =',emax
     
       return

       end
