515 SUBROUTINE sdrvvx( NSIZES, NN, NTYPES, DOTYPE, ISEED, THRESH,
516 $ NIUNIT, NOUNIT, A, LDA, H, WR, WI, WR1, WI1,
517 $ VL, LDVL, VR, LDVR, LRE, LDLRE, RCONDV, RCNDV1,
518 $ RCDVIN, RCONDE, RCNDE1, RCDEIN, SCALE, SCALE1,
519 $ RESULT, WORK, NWORK, IWORK, INFO )
526 INTEGER INFO, LDA, LDLRE, LDVL, LDVR, NIUNIT, NOUNIT,
527 $ NSIZES, NTYPES, NWORK
532 INTEGER ISEED( 4 ), IWORK( * ), NN( * )
533 REAL A( LDA, * ), H( LDA, * ), LRE( LDLRE, * ),
534 $ RCDEIN( * ), RCDVIN( * ), RCNDE1( * ),
535 $ rcndv1( * ), rconde( * ), rcondv( * ),
536 $ result( 11 ), scale( * ), scale1( * ),
537 $ vl( ldvl, * ), vr( ldvr, * ), wi( * ),
538 $ wi1( * ), work( * ), wr( * ), wr1( * )
545 PARAMETER ( ZERO = 0.0e0, one = 1.0e0 )
547 PARAMETER ( MAXTYP = 21 )
553 INTEGER I, IBAL, IINFO, IMODE, ITYPE, IWK, J, JCOL,
554 $ jsize, jtype, mtypes, n, nerrs, nfail,
555 $ nmax, nnwork, ntest, ntestf, ntestt
556 REAL ANORM, COND, CONDS, OVFL, RTULP, RTULPI, ULP,
560 CHARACTER ADUMMA( 1 ), BAL( 4 )
561 INTEGER IDUMMA( 1 ), IOLDSD( 4 ), KCONDS( MAXTYP ),
562 $ KMAGN( MAXTYP ), KMODE( MAXTYP ),
574 INTRINSIC abs, max, min, sqrt
577 DATA ktype / 1, 2, 3, 5*4, 4*6, 6*6, 3*9 /
578 DATA kmagn / 3*1, 1, 1, 1, 2, 3, 4*1, 1, 1, 1, 1, 2,
580 DATA kmode / 3*0, 4, 3, 1, 4, 4, 4, 3, 1, 5, 4, 3,
581 $ 1, 5, 5, 5, 4, 3, 1 /
582 DATA kconds / 3*0, 5*0, 4*1, 6*2, 3*0 /
583 DATA bal /
'N',
'P',
'S',
'B' /
587 path( 1: 1 ) =
'Single precision'
605 nmax = max( nmax, nn( j ) )
612 IF( nsizes.LT.0 )
THEN
614 ELSE IF( badnn )
THEN
616 ELSE IF( ntypes.LT.0 )
THEN
618 ELSE IF( thresh.LT.zero )
THEN
620 ELSE IF( lda.LT.1 .OR. lda.LT.nmax )
THEN
622 ELSE IF( ldvl.LT.1 .OR. ldvl.LT.nmax )
THEN
624 ELSE IF( ldvr.LT.1 .OR. ldvr.LT.nmax )
THEN
626 ELSE IF( ldlre.LT.1 .OR. ldlre.LT.nmax )
THEN
628 ELSE IF( 6*nmax+2*nmax**2.GT.nwork )
THEN
633 CALL xerbla(
'SDRVVX', -info )
639 IF( nsizes.EQ.0 .OR. ntypes.EQ.0 )
644 unfl = slamch(
'Safe minimum' )
646 ulp = slamch(
'Precision' )
655 DO 150 jsize = 1, nsizes
657 IF( nsizes.NE.1 )
THEN
658 mtypes = min( maxtyp, ntypes )
660 mtypes = min( maxtyp+1, ntypes )
663 DO 140 jtype = 1, mtypes
664 IF( .NOT.dotype( jtype ) )
670 ioldsd( j ) = iseed( j )
689 IF( mtypes.GT.maxtyp )
692 itype = ktype( jtype )
693 imode = kmode( jtype )
697 GO TO ( 30, 40, 50 )kmagn( jtype )
713 CALL slaset(
'Full', lda, n, zero, zero, a, lda )
721 IF( itype.EQ.1 )
THEN
724 ELSE IF( itype.EQ.2 )
THEN
729 a( jcol, jcol ) = anorm
732 ELSE IF( itype.EQ.3 )
THEN
737 a( jcol, jcol ) = anorm
739 $ a( jcol, jcol-1 ) = one
742 ELSE IF( itype.EQ.4 )
THEN
746 CALL slatms( n, n,
'S', iseed,
'S', work, imode, cond,
747 $ anorm, 0, 0,
'N', a, lda, work( n+1 ),
750 ELSE IF( itype.EQ.5 )
THEN
754 CALL slatms( n, n,
'S', iseed,
'S', work, imode, cond,
755 $ anorm, n, n,
'N', a, lda, work( n+1 ),
758 ELSE IF( itype.EQ.6 )
THEN
762 IF( kconds( jtype ).EQ.1 )
THEN
764 ELSE IF( kconds( jtype ).EQ.2 )
THEN
771 CALL slatme( n,
'S', iseed, work, imode, cond, one,
772 $ adumma,
'T',
'T',
'T', work( n+1 ), 4,
773 $ conds, n, n, anorm, a, lda, work( 2*n+1 ),
776 ELSE IF( itype.EQ.7 )
THEN
780 CALL slatmr( n, n,
'S', iseed,
'S', work, 6, one, one,
781 $
'T',
'N', work( n+1 ), 1, one,
782 $ work( 2*n+1 ), 1, one,
'N', idumma, 0, 0,
783 $ zero, anorm,
'NO', a, lda, iwork, iinfo )
785 ELSE IF( itype.EQ.8 )
THEN
789 CALL slatmr( n, n,
'S', iseed,
'S', work, 6, one, one,
790 $
'T',
'N', work( n+1 ), 1, one,
791 $ work( 2*n+1 ), 1, one,
'N', idumma, n, n,
792 $ zero, anorm,
'NO', a, lda, iwork, iinfo )
794 ELSE IF( itype.EQ.9 )
THEN
798 CALL slatmr( n, n,
'S', iseed,
'N', work, 6, one, one,
799 $
'T',
'N', work( n+1 ), 1, one,
800 $ work( 2*n+1 ), 1, one,
'N', idumma, n, n,
801 $ zero, anorm,
'NO', a, lda, iwork, iinfo )
803 CALL slaset(
'Full', 2, n, zero, zero, a, lda )
804 CALL slaset(
'Full', n-3, 1, zero, zero, a( 3, 1 ),
806 CALL slaset(
'Full', n-3, 2, zero, zero, a( 3, n-1 ),
808 CALL slaset(
'Full', 1, n, zero, zero, a( n, 1 ),
812 ELSE IF( itype.EQ.10 )
THEN
816 CALL slatmr( n, n,
'S', iseed,
'N', work, 6, one, one,
817 $
'T',
'N', work( n+1 ), 1, one,
818 $ work( 2*n+1 ), 1, one,
'N', idumma, n, 0,
819 $ zero, anorm,
'NO', a, lda, iwork, iinfo )
826 IF( iinfo.NE.0 )
THEN
827 WRITE( nounit, fmt = 9992 )
'Generator', iinfo, n, jtype,
840 ELSE IF( iwk.EQ.2 )
THEN
843 nnwork = 6*n + 2*n**2
845 nnwork = max( nnwork, 1 )
854 CALL sget23( .false., balanc, jtype, thresh, ioldsd,
855 $ nounit, n, a, lda, h, wr, wi, wr1, wi1,
856 $ vl, ldvl, vr, ldvr, lre, ldlre, rcondv,
857 $ rcndv1, rcdvin, rconde, rcnde1, rcdein,
858 $ scale, scale1, result, work, nnwork,
866 IF( result( j ).GE.zero )
868 IF( result( j ).GE.thresh )
873 $ ntestf = ntestf + 1
874 IF( ntestf.EQ.1 )
THEN
875 WRITE( nounit, fmt = 9999 )path
876 WRITE( nounit, fmt = 9998 )
877 WRITE( nounit, fmt = 9997 )
878 WRITE( nounit, fmt = 9996 )
879 WRITE( nounit, fmt = 9995 )thresh
884 IF( result( j ).GE.thresh )
THEN
885 WRITE( nounit, fmt = 9994 )balanc, n, iwk,
886 $ ioldsd, jtype, j, result( j )
890 nerrs = nerrs + nfail
891 ntestt = ntestt + ntest
906 READ( niunit, fmt = *,
END = 220 )n
915 READ( niunit, fmt = * )( a( i, j ), j = 1, n )
918 READ( niunit, fmt = * )wr1( i ), wi1( i ), rcdein( i ),
921 CALL sget23( .true.,
'N', 22, thresh, iseed, nounit, n, a, lda, h,
922 $ wr, wi, wr1, wi1, vl, ldvl, vr, ldvr, lre, ldlre,
923 $ rcondv, rcndv1, rcdvin, rconde, rcnde1, rcdein,
924 $ scale, scale1, result, work, 6*n+2*n**2, iwork,
932 IF( result( j ).GE.zero )
934 IF( result( j ).GE.thresh )
939 $ ntestf = ntestf + 1
940 IF( ntestf.EQ.1 )
THEN
941 WRITE( nounit, fmt = 9999 )path
942 WRITE( nounit, fmt = 9998 )
943 WRITE( nounit, fmt = 9997 )
944 WRITE( nounit, fmt = 9996 )
945 WRITE( nounit, fmt = 9995 )thresh
950 IF( result( j ).GE.thresh )
THEN
951 WRITE( nounit, fmt = 9993 )n, jtype, j, result( j )
955 nerrs = nerrs + nfail
956 ntestt = ntestt + ntest
962 CALL slasum( path, nounit, nerrs, ntestt )
964 9999
FORMAT( / 1x, a3,
' -- Real Eigenvalue-Eigenvector Decomposition',
965 $
' Expert Driver', /
966 $
' Matrix types (see SDRVVX for details): ' )
968 9998
FORMAT( /
' Special Matrices:', /
' 1=Zero matrix. ',
969 $
' ',
' 5=Diagonal: geometr. spaced entries.',
970 $ /
' 2=Identity matrix. ',
' 6=Diagona',
971 $
'l: clustered entries.', /
' 3=Transposed Jordan block. ',
972 $
' ',
' 7=Diagonal: large, evenly spaced.', /
' ',
973 $
'4=Diagonal: evenly spaced entries. ',
' 8=Diagonal: s',
974 $
'mall, evenly spaced.' )
975 9997
FORMAT(
' Dense, Non-Symmetric Matrices:', /
' 9=Well-cond., ev',
976 $
'enly spaced eigenvals.',
' 14=Ill-cond., geomet. spaced e',
977 $
'igenals.', /
' 10=Well-cond., geom. spaced eigenvals. ',
978 $
' 15=Ill-conditioned, clustered e.vals.', /
' 11=Well-cond',
979 $
'itioned, clustered e.vals. ',
' 16=Ill-cond., random comp',
980 $
'lex ', /
' 12=Well-cond., random complex ',
' ',
981 $
' 17=Ill-cond., large rand. complx ', /
' 13=Ill-condi',
982 $
'tioned, evenly spaced. ',
' 18=Ill-cond., small rand.',
984 9996
FORMAT(
' 19=Matrix with random O(1) entries. ',
' 21=Matrix ',
985 $
'with small random entries.', /
' 20=Matrix with large ran',
986 $
'dom entries. ',
' 22=Matrix read from input file', / )
987 9995
FORMAT(
' Tests performed with test threshold =', f8.2,
988 $ / /
' 1 = | A VR - VR W | / ( n |A| ulp ) ',
989 $ /
' 2 = | transpose(A) VL - VL W | / ( n |A| ulp ) ',
990 $ /
' 3 = | |VR(i)| - 1 | / ulp ',
991 $ /
' 4 = | |VL(i)| - 1 | / ulp ',
992 $ /
' 5 = 0 if W same no matter if VR or VL computed,',
993 $
' 1/ulp otherwise', /
994 $
' 6 = 0 if VR same no matter what else computed,',
995 $
' 1/ulp otherwise', /
996 $
' 7 = 0 if VL same no matter what else computed,',
997 $
' 1/ulp otherwise', /
998 $
' 8 = 0 if RCONDV same no matter what else computed,',
999 $
' 1/ulp otherwise', /
1000 $
' 9 = 0 if SCALE, ILO, IHI, ABNRM same no matter what else',
1001 $
' computed, 1/ulp otherwise',
1002 $ /
' 10 = | RCONDV - RCONDV(precomputed) | / cond(RCONDV),',
1003 $ /
' 11 = | RCONDE - RCONDE(precomputed) | / cond(RCONDE),' )
1004 9994
FORMAT(
' BALANC=''', a1,
''',N=', i4,
',IWK=', i1,
', seed=',
1005 $ 4( i4,
',' ),
' type ', i2,
', test(', i2,
')=', g10.3 )
1006 9993
FORMAT(
' N=', i5,
', input example =', i3,
', test(', i2,
')=',
1008 9992
FORMAT(
' SDRVVX: ', a,
' returned INFO=', i6,
'.', / 9x,
'N=',
1009 $ i6,
', JTYPE=', i6,
', ISEED=(', 3( i5,
',' ), i5,
')' )
subroutine xerbla(srname, info)
subroutine slaset(uplo, m, n, alpha, beta, a, lda)
SLASET initializes the off-diagonal elements and the diagonal elements of a matrix to given values.
subroutine sdrvvx(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)
SDRVVX
subroutine sget23(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)
SGET23
subroutine slasum(type, iounit, ie, nrun)
SLASUM
subroutine slatme(n, dist, iseed, d, mode, cond, dmax, ei, rsign, upper, sim, ds, modes, conds, kl, ku, anorm, a, lda, work, info)
SLATME
subroutine slatmr(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)
SLATMR
subroutine slatms(m, n, dist, iseed, sym, d, mode, cond, dmax, kl, ku, pack, a, lda, work, info)
SLATMS