LAPACK  3.8.0 LAPACK: Linear Algebra PACKage

## ◆ zdrvvx()

 subroutine zdrvvx ( integer NSIZES, integer, dimension( * ) NN, integer NTYPES, logical, dimension( * ) DOTYPE, integer, dimension( 4 ) ISEED, double precision THRESH, integer NIUNIT, integer NOUNIT, complex*16, dimension( lda, * ) A, integer LDA, complex*16, dimension( lda, * ) H, complex*16, dimension( * ) W, complex*16, dimension( * ) W1, complex*16, dimension( ldvl, * ) VL, integer LDVL, complex*16, dimension( ldvr, * ) VR, integer LDVR, complex*16, dimension( ldlre, * ) LRE, integer LDLRE, double precision, dimension( * ) RCONDV, double precision, dimension( * ) RCNDV1, double precision, dimension( * ) RCDVIN, double precision, dimension( * ) RCONDE, double precision, dimension( * ) RCNDE1, double precision, dimension( * ) RCDEIN, double precision, dimension( * ) SCALE, double precision, dimension( * ) SCALE1, double precision, dimension( 11 ) RESULT, complex*16, dimension( * ) WORK, integer NWORK, double precision, dimension( * ) RWORK, integer INFO )

ZDRVVX

Purpose:
```    ZDRVVX  checks the nonsymmetric eigenvalue problem expert driver
ZGEEVX.

ZDRVVX uses both test matrices generated randomly depending on
data supplied in the calling sequence, as well as on data
read from an input file and including precomputed condition
numbers to which it compares the ones it computes.

When ZDRVVX is called, a number of matrix "sizes" ("n's") and a
number of matrix "types" are specified in the calling sequence.
For each size ("n") and each type of matrix, one matrix will be
generated and used to test the nonsymmetric eigenroutines.  For
each matrix, 9 tests will be performed:

(1)     | A * VR - VR * W | / ( n |A| ulp )

Here VR is the matrix of unit right eigenvectors.
W is a diagonal matrix with diagonal entries W(j).

(2)     | A**H  * VL - VL * W**H | / ( n |A| ulp )

Here VL is the matrix of unit left eigenvectors, A**H is the
conjugate transpose of A, and W is as above.

(3)     | |VR(i)| - 1 | / ulp and largest component real

VR(i) denotes the i-th column of VR.

(4)     | |VL(i)| - 1 | / ulp and largest component real

VL(i) denotes the i-th column of VL.

(5)     W(full) = W(partial)

W(full) denotes the eigenvalues computed when VR, VL, RCONDV
and RCONDE are also computed, and W(partial) denotes the
eigenvalues computed when only some of VR, VL, RCONDV, and
RCONDE are computed.

(6)     VR(full) = VR(partial)

VR(full) denotes the right eigenvectors computed when VL, RCONDV
and RCONDE are computed, and VR(partial) denotes the result
when only some of VL and RCONDV are computed.

(7)     VL(full) = VL(partial)

VL(full) denotes the left eigenvectors computed when VR, RCONDV
and RCONDE are computed, and VL(partial) denotes the result
when only some of VR and RCONDV are computed.

(8)     0 if SCALE, ILO, IHI, ABNRM (full) =
SCALE, ILO, IHI, ABNRM (partial)
1/ulp otherwise

SCALE, ILO, IHI and ABNRM describe how the matrix is balanced.
(full) is when VR, VL, RCONDE and RCONDV are also computed, and
(partial) is when some are not computed.

(9)     RCONDV(full) = RCONDV(partial)

RCONDV(full) denotes the reciprocal condition numbers of the
right eigenvectors computed when VR, VL and RCONDE are also
computed. RCONDV(partial) denotes the reciprocal condition
numbers when only some of VR, VL and RCONDE are computed.

The "sizes" are specified by an array NN(1:NSIZES); the value of
each element NN(j) specifies one size.
The "types" are specified by a logical array DOTYPE( 1:NTYPES );
if DOTYPE(j) is .TRUE., then matrix type "j" will be generated.
Currently, the list of possible types is:

(1)  The zero matrix.
(2)  The identity matrix.
(3)  A (transposed) Jordan block, with 1's on the diagonal.

(4)  A diagonal matrix with evenly spaced entries
1, ..., ULP  and random complex angles.
(ULP = (first number larger than 1) - 1 )
(5)  A diagonal matrix with geometrically spaced entries
1, ..., ULP  and random complex angles.
(6)  A diagonal matrix with "clustered" entries 1, ULP, ..., ULP
and random complex angles.

(7)  Same as (4), but multiplied by a constant near
the overflow threshold
(8)  Same as (4), but multiplied by a constant near
the underflow threshold

(9)  A matrix of the form  U' T U, where U is unitary and
T has evenly spaced entries 1, ..., ULP with random complex
angles on the diagonal and random O(1) entries in the upper
triangle.

(10) A matrix of the form  U' T U, where U is unitary and
T has geometrically spaced entries 1, ..., ULP with random
complex angles on the diagonal and random O(1) entries in
the upper triangle.

(11) A matrix of the form  U' T U, where U is unitary and
T has "clustered" entries 1, ULP,..., ULP with random
complex angles on the diagonal and random O(1) entries in
the upper triangle.

(12) A matrix of the form  U' T U, where U is unitary and
T has complex eigenvalues randomly chosen from
ULP < |z| < 1   and random O(1) entries in the upper
triangle.

(13) A matrix of the form  X' T X, where X has condition
SQRT( ULP ) and T has evenly spaced entries 1, ..., ULP
with random complex angles on the diagonal and random O(1)
entries in the upper triangle.

(14) A matrix of the form  X' T X, where X has condition
SQRT( ULP ) and T has geometrically spaced entries
1, ..., ULP with random complex angles on the diagonal
and random O(1) entries in the upper triangle.

(15) A matrix of the form  X' T X, where X has condition
SQRT( ULP ) and T has "clustered" entries 1, ULP,..., ULP
with random complex angles on the diagonal and random O(1)
entries in the upper triangle.

(16) A matrix of the form  X' T X, where X has condition
SQRT( ULP ) and T has complex eigenvalues randomly chosen
from ULP < |z| < 1 and random O(1) entries in the upper
triangle.

(17) Same as (16), but multiplied by a constant
near the overflow threshold
(18) Same as (16), but multiplied by a constant
near the underflow threshold

(19) Nonsymmetric matrix with random entries chosen from |z| < 1
If N is at least 4, all entries in first two rows and last
row, and first column and last two columns are zero.
(20) Same as (19), but multiplied by a constant
near the overflow threshold
(21) Same as (19), but multiplied by a constant
near the underflow threshold

In addition, an input file will be read from logical unit number
NIUNIT. The file contains matrices along with precomputed
eigenvalues and reciprocal condition numbers for the eigenvalues
and right eigenvectors. For these matrices, in addition to tests
(1) to (9) we will compute the following two tests:

(10)  |RCONDV - RCDVIN| / cond(RCONDV)

RCONDV is the reciprocal right eigenvector condition number
computed by ZGEEVX and RCDVIN (the precomputed true value)
is supplied as input. cond(RCONDV) is the condition number of
RCONDV, and takes errors in computing RCONDV into account, so
that the resulting quantity should be O(ULP). cond(RCONDV) is
essentially given by norm(A)/RCONDE.

(11)  |RCONDE - RCDEIN| / cond(RCONDE)

RCONDE is the reciprocal eigenvalue condition number
computed by ZGEEVX and RCDEIN (the precomputed true value)
is supplied as input.  cond(RCONDE) is the condition number
of RCONDE, and takes errors in computing RCONDE into account,
so that the resulting quantity should be O(ULP). cond(RCONDE)
is essentially given by norm(A)/RCONDV.```
Parameters
 [in] NSIZES ``` NSIZES is INTEGER The number of sizes of matrices to use. NSIZES must be at least zero. If it is zero, no randomly generated matrices are tested, but any test matrices read from NIUNIT will be tested.``` [in] NN ``` NN is INTEGER array, dimension (NSIZES) An array containing the sizes to be used for the matrices. Zero values will be skipped. The values must be at least zero.``` [in] NTYPES ``` NTYPES is INTEGER The number of elements in DOTYPE. NTYPES must be at least zero. If it is zero, no randomly generated test matrices are tested, but and test matrices read from NIUNIT will be tested. If it is MAXTYP+1 and NSIZES is 1, then an additional type, MAXTYP+1 is defined, which is to use whatever matrix is in A. This is only useful if DOTYPE(1:MAXTYP) is .FALSE. and DOTYPE(MAXTYP+1) is .TRUE. .``` [in] DOTYPE ``` DOTYPE is LOGICAL array, dimension (NTYPES) If DOTYPE(j) is .TRUE., then for each size in NN a matrix of that size and of type j will be generated. If NTYPES is smaller than the maximum number of types defined (PARAMETER MAXTYP), then types NTYPES+1 through MAXTYP will not be generated. If NTYPES is larger than MAXTYP, DOTYPE(MAXTYP+1) through DOTYPE(NTYPES) will be ignored.``` [in,out] ISEED ``` ISEED is INTEGER array, dimension (4) On entry ISEED specifies the seed of the random number generator. The array elements should be between 0 and 4095; if not they will be reduced mod 4096. Also, ISEED(4) must be odd. The random number generator uses a linear congruential sequence limited to small integers, and so should produce machine independent random numbers. The values of ISEED are changed on exit, and can be used in the next call to ZDRVVX to continue the same random number sequence.``` [in] THRESH ``` THRESH is DOUBLE PRECISION A test will count as "failed" if the "error", computed as described above, exceeds THRESH. Note that the error is scaled to be O(1), so THRESH should be a reasonably small multiple of 1, e.g., 10 or 100. In particular, it should not depend on the precision (single vs. double) or the size of the matrix. It must be at least zero.``` [in] NIUNIT ``` NIUNIT is INTEGER The FORTRAN unit number for reading in the data file of problems to solve.``` [in] NOUNIT ``` NOUNIT is INTEGER The FORTRAN unit number for printing out error messages (e.g., if a routine returns INFO not equal to 0.)``` [out] A ``` A is COMPLEX*16 array, dimension (LDA, max(NN,12)) Used to hold the matrix whose eigenvalues are to be computed. On exit, A contains the last matrix actually used.``` [in] LDA ``` LDA is INTEGER The leading dimension of A, and H. LDA must be at least 1 and at least max( NN, 12 ). (12 is the dimension of the largest matrix on the precomputed input file.)``` [out] H ``` H is COMPLEX*16 array, dimension (LDA, max(NN,12)) Another copy of the test matrix A, modified by ZGEEVX.``` [out] W ``` W is COMPLEX*16 array, dimension (max(NN,12)) Contains the eigenvalues of A.``` [out] W1 ``` W1 is COMPLEX*16 array, dimension (max(NN,12)) Like W, this array contains the eigenvalues of A, but those computed when ZGEEVX only computes a partial eigendecomposition, i.e. not the eigenvalues and left and right eigenvectors.``` [out] VL ``` VL is COMPLEX*16 array, dimension (LDVL, max(NN,12)) VL holds the computed left eigenvectors.``` [in] LDVL ``` LDVL is INTEGER Leading dimension of VL. Must be at least max(1,max(NN,12)).``` [out] VR ``` VR is COMPLEX*16 array, dimension (LDVR, max(NN,12)) VR holds the computed right eigenvectors.``` [in] LDVR ``` LDVR is INTEGER Leading dimension of VR. Must be at least max(1,max(NN,12)).``` [out] LRE ``` LRE is COMPLEX*16 array, dimension (LDLRE, max(NN,12)) LRE holds the computed right or left eigenvectors.``` [in] LDLRE ``` LDLRE is INTEGER Leading dimension of LRE. Must be at least max(1,max(NN,12))``` [out] RCONDV ``` RCONDV is DOUBLE PRECISION array, dimension (N) RCONDV holds the computed reciprocal condition numbers for eigenvectors.``` [out] RCNDV1 ``` RCNDV1 is DOUBLE PRECISION array, dimension (N) RCNDV1 holds more computed reciprocal condition numbers for eigenvectors.``` [in] RCDVIN ``` RCDVIN is DOUBLE PRECISION array, dimension (N) When COMP = .TRUE. RCDVIN holds the precomputed reciprocal condition numbers for eigenvectors to be compared with RCONDV.``` [out] RCONDE ``` RCONDE is DOUBLE PRECISION array, dimension (N) RCONDE holds the computed reciprocal condition numbers for eigenvalues.``` [out] RCNDE1 ``` RCNDE1 is DOUBLE PRECISION array, dimension (N) RCNDE1 holds more computed reciprocal condition numbers for eigenvalues.``` [in] RCDEIN ``` RCDEIN is DOUBLE PRECISION array, dimension (N) When COMP = .TRUE. RCDEIN holds the precomputed reciprocal condition numbers for eigenvalues to be compared with RCONDE.``` [out] SCALE ``` SCALE is DOUBLE PRECISION array, dimension (N) Holds information describing balancing of matrix.``` [out] SCALE1 ``` SCALE1 is DOUBLE PRECISION array, dimension (N) Holds information describing balancing of matrix.``` [out] WORK ` WORK is COMPLEX*16 array, dimension (NWORK)` [out] RESULT ``` RESULT is DOUBLE PRECISION array, dimension (11) The values computed by the seven tests described above. The values are currently limited to 1/ulp, to avoid overflow.``` [in] NWORK ``` NWORK is INTEGER The number of entries in WORK. This must be at least max(6*12+2*12**2,6*NN(j)+2*NN(j)**2) = max( 360 ,6*NN(j)+2*NN(j)**2) for all j.``` [out] RWORK ` RWORK is DOUBLE PRECISION array, dimension (2*max(NN,12))` [out] INFO ``` INFO is INTEGER If 0, then successful exit. If <0, then input parameter -INFO is incorrect. If >0, ZLATMR, CLATMS, CLATME or ZGET23 returned an error code, and INFO is its absolute value. ----------------------------------------------------------------------- Some Local Variables and Parameters: ---- ----- --------- --- ---------- ZERO, ONE Real 0 and 1. MAXTYP The number of types defined. NMAX Largest value in NN or 12. NERRS The number of tests which have exceeded THRESH COND, CONDS, IMODE Values to be passed to the matrix generators. ANORM Norm of A; passed to matrix generators. OVFL, UNFL Overflow and underflow thresholds. ULP, ULPINV Finest relative precision and its inverse. RTULP, RTULPI Square roots of the previous 4 values. The following four arrays decode JTYPE: KTYPE(j) The general type (1-10) for type "j". KMODE(j) The MODE value to be passed to the matrix generator for type "j". KMAGN(j) The order of magnitude ( O(1), O(overflow^(1/2) ), O(underflow^(1/2) ) KCONDS(j) Selectw whether CONDS is to be 1 or 1/sqrt(ulp). (0 means irrelevant.)```
Date
June 2016

Definition at line 498 of file zdrvvx.f.

498 *
499 * -- LAPACK test routine (version 3.7.0) --
500 * -- LAPACK is a software package provided by Univ. of Tennessee, --
501 * -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
502 * June 2016
503 *
504 * .. Scalar Arguments ..
505  INTEGER info, lda, ldlre, ldvl, ldvr, niunit, nounit,
506  \$ nsizes, ntypes, nwork
507  DOUBLE PRECISION thresh
508 * ..
509 * .. Array Arguments ..
510  LOGICAL dotype( * )
511  INTEGER iseed( 4 ), nn( * )
512  DOUBLE PRECISION rcdein( * ), rcdvin( * ), rcnde1( * ),
513  \$ rcndv1( * ), rconde( * ), rcondv( * ),
514  \$ result( 11 ), rwork( * ), scale( * ),
515  \$ scale1( * )
516  COMPLEX*16 a( lda, * ), h( lda, * ), lre( ldlre, * ),
517  \$ vl( ldvl, * ), vr( ldvr, * ), w( * ), w1( * ),
518  \$ work( * )
519 * ..
520 *
521 * =====================================================================
522 *
523 * .. Parameters ..
524  COMPLEX*16 czero
525  parameter( czero = ( 0.0d+0, 0.0d+0 ) )
526  COMPLEX*16 cone
527  parameter( cone = ( 1.0d+0, 0.0d+0 ) )
528  DOUBLE PRECISION zero, one
529  parameter( zero = 0.0d+0, one = 1.0d+0 )
530  INTEGER maxtyp
531  parameter( maxtyp = 21 )
532 * ..
533 * .. Local Scalars ..
535  CHARACTER balanc
536  CHARACTER*3 path
537  INTEGER i, ibal, iinfo, imode, isrt, itype, iwk, j,
538  \$ jcol, jsize, jtype, mtypes, n, nerrs, nfail,
539  \$ nmax, nnwork, ntest, ntestf, ntestt
540  DOUBLE PRECISION anorm, cond, conds, ovfl, rtulp, rtulpi, ulp,
541  \$ ulpinv, unfl, wi, wr
542 * ..
543 * .. Local Arrays ..
544  CHARACTER bal( 4 )
545  INTEGER idumma( 1 ), ioldsd( 4 ), kconds( maxtyp ),
546  \$ kmagn( maxtyp ), kmode( maxtyp ),
547  \$ ktype( maxtyp )
548 * ..
549 * .. External Functions ..
550  DOUBLE PRECISION dlamch
551  EXTERNAL dlamch
552 * ..
553 * .. External Subroutines ..
554  EXTERNAL dlabad, dlasum, xerbla, zget23, zlaset, zlatme,
555  \$ zlatmr, zlatms
556 * ..
557 * .. Intrinsic Functions ..
558  INTRINSIC abs, dcmplx, max, min, sqrt
559 * ..
560 * .. Data statements ..
561  DATA ktype / 1, 2, 3, 5*4, 4*6, 6*6, 3*9 /
562  DATA kmagn / 3*1, 1, 1, 1, 2, 3, 4*1, 1, 1, 1, 1, 2,
563  \$ 3, 1, 2, 3 /
564  DATA kmode / 3*0, 4, 3, 1, 4, 4, 4, 3, 1, 5, 4, 3,
565  \$ 1, 5, 5, 5, 4, 3, 1 /
566  DATA kconds / 3*0, 5*0, 4*1, 6*2, 3*0 /
567  DATA bal / 'N', 'P', 'S', 'B' /
568 * ..
569 * .. Executable Statements ..
570 *
571  path( 1: 1 ) = 'Zomplex precision'
572  path( 2: 3 ) = 'VX'
573 *
574 * Check for errors
575 *
576  ntestt = 0
577  ntestf = 0
578  info = 0
579 *
580 * Important constants
581 *
583 *
584 * 7 is the largest dimension in the input file of precomputed
585 * problems
586 *
587  nmax = 7
588  DO 10 j = 1, nsizes
589  nmax = max( nmax, nn( j ) )
590  IF( nn( j ).LT.0 )
592  10 CONTINUE
593 *
594 * Check for errors
595 *
596  IF( nsizes.LT.0 ) THEN
597  info = -1
598  ELSE IF( badnn ) THEN
599  info = -2
600  ELSE IF( ntypes.LT.0 ) THEN
601  info = -3
602  ELSE IF( thresh.LT.zero ) THEN
603  info = -6
604  ELSE IF( lda.LT.1 .OR. lda.LT.nmax ) THEN
605  info = -10
606  ELSE IF( ldvl.LT.1 .OR. ldvl.LT.nmax ) THEN
607  info = -15
608  ELSE IF( ldvr.LT.1 .OR. ldvr.LT.nmax ) THEN
609  info = -17
610  ELSE IF( ldlre.LT.1 .OR. ldlre.LT.nmax ) THEN
611  info = -19
612  ELSE IF( 6*nmax+2*nmax**2.GT.nwork ) THEN
613  info = -30
614  END IF
615 *
616  IF( info.NE.0 ) THEN
617  CALL xerbla( 'ZDRVVX', -info )
618  RETURN
619  END IF
620 *
621 * If nothing to do check on NIUNIT
622 *
623  IF( nsizes.EQ.0 .OR. ntypes.EQ.0 )
624  \$ GO TO 160
625 *
626 * More Important constants
627 *
628  unfl = dlamch( 'Safe minimum' )
629  ovfl = one / unfl
630  CALL dlabad( unfl, ovfl )
631  ulp = dlamch( 'Precision' )
632  ulpinv = one / ulp
633  rtulp = sqrt( ulp )
634  rtulpi = one / rtulp
635 *
636 * Loop over sizes, types
637 *
638  nerrs = 0
639 *
640  DO 150 jsize = 1, nsizes
641  n = nn( jsize )
642  IF( nsizes.NE.1 ) THEN
643  mtypes = min( maxtyp, ntypes )
644  ELSE
645  mtypes = min( maxtyp+1, ntypes )
646  END IF
647 *
648  DO 140 jtype = 1, mtypes
649  IF( .NOT.dotype( jtype ) )
650  \$ GO TO 140
651 *
652 * Save ISEED in case of an error.
653 *
654  DO 20 j = 1, 4
655  ioldsd( j ) = iseed( j )
656  20 CONTINUE
657 *
658 * Compute "A"
659 *
660 * Control parameters:
661 *
662 * KMAGN KCONDS KMODE KTYPE
663 * =1 O(1) 1 clustered 1 zero
664 * =2 large large clustered 2 identity
665 * =3 small exponential Jordan
666 * =4 arithmetic diagonal, (w/ eigenvalues)
667 * =5 random log symmetric, w/ eigenvalues
668 * =6 random general, w/ eigenvalues
669 * =7 random diagonal
670 * =8 random symmetric
671 * =9 random general
672 * =10 random triangular
673 *
674  IF( mtypes.GT.maxtyp )
675  \$ GO TO 90
676 *
677  itype = ktype( jtype )
678  imode = kmode( jtype )
679 *
680 * Compute norm
681 *
682  GO TO ( 30, 40, 50 )kmagn( jtype )
683 *
684  30 CONTINUE
685  anorm = one
686  GO TO 60
687 *
688  40 CONTINUE
689  anorm = ovfl*ulp
690  GO TO 60
691 *
692  50 CONTINUE
693  anorm = unfl*ulpinv
694  GO TO 60
695 *
696  60 CONTINUE
697 *
698  CALL zlaset( 'Full', lda, n, czero, czero, a, lda )
699  iinfo = 0
700  cond = ulpinv
701 *
702 * Special Matrices -- Identity & Jordan block
703 *
704 * Zero
705 *
706  IF( itype.EQ.1 ) THEN
707  iinfo = 0
708 *
709  ELSE IF( itype.EQ.2 ) THEN
710 *
711 * Identity
712 *
713  DO 70 jcol = 1, n
714  a( jcol, jcol ) = anorm
715  70 CONTINUE
716 *
717  ELSE IF( itype.EQ.3 ) THEN
718 *
719 * Jordan Block
720 *
721  DO 80 jcol = 1, n
722  a( jcol, jcol ) = anorm
723  IF( jcol.GT.1 )
724  \$ a( jcol, jcol-1 ) = one
725  80 CONTINUE
726 *
727  ELSE IF( itype.EQ.4 ) THEN
728 *
729 * Diagonal Matrix, [Eigen]values Specified
730 *
731  CALL zlatms( n, n, 'S', iseed, 'H', rwork, imode, cond,
732  \$ anorm, 0, 0, 'N', a, lda, work( n+1 ),
733  \$ iinfo )
734 *
735  ELSE IF( itype.EQ.5 ) THEN
736 *
737 * Symmetric, eigenvalues specified
738 *
739  CALL zlatms( n, n, 'S', iseed, 'H', rwork, imode, cond,
740  \$ anorm, n, n, 'N', a, lda, work( n+1 ),
741  \$ iinfo )
742 *
743  ELSE IF( itype.EQ.6 ) THEN
744 *
745 * General, eigenvalues specified
746 *
747  IF( kconds( jtype ).EQ.1 ) THEN
748  conds = one
749  ELSE IF( kconds( jtype ).EQ.2 ) THEN
750  conds = rtulpi
751  ELSE
752  conds = zero
753  END IF
754 *
755  CALL zlatme( n, 'D', iseed, work, imode, cond, cone,
756  \$ 'T', 'T', 'T', rwork, 4, conds, n, n, anorm,
757  \$ a, lda, work( 2*n+1 ), iinfo )
758 *
759  ELSE IF( itype.EQ.7 ) THEN
760 *
761 * Diagonal, random eigenvalues
762 *
763  CALL zlatmr( n, n, 'D', iseed, 'S', work, 6, one, cone,
764  \$ 'T', 'N', work( n+1 ), 1, one,
765  \$ work( 2*n+1 ), 1, one, 'N', idumma, 0, 0,
766  \$ zero, anorm, 'NO', a, lda, idumma, iinfo )
767 *
768  ELSE IF( itype.EQ.8 ) THEN
769 *
770 * Symmetric, random eigenvalues
771 *
772  CALL zlatmr( n, n, 'D', iseed, 'H', work, 6, one, cone,
773  \$ 'T', 'N', work( n+1 ), 1, one,
774  \$ work( 2*n+1 ), 1, one, 'N', idumma, n, n,
775  \$ zero, anorm, 'NO', a, lda, idumma, iinfo )
776 *
777  ELSE IF( itype.EQ.9 ) THEN
778 *
779 * General, random eigenvalues
780 *
781  CALL zlatmr( n, n, 'D', iseed, 'N', work, 6, one, cone,
782  \$ 'T', 'N', work( n+1 ), 1, one,
783  \$ work( 2*n+1 ), 1, one, 'N', idumma, n, n,
784  \$ zero, anorm, 'NO', a, lda, idumma, iinfo )
785  IF( n.GE.4 ) THEN
786  CALL zlaset( 'Full', 2, n, czero, czero, a, lda )
787  CALL zlaset( 'Full', n-3, 1, czero, czero, a( 3, 1 ),
788  \$ lda )
789  CALL zlaset( 'Full', n-3, 2, czero, czero,
790  \$ a( 3, n-1 ), lda )
791  CALL zlaset( 'Full', 1, n, czero, czero, a( n, 1 ),
792  \$ lda )
793  END IF
794 *
795  ELSE IF( itype.EQ.10 ) THEN
796 *
797 * Triangular, random eigenvalues
798 *
799  CALL zlatmr( n, n, 'D', iseed, 'N', work, 6, one, cone,
800  \$ 'T', 'N', work( n+1 ), 1, one,
801  \$ work( 2*n+1 ), 1, one, 'N', idumma, n, 0,
802  \$ zero, anorm, 'NO', a, lda, idumma, iinfo )
803 *
804  ELSE
805 *
806  iinfo = 1
807  END IF
808 *
809  IF( iinfo.NE.0 ) THEN
810  WRITE( nounit, fmt = 9992 )'Generator', iinfo, n, jtype,
811  \$ ioldsd
812  info = abs( iinfo )
813  RETURN
814  END IF
815 *
816  90 CONTINUE
817 *
818 * Test for minimal and generous workspace
819 *
820  DO 130 iwk = 1, 3
821  IF( iwk.EQ.1 ) THEN
822  nnwork = 2*n
823  ELSE IF( iwk.EQ.2 ) THEN
824  nnwork = 2*n + n**2
825  ELSE
826  nnwork = 6*n + 2*n**2
827  END IF
828  nnwork = max( nnwork, 1 )
829 *
830 * Test for all balancing options
831 *
832  DO 120 ibal = 1, 4
833  balanc = bal( ibal )
834 *
835 * Perform tests
836 *
837  CALL zget23( .false., 0, balanc, jtype, thresh,
838  \$ ioldsd, nounit, n, a, lda, h, w, w1, vl,
839  \$ ldvl, vr, ldvr, lre, ldlre, rcondv,
840  \$ rcndv1, rcdvin, rconde, rcnde1, rcdein,
841  \$ scale, scale1, result, work, nnwork,
842  \$ rwork, info )
843 *
844 * Check for RESULT(j) > THRESH
845 *
846  ntest = 0
847  nfail = 0
848  DO 100 j = 1, 9
849  IF( result( j ).GE.zero )
850  \$ ntest = ntest + 1
851  IF( result( j ).GE.thresh )
852  \$ nfail = nfail + 1
853  100 CONTINUE
854 *
855  IF( nfail.GT.0 )
856  \$ ntestf = ntestf + 1
857  IF( ntestf.EQ.1 ) THEN
858  WRITE( nounit, fmt = 9999 )path
859  WRITE( nounit, fmt = 9998 )
860  WRITE( nounit, fmt = 9997 )
861  WRITE( nounit, fmt = 9996 )
862  WRITE( nounit, fmt = 9995 )thresh
863  ntestf = 2
864  END IF
865 *
866  DO 110 j = 1, 9
867  IF( result( j ).GE.thresh ) THEN
868  WRITE( nounit, fmt = 9994 )balanc, n, iwk,
869  \$ ioldsd, jtype, j, result( j )
870  END IF
871  110 CONTINUE
872 *
873  nerrs = nerrs + nfail
874  ntestt = ntestt + ntest
875 *
876  120 CONTINUE
877  130 CONTINUE
878  140 CONTINUE
879  150 CONTINUE
880 *
881  160 CONTINUE
882 *
883 * Read in data from file to check accuracy of condition estimation.
884 * Assume input eigenvalues are sorted lexicographically (increasing
885 * by real part, then decreasing by imaginary part)
886 *
887  jtype = 0
888  170 CONTINUE
889  READ( niunit, fmt = *, end = 220 )n, isrt
890 *
891 * Read input data until N=0
892 *
893  IF( n.EQ.0 )
894  \$ GO TO 220
895  jtype = jtype + 1
896  iseed( 1 ) = jtype
897  DO 180 i = 1, n
898  READ( niunit, fmt = * )( a( i, j ), j = 1, n )
899  180 CONTINUE
900  DO 190 i = 1, n
901  READ( niunit, fmt = * )wr, wi, rcdein( i ), rcdvin( i )
902  w1( i ) = dcmplx( wr, wi )
903  190 CONTINUE
904  CALL zget23( .true., isrt, 'N', 22, thresh, iseed, nounit, n, a,
905  \$ lda, h, w, w1, vl, ldvl, vr, ldvr, lre, ldlre,
906  \$ rcondv, rcndv1, rcdvin, rconde, rcnde1, rcdein,
907  \$ scale, scale1, result, work, 6*n+2*n**2, rwork,
908  \$ info )
909 *
910 * Check for RESULT(j) > THRESH
911 *
912  ntest = 0
913  nfail = 0
914  DO 200 j = 1, 11
915  IF( result( j ).GE.zero )
916  \$ ntest = ntest + 1
917  IF( result( j ).GE.thresh )
918  \$ nfail = nfail + 1
919  200 CONTINUE
920 *
921  IF( nfail.GT.0 )
922  \$ ntestf = ntestf + 1
923  IF( ntestf.EQ.1 ) THEN
924  WRITE( nounit, fmt = 9999 )path
925  WRITE( nounit, fmt = 9998 )
926  WRITE( nounit, fmt = 9997 )
927  WRITE( nounit, fmt = 9996 )
928  WRITE( nounit, fmt = 9995 )thresh
929  ntestf = 2
930  END IF
931 *
932  DO 210 j = 1, 11
933  IF( result( j ).GE.thresh ) THEN
934  WRITE( nounit, fmt = 9993 )n, jtype, j, result( j )
935  END IF
936  210 CONTINUE
937 *
938  nerrs = nerrs + nfail
939  ntestt = ntestt + ntest
940  GO TO 170
941  220 CONTINUE
942 *
943 * Summary
944 *
945  CALL dlasum( path, nounit, nerrs, ntestt )
946 *
947  9999 FORMAT( / 1x, a3, ' -- Complex Eigenvalue-Eigenvector ',
948  \$ 'Decomposition Expert Driver',
949  \$ / ' Matrix types (see ZDRVVX for details): ' )
950 *
951  9998 FORMAT( / ' Special Matrices:', / ' 1=Zero matrix. ',
952  \$ ' ', ' 5=Diagonal: geometr. spaced entries.',
953  \$ / ' 2=Identity matrix. ', ' 6=Diagona',
954  \$ 'l: clustered entries.', / ' 3=Transposed Jordan block. ',
955  \$ ' ', ' 7=Diagonal: large, evenly spaced.', / ' ',
956  \$ '4=Diagonal: evenly spaced entries. ', ' 8=Diagonal: s',
957  \$ 'mall, evenly spaced.' )
958  9997 FORMAT( ' Dense, Non-Symmetric Matrices:', / ' 9=Well-cond., ev',
959  \$ 'enly spaced eigenvals.', ' 14=Ill-cond., geomet. spaced e',
960  \$ 'igenals.', / ' 10=Well-cond., geom. spaced eigenvals. ',
961  \$ ' 15=Ill-conditioned, clustered e.vals.', / ' 11=Well-cond',
962  \$ 'itioned, clustered e.vals. ', ' 16=Ill-cond., random comp',
963  \$ 'lex ', / ' 12=Well-cond., random complex ', ' ',
964  \$ ' 17=Ill-cond., large rand. complx ', / ' 13=Ill-condi',
965  \$ 'tioned, evenly spaced. ', ' 18=Ill-cond., small rand.',
966  \$ ' complx ' )
967  9996 FORMAT( ' 19=Matrix with random O(1) entries. ', ' 21=Matrix ',
968  \$ 'with small random entries.', / ' 20=Matrix with large ran',
969  \$ 'dom entries. ', ' 22=Matrix read from input file', / )
970  9995 FORMAT( ' Tests performed with test threshold =', f8.2,
971  \$ / / ' 1 = | A VR - VR W | / ( n |A| ulp ) ',
972  \$ / ' 2 = | transpose(A) VL - VL W | / ( n |A| ulp ) ',
973  \$ / ' 3 = | |VR(i)| - 1 | / ulp ',
974  \$ / ' 4 = | |VL(i)| - 1 | / ulp ',
975  \$ / ' 5 = 0 if W same no matter if VR or VL computed,',
976  \$ ' 1/ulp otherwise', /
977  \$ ' 6 = 0 if VR same no matter what else computed,',
978  \$ ' 1/ulp otherwise', /
979  \$ ' 7 = 0 if VL same no matter what else computed,',
980  \$ ' 1/ulp otherwise', /
981  \$ ' 8 = 0 if RCONDV same no matter what else computed,',
982  \$ ' 1/ulp otherwise', /
983  \$ ' 9 = 0 if SCALE, ILO, IHI, ABNRM same no matter what else',
984  \$ ' computed, 1/ulp otherwise',
985  \$ / ' 10 = | RCONDV - RCONDV(precomputed) | / cond(RCONDV),',
986  \$ / ' 11 = | RCONDE - RCONDE(precomputed) | / cond(RCONDE),' )
987  9994 FORMAT( ' BALANC=''', a1, ''',N=', i4, ',IWK=', i1, ', seed=',
988  \$ 4( i4, ',' ), ' type ', i2, ', test(', i2, ')=', g10.3 )
989  9993 FORMAT( ' N=', i5, ', input example =', i3, ', test(', i2, ')=',
990  \$ g10.3 )
991  9992 FORMAT( ' ZDRVVX: ', a, ' returned INFO=', i6, '.', / 9x, 'N=',
992  \$ i6, ', JTYPE=', i6, ', ISEED=(', 3( i5, ',' ), i5, ')' )
993 *
994  RETURN
995 *
996 * End of ZDRVVX
997 *
double precision function dlamch(CMACH)
DLAMCH
Definition: dlamch.f:65
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
Definition: zlatmr.f:492
subroutine zlatme(N, DIST, ISEED, D, MODE, COND, DMAX, RSIGN, UPPER, SIM, DS, MODES, CONDS, KL, KU, ANORM, A, LDA, WORK, INFO)
ZLATME
Definition: zlatme.f:303
subroutine xerbla(SRNAME, INFO)
XERBLA
Definition: xerbla.f:62
subroutine zlatms(M, N, DIST, ISEED, SYM, D, MODE, COND, DMAX, KL, KU, PACK, A, LDA, WORK, INFO)
ZLATMS
Definition: zlatms.f:334
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...
Definition: zlaset.f:108