375 SUBROUTINE zdrves( NSIZES, NN, NTYPES, DOTYPE, ISEED, THRESH,
376 $ NOUNIT, A, LDA, H, HT, W, WT, VS, LDVS, RESULT,
377 $ WORK, NWORK, RWORK, IWORK, BWORK, INFO )
384 INTEGER INFO, LDA, LDVS, NOUNIT, NSIZES, NTYPES, NWORK
385 DOUBLE PRECISION THRESH
388 LOGICAL BWORK( * ), DOTYPE( * )
389 INTEGER ISEED( 4 ), IWORK( * ), NN( * )
390 DOUBLE PRECISION RESULT( 13 ), RWORK( * )
391 COMPLEX*16 A( LDA, * ), H( LDA, * ), HT( LDA, * ),
392 $ vs( ldvs, * ), w( * ), work( * ), wt( * )
399 PARAMETER ( CZERO = ( 0.0d+0, 0.0d+0 ) )
401 parameter( cone = ( 1.0d+0, 0.0d+0 ) )
402 DOUBLE PRECISION ZERO, ONE
403 parameter( zero = 0.0d+0, one = 1.0d+0 )
405 parameter( maxtyp = 21 )
411 INTEGER I, IINFO, IMODE, ISORT, ITYPE, IWK, J, JCOL,
412 $ jsize, jtype, knteig, lwork, mtypes, n, nerrs,
413 $ nfail, nmax, nnwork, ntest, ntestf, ntestt,
415 DOUBLE PRECISION ANORM, COND, CONDS, OVFL, RTULP, RTULPI, ULP,
419 INTEGER IDUMMA( 1 ), IOLDSD( 4 ), KCONDS( MAXTYP ),
420 $ KMAGN( MAXTYP ), KMODE( MAXTYP ),
422 DOUBLE PRECISION RES( 2 )
426 DOUBLE PRECISION SELWI( 20 ), SELWR( 20 )
429 INTEGER SELDIM, SELOPT
432 COMMON / sslct / selopt, seldim, selval, selwr, selwi
436 DOUBLE PRECISION DLAMCH
437 EXTERNAL zslect, dlamch
444 INTRINSIC abs, dcmplx, max, min, sqrt
447 DATA ktype / 1, 2, 3, 5*4, 4*6, 6*6, 3*9 /
448 DATA kmagn / 3*1, 1, 1, 1, 2, 3, 4*1, 1, 1, 1, 1, 2,
450 DATA kmode / 3*0, 4, 3, 1, 4, 4, 4, 3, 1, 5, 4, 3,
451 $ 1, 5, 5, 5, 4, 3, 1 /
452 DATA kconds / 3*0, 5*0, 4*1, 6*2, 3*0 /
456 path( 1: 1 ) =
'Zomplex precision'
471 nmax = max( nmax, nn( j ) )
478 IF( nsizes.LT.0 )
THEN
480 ELSE IF( badnn )
THEN
482 ELSE IF( ntypes.LT.0 )
THEN
484 ELSE IF( thresh.LT.zero )
THEN
486 ELSE IF( nounit.LE.0 )
THEN
488 ELSE IF( lda.LT.1 .OR. lda.LT.nmax )
THEN
490 ELSE IF( ldvs.LT.1 .OR. ldvs.LT.nmax )
THEN
492 ELSE IF( 5*nmax+2*nmax**2.GT.nwork )
THEN
497 CALL xerbla(
'ZDRVES', -info )
503 IF( nsizes.EQ.0 .OR. ntypes.EQ.0 )
508 unfl = dlamch(
'Safe minimum' )
511 ulp = dlamch(
'Precision' )
520 DO 240 jsize = 1, nsizes
522 IF( nsizes.NE.1 )
THEN
523 mtypes = min( maxtyp, ntypes )
525 mtypes = min( maxtyp+1, ntypes )
528 DO 230 jtype = 1, mtypes
529 IF( .NOT.dotype( jtype ) )
535 ioldsd( j ) = iseed( j )
554 IF( mtypes.GT.maxtyp )
557 itype = ktype( jtype )
558 imode = kmode( jtype )
562 GO TO ( 30, 40, 50 )kmagn( jtype )
578 CALL zlaset(
'Full', lda, n, czero, czero, a, lda )
584 IF( itype.EQ.1 )
THEN
590 ELSE IF( itype.EQ.2 )
THEN
595 a( jcol, jcol ) = dcmplx( anorm )
598 ELSE IF( itype.EQ.3 )
THEN
603 a( jcol, jcol ) = dcmplx( anorm )
605 $ a( jcol, jcol-1 ) = cone
608 ELSE IF( itype.EQ.4 )
THEN
612 CALL zlatms( n, n,
'S', iseed,
'H', rwork, imode, cond,
613 $ anorm, 0, 0,
'N', a, lda, work( n+1 ),
616 ELSE IF( itype.EQ.5 )
THEN
620 CALL zlatms( n, n,
'S', iseed,
'H', rwork, imode, cond,
621 $ anorm, n, n,
'N', a, lda, work( n+1 ),
624 ELSE IF( itype.EQ.6 )
THEN
628 IF( kconds( jtype ).EQ.1 )
THEN
630 ELSE IF( kconds( jtype ).EQ.2 )
THEN
636 CALL zlatme( n,
'D', iseed, work, imode, cond, cone,
637 $
'T',
'T',
'T', rwork, 4, conds, n, n, anorm,
638 $ a, lda, work( 2*n+1 ), iinfo )
640 ELSE IF( itype.EQ.7 )
THEN
644 CALL zlatmr( n, n,
'D', iseed,
'N', work, 6, one, cone,
645 $
'T',
'N', work( n+1 ), 1, one,
646 $ work( 2*n+1 ), 1, one,
'N', idumma, 0, 0,
647 $ zero, anorm,
'NO', a, lda, iwork, iinfo )
649 ELSE IF( itype.EQ.8 )
THEN
653 CALL zlatmr( n, n,
'D', iseed,
'H', work, 6, one, cone,
654 $
'T',
'N', work( n+1 ), 1, one,
655 $ work( 2*n+1 ), 1, one,
'N', idumma, n, n,
656 $ zero, anorm,
'NO', a, lda, iwork, iinfo )
658 ELSE IF( itype.EQ.9 )
THEN
662 CALL zlatmr( n, n,
'D', iseed,
'N', work, 6, one, cone,
663 $
'T',
'N', work( n+1 ), 1, one,
664 $ work( 2*n+1 ), 1, one,
'N', idumma, n, n,
665 $ zero, anorm,
'NO', a, lda, iwork, iinfo )
667 CALL zlaset(
'Full', 2, n, czero, czero, a, lda )
668 CALL zlaset(
'Full', n-3, 1, czero, czero, a( 3, 1 ),
670 CALL zlaset(
'Full', n-3, 2, czero, czero,
672 CALL zlaset(
'Full', 1, n, czero, czero, a( n, 1 ),
676 ELSE IF( itype.EQ.10 )
THEN
680 CALL zlatmr( n, n,
'D', iseed,
'N', work, 6, one, cone,
681 $
'T',
'N', work( n+1 ), 1, one,
682 $ work( 2*n+1 ), 1, one,
'N', idumma, n, 0,
683 $ zero, anorm,
'NO', a, lda, iwork, iinfo )
690 IF( iinfo.NE.0 )
THEN
691 WRITE( nounit, fmt = 9992 )
'Generator', iinfo, n, jtype,
705 nnwork = 5*n + 2*n**2
707 nnwork = max( nnwork, 1 )
718 IF( isort.EQ.0 )
THEN
728 CALL zlacpy(
'F', n, n, a, lda, h, lda )
729 CALL zgees(
'V', sort, zslect, n, h, lda, sdim, w, vs,
730 $ ldvs, work, nnwork, rwork, bwork, iinfo )
731 IF( iinfo.NE.0 )
THEN
732 result( 1+rsub ) = ulpinv
733 WRITE( nounit, fmt = 9992 )
'ZGEES1', iinfo, n,
741 result( 1+rsub ) = zero
744 IF( h( i, j ).NE.zero )
745 $ result( 1+rsub ) = ulpinv
751 lwork = max( 1, 2*n*n )
752 CALL zhst01( n, 1, n, a, lda, h, lda, vs, ldvs, work,
753 $ lwork, rwork, res )
754 result( 2+rsub ) = res( 1 )
755 result( 3+rsub ) = res( 2 )
759 result( 4+rsub ) = zero
761 IF( h( i, i ).NE.w( i ) )
762 $ result( 4+rsub ) = ulpinv
767 CALL zlacpy(
'F', n, n, a, lda, ht, lda )
768 CALL zgees(
'N', sort, zslect, n, ht, lda, sdim, wt,
769 $ vs, ldvs, work, nnwork, rwork, bwork,
771 IF( iinfo.NE.0 )
THEN
772 result( 5+rsub ) = ulpinv
773 WRITE( nounit, fmt = 9992 )
'ZGEES2', iinfo, n,
779 result( 5+rsub ) = zero
782 IF( h( i, j ).NE.ht( i, j ) )
783 $ result( 5+rsub ) = ulpinv
789 result( 6+rsub ) = zero
791 IF( w( i ).NE.wt( i ) )
792 $ result( 6+rsub ) = ulpinv
797 IF( isort.EQ.1 )
THEN
801 IF( zslect( w( i ) ) )
802 $ knteig = knteig + 1
804 IF( zslect( w( i+1 ) ) .AND.
805 $ ( .NOT.zslect( w( i ) ) ) )result( 13 )
810 $ result( 13 ) = ulpinv
822 IF( result( j ).GE.zero )
824 IF( result( j ).GE.thresh )
829 $ ntestf = ntestf + 1
830 IF( ntestf.EQ.1 )
THEN
831 WRITE( nounit, fmt = 9999 )path
832 WRITE( nounit, fmt = 9998 )
833 WRITE( nounit, fmt = 9997 )
834 WRITE( nounit, fmt = 9996 )
835 WRITE( nounit, fmt = 9995 )thresh
836 WRITE( nounit, fmt = 9994 )
841 IF( result( j ).GE.thresh )
THEN
842 WRITE( nounit, fmt = 9993 )n, iwk, ioldsd, jtype,
847 nerrs = nerrs + nfail
848 ntestt = ntestt + ntest
856 CALL dlasum( path, nounit, nerrs, ntestt )
858 9999
FORMAT( / 1x, a3,
' -- Complex Schur Form Decomposition Driver',
859 $ /
' Matrix types (see ZDRVES for details): ' )
861 9998
FORMAT( /
' Special Matrices:', /
' 1=Zero matrix. ',
862 $
' ',
' 5=Diagonal: geometr. spaced entries.',
863 $ /
' 2=Identity matrix. ',
' 6=Diagona',
864 $
'l: clustered entries.', /
' 3=Transposed Jordan block. ',
865 $
' ',
' 7=Diagonal: large, evenly spaced.', /
' ',
866 $
'4=Diagonal: evenly spaced entries. ',
' 8=Diagonal: s',
867 $
'mall, evenly spaced.' )
868 9997
FORMAT(
' Dense, Non-Symmetric Matrices:', /
' 9=Well-cond., ev',
869 $
'enly spaced eigenvals.',
' 14=Ill-cond., geomet. spaced e',
870 $
'igenals.', /
' 10=Well-cond., geom. spaced eigenvals. ',
871 $
' 15=Ill-conditioned, clustered e.vals.', /
' 11=Well-cond',
872 $
'itioned, clustered e.vals. ',
' 16=Ill-cond., random comp',
873 $
'lex ', a6, /
' 12=Well-cond., random complex ', a6,
' ',
874 $
' 17=Ill-cond., large rand. complx ', a4, /
' 13=Ill-condi',
875 $
'tioned, evenly spaced. ',
' 18=Ill-cond., small rand.',
877 9996
FORMAT(
' 19=Matrix with random O(1) entries. ',
' 21=Matrix ',
878 $
'with small random entries.', /
' 20=Matrix with large ran',
879 $
'dom entries. ', / )
880 9995
FORMAT(
' Tests performed with test threshold =', f8.2,
881 $ /
' ( A denotes A on input and T denotes A on output)',
882 $ / /
' 1 = 0 if T in Schur form (no sort), ',
883 $
' 1/ulp otherwise', /
884 $
' 2 = | A - VS T transpose(VS) | / ( n |A| ulp ) (no sort)',
885 $ /
' 3 = | I - VS transpose(VS) | / ( n ulp ) (no sort) ',
886 $ /
' 4 = 0 if W are eigenvalues of T (no sort),',
887 $
' 1/ulp otherwise', /
888 $
' 5 = 0 if T same no matter if VS computed (no sort),',
889 $
' 1/ulp otherwise', /
890 $
' 6 = 0 if W same no matter if VS computed (no sort)',
891 $
', 1/ulp otherwise' )
892 9994
FORMAT(
' 7 = 0 if T in Schur form (sort), ',
' 1/ulp otherwise',
893 $ /
' 8 = | A - VS T transpose(VS) | / ( n |A| ulp ) (sort)',
894 $ /
' 9 = | I - VS transpose(VS) | / ( n ulp ) (sort) ',
895 $ /
' 10 = 0 if W are eigenvalues of T (sort),',
896 $
' 1/ulp otherwise', /
897 $
' 11 = 0 if T same no matter if VS computed (sort),',
898 $
' 1/ulp otherwise', /
899 $
' 12 = 0 if W same no matter if VS computed (sort),',
900 $
' 1/ulp otherwise', /
901 $
' 13 = 0 if sorting successful, 1/ulp otherwise', / )
902 9993
FORMAT(
' N=', i5,
', IWK=', i2,
', seed=', 4( i4,
',' ),
903 $
' type ', i2,
', test(', i2,
')=', g10.3 )
904 9992
FORMAT(
' ZDRVES: ', a,
' returned INFO=', i6,
'.', / 9x,
'N=',
905 $ i6,
', JTYPE=', i6,
', ISEED=(', 3( i5,
',' ), i5,
')' )
subroutine dlabad(SMALL, LARGE)
DLABAD
subroutine xerbla(SRNAME, INFO)
XERBLA
subroutine zhst01(N, ILO, IHI, A, LDA, H, LDH, Q, LDQ, WORK, LWORK, RWORK, RESULT)
ZHST01
subroutine zdrves(NSIZES, NN, NTYPES, DOTYPE, ISEED, THRESH, NOUNIT, A, LDA, H, HT, W, WT, VS, LDVS, RESULT, WORK, NWORK, RWORK, IWORK, BWORK, INFO)
ZDRVES
subroutine zlatms(M, N, DIST, ISEED, SYM, D, MODE, COND, DMAX, KL, KU, PACK, A, LDA, WORK, INFO)
ZLATMS
subroutine zlatmr(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)
ZLATMR
subroutine zlatme(N, DIST, ISEED, D, MODE, COND, DMAX, RSIGN, UPPER, SIM, DS, MODES, CONDS, KL, KU, ANORM, A, LDA, WORK, INFO)
ZLATME
subroutine zgees(JOBVS, SORT, SELECT, N, A, LDA, SDIM, W, VS, LDVS, WORK, LWORK, RWORK, BWORK, INFO)
ZGEES computes the eigenvalues, the Schur form, and, optionally, the matrix of Schur vectors for GE m...
subroutine zlacpy(UPLO, M, N, A, LDA, B, LDB)
ZLACPY copies all or part of one two-dimensional array to another.
subroutine zlaset(UPLO, M, N, ALPHA, BETA, A, LDA)
ZLASET initializes the off-diagonal elements and the diagonal elements of a matrix to given values.
subroutine dlasum(TYPE, IOUNIT, IE, NRUN)
DLASUM