LAPACK  3.6.1
LAPACK: Linear Algebra PACKage
subroutine cdrvsx ( integer  NSIZES,
integer, dimension( * )  NN,
integer  NTYPES,
logical, dimension( * )  DOTYPE,
integer, dimension( 4 )  ISEED,
real  THRESH,
integer  NIUNIT,
integer  NOUNIT,
complex, dimension( lda, * )  A,
integer  LDA,
complex, dimension( lda, * )  H,
complex, dimension( lda, * )  HT,
complex, dimension( * )  W,
complex, dimension( * )  WT,
complex, dimension( * )  WTMP,
complex, dimension( ldvs, * )  VS,
integer  LDVS,
complex, dimension( ldvs, * )  VS1,
real, dimension( 17 )  RESULT,
complex, dimension( * )  WORK,
integer  LWORK,
real, dimension( * )  RWORK,
logical, dimension( * )  BWORK,
integer  INFO 
)

CDRVSX

Purpose:
    CDRVSX checks the nonsymmetric eigenvalue (Schur form) problem
    expert driver CGEESX.

    CDRVSX 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 CDRVSX is called, a number of matrix "sizes" ("n's") and a
    number of matrix "types" are specified.  For each size ("n")
    and each type of matrix, one matrix will be generated and used
    to test the nonsymmetric eigenroutines.  For each matrix, 15
    tests will be performed:

    (1)     0 if T is in Schur form, 1/ulp otherwise
           (no sorting of eigenvalues)

    (2)     | A - VS T VS' | / ( n |A| ulp )

      Here VS is the matrix of Schur eigenvectors, and T is in Schur
      form  (no sorting of eigenvalues).

    (3)     | I - VS VS' | / ( n ulp ) (no sorting of eigenvalues).

    (4)     0     if W are eigenvalues of T
            1/ulp otherwise
            (no sorting of eigenvalues)

    (5)     0     if T(with VS) = T(without VS),
            1/ulp otherwise
            (no sorting of eigenvalues)

    (6)     0     if eigenvalues(with VS) = eigenvalues(without VS),
            1/ulp otherwise
            (no sorting of eigenvalues)

    (7)     0 if T is in Schur form, 1/ulp otherwise
            (with sorting of eigenvalues)

    (8)     | A - VS T VS' | / ( n |A| ulp )

      Here VS is the matrix of Schur eigenvectors, and T is in Schur
      form  (with sorting of eigenvalues).

    (9)     | I - VS VS' | / ( n ulp ) (with sorting of eigenvalues).

    (10)    0     if W are eigenvalues of T
            1/ulp otherwise
            If workspace sufficient, also compare W with and
            without reciprocal condition numbers
            (with sorting of eigenvalues)

    (11)    0     if T(with VS) = T(without VS),
            1/ulp otherwise
            If workspace sufficient, also compare T with and without
            reciprocal condition numbers
            (with sorting of eigenvalues)

    (12)    0     if eigenvalues(with VS) = eigenvalues(without VS),
            1/ulp otherwise
            If workspace sufficient, also compare VS with and without
            reciprocal condition numbers
            (with sorting of eigenvalues)

    (13)    if sorting worked and SDIM is the number of
            eigenvalues which were SELECTed
            If workspace sufficient, also compare SDIM with and
            without reciprocal condition numbers

    (14)    if RCONDE the same no matter if VS and/or RCONDV computed

    (15)    if RCONDV the same no matter if VS and/or RCONDE 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 orthogonal 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 (-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 eigenvalue
    average and right invariant subspace. For these matrices, in
    addition to tests (1) to (15) we will compute the following two
    tests:

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

      RCONDE is the reciprocal average eigenvalue condition number
      computed by CGEESX 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.

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

      RCONDV is the reciprocal right invariant subspace condition
      number computed by CGEESX 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.
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 CDRVSX to continue the same random number
          sequence.
[in]THRESH
          THRESH is REAL
          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 array, dimension (LDA, max(NN))
          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 ).
[out]H
          H is COMPLEX array, dimension (LDA, max(NN))
          Another copy of the test matrix A, modified by CGEESX.
[out]HT
          HT is COMPLEX array, dimension (LDA, max(NN))
          Yet another copy of the test matrix A, modified by CGEESX.
[out]W
          W is COMPLEX array, dimension (max(NN))
          The computed eigenvalues of A.
[out]WT
          WT is COMPLEX array, dimension (max(NN))
          Like W, this array contains the eigenvalues of A,
          but those computed when CGEESX only computes a partial
          eigendecomposition, i.e. not Schur vectors
[out]WTMP
          WTMP is COMPLEX array, dimension (max(NN))
          More temporary storage for eigenvalues.
[out]VS
          VS is COMPLEX array, dimension (LDVS, max(NN))
          VS holds the computed Schur vectors.
[in]LDVS
          LDVS is INTEGER
          Leading dimension of VS. Must be at least max(1,max(NN)).
[out]VS1
          VS1 is COMPLEX array, dimension (LDVS, max(NN))
          VS1 holds another copy of the computed Schur vectors.
[out]RESULT
          RESULT is REAL array, dimension (17)
          The values computed by the 17 tests described above.
          The values are currently limited to 1/ulp, to avoid overflow.
[out]WORK
          WORK is COMPLEX array, dimension (LWORK)
[in]LWORK
          LWORK is INTEGER
          The number of entries in WORK.  This must be at least
          max(1,2*NN(j)**2) for all j.
[out]RWORK
          RWORK is REAL array, dimension (max(NN))
[out]BWORK
          BWORK is LOGICAL array, dimension (max(NN))
[out]INFO
          INFO is INTEGER
          If 0,  successful exit.
            <0,  input parameter -INFO is incorrect
            >0,  CLATMR, CLATMS, CLATME or CGET24 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.
     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 437 of file cdrvsx.f.

437 *
438 * -- LAPACK test routine (version 3.6.1) --
439 * -- LAPACK is a software package provided by Univ. of Tennessee, --
440 * -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
441 * June 2016
442 *
443 * .. Scalar Arguments ..
444  INTEGER info, lda, ldvs, lwork, niunit, nounit, nsizes,
445  $ ntypes
446  REAL thresh
447 * ..
448 * .. Array Arguments ..
449  LOGICAL bwork( * ), dotype( * )
450  INTEGER iseed( 4 ), nn( * )
451  REAL result( 17 ), rwork( * )
452  COMPLEX a( lda, * ), h( lda, * ), ht( lda, * ),
453  $ vs( ldvs, * ), vs1( ldvs, * ), w( * ),
454  $ work( * ), wt( * ), wtmp( * )
455 * ..
456 *
457 * =====================================================================
458 *
459 * .. Parameters ..
460  COMPLEX czero
461  parameter ( czero = ( 0.0e+0, 0.0e+0 ) )
462  COMPLEX cone
463  parameter ( cone = ( 1.0e+0, 0.0e+0 ) )
464  REAL zero, one
465  parameter ( zero = 0.0e+0, one = 1.0e+0 )
466  INTEGER maxtyp
467  parameter ( maxtyp = 21 )
468 * ..
469 * .. Local Scalars ..
470  LOGICAL badnn
471  CHARACTER*3 path
472  INTEGER i, iinfo, imode, isrt, itype, iwk, j, jcol,
473  $ jsize, jtype, mtypes, n, nerrs, nfail,
474  $ nmax, nnwork, nslct, ntest, ntestf, ntestt
475  REAL anorm, cond, conds, ovfl, rcdein, rcdvin,
476  $ rtulp, rtulpi, ulp, ulpinv, unfl
477 * ..
478 * .. Local Arrays ..
479  INTEGER idumma( 1 ), ioldsd( 4 ), islct( 20 ),
480  $ kconds( maxtyp ), kmagn( maxtyp ),
481  $ kmode( maxtyp ), ktype( maxtyp )
482 * ..
483 * .. Arrays in Common ..
484  LOGICAL selval( 20 )
485  REAL selwi( 20 ), selwr( 20 )
486 * ..
487 * .. Scalars in Common ..
488  INTEGER seldim, selopt
489 * ..
490 * .. Common blocks ..
491  COMMON / sslct / selopt, seldim, selval, selwr, selwi
492 * ..
493 * .. External Functions ..
494  REAL slamch
495  EXTERNAL slamch
496 * ..
497 * .. External Subroutines ..
498  EXTERNAL cget24, clatme, clatmr, clatms, claset, slabad,
499  $ slasum, xerbla
500 * ..
501 * .. Intrinsic Functions ..
502  INTRINSIC abs, max, min, sqrt
503 * ..
504 * .. Data statements ..
505  DATA ktype / 1, 2, 3, 5*4, 4*6, 6*6, 3*9 /
506  DATA kmagn / 3*1, 1, 1, 1, 2, 3, 4*1, 1, 1, 1, 1, 2,
507  $ 3, 1, 2, 3 /
508  DATA kmode / 3*0, 4, 3, 1, 4, 4, 4, 3, 1, 5, 4, 3,
509  $ 1, 5, 5, 5, 4, 3, 1 /
510  DATA kconds / 3*0, 5*0, 4*1, 6*2, 3*0 /
511 * ..
512 * .. Executable Statements ..
513 *
514  path( 1: 1 ) = 'Complex precision'
515  path( 2: 3 ) = 'SX'
516 *
517 * Check for errors
518 *
519  ntestt = 0
520  ntestf = 0
521  info = 0
522 *
523 * Important constants
524 *
525  badnn = .false.
526 *
527 * 8 is the largest dimension in the input file of precomputed
528 * problems
529 *
530  nmax = 8
531  DO 10 j = 1, nsizes
532  nmax = max( nmax, nn( j ) )
533  IF( nn( j ).LT.0 )
534  $ badnn = .true.
535  10 CONTINUE
536 *
537 * Check for errors
538 *
539  IF( nsizes.LT.0 ) THEN
540  info = -1
541  ELSE IF( badnn ) THEN
542  info = -2
543  ELSE IF( ntypes.LT.0 ) THEN
544  info = -3
545  ELSE IF( thresh.LT.zero ) THEN
546  info = -6
547  ELSE IF( niunit.LE.0 ) THEN
548  info = -7
549  ELSE IF( nounit.LE.0 ) THEN
550  info = -8
551  ELSE IF( lda.LT.1 .OR. lda.LT.nmax ) THEN
552  info = -10
553  ELSE IF( ldvs.LT.1 .OR. ldvs.LT.nmax ) THEN
554  info = -20
555  ELSE IF( max( 3*nmax, 2*nmax**2 ).GT.lwork ) THEN
556  info = -24
557  END IF
558 *
559  IF( info.NE.0 ) THEN
560  CALL xerbla( 'CDRVSX', -info )
561  RETURN
562  END IF
563 *
564 * If nothing to do check on NIUNIT
565 *
566  IF( nsizes.EQ.0 .OR. ntypes.EQ.0 )
567  $ GO TO 150
568 *
569 * More Important constants
570 *
571  unfl = slamch( 'Safe minimum' )
572  ovfl = one / unfl
573  CALL slabad( unfl, ovfl )
574  ulp = slamch( 'Precision' )
575  ulpinv = one / ulp
576  rtulp = sqrt( ulp )
577  rtulpi = one / rtulp
578 *
579 * Loop over sizes, types
580 *
581  nerrs = 0
582 *
583  DO 140 jsize = 1, nsizes
584  n = nn( jsize )
585  IF( nsizes.NE.1 ) THEN
586  mtypes = min( maxtyp, ntypes )
587  ELSE
588  mtypes = min( maxtyp+1, ntypes )
589  END IF
590 *
591  DO 130 jtype = 1, mtypes
592  IF( .NOT.dotype( jtype ) )
593  $ GO TO 130
594 *
595 * Save ISEED in case of an error.
596 *
597  DO 20 j = 1, 4
598  ioldsd( j ) = iseed( j )
599  20 CONTINUE
600 *
601 * Compute "A"
602 *
603 * Control parameters:
604 *
605 * KMAGN KCONDS KMODE KTYPE
606 * =1 O(1) 1 clustered 1 zero
607 * =2 large large clustered 2 identity
608 * =3 small exponential Jordan
609 * =4 arithmetic diagonal, (w/ eigenvalues)
610 * =5 random log symmetric, w/ eigenvalues
611 * =6 random general, w/ eigenvalues
612 * =7 random diagonal
613 * =8 random symmetric
614 * =9 random general
615 * =10 random triangular
616 *
617  IF( mtypes.GT.maxtyp )
618  $ GO TO 90
619 *
620  itype = ktype( jtype )
621  imode = kmode( jtype )
622 *
623 * Compute norm
624 *
625  GO TO ( 30, 40, 50 )kmagn( jtype )
626 *
627  30 CONTINUE
628  anorm = one
629  GO TO 60
630 *
631  40 CONTINUE
632  anorm = ovfl*ulp
633  GO TO 60
634 *
635  50 CONTINUE
636  anorm = unfl*ulpinv
637  GO TO 60
638 *
639  60 CONTINUE
640 *
641  CALL claset( 'Full', lda, n, czero, czero, a, lda )
642  iinfo = 0
643  cond = ulpinv
644 *
645 * Special Matrices -- Identity & Jordan block
646 *
647  IF( itype.EQ.1 ) THEN
648 *
649 * Zero
650 *
651  iinfo = 0
652 *
653  ELSE IF( itype.EQ.2 ) THEN
654 *
655 * Identity
656 *
657  DO 70 jcol = 1, n
658  a( jcol, jcol ) = anorm
659  70 CONTINUE
660 *
661  ELSE IF( itype.EQ.3 ) THEN
662 *
663 * Jordan Block
664 *
665  DO 80 jcol = 1, n
666  a( jcol, jcol ) = anorm
667  IF( jcol.GT.1 )
668  $ a( jcol, jcol-1 ) = cone
669  80 CONTINUE
670 *
671  ELSE IF( itype.EQ.4 ) THEN
672 *
673 * Diagonal Matrix, [Eigen]values Specified
674 *
675  CALL clatms( n, n, 'S', iseed, 'H', rwork, imode, cond,
676  $ anorm, 0, 0, 'N', a, lda, work( n+1 ),
677  $ iinfo )
678 *
679  ELSE IF( itype.EQ.5 ) THEN
680 *
681 * Symmetric, eigenvalues specified
682 *
683  CALL clatms( n, n, 'S', iseed, 'H', rwork, imode, cond,
684  $ anorm, n, n, 'N', a, lda, work( n+1 ),
685  $ iinfo )
686 *
687  ELSE IF( itype.EQ.6 ) THEN
688 *
689 * General, eigenvalues specified
690 *
691  IF( kconds( jtype ).EQ.1 ) THEN
692  conds = one
693  ELSE IF( kconds( jtype ).EQ.2 ) THEN
694  conds = rtulpi
695  ELSE
696  conds = zero
697  END IF
698 *
699  CALL clatme( n, 'D', iseed, work, imode, cond, cone,
700  $ 'T', 'T', 'T', rwork, 4, conds, n, n, anorm,
701  $ a, lda, work( 2*n+1 ), iinfo )
702 *
703  ELSE IF( itype.EQ.7 ) THEN
704 *
705 * Diagonal, random eigenvalues
706 *
707  CALL clatmr( n, n, 'D', iseed, 'N', work, 6, one, cone,
708  $ 'T', 'N', work( n+1 ), 1, one,
709  $ work( 2*n+1 ), 1, one, 'N', idumma, 0, 0,
710  $ zero, anorm, 'NO', a, lda, idumma, iinfo )
711 *
712  ELSE IF( itype.EQ.8 ) THEN
713 *
714 * Symmetric, random eigenvalues
715 *
716  CALL clatmr( n, n, 'D', iseed, 'H', work, 6, one, cone,
717  $ 'T', 'N', work( n+1 ), 1, one,
718  $ work( 2*n+1 ), 1, one, 'N', idumma, n, n,
719  $ zero, anorm, 'NO', a, lda, idumma, iinfo )
720 *
721  ELSE IF( itype.EQ.9 ) THEN
722 *
723 * General, random eigenvalues
724 *
725  CALL clatmr( n, n, 'D', iseed, 'N', work, 6, one, cone,
726  $ 'T', 'N', work( n+1 ), 1, one,
727  $ work( 2*n+1 ), 1, one, 'N', idumma, n, n,
728  $ zero, anorm, 'NO', a, lda, idumma, iinfo )
729  IF( n.GE.4 ) THEN
730  CALL claset( 'Full', 2, n, czero, czero, a, lda )
731  CALL claset( 'Full', n-3, 1, czero, czero, a( 3, 1 ),
732  $ lda )
733  CALL claset( 'Full', n-3, 2, czero, czero,
734  $ a( 3, n-1 ), lda )
735  CALL claset( 'Full', 1, n, czero, czero, a( n, 1 ),
736  $ lda )
737  END IF
738 *
739  ELSE IF( itype.EQ.10 ) THEN
740 *
741 * Triangular, random eigenvalues
742 *
743  CALL clatmr( n, n, 'D', iseed, 'N', work, 6, one, cone,
744  $ 'T', 'N', work( n+1 ), 1, one,
745  $ work( 2*n+1 ), 1, one, 'N', idumma, n, 0,
746  $ zero, anorm, 'NO', a, lda, idumma, iinfo )
747 *
748  ELSE
749 *
750  iinfo = 1
751  END IF
752 *
753  IF( iinfo.NE.0 ) THEN
754  WRITE( nounit, fmt = 9991 )'Generator', iinfo, n, jtype,
755  $ ioldsd
756  info = abs( iinfo )
757  RETURN
758  END IF
759 *
760  90 CONTINUE
761 *
762 * Test for minimal and generous workspace
763 *
764  DO 120 iwk = 1, 2
765  IF( iwk.EQ.1 ) THEN
766  nnwork = 2*n
767  ELSE
768  nnwork = max( 2*n, n*( n+1 ) / 2 )
769  END IF
770  nnwork = max( nnwork, 1 )
771 *
772  CALL cget24( .false., jtype, thresh, ioldsd, nounit, n,
773  $ a, lda, h, ht, w, wt, wtmp, vs, ldvs, vs1,
774  $ rcdein, rcdvin, nslct, islct, 0, result,
775  $ work, nnwork, rwork, bwork, info )
776 *
777 * Check for RESULT(j) > THRESH
778 *
779  ntest = 0
780  nfail = 0
781  DO 100 j = 1, 15
782  IF( result( j ).GE.zero )
783  $ ntest = ntest + 1
784  IF( result( j ).GE.thresh )
785  $ nfail = nfail + 1
786  100 CONTINUE
787 *
788  IF( nfail.GT.0 )
789  $ ntestf = ntestf + 1
790  IF( ntestf.EQ.1 ) THEN
791  WRITE( nounit, fmt = 9999 )path
792  WRITE( nounit, fmt = 9998 )
793  WRITE( nounit, fmt = 9997 )
794  WRITE( nounit, fmt = 9996 )
795  WRITE( nounit, fmt = 9995 )thresh
796  WRITE( nounit, fmt = 9994 )
797  ntestf = 2
798  END IF
799 *
800  DO 110 j = 1, 15
801  IF( result( j ).GE.thresh ) THEN
802  WRITE( nounit, fmt = 9993 )n, iwk, ioldsd, jtype,
803  $ j, result( j )
804  END IF
805  110 CONTINUE
806 *
807  nerrs = nerrs + nfail
808  ntestt = ntestt + ntest
809 *
810  120 CONTINUE
811  130 CONTINUE
812  140 CONTINUE
813 *
814  150 CONTINUE
815 *
816 * Read in data from file to check accuracy of condition estimation
817 * Read input data until N=0
818 *
819  jtype = 0
820  160 CONTINUE
821  READ( niunit, fmt = *, end = 200 )n, nslct, isrt
822  IF( n.EQ.0 )
823  $ GO TO 200
824  jtype = jtype + 1
825  iseed( 1 ) = jtype
826  READ( niunit, fmt = * )( islct( i ), i = 1, nslct )
827  DO 170 i = 1, n
828  READ( niunit, fmt = * )( a( i, j ), j = 1, n )
829  170 CONTINUE
830  READ( niunit, fmt = * )rcdein, rcdvin
831 *
832  CALL cget24( .true., 22, thresh, iseed, nounit, n, a, lda, h, ht,
833  $ w, wt, wtmp, vs, ldvs, vs1, rcdein, rcdvin, nslct,
834  $ islct, isrt, result, work, lwork, rwork, bwork,
835  $ info )
836 *
837 * Check for RESULT(j) > THRESH
838 *
839  ntest = 0
840  nfail = 0
841  DO 180 j = 1, 17
842  IF( result( j ).GE.zero )
843  $ ntest = ntest + 1
844  IF( result( j ).GE.thresh )
845  $ nfail = nfail + 1
846  180 CONTINUE
847 *
848  IF( nfail.GT.0 )
849  $ ntestf = ntestf + 1
850  IF( ntestf.EQ.1 ) THEN
851  WRITE( nounit, fmt = 9999 )path
852  WRITE( nounit, fmt = 9998 )
853  WRITE( nounit, fmt = 9997 )
854  WRITE( nounit, fmt = 9996 )
855  WRITE( nounit, fmt = 9995 )thresh
856  WRITE( nounit, fmt = 9994 )
857  ntestf = 2
858  END IF
859  DO 190 j = 1, 17
860  IF( result( j ).GE.thresh ) THEN
861  WRITE( nounit, fmt = 9992 )n, jtype, j, result( j )
862  END IF
863  190 CONTINUE
864 *
865  nerrs = nerrs + nfail
866  ntestt = ntestt + ntest
867  GO TO 160
868  200 CONTINUE
869 *
870 * Summary
871 *
872  CALL slasum( path, nounit, nerrs, ntestt )
873 *
874  9999 FORMAT( / 1x, a3, ' -- Complex Schur Form Decomposition Expert ',
875  $ 'Driver', / ' Matrix types (see CDRVSX for details): ' )
876 *
877  9998 FORMAT( / ' Special Matrices:', / ' 1=Zero matrix. ',
878  $ ' ', ' 5=Diagonal: geometr. spaced entries.',
879  $ / ' 2=Identity matrix. ', ' 6=Diagona',
880  $ 'l: clustered entries.', / ' 3=Transposed Jordan block. ',
881  $ ' ', ' 7=Diagonal: large, evenly spaced.', / ' ',
882  $ '4=Diagonal: evenly spaced entries. ', ' 8=Diagonal: s',
883  $ 'mall, evenly spaced.' )
884  9997 FORMAT( ' Dense, Non-Symmetric Matrices:', / ' 9=Well-cond., ev',
885  $ 'enly spaced eigenvals.', ' 14=Ill-cond., geomet. spaced e',
886  $ 'igenals.', / ' 10=Well-cond., geom. spaced eigenvals. ',
887  $ ' 15=Ill-conditioned, clustered e.vals.', / ' 11=Well-cond',
888  $ 'itioned, clustered e.vals. ', ' 16=Ill-cond., random comp',
889  $ 'lex ', / ' 12=Well-cond., random complex ', ' ',
890  $ ' 17=Ill-cond., large rand. complx ', / ' 13=Ill-condi',
891  $ 'tioned, evenly spaced. ', ' 18=Ill-cond., small rand.',
892  $ ' complx ' )
893  9996 FORMAT( ' 19=Matrix with random O(1) entries. ', ' 21=Matrix ',
894  $ 'with small random entries.', / ' 20=Matrix with large ran',
895  $ 'dom entries. ', / )
896  9995 FORMAT( ' Tests performed with test threshold =', f8.2,
897  $ / ' ( A denotes A on input and T denotes A on output)',
898  $ / / ' 1 = 0 if T in Schur form (no sort), ',
899  $ ' 1/ulp otherwise', /
900  $ ' 2 = | A - VS T transpose(VS) | / ( n |A| ulp ) (no sort)',
901  $ / ' 3 = | I - VS transpose(VS) | / ( n ulp ) (no sort) ',
902  $ / ' 4 = 0 if W are eigenvalues of T (no sort),',
903  $ ' 1/ulp otherwise', /
904  $ ' 5 = 0 if T same no matter if VS computed (no sort),',
905  $ ' 1/ulp otherwise', /
906  $ ' 6 = 0 if W same no matter if VS computed (no sort)',
907  $ ', 1/ulp otherwise' )
908  9994 FORMAT( ' 7 = 0 if T in Schur form (sort), ', ' 1/ulp otherwise',
909  $ / ' 8 = | A - VS T transpose(VS) | / ( n |A| ulp ) (sort)',
910  $ / ' 9 = | I - VS transpose(VS) | / ( n ulp ) (sort) ',
911  $ / ' 10 = 0 if W are eigenvalues of T (sort),',
912  $ ' 1/ulp otherwise', /
913  $ ' 11 = 0 if T same no matter what else computed (sort),',
914  $ ' 1/ulp otherwise', /
915  $ ' 12 = 0 if W same no matter what else computed ',
916  $ '(sort), 1/ulp otherwise', /
917  $ ' 13 = 0 if sorting successful, 1/ulp otherwise',
918  $ / ' 14 = 0 if RCONDE same no matter what else computed,',
919  $ ' 1/ulp otherwise', /
920  $ ' 15 = 0 if RCONDv same no matter what else computed,',
921  $ ' 1/ulp otherwise', /
922  $ ' 16 = | RCONDE - RCONDE(precomputed) | / cond(RCONDE),',
923  $ / ' 17 = | RCONDV - RCONDV(precomputed) | / cond(RCONDV),' )
924  9993 FORMAT( ' N=', i5, ', IWK=', i2, ', seed=', 4( i4, ',' ),
925  $ ' type ', i2, ', test(', i2, ')=', g10.3 )
926  9992 FORMAT( ' N=', i5, ', input example =', i3, ', test(', i2, ')=',
927  $ g10.3 )
928  9991 FORMAT( ' CDRVSX: ', a, ' returned INFO=', i6, '.', / 9x, 'N=',
929  $ i6, ', JTYPE=', i6, ', ISEED=(', 3( i5, ',' ), i5, ')' )
930 *
931  RETURN
932 *
933 * End of CDRVSX
934 *
subroutine clatmr(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)
CLATMR
Definition: clatmr.f:492
subroutine slabad(SMALL, LARGE)
SLABAD
Definition: slabad.f:76
subroutine cget24(COMP, JTYPE, THRESH, ISEED, NOUNIT, N, A, LDA, H, HT, W, WT, WTMP, VS, LDVS, VS1, RCDEIN, RCDVIN, NSLCT, ISLCT, ISRT, RESULT, WORK, LWORK, RWORK, BWORK, INFO)
CGET24
Definition: cget24.f:337
subroutine xerbla(SRNAME, INFO)
XERBLA
Definition: xerbla.f:62
subroutine claset(UPLO, M, N, ALPHA, BETA, A, LDA)
CLASET initializes the off-diagonal elements and the diagonal elements of a matrix to given values...
Definition: claset.f:108
subroutine clatms(M, N, DIST, ISEED, SYM, D, MODE, COND, DMAX, KL, KU, PACK, A, LDA, WORK, INFO)
CLATMS
Definition: clatms.f:334
real function slamch(CMACH)
SLAMCH
Definition: slamch.f:69
subroutine slasum(TYPE, IOUNIT, IE, NRUN)
SLASUM
Definition: slasum.f:42
subroutine clatme(N, DIST, ISEED, D, MODE, COND, DMAX, RSIGN, UPPER, SIM, DS, MODES, CONDS, KL, KU, ANORM, A, LDA, WORK, INFO)
CLATME
Definition: clatme.f:303

Here is the call graph for this function:

Here is the caller graph for this function: