LAPACK  3.8.0
LAPACK: Linear Algebra PACKage

◆ ddrvvx()

subroutine ddrvvx ( integer  NSIZES,
integer, dimension( * )  NN,
integer  NTYPES,
logical, dimension( * )  DOTYPE,
integer, dimension( 4 )  ISEED,
double precision  THRESH,
integer  NIUNIT,
integer  NOUNIT,
double precision, dimension( lda, * )  A,
integer  LDA,
double precision, dimension( lda, * )  H,
double precision, dimension( * )  WR,
double precision, dimension( * )  WI,
double precision, dimension( * )  WR1,
double precision, dimension( * )  WI1,
double precision, dimension( ldvl, * )  VL,
integer  LDVL,
double precision, dimension( ldvr, * )  VR,
integer  LDVR,
double precision, 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,
double precision, dimension( * )  WORK,
integer  NWORK,
integer, dimension( * )  IWORK,
integer  INFO 
)

DDRVVX

Purpose:
    DDRVVX  checks the nonsymmetric eigenvalue problem expert driver
    DGEEVX.

    DDRVVX 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 DDRVVX 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 block diagonal matrix, with a 1x1 block for each
      real eigenvalue and a 2x2 block for each complex conjugate
      pair.  If eigenvalues j and j+1 are a complex conjugate pair,
      so WR(j) = WR(j+1) = wr and WI(j) = - WI(j+1) = wi, then the
      2 x 2 block corresponding to the pair will be:

              (  wr  wi  )
              ( -wi  wr  )

      Such a block multiplying an n x 2 matrix  ( ur ui ) on the
      right will be the same as multiplying  ur + i*ui  by  wr + i*wi.

    (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 signs.
         (ULP = (first number larger than 1) - 1 )
    (5)  A diagonal matrix with geometrically spaced entries
         1, ..., ULP  and random signs.
    (6)  A diagonal matrix with "clustered" entries 1, ULP, ..., ULP
         and random signs.

    (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 orthogonal and
         T has evenly spaced entries 1, ..., ULP with random signs
         on the diagonal and random O(1) entries in the upper
         triangle.

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

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

    (12) A matrix of the form  U' T U, where U is orthogonal and
         T has real or complex conjugate paired eigenvalues randomly
         chosen from ( ULP, 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 signs 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 signs 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 signs 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 real or complex conjugate paired
         eigenvalues randomly chosen from ( ULP, 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 (-1,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 DGEEVX 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 DGEEVX 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 DDRVVX 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 DOUBLE PRECISION 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 the arrays A and H.
          LDA >= max(NN,12), since 12 is the dimension of the largest
          matrix in the precomputed input file.
[out]H
          H is DOUBLE PRECISION array, dimension
                      (LDA, max(NN,12))
          Another copy of the test matrix A, modified by DGEEVX.
[out]WR
          WR is DOUBLE PRECISION array, dimension (max(NN))
[out]WI
          WI is DOUBLE PRECISION array, dimension (max(NN))

          The real and imaginary parts of the eigenvalues of A.
          On exit, WR + WI*i are the eigenvalues of the matrix in A.
[out]WR1
          WR1 is DOUBLE PRECISION array, dimension (max(NN,12))
[out]WI1
          WI1 is DOUBLE PRECISION array, dimension (max(NN,12))

          Like WR, WI, these arrays contain the eigenvalues of A,
          but those computed when DGEEVX only computes a partial
          eigendecomposition, i.e. not the eigenvalues and left
          and right eigenvectors.
[out]VL
          VL is DOUBLE PRECISION 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 DOUBLE PRECISION 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 DOUBLE PRECISION 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.
[out]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.
[out]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]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.
[out]WORK
          WORK is DOUBLE PRECISION array, dimension (NWORK)
[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]IWORK
          IWORK is INTEGER 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, DLATMR, SLATMS, SLATME or DGET23 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.)
Author
Univ. of Tennessee
Univ. of California Berkeley
Univ. of Colorado Denver
NAG Ltd.
Date
June 2016

Definition at line 523 of file ddrvvx.f.

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