LAPACK  3.6.1
LAPACK: Linear Algebra PACKage
subroutine sdrvsx ( integer  NSIZES,
integer, dimension( * )  NN,
integer  NTYPES,
logical, dimension( * )  DOTYPE,
integer, dimension( 4 )  ISEED,
real  THRESH,
integer  NIUNIT,
integer  NOUNIT,
real, dimension( lda, * )  A,
integer  LDA,
real, dimension( lda, * )  H,
real, dimension( lda, * )  HT,
real, dimension( * )  WR,
real, dimension( * )  WI,
real, dimension( * )  WRT,
real, dimension( * )  WIT,
real, dimension( * )  WRTMP,
real, dimension( * )  WITMP,
real, dimension( ldvs, * )  VS,
integer  LDVS,
real, dimension( ldvs, * )  VS1,
real, dimension( 17 )  RESULT,
real, dimension( * )  WORK,
integer  LWORK,
integer, dimension( * )  IWORK,
logical, dimension( * )  BWORK,
integer  INFO 
)

SDRVSX

Purpose:
    SDRVSX checks the nonsymmetric eigenvalue (Schur form) problem
    expert driver SGEESX.

    SDRVSX 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 SDRVSX 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 WR+sqrt(-1)*WI 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 WR+sqrt(-1)*WI are eigenvalues of T
            1/ulp otherwise
            If workspace sufficient, also compare WR, WI 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 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 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 SGEESX 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 SGEESX 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 SDRVSX 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 REAL 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 REAL array, dimension (LDA, max(NN))
          Another copy of the test matrix A, modified by SGEESX.
[out]HT
          HT is REAL array, dimension (LDA, max(NN))
          Yet another copy of the test matrix A, modified by SGEESX.
[out]WR
          WR is REAL array, dimension (max(NN))
[out]WI
          WI is REAL 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]WRT
          WRT is REAL array, dimension (max(NN))
[out]WIT
          WIT is REAL array, dimension (max(NN))

          Like WR, WI, these arrays contain the eigenvalues of A,
          but those computed when SGEESX only computes a partial
          eigendecomposition, i.e. not Schur vectors
[out]WRTMP
          WRTMP is REAL array, dimension (max(NN))
[out]WITMP
          WITMP is REAL array, dimension (max(NN))

          More temporary storage for eigenvalues.
[out]VS
          VS is REAL 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 REAL 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 REAL array, dimension (LWORK)
[in]LWORK
          LWORK is INTEGER
          The number of entries in WORK.  This must be at least
          max(3*NN(j),2*NN(j)**2) for all j.
[out]IWORK
          IWORK is INTEGER array, dimension (max(NN)*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,  SLATMR, SLATMS, SLATME or SGET24 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 456 of file sdrvsx.f.

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

Here is the call graph for this function:

Here is the caller graph for this function: