516 SUBROUTINE ddrvvx( NSIZES, NN, NTYPES, DOTYPE, ISEED, THRESH,
517 $ NIUNIT, NOUNIT, A, LDA, H, WR, WI, WR1, WI1,
518 $ VL, LDVL, VR, LDVR, LRE, LDLRE, RCONDV, RCNDV1,
519 $ RCDVIN, RCONDE, RCNDE1, RCDEIN, SCALE, SCALE1,
520 $ RESULT, WORK, NWORK, IWORK, INFO )
527 INTEGER INFO, LDA, LDLRE, LDVL, LDVR, NIUNIT, NOUNIT,
528 $ NSIZES, NTYPES, NWORK
529 DOUBLE PRECISION THRESH
533 INTEGER ISEED( 4 ), IWORK( * ), NN( * )
534 DOUBLE PRECISION A( LDA, * ), H( LDA, * ), LRE( LDLRE, * ),
535 $ RCDEIN( * ), RCDVIN( * ), RCNDE1( * ),
536 $ rcndv1( * ), rconde( * ), rcondv( * ),
537 $ result( 11 ), scale( * ), scale1( * ),
538 $ vl( ldvl, * ), vr( ldvr, * ), wi( * ),
539 $ wi1( * ), work( * ), wr( * ), wr1( * )
545 DOUBLE PRECISION ZERO, ONE
546 PARAMETER ( ZERO = 0.0d0, one = 1.0d0 )
548 PARAMETER ( MAXTYP = 21 )
554 INTEGER I, IBAL, IINFO, IMODE, ITYPE, IWK, J, JCOL,
555 $ jsize, jtype, mtypes, n, nerrs, nfail, nmax,
556 $ nnwork, ntest, ntestf, ntestt
557 DOUBLE PRECISION ANORM, COND, CONDS, OVFL, RTULP, RTULPI, ULP,
561 CHARACTER ADUMMA( 1 ), BAL( 4 )
562 INTEGER IDUMMA( 1 ), IOLDSD( 4 ), KCONDS( MAXTYP ),
563 $ KMAGN( MAXTYP ), KMODE( MAXTYP ),
567 DOUBLE PRECISION DLAMCH
575 INTRINSIC abs, max, min, sqrt
578 DATA ktype / 1, 2, 3, 5*4, 4*6, 6*6, 3*9 /
579 DATA kmagn / 3*1, 1, 1, 1, 2, 3, 4*1, 1, 1, 1, 1, 2,
581 DATA kmode / 3*0, 4, 3, 1, 4, 4, 4, 3, 1, 5, 4, 3,
582 $ 1, 5, 5, 5, 4, 3, 1 /
583 DATA kconds / 3*0, 5*0, 4*1, 6*2, 3*0 /
584 DATA bal /
'N',
'P',
'S',
'B' /
588 path( 1: 1 ) =
'Double precision'
606 nmax = max( nmax, nn( j ) )
613 IF( nsizes.LT.0 )
THEN
615 ELSE IF( badnn )
THEN
617 ELSE IF( ntypes.LT.0 )
THEN
619 ELSE IF( thresh.LT.zero )
THEN
621 ELSE IF( lda.LT.1 .OR. lda.LT.nmax )
THEN
623 ELSE IF( ldvl.LT.1 .OR. ldvl.LT.nmax )
THEN
625 ELSE IF( ldvr.LT.1 .OR. ldvr.LT.nmax )
THEN
627 ELSE IF( ldlre.LT.1 .OR. ldlre.LT.nmax )
THEN
629 ELSE IF( 6*nmax+2*nmax**2.GT.nwork )
THEN
634 CALL xerbla(
'DDRVVX', -info )
640 IF( nsizes.EQ.0 .OR. ntypes.EQ.0 )
645 unfl = dlamch(
'Safe minimum' )
648 ulp = dlamch(
'Precision' )
657 DO 150 jsize = 1, nsizes
659 IF( nsizes.NE.1 )
THEN
660 mtypes = min( maxtyp, ntypes )
662 mtypes = min( maxtyp+1, ntypes )
665 DO 140 jtype = 1, mtypes
666 IF( .NOT.dotype( jtype ) )
672 ioldsd( j ) = iseed( j )
691 IF( mtypes.GT.maxtyp )
694 itype = ktype( jtype )
695 imode = kmode( jtype )
699 GO TO ( 30, 40, 50 )kmagn( jtype )
715 CALL dlaset(
'Full', lda, n, zero, zero, a, lda )
723 IF( itype.EQ.1 )
THEN
726 ELSE IF( itype.EQ.2 )
THEN
731 a( jcol, jcol ) = anorm
734 ELSE IF( itype.EQ.3 )
THEN
739 a( jcol, jcol ) = anorm
741 $ a( jcol, jcol-1 ) = one
744 ELSE IF( itype.EQ.4 )
THEN
748 CALL dlatms( n, n,
'S', iseed,
'S', work, imode, cond,
749 $ anorm, 0, 0,
'N', a, lda, work( n+1 ),
752 ELSE IF( itype.EQ.5 )
THEN
756 CALL dlatms( n, n,
'S', iseed,
'S', work, imode, cond,
757 $ anorm, n, n,
'N', a, lda, work( n+1 ),
760 ELSE IF( itype.EQ.6 )
THEN
764 IF( kconds( jtype ).EQ.1 )
THEN
766 ELSE IF( kconds( jtype ).EQ.2 )
THEN
773 CALL dlatme( n,
'S', iseed, work, imode, cond, one,
774 $ adumma,
'T',
'T',
'T', work( n+1 ), 4,
775 $ conds, n, n, anorm, a, lda, work( 2*n+1 ),
778 ELSE IF( itype.EQ.7 )
THEN
782 CALL dlatmr( n, n,
'S', iseed,
'S', work, 6, one, one,
783 $
'T',
'N', work( n+1 ), 1, one,
784 $ work( 2*n+1 ), 1, one,
'N', idumma, 0, 0,
785 $ zero, anorm,
'NO', a, lda, iwork, iinfo )
787 ELSE IF( itype.EQ.8 )
THEN
791 CALL dlatmr( n, n,
'S', iseed,
'S', work, 6, one, one,
792 $
'T',
'N', work( n+1 ), 1, one,
793 $ work( 2*n+1 ), 1, one,
'N', idumma, n, n,
794 $ zero, anorm,
'NO', a, lda, iwork, iinfo )
796 ELSE IF( itype.EQ.9 )
THEN
800 CALL dlatmr( n, n,
'S', iseed,
'N', work, 6, one, one,
801 $
'T',
'N', work( n+1 ), 1, one,
802 $ work( 2*n+1 ), 1, one,
'N', idumma, n, n,
803 $ zero, anorm,
'NO', a, lda, iwork, iinfo )
805 CALL dlaset(
'Full', 2, n, zero, zero, a, lda )
806 CALL dlaset(
'Full', n-3, 1, zero, zero, a( 3, 1 ),
808 CALL dlaset(
'Full', n-3, 2, zero, zero, a( 3, n-1 ),
810 CALL dlaset(
'Full', 1, n, zero, zero, a( n, 1 ),
814 ELSE IF( itype.EQ.10 )
THEN
818 CALL dlatmr( n, n,
'S', iseed,
'N', work, 6, one, one,
819 $
'T',
'N', work( n+1 ), 1, one,
820 $ work( 2*n+1 ), 1, one,
'N', idumma, n, 0,
821 $ zero, anorm,
'NO', a, lda, iwork, iinfo )
828 IF( iinfo.NE.0 )
THEN
829 WRITE( nounit, fmt = 9992 )
'Generator', iinfo, n, jtype,
842 ELSE IF( iwk.EQ.2 )
THEN
845 nnwork = 6*n + 2*n**2
847 nnwork = max( nnwork, 1 )
856 CALL dget23( .false., balanc, jtype, thresh, ioldsd,
857 $ nounit, n, a, lda, h, wr, wi, wr1, wi1,
858 $ vl, ldvl, vr, ldvr, lre, ldlre, rcondv,
859 $ rcndv1, rcdvin, rconde, rcnde1, rcdein,
860 $ scale, scale1, result, work, nnwork,
868 IF( result( j ).GE.zero )
870 IF( result( j ).GE.thresh )
875 $ ntestf = ntestf + 1
876 IF( ntestf.EQ.1 )
THEN
877 WRITE( nounit, fmt = 9999 )path
878 WRITE( nounit, fmt = 9998 )
879 WRITE( nounit, fmt = 9997 )
880 WRITE( nounit, fmt = 9996 )
881 WRITE( nounit, fmt = 9995 )thresh
886 IF( result( j ).GE.thresh )
THEN
887 WRITE( nounit, fmt = 9994 )balanc, n, iwk,
888 $ ioldsd, jtype, j, result( j )
892 nerrs = nerrs + nfail
893 ntestt = ntestt + ntest
908 READ( niunit, fmt = *,
END = 220 )n
917 READ( niunit, fmt = * )( a( i, j ), j = 1, n )
920 READ( niunit, fmt = * )wr1( i ), wi1( i ), rcdein( i ),
923 CALL dget23( .true.,
'N', 22, thresh, iseed, nounit, n, a, lda, h,
924 $ wr, wi, wr1, wi1, vl, ldvl, vr, ldvr, lre, ldlre,
925 $ rcondv, rcndv1, rcdvin, rconde, rcnde1, rcdein,
926 $ scale, scale1, result, work, 6*n+2*n**2, iwork,
934 IF( result( j ).GE.zero )
936 IF( result( j ).GE.thresh )
941 $ ntestf = ntestf + 1
942 IF( ntestf.EQ.1 )
THEN
943 WRITE( nounit, fmt = 9999 )path
944 WRITE( nounit, fmt = 9998 )
945 WRITE( nounit, fmt = 9997 )
946 WRITE( nounit, fmt = 9996 )
947 WRITE( nounit, fmt = 9995 )thresh
952 IF( result( j ).GE.thresh )
THEN
953 WRITE( nounit, fmt = 9993 )n, jtype, j, result( j )
957 nerrs = nerrs + nfail
958 ntestt = ntestt + ntest
964 CALL dlasum( path, nounit, nerrs, ntestt )
966 9999
FORMAT( / 1x, a3,
' -- Real Eigenvalue-Eigenvector Decomposition',
967 $
' Expert Driver', /
968 $
' Matrix types (see DDRVVX for details): ' )
970 9998
FORMAT( /
' Special Matrices:', /
' 1=Zero matrix. ',
971 $
' ',
' 5=Diagonal: geometr. spaced entries.',
972 $ /
' 2=Identity matrix. ',
' 6=Diagona',
973 $
'l: clustered entries.', /
' 3=Transposed Jordan block. ',
974 $
' ',
' 7=Diagonal: large, evenly spaced.', /
' ',
975 $
'4=Diagonal: evenly spaced entries. ',
' 8=Diagonal: s',
976 $
'mall, evenly spaced.' )
977 9997
FORMAT(
' Dense, Non-Symmetric Matrices:', /
' 9=Well-cond., ev',
978 $
'enly spaced eigenvals.',
' 14=Ill-cond., geomet. spaced e',
979 $
'igenals.', /
' 10=Well-cond., geom. spaced eigenvals. ',
980 $
' 15=Ill-conditioned, clustered e.vals.', /
' 11=Well-cond',
981 $
'itioned, clustered e.vals. ',
' 16=Ill-cond., random comp',
982 $
'lex ', /
' 12=Well-cond., random complex ',
' ',
983 $
' 17=Ill-cond., large rand. complx ', /
' 13=Ill-condi',
984 $
'tioned, evenly spaced. ',
' 18=Ill-cond., small rand.',
986 9996
FORMAT(
' 19=Matrix with random O(1) entries. ',
' 21=Matrix ',
987 $
'with small random entries.', /
' 20=Matrix with large ran',
988 $
'dom entries. ',
' 22=Matrix read from input file', / )
989 9995
FORMAT(
' Tests performed with test threshold =', f8.2,
990 $ / /
' 1 = | A VR - VR W | / ( n |A| ulp ) ',
991 $ /
' 2 = | transpose(A) VL - VL W | / ( n |A| ulp ) ',
992 $ /
' 3 = | |VR(i)| - 1 | / ulp ',
993 $ /
' 4 = | |VL(i)| - 1 | / ulp ',
994 $ /
' 5 = 0 if W same no matter if VR or VL computed,',
995 $
' 1/ulp otherwise', /
996 $
' 6 = 0 if VR same no matter what else computed,',
997 $
' 1/ulp otherwise', /
998 $
' 7 = 0 if VL same no matter what else computed,',
999 $
' 1/ulp otherwise', /
1000 $
' 8 = 0 if RCONDV same no matter what else computed,',
1001 $
' 1/ulp otherwise', /
1002 $
' 9 = 0 if SCALE, ILO, IHI, ABNRM same no matter what else',
1003 $
' computed, 1/ulp otherwise',
1004 $ /
' 10 = | RCONDV - RCONDV(precomputed) | / cond(RCONDV),',
1005 $ /
' 11 = | RCONDE - RCONDE(precomputed) | / cond(RCONDE),' )
1006 9994
FORMAT(
' BALANC=''', a1,
''',N=', i4,
',IWK=', i1,
', seed=',
1007 $ 4( i4,
',' ),
' type ', i2,
', test(', i2,
')=', g10.3 )
1008 9993
FORMAT(
' N=', i5,
', input example =', i3,
', test(', i2,
')=',
1010 9992
FORMAT(
' DDRVVX: ', a,
' returned INFO=', i6,
'.', / 9x,
'N=',
1011 $ i6,
', JTYPE=', i6,
', ISEED=(', 3( i5,
',' ), i5,
')' )
subroutine dlabad(SMALL, LARGE)
DLABAD
subroutine dlaset(UPLO, M, N, ALPHA, BETA, A, LDA)
DLASET initializes the off-diagonal elements and the diagonal elements of a matrix to given values.
subroutine xerbla(SRNAME, INFO)
XERBLA
subroutine dlasum(TYPE, IOUNIT, IE, NRUN)
DLASUM
subroutine ddrvvx(NSIZES, NN, NTYPES, DOTYPE, ISEED, THRESH, NIUNIT, NOUNIT, A, LDA, H, WR, WI, WR1, WI1, VL, LDVL, VR, LDVR, LRE, LDLRE, RCONDV, RCNDV1, RCDVIN, RCONDE, RCNDE1, RCDEIN, SCALE, SCALE1, RESULT, WORK, NWORK, IWORK, INFO)
DDRVVX
subroutine dget23(COMP, BALANC, JTYPE, THRESH, ISEED, NOUNIT, N, A, LDA, H, WR, WI, WR1, WI1, VL, LDVL, VR, LDVR, LRE, LDLRE, RCONDV, RCNDV1, RCDVIN, RCONDE, RCNDE1, RCDEIN, SCALE, SCALE1, RESULT, WORK, LWORK, IWORK, INFO)
DGET23
subroutine dlatmr(M, N, DIST, ISEED, SYM, D, MODE, COND, DMAX, RSIGN, GRADE, DL, MODEL, CONDL, DR, MODER, CONDR, PIVTNG, IPIVOT, KL, KU, SPARSE, ANORM, PACK, A, LDA, IWORK, INFO)
DLATMR
subroutine dlatme(N, DIST, ISEED, D, MODE, COND, DMAX, EI, RSIGN, UPPER, SIM, DS, MODES, CONDS, KL, KU, ANORM, A, LDA, WORK, INFO)
DLATME
subroutine dlatms(M, N, DIST, ISEED, SYM, D, MODE, COND, DMAX, KL, KU, PACK, A, LDA, WORK, INFO)
DLATMS