      SUBROUTINE EVALVEC(N,M,AA,LAMBDA,X)
C             EIGENVALUE EIGENVECTOR ACCURACY CHECK ROUTINE
C
C             AA     - ORIGONAL COMPLEX MATRIX
C             LAMBDA - COMPLEX VECTOR OF EIGENVALUES
C             X      - COMPLEX MATRIX CONTAINING EIGENVECTORS
C             N      - N ROWS/COLUMNS
C             M      - DIMENSIONED SIZE
      INTEGER N,M
      COMPLEX*16 AA(M,M), X(M,M), LAMBDA(M)
      COMPLEX*16 A(20,20), ASAVE(20,20), T(20), XV(20), C(20,20)
      COMPLEX*16 T1(20), T2(20), D1(20), D2(20)
      REAL*8 SUM,TOTAL
      CALL CXCOPY(N,M,AA,A)
      CALL CXCOPY(N,M,A,ASAVE)
C          CHECK ACCURACY OF  det | A - IDENT * LAMBDA(I) | = 0   I=1..N
      CALL EIGDET(N,M,A,LAMBDA)
C          CHECK ACCURACY OF  X A = LAMBDA X     1..Nth EIGENVECTOR 
      TOTAL = 0.0D0
      DO 10 I=1,N
         DO 20 J=1,N
C            XV(J) = X(I,J) ! NOT RIGHT.. COLUMNS NOT ROWS
            XV(J) = X(J,I)
20       CONTINUE
C*      PRINT *,'I LAMBDA(K) = ',I,LAMBDA(I)
C*      PRINT *,' XV ',(XV(J),J=1,N)
      CALL VECMUL(N,M,ASAVE,XV,T1)
C*      PRINT *,' T1  ',(T1(J),J=1,N)
         DO 25 J=1,N
            T(J) = XV(J) * LAMBDA(I)
25       CONTINUE
C*         PRINT *,' LAMBDA XV  ',(T(J),J=1,N)
         DO 30 J=1,N
            D1(J) = T(J) - T1(J)
30       CONTINUE
C*         PRINT *,' DIFF D1  ',(D1(J),J=1,N)
      CALL SUMABS(N,M,D1,SUM)
C*      PRINT *,' SUM = ',SUM
      TOTAL = TOTAL + SUM
10    CONTINUE
      PRINT *,' TOTAL EIGENVECTOR ERROR = ',TOTAL
      RETURN
      END
