1       PROGRAM CCHKEE
   2 *
   3 *  -- LAPACK test routine (version 3.1.1) --
   4 *     Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
   5 *     February 2007
   6 *
   7 *  Purpose
   8 *  =======
   9 *
  10 *  CCHKEE tests the COMPLEX LAPACK subroutines for the matrix
  11 *  eigenvalue problem.  The test paths in this version are
  12 *
  13 *  NEP (Nonsymmetric Eigenvalue Problem):
  14 *      Test CGEHRD, CUNGHR, CHSEQR, CTREVC, CHSEIN, and CUNMHR
  15 *
  16 *  SEP (Hermitian Eigenvalue Problem):
  17 *      Test CHETRD, CUNGTR, CSTEQR, CSTERF, CSTEIN, CSTEDC,
  18 *      and drivers CHEEV(X), CHBEV(X), CHPEV(X),
  19 *                  CHEEVD,   CHBEVD,   CHPEVD
  20 *
  21 *  SVD (Singular Value Decomposition):
  22 *      Test CGEBRD, CUNGBR, and CBDSQR
  23 *      and the drivers CGESVD, CGESDD
  24 *
  25 *  CEV (Nonsymmetric Eigenvalue/eigenvector Driver):
  26 *      Test CGEEV
  27 *
  28 *  CES (Nonsymmetric Schur form Driver):
  29 *      Test CGEES
  30 *
  31 *  CVX (Nonsymmetric Eigenvalue/eigenvector Expert Driver):
  32 *      Test CGEEVX
  33 *
  34 *  CSX (Nonsymmetric Schur form Expert Driver):
  35 *      Test CGEESX
  36 *
  37 *  CGG (Generalized Nonsymmetric Eigenvalue Problem):
  38 *      Test CGGHRD, CGGBAL, CGGBAK, CHGEQZ, and CTGEVC
  39 *      and the driver routines CGEGS and CGEGV
  40 *
  41 *  CGS (Generalized Nonsymmetric Schur form Driver):
  42 *      Test CGGES
  43 *
  44 *  CGV (Generalized Nonsymmetric Eigenvalue/eigenvector Driver):
  45 *      Test CGGEV
  46 *
  47 *  CGX (Generalized Nonsymmetric Schur form Expert Driver):
  48 *      Test CGGESX
  49 *
  50 *  CXV (Generalized Nonsymmetric Eigenvalue/eigenvector Expert Driver):
  51 *      Test CGGEVX
  52 *
  53 *  CSG (Hermitian Generalized Eigenvalue Problem):
  54 *      Test CHEGST, CHEGV, CHEGVD, CHEGVX, CHPGST, CHPGV, CHPGVD,
  55 *      CHPGVX, CHBGST, CHBGV, CHBGVD, and CHBGVX
  56 *
  57 *  CHB (Hermitian Band Eigenvalue Problem):
  58 *      Test CHBTRD
  59 *
  60 *  CBB (Band Singular Value Decomposition):
  61 *      Test CGBBRD
  62 *
  63 *  CEC (Eigencondition estimation):
  64 *      Test CTRSYL, CTREXC, CTRSNA, and CTRSEN
  65 *
  66 *  CBL (Balancing a general matrix)
  67 *      Test CGEBAL
  68 *
  69 *  CBK (Back transformation on a balanced matrix)
  70 *      Test CGEBAK
  71 *
  72 *  CGL (Balancing a matrix pair)
  73 *      Test CGGBAL
  74 *
  75 *  CGK (Back transformation on a matrix pair)
  76 *      Test CGGBAK
  77 *
  78 *  GLM (Generalized Linear Regression Model):
  79 *      Tests CGGGLM
  80 *
  81 *  GQR (Generalized QR and RQ factorizations):
  82 *      Tests CGGQRF and CGGRQF
  83 *
  84 *  GSV (Generalized Singular Value Decomposition):
  85 *      Tests CGGSVD, CGGSVP, CTGSJA, CLAGS2, CLAPLL, and CLAPMT
  86 *
  87 *  CSD (CS decomposition):
  88 *      Tests CUNCSD
  89 *
  90 *  LSE (Constrained Linear Least Squares):
  91 *      Tests CGGLSE
  92 *
  93 *  Each test path has a different set of inputs, but the data sets for
  94 *  the driver routines xEV, xES, xVX, and xSX can be concatenated in a
  95 *  single input file.  The first line of input should contain one of the
  96 *  3-character path names in columns 1-3.  The number of remaining lines
  97 *  depends on what is found on the first line.
  98 *
  99 *  The number of matrix types used in testing is often controllable from
 100 *  the input file.  The number of matrix types for each path, and the
 101 *  test routine that describes them, is as follows:
 102 *
 103 *  Path name(s)  Types    Test routine
 104 *
 105 *  CHS or NEP      21     CCHKHS
 106 *  CST or SEP      21     CCHKST (routines)
 107 *                  18     CDRVST (drivers)
 108 *  CBD or SVD      16     CCHKBD (routines)
 109 *                   5     CDRVBD (drivers)
 110 *  CEV             21     CDRVEV
 111 *  CES             21     CDRVES
 112 *  CVX             21     CDRVVX
 113 *  CSX             21     CDRVSX
 114 *  CGG             26     CCHKGG (routines)
 115 *                  26     CDRVGG (drivers)
 116 *  CGS             26     CDRGES
 117 *  CGX              5     CDRGSX
 118 *  CGV             26     CDRGEV
 119 *  CXV              2     CDRGVX
 120 *  CSG             21     CDRVSG
 121 *  CHB             15     CCHKHB
 122 *  CBB             15     CCHKBB
 123 *  CEC              -     CCHKEC
 124 *  CBL              -     CCHKBL
 125 *  CBK              -     CCHKBK
 126 *  CGL              -     CCHKGL
 127 *  CGK              -     CCHKGK
 128 *  GLM              8     CCKGLM
 129 *  GQR              8     CCKGQR
 130 *  GSV              8     CCKGSV
 131 *  CSD              3     CCKCSD
 132 *  LSE              8     CCKLSE
 133 *
 134 *-----------------------------------------------------------------------
 135 *
 136 *  NEP input file:
 137 *
 138 *  line 2:  NN, INTEGER
 139 *           Number of values of N.
 140 *
 141 *  line 3:  NVAL, INTEGER array, dimension (NN)
 142 *           The values for the matrix dimension N.
 143 *
 144 *  line 4:  NPARMS, INTEGER
 145 *           Number of values of the parameters NB, NBMIN, NX, NS, and
 146 *           MAXB.
 147 *
 148 *  line 5:  NBVAL, INTEGER array, dimension (NPARMS)
 149 *           The values for the blocksize NB.
 150 *
 151 *  line 6:  NBMIN, INTEGER array, dimension (NPARMS)
 152 *           The values for the minimum blocksize NBMIN.
 153 *
 154 *  line 7:  NXVAL, INTEGER array, dimension (NPARMS)
 155 *           The values for the crossover point NX.
 156 *
 157 *  line 8:  INMIN, INTEGER array, dimension (NPARMS)
 158 *           LAHQR vs TTQRE crossover point, >= 11
 159 *
 160 *  line 9:  INWIN, INTEGER array, dimension (NPARMS)
 161 *           recommended deflation window size
 162 *
 163 *  line 10: INIBL, INTEGER array, dimension (NPARMS)
 164 *           nibble crossover point
 165 *
 166 *  line 11:  ISHFTS, INTEGER array, dimension (NPARMS)
 167 *           number of simultaneous shifts)
 168 *
 169 *  line 12:  IACC22, INTEGER array, dimension (NPARMS)
 170 *           select structured matrix multiply: 0, 1 or 2)
 171 *
 172 *  line 13: THRESH
 173 *           Threshold value for the test ratios.  Information will be
 174 *           printed about each test for which the test ratio is greater
 175 *           than or equal to the threshold.  To have all of the test
 176 *           ratios printed, use THRESH = 0.0 .
 177 *
 178 *  line 14: NEWSD, INTEGER
 179 *           A code indicating how to set the random number seed.
 180 *           = 0:  Set the seed to a default value before each run
 181 *           = 1:  Initialize the seed to a default value only before the
 182 *                 first run
 183 *           = 2:  Like 1, but use the seed values on the next line
 184 *
 185 *  If line 14 was 2:
 186 *
 187 *  line 15: INTEGER array, dimension (4)
 188 *           Four integer values for the random number seed.
 189 *
 190 *  lines 15-EOF:  The remaining lines occur in sets of 1 or 2 and allow
 191 *           the user to specify the matrix types.  Each line contains
 192 *           a 3-character path name in columns 1-3, and the number
 193 *           of matrix types must be the first nonblank item in columns
 194 *           4-80.  If the number of matrix types is at least 1 but is
 195 *           less than the maximum number of possible types, a second
 196 *           line will be read to get the numbers of the matrix types to
 197 *           be used.  For example,
 198 *  NEP 21
 199 *           requests all of the matrix types for the nonsymmetric
 200 *           eigenvalue problem, while
 201 *  NEP  4
 202 *  9 10 11 12
 203 *           requests only matrices of type 9, 10, 11, and 12.
 204 *
 205 *           The valid 3-character path names are 'NEP' or 'CHS' for the
 206 *           nonsymmetric eigenvalue routines.
 207 *
 208 *-----------------------------------------------------------------------
 209 *
 210 *  SEP or CSG input file:
 211 *
 212 *  line 2:  NN, INTEGER
 213 *           Number of values of N.
 214 *
 215 *  line 3:  NVAL, INTEGER array, dimension (NN)
 216 *           The values for the matrix dimension N.
 217 *
 218 *  line 4:  NPARMS, INTEGER
 219 *           Number of values of the parameters NB, NBMIN, and NX.
 220 *
 221 *  line 5:  NBVAL, INTEGER array, dimension (NPARMS)
 222 *           The values for the blocksize NB.
 223 *
 224 *  line 6:  NBMIN, INTEGER array, dimension (NPARMS)
 225 *           The values for the minimum blocksize NBMIN.
 226 *
 227 *  line 7:  NXVAL, INTEGER array, dimension (NPARMS)
 228 *           The values for the crossover point NX.
 229 *
 230 *  line 8:  THRESH
 231 *           Threshold value for the test ratios.  Information will be
 232 *           printed about each test for which the test ratio is greater
 233 *           than or equal to the threshold.
 234 *
 235 *  line 9:  TSTCHK, LOGICAL
 236 *           Flag indicating whether or not to test the LAPACK routines.
 237 *
 238 *  line 10: TSTDRV, LOGICAL
 239 *           Flag indicating whether or not to test the driver routines.
 240 *
 241 *  line 11: TSTERR, LOGICAL
 242 *           Flag indicating whether or not to test the error exits for
 243 *           the LAPACK routines and driver routines.
 244 *
 245 *  line 12: NEWSD, INTEGER
 246 *           A code indicating how to set the random number seed.
 247 *           = 0:  Set the seed to a default value before each run
 248 *           = 1:  Initialize the seed to a default value only before the
 249 *                 first run
 250 *           = 2:  Like 1, but use the seed values on the next line
 251 *
 252 *  If line 12 was 2:
 253 *
 254 *  line 13: INTEGER array, dimension (4)
 255 *           Four integer values for the random number seed.
 256 *
 257 *  lines 13-EOF:  Lines specifying matrix types, as for NEP.
 258 *           The valid 3-character path names are 'SEP' or 'CST' for the
 259 *           Hermitian eigenvalue routines and driver routines, and
 260 *           'CSG' for the routines for the Hermitian generalized
 261 *           eigenvalue problem.
 262 *
 263 *-----------------------------------------------------------------------
 264 *
 265 *  SVD input file:
 266 *
 267 *  line 2:  NN, INTEGER
 268 *           Number of values of M and N.
 269 *
 270 *  line 3:  MVAL, INTEGER array, dimension (NN)
 271 *           The values for the matrix row dimension M.
 272 *
 273 *  line 4:  NVAL, INTEGER array, dimension (NN)
 274 *           The values for the matrix column dimension N.
 275 *
 276 *  line 5:  NPARMS, INTEGER
 277 *           Number of values of the parameter NB, NBMIN, NX, and NRHS.
 278 *
 279 *  line 6:  NBVAL, INTEGER array, dimension (NPARMS)
 280 *           The values for the blocksize NB.
 281 *
 282 *  line 7:  NBMIN, INTEGER array, dimension (NPARMS)
 283 *           The values for the minimum blocksize NBMIN.
 284 *
 285 *  line 8:  NXVAL, INTEGER array, dimension (NPARMS)
 286 *           The values for the crossover point NX.
 287 *
 288 *  line 9:  NSVAL, INTEGER array, dimension (NPARMS)
 289 *           The values for the number of right hand sides NRHS.
 290 *
 291 *  line 10: THRESH
 292 *           Threshold value for the test ratios.  Information will be
 293 *           printed about each test for which the test ratio is greater
 294 *           than or equal to the threshold.
 295 *
 296 *  line 11: TSTCHK, LOGICAL
 297 *           Flag indicating whether or not to test the LAPACK routines.
 298 *
 299 *  line 12: TSTDRV, LOGICAL
 300 *           Flag indicating whether or not to test the driver routines.
 301 *
 302 *  line 13: TSTERR, LOGICAL
 303 *           Flag indicating whether or not to test the error exits for
 304 *           the LAPACK routines and driver routines.
 305 *
 306 *  line 14: NEWSD, INTEGER
 307 *           A code indicating how to set the random number seed.
 308 *           = 0:  Set the seed to a default value before each run
 309 *           = 1:  Initialize the seed to a default value only before the
 310 *                 first run
 311 *           = 2:  Like 1, but use the seed values on the next line
 312 *
 313 *  If line 14 was 2:
 314 *
 315 *  line 15: INTEGER array, dimension (4)
 316 *           Four integer values for the random number seed.
 317 *
 318 *  lines 15-EOF:  Lines specifying matrix types, as for NEP.
 319 *           The 3-character path names are 'SVD' or 'CBD' for both the
 320 *           SVD routines and the SVD driver routines.
 321 *
 322 *-----------------------------------------------------------------------
 323 *
 324 *  CEV and CES data files:
 325 *
 326 *  line 1:  'CEV' or 'CES' in columns 1 to 3.
 327 *
 328 *  line 2:  NSIZES, INTEGER
 329 *           Number of sizes of matrices to use. Should be at least 0
 330 *           and at most 20. If NSIZES = 0, no testing is done
 331 *           (although the remaining  3 lines are still read).
 332 *
 333 *  line 3:  NN, INTEGER array, dimension(NSIZES)
 334 *           Dimensions of matrices to be tested.
 335 *
 336 *  line 4:  NB, NBMIN, NX, NS, NBCOL, INTEGERs
 337 *           These integer parameters determine how blocking is done
 338 *           (see ILAENV for details)
 339 *           NB     : block size
 340 *           NBMIN  : minimum block size
 341 *           NX     : minimum dimension for blocking
 342 *           NS     : number of shifts in xHSEQR
 343 *           NBCOL  : minimum column dimension for blocking
 344 *
 345 *  line 5:  THRESH, REAL
 346 *           The test threshold against which computed residuals are
 347 *           compared. Should generally be in the range from 10. to 20.
 348 *           If it is 0., all test case data will be printed.
 349 *
 350 *  line 6:  NEWSD, INTEGER
 351 *           A code indicating how to set the random number seed.
 352 *           = 0:  Set the seed to a default value before each run
 353 *           = 1:  Initialize the seed to a default value only before the
 354 *                 first run
 355 *           = 2:  Like 1, but use the seed values on the next line
 356 *
 357 *  If line 6 was 2:
 358 *
 359 *  line 7:  INTEGER array, dimension (4)
 360 *           Four integer values for the random number seed.
 361 *
 362 *  lines 8 and following:  Lines specifying matrix types, as for NEP.
 363 *           The 3-character path name is 'CEV' to test CGEEV, or
 364 *           'CES' to test CGEES.
 365 *
 366 *-----------------------------------------------------------------------
 367 *
 368 *  The CVX data has two parts. The first part is identical to CEV,
 369 *  and the second part consists of test matrices with precomputed
 370 *  solutions.
 371 *
 372 *  line 1:  'CVX' in columns 1-3.
 373 *
 374 *  line 2:  NSIZES, INTEGER
 375 *           If NSIZES = 0, no testing of randomly generated examples
 376 *           is done, but any precomputed examples are tested.
 377 *
 378 *  line 3:  NN, INTEGER array, dimension(NSIZES)
 379 *
 380 *  line 4:  NB, NBMIN, NX, NS, NBCOL, INTEGERs
 381 *
 382 *  line 5:  THRESH, REAL
 383 *
 384 *  line 6:  NEWSD, INTEGER
 385 *
 386 *  If line 6 was 2:
 387 *
 388 *  line 7:  INTEGER array, dimension (4)
 389 *
 390 *  lines 8 and following: The first line contains 'CVX' in columns 1-3
 391 *           followed by the number of matrix types, possibly with
 392 *           a second line to specify certain matrix types.
 393 *           If the number of matrix types = 0, no testing of randomly
 394 *           generated examples is done, but any precomputed examples
 395 *           are tested.
 396 *
 397 *  remaining lines : Each matrix is stored on 1+N+N**2 lines, where N is
 398 *           its dimension. The first line contains the dimension N and
 399 *           ISRT (two integers). ISRT indicates whether the last N lines
 400 *           are sorted by increasing real part of the eigenvalue
 401 *           (ISRT=0) or by increasing imaginary part (ISRT=1). The next
 402 *           N**2 lines contain the matrix rowwise, one entry per line.
 403 *           The last N lines correspond to each eigenvalue. Each of
 404 *           these last N lines contains 4 real values: the real part of
 405 *           the eigenvalues, the imaginary part of the eigenvalue, the
 406 *           reciprocal condition number of the eigenvalues, and the
 407 *           reciprocal condition number of the vector eigenvector. The
 408 *           end of data is indicated by dimension N=0. Even if no data
 409 *           is to be tested, there must be at least one line containing
 410 *           N=0.
 411 *
 412 *-----------------------------------------------------------------------
 413 *
 414 *  The CSX data is like CVX. The first part is identical to CEV, and the
 415 *  second part consists of test matrices with precomputed solutions.
 416 *
 417 *  line 1:  'CSX' in columns 1-3.
 418 *
 419 *  line 2:  NSIZES, INTEGER
 420 *           If NSIZES = 0, no testing of randomly generated examples
 421 *           is done, but any precomputed examples are tested.
 422 *
 423 *  line 3:  NN, INTEGER array, dimension(NSIZES)
 424 *
 425 *  line 4:  NB, NBMIN, NX, NS, NBCOL, INTEGERs
 426 *
 427 *  line 5:  THRESH, REAL
 428 *
 429 *  line 6:  NEWSD, INTEGER
 430 *
 431 *  If line 6 was 2:
 432 *
 433 *  line 7:  INTEGER array, dimension (4)
 434 *
 435 *  lines 8 and following: The first line contains 'CSX' in columns 1-3
 436 *           followed by the number of matrix types, possibly with
 437 *           a second line to specify certain matrix types.
 438 *           If the number of matrix types = 0, no testing of randomly
 439 *           generated examples is done, but any precomputed examples
 440 *           are tested.
 441 *
 442 *  remaining lines : Each matrix is stored on 3+N**2 lines, where N is
 443 *           its dimension. The first line contains the dimension N, the
 444 *           dimension M of an invariant subspace, and ISRT. The second
 445 *           line contains M integers, identifying the eigenvalues in the
 446 *           invariant subspace (by their position in a list of
 447 *           eigenvalues ordered by increasing real part (if ISRT=0) or
 448 *           by increasing imaginary part (if ISRT=1)). The next N**2
 449 *           lines contain the matrix rowwise. The last line contains the
 450 *           reciprocal condition number for the average of the selected
 451 *           eigenvalues, and the reciprocal condition number for the
 452 *           corresponding right invariant subspace. The end of data in
 453 *           indicated by a line containing N=0, M=0, and ISRT = 0.  Even
 454 *           if no data is to be tested, there must be at least one line
 455 *           containing N=0, M=0 and ISRT=0.
 456 *
 457 *-----------------------------------------------------------------------
 458 *
 459 *  CGG input file:
 460 *
 461 *  line 2:  NN, INTEGER
 462 *           Number of values of N.
 463 *
 464 *  line 3:  NVAL, INTEGER array, dimension (NN)
 465 *           The values for the matrix dimension N.
 466 *
 467 *  line 4:  NPARMS, INTEGER
 468 *           Number of values of the parameters NB, NBMIN, NBCOL, NS, and
 469 *           MAXB.
 470 *
 471 *  line 5:  NBVAL, INTEGER array, dimension (NPARMS)
 472 *           The values for the blocksize NB.
 473 *
 474 *  line 6:  NBMIN, INTEGER array, dimension (NPARMS)
 475 *           The values for NBMIN, the minimum row dimension for blocks.
 476 *
 477 *  line 7:  NSVAL, INTEGER array, dimension (NPARMS)
 478 *           The values for the number of shifts.
 479 *
 480 *  line 8:  MXBVAL, INTEGER array, dimension (NPARMS)
 481 *           The values for MAXB, used in determining minimum blocksize.
 482 *
 483 *  line 9:  NBCOL, INTEGER array, dimension (NPARMS)
 484 *           The values for NBCOL, the minimum column dimension for
 485 *           blocks.
 486 *
 487 *  line 10: THRESH
 488 *           Threshold value for the test ratios.  Information will be
 489 *           printed about each test for which the test ratio is greater
 490 *           than or equal to the threshold.
 491 *
 492 *  line 11: TSTCHK, LOGICAL
 493 *           Flag indicating whether or not to test the LAPACK routines.
 494 *
 495 *  line 12: TSTDRV, LOGICAL
 496 *           Flag indicating whether or not to test the driver routines.
 497 *
 498 *  line 13: TSTERR, LOGICAL
 499 *           Flag indicating whether or not to test the error exits for
 500 *           the LAPACK routines and driver routines.
 501 *
 502 *  line 14: NEWSD, INTEGER
 503 *           A code indicating how to set the random number seed.
 504 *           = 0:  Set the seed to a default value before each run
 505 *           = 1:  Initialize the seed to a default value only before the
 506 *                 first run
 507 *           = 2:  Like 1, but use the seed values on the next line
 508 *
 509 *  If line 14 was 2:
 510 *
 511 *  line 15: INTEGER array, dimension (4)
 512 *           Four integer values for the random number seed.
 513 *
 514 *  lines 16-EOF:  Lines specifying matrix types, as for NEP.
 515 *           The 3-character path name is 'CGG' for the generalized
 516 *           eigenvalue problem routines and driver routines.
 517 *
 518 *-----------------------------------------------------------------------
 519 *
 520 *  CGS and CGV input files:
 521 *
 522 *  line 1:  'CGS' or 'CGV' in columns 1 to 3.
 523 *
 524 *  line 2:  NN, INTEGER
 525 *           Number of values of N.
 526 *
 527 *  line 3:  NVAL, INTEGER array, dimension(NN)
 528 *           Dimensions of matrices to be tested.
 529 *
 530 *  line 4:  NB, NBMIN, NX, NS, NBCOL, INTEGERs
 531 *           These integer parameters determine how blocking is done
 532 *           (see ILAENV for details)
 533 *           NB     : block size
 534 *           NBMIN  : minimum block size
 535 *           NX     : minimum dimension for blocking
 536 *           NS     : number of shifts in xHGEQR
 537 *           NBCOL  : minimum column dimension for blocking
 538 *
 539 *  line 5:  THRESH, REAL
 540 *           The test threshold against which computed residuals are
 541 *           compared. Should generally be in the range from 10. to 20.
 542 *           If it is 0., all test case data will be printed.
 543 *
 544 *  line 6:  TSTERR, LOGICAL
 545 *           Flag indicating whether or not to test the error exits.
 546 *
 547 *  line 7:  NEWSD, INTEGER
 548 *           A code indicating how to set the random number seed.
 549 *           = 0:  Set the seed to a default value before each run
 550 *           = 1:  Initialize the seed to a default value only before the
 551 *                 first run
 552 *           = 2:  Like 1, but use the seed values on the next line
 553 *
 554 *  If line 17 was 2:
 555 *
 556 *  line 7:  INTEGER array, dimension (4)
 557 *           Four integer values for the random number seed.
 558 *
 559 *  lines 7-EOF:  Lines specifying matrix types, as for NEP.
 560 *           The 3-character path name is 'CGS' for the generalized
 561 *           eigenvalue problem routines and driver routines.
 562 *
 563 *-----------------------------------------------------------------------
 564 *
 565 *  CGX input file:
 566 *  line 1:  'CGX' in columns 1 to 3.
 567 *
 568 *  line 2:  N, INTEGER
 569 *           Value of N.
 570 *
 571 *  line 3:  NB, NBMIN, NX, NS, NBCOL, INTEGERs
 572 *           These integer parameters determine how blocking is done
 573 *           (see ILAENV for details)
 574 *           NB     : block size
 575 *           NBMIN  : minimum block size
 576 *           NX     : minimum dimension for blocking
 577 *           NS     : number of shifts in xHGEQR
 578 *           NBCOL  : minimum column dimension for blocking
 579 *
 580 *  line 4:  THRESH, REAL
 581 *           The test threshold against which computed residuals are
 582 *           compared. Should generally be in the range from 10. to 20.
 583 *           Information will be printed about each test for which the
 584 *           test ratio is greater than or equal to the threshold.
 585 *
 586 *  line 5:  TSTERR, LOGICAL
 587 *           Flag indicating whether or not to test the error exits for
 588 *           the LAPACK routines and driver routines.
 589 *
 590 *  line 6:  NEWSD, INTEGER
 591 *           A code indicating how to set the random number seed.
 592 *           = 0:  Set the seed to a default value before each run
 593 *           = 1:  Initialize the seed to a default value only before the
 594 *                 first run
 595 *           = 2:  Like 1, but use the seed values on the next line
 596 *
 597 *  If line 6 was 2:
 598 *
 599 *  line 7: INTEGER array, dimension (4)
 600 *           Four integer values for the random number seed.
 601 *
 602 *  If line 2 was 0:
 603 *
 604 *  line 7-EOF: Precomputed examples are tested.
 605 *
 606 *  remaining lines : Each example is stored on 3+2*N*N lines, where N is
 607 *           its dimension. The first line contains the dimension (a
 608 *           single integer).  The next line contains an integer k such
 609 *           that only the last k eigenvalues will be selected and appear
 610 *           in the leading diagonal blocks of $A$ and $B$. The next N*N
 611 *           lines contain the matrix A, one element per line. The next N*N
 612 *           lines contain the matrix B. The last line contains the
 613 *           reciprocal of the eigenvalue cluster condition number and the
 614 *           reciprocal of the deflating subspace (associated with the
 615 *           selected eigencluster) condition number.  The end of data is
 616 *           indicated by dimension N=0.  Even if no data is to be tested,
 617 *           there must be at least one line containing N=0.
 618 *
 619 *-----------------------------------------------------------------------
 620 *
 621 *  CXV input files:
 622 *  line 1:  'CXV' in columns 1 to 3.
 623 *
 624 *  line 2:  N, INTEGER
 625 *           Value of N.
 626 *
 627 *  line 3:  NB, NBMIN, NX, NS, NBCOL, INTEGERs
 628 *           These integer parameters determine how blocking is done
 629 *           (see ILAENV for details)
 630 *           NB     : block size
 631 *           NBMIN  : minimum block size
 632 *           NX     : minimum dimension for blocking
 633 *           NS     : number of shifts in xHGEQR
 634 *           NBCOL  : minimum column dimension for blocking
 635 *
 636 *  line 4:  THRESH, REAL
 637 *           The test threshold against which computed residuals are
 638 *           compared. Should generally be in the range from 10. to 20.
 639 *           Information will be printed about each test for which the
 640 *           test ratio is greater than or equal to the threshold.
 641 *
 642 *  line 5:  TSTERR, LOGICAL
 643 *           Flag indicating whether or not to test the error exits for
 644 *           the LAPACK routines and driver routines.
 645 *
 646 *  line 6:  NEWSD, INTEGER
 647 *           A code indicating how to set the random number seed.
 648 *           = 0:  Set the seed to a default value before each run
 649 *           = 1:  Initialize the seed to a default value only before the
 650 *                 first run
 651 *           = 2:  Like 1, but use the seed values on the next line
 652 *
 653 *  If line 6 was 2:
 654 *
 655 *  line 7: INTEGER array, dimension (4)
 656 *           Four integer values for the random number seed.
 657 *
 658 *  If line 2 was 0:
 659 *
 660 *  line 7-EOF: Precomputed examples are tested.
 661 *
 662 *  remaining lines : Each example is stored on 3+2*N*N lines, where N is
 663 *           its dimension. The first line contains the dimension (a
 664 *           single integer). The next N*N lines contain the matrix A, one
 665 *           element per line. The next N*N lines contain the matrix B.
 666 *           The next line contains the reciprocals of the eigenvalue
 667 *           condition numbers.  The last line contains the reciprocals of
 668 *           the eigenvector condition numbers.  The end of data is
 669 *           indicated by dimension N=0.  Even if no data is to be tested,
 670 *           there must be at least one line containing N=0.
 671 *
 672 *-----------------------------------------------------------------------
 673 *
 674 *  CHB input file:
 675 *
 676 *  line 2:  NN, INTEGER
 677 *           Number of values of N.
 678 *
 679 *  line 3:  NVAL, INTEGER array, dimension (NN)
 680 *           The values for the matrix dimension N.
 681 *
 682 *  line 4:  NK, INTEGER
 683 *           Number of values of K.
 684 *
 685 *  line 5:  KVAL, INTEGER array, dimension (NK)
 686 *           The values for the matrix dimension K.
 687 *
 688 *  line 6:  THRESH
 689 *           Threshold value for the test ratios.  Information will be
 690 *           printed about each test for which the test ratio is greater
 691 *           than or equal to the threshold.
 692 *
 693 *  line 7:  NEWSD, INTEGER
 694 *           A code indicating how to set the random number seed.
 695 *           = 0:  Set the seed to a default value before each run
 696 *           = 1:  Initialize the seed to a default value only before the
 697 *                 first run
 698 *           = 2:  Like 1, but use the seed values on the next line
 699 *
 700 *  If line 7 was 2:
 701 *
 702 *  line 8:  INTEGER array, dimension (4)
 703 *           Four integer values for the random number seed.
 704 *
 705 *  lines 8-EOF:  Lines specifying matrix types, as for NEP.
 706 *           The 3-character path name is 'CHB'.
 707 *
 708 *-----------------------------------------------------------------------
 709 *
 710 *  CBB input file:
 711 *
 712 *  line 2:  NN, INTEGER
 713 *           Number of values of M and N.
 714 *
 715 *  line 3:  MVAL, INTEGER array, dimension (NN)
 716 *           The values for the matrix row dimension M.
 717 *
 718 *  line 4:  NVAL, INTEGER array, dimension (NN)
 719 *           The values for the matrix column dimension N.
 720 *
 721 *  line 4:  NK, INTEGER
 722 *           Number of values of K.
 723 *
 724 *  line 5:  KVAL, INTEGER array, dimension (NK)
 725 *           The values for the matrix bandwidth K.
 726 *
 727 *  line 6:  NPARMS, INTEGER
 728 *           Number of values of the parameter NRHS
 729 *
 730 *  line 7:  NSVAL, INTEGER array, dimension (NPARMS)
 731 *           The values for the number of right hand sides NRHS.
 732 *
 733 *  line 8:  THRESH
 734 *           Threshold value for the test ratios.  Information will be
 735 *           printed about each test for which the test ratio is greater
 736 *           than or equal to the threshold.
 737 *
 738 *  line 9:  NEWSD, INTEGER
 739 *           A code indicating how to set the random number seed.
 740 *           = 0:  Set the seed to a default value before each run
 741 *           = 1:  Initialize the seed to a default value only before the
 742 *                 first run
 743 *           = 2:  Like 1, but use the seed values on the next line
 744 *
 745 *  If line 9 was 2:
 746 *
 747 *  line 10: INTEGER array, dimension (4)
 748 *           Four integer values for the random number seed.
 749 *
 750 *  lines 10-EOF:  Lines specifying matrix types, as for SVD.
 751 *           The 3-character path name is 'CBB'.
 752 *
 753 *-----------------------------------------------------------------------
 754 *
 755 *  CEC input file:
 756 *
 757 *  line  2: THRESH, REAL
 758 *           Threshold value for the test ratios.  Information will be
 759 *           printed about each test for which the test ratio is greater
 760 *           than or equal to the threshold.
 761 *
 762 *  lines  3-EOF:
 763 *
 764 *  Input for testing the eigencondition routines consists of a set of
 765 *  specially constructed test cases and their solutions.  The data
 766 *  format is not intended to be modified by the user.
 767 *
 768 *-----------------------------------------------------------------------
 769 *
 770 *  CBL and CBK input files:
 771 *
 772 *  line 1:  'CBL' in columns 1-3 to test CGEBAL, or 'CBK' in
 773 *           columns 1-3 to test CGEBAK.
 774 *
 775 *  The remaining lines consist of specially constructed test cases.
 776 *
 777 *-----------------------------------------------------------------------
 778 *
 779 *  CGL and CGK input files:
 780 *
 781 *  line 1:  'CGL' in columns 1-3 to test CGGBAL, or 'CGK' in
 782 *           columns 1-3 to test CGGBAK.
 783 *
 784 *  The remaining lines consist of specially constructed test cases.
 785 *
 786 *-----------------------------------------------------------------------
 787 *
 788 *  GLM data file:
 789 *
 790 *  line 1:  'GLM' in columns 1 to 3.
 791 *
 792 *  line 2:  NN, INTEGER
 793 *           Number of values of M, P, and N.
 794 *
 795 *  line 3:  MVAL, INTEGER array, dimension(NN)
 796 *           Values of M (row dimension).
 797 *
 798 *  line 4:  PVAL, INTEGER array, dimension(NN)
 799 *           Values of P (row dimension).
 800 *
 801 *  line 5:  NVAL, INTEGER array, dimension(NN)
 802 *           Values of N (column dimension), note M <= N <= M+P.
 803 *
 804 *  line 6:  THRESH, REAL
 805 *           Threshold value for the test ratios.  Information will be
 806 *           printed about each test for which the test ratio is greater
 807 *           than or equal to the threshold.
 808 *
 809 *  line 7:  TSTERR, LOGICAL
 810 *           Flag indicating whether or not to test the error exits for
 811 *           the LAPACK routines and driver routines.
 812 *
 813 *  line 8:  NEWSD, INTEGER
 814 *           A code indicating how to set the random number seed.
 815 *           = 0:  Set the seed to a default value before each run
 816 *           = 1:  Initialize the seed to a default value only before the
 817 *                 first run
 818 *           = 2:  Like 1, but use the seed values on the next line
 819 *
 820 *  If line 8 was 2:
 821 *
 822 *  line 9:  INTEGER array, dimension (4)
 823 *           Four integer values for the random number seed.
 824 *
 825 *  lines 9-EOF:  Lines specifying matrix types, as for NEP.
 826 *           The 3-character path name is 'GLM' for the generalized
 827 *           linear regression model routines.
 828 *
 829 *-----------------------------------------------------------------------
 830 *
 831 *  GQR data file:
 832 *
 833 *  line 1:  'GQR' in columns 1 to 3.
 834 *
 835 *  line 2:  NN, INTEGER
 836 *           Number of values of M, P, and N.
 837 *
 838 *  line 3:  MVAL, INTEGER array, dimension(NN)
 839 *           Values of M.
 840 *
 841 *  line 4:  PVAL, INTEGER array, dimension(NN)
 842 *           Values of P.
 843 *
 844 *  line 5:  NVAL, INTEGER array, dimension(NN)
 845 *           Values of N.
 846 *
 847 *  line 6:  THRESH, REAL
 848 *           Threshold value for the test ratios.  Information will be
 849 *           printed about each test for which the test ratio is greater
 850 *           than or equal to the threshold.
 851 *
 852 *  line 7:  TSTERR, LOGICAL
 853 *           Flag indicating whether or not to test the error exits for
 854 *           the LAPACK routines and driver routines.
 855 *
 856 *  line 8:  NEWSD, INTEGER
 857 *           A code indicating how to set the random number seed.
 858 *           = 0:  Set the seed to a default value before each run
 859 *           = 1:  Initialize the seed to a default value only before the
 860 *                 first run
 861 *           = 2:  Like 1, but use the seed values on the next line
 862 *
 863 *  If line 8 was 2:
 864 *
 865 *  line 9:  INTEGER array, dimension (4)
 866 *           Four integer values for the random number seed.
 867 *
 868 *  lines 9-EOF:  Lines specifying matrix types, as for NEP.
 869 *           The 3-character path name is 'GQR' for the generalized
 870 *           QR and RQ routines.
 871 *
 872 *-----------------------------------------------------------------------
 873 *
 874 *  GSV data file:
 875 *
 876 *  line 1:  'GSV' in columns 1 to 3.
 877 *
 878 *  line 2:  NN, INTEGER
 879 *           Number of values of M, P, and N.
 880 *
 881 *  line 3:  MVAL, INTEGER array, dimension(NN)
 882 *           Values of M (row dimension).
 883 *
 884 *  line 4:  PVAL, INTEGER array, dimension(NN)
 885 *           Values of P (row dimension).
 886 *
 887 *  line 5:  NVAL, INTEGER array, dimension(NN)
 888 *           Values of N (column dimension).
 889 *
 890 *  line 6:  THRESH, REAL
 891 *           Threshold value for the test ratios.  Information will be
 892 *           printed about each test for which the test ratio is greater
 893 *           than or equal to the threshold.
 894 *
 895 *  line 7:  TSTERR, LOGICAL
 896 *           Flag indicating whether or not to test the error exits for
 897 *           the LAPACK routines and driver routines.
 898 *
 899 *  line 8:  NEWSD, INTEGER
 900 *           A code indicating how to set the random number seed.
 901 *           = 0:  Set the seed to a default value before each run
 902 *           = 1:  Initialize the seed to a default value only before the
 903 *                 first run
 904 *           = 2:  Like 1, but use the seed values on the next line
 905 *
 906 *  If line 8 was 2:
 907 *
 908 *  line 9:  INTEGER array, dimension (4)
 909 *           Four integer values for the random number seed.
 910 *
 911 *  lines 9-EOF:  Lines specifying matrix types, as for NEP.
 912 *           The 3-character path name is 'GSV' for the generalized
 913 *           SVD routines.
 914 *
 915 *-----------------------------------------------------------------------
 916 *
 917 *  CSD data file:
 918 *
 919 *  line 1:  'CSD' in columns 1 to 3.
 920 *
 921 *  line 2:  NM, INTEGER
 922 *           Number of values of M, P, and N.
 923 *
 924 *  line 3:  MVAL, INTEGER array, dimension(NM)
 925 *           Values of M (row and column dimension of orthogonal matrix).
 926 *
 927 *  line 4:  PVAL, INTEGER array, dimension(NM)
 928 *           Values of P (row dimension of top-left block).
 929 *
 930 *  line 5:  NVAL, INTEGER array, dimension(NM)
 931 *           Values of N (column dimension of top-left block).
 932 *
 933 *  line 6:  THRESH, REAL
 934 *           Threshold value for the test ratios.  Information will be
 935 *           printed about each test for which the test ratio is greater
 936 *           than or equal to the threshold.
 937 *
 938 *  line 7:  TSTERR, LOGICAL
 939 *           Flag indicating whether or not to test the error exits for
 940 *           the LAPACK routines and driver routines.
 941 *
 942 *  line 8:  NEWSD, INTEGER
 943 *           A code indicating how to set the random number seed.
 944 *           = 0:  Set the seed to a default value before each run
 945 *           = 1:  Initialize the seed to a default value only before the
 946 *                 first run
 947 *           = 2:  Like 1, but use the seed values on the next line
 948 *
 949 *  If line 8 was 2:
 950 *
 951 *  line 9:  INTEGER array, dimension (4)
 952 *           Four integer values for the random number seed.
 953 *
 954 *  lines 9-EOF:  Lines specifying matrix types, as for NEP.
 955 *           The 3-character path name is 'CSD' for the CSD routine.
 956 *
 957 *-----------------------------------------------------------------------
 958 *
 959 *  LSE data file:
 960 *
 961 *  line 1:  'LSE' in columns 1 to 3.
 962 *
 963 *  line 2:  NN, INTEGER
 964 *           Number of values of M, P, and N.
 965 *
 966 *  line 3:  MVAL, INTEGER array, dimension(NN)
 967 *           Values of M.
 968 *
 969 *  line 4:  PVAL, INTEGER array, dimension(NN)
 970 *           Values of P.
 971 *
 972 *  line 5:  NVAL, INTEGER array, dimension(NN)
 973 *           Values of N, note P <= N <= P+M.
 974 *
 975 *  line 6:  THRESH, REAL
 976 *           Threshold value for the test ratios.  Information will be
 977 *           printed about each test for which the test ratio is greater
 978 *           than or equal to the threshold.
 979 *
 980 *  line 7:  TSTERR, LOGICAL
 981 *           Flag indicating whether or not to test the error exits for
 982 *           the LAPACK routines and driver routines.
 983 *
 984 *  line 8:  NEWSD, INTEGER
 985 *           A code indicating how to set the random number seed.
 986 *           = 0:  Set the seed to a default value before each run
 987 *           = 1:  Initialize the seed to a default value only before the
 988 *                 first run
 989 *           = 2:  Like 1, but use the seed values on the next line
 990 *
 991 *  If line 8 was 2:
 992 *
 993 *  line 9:  INTEGER array, dimension (4)
 994 *           Four integer values for the random number seed.
 995 *
 996 *  lines 9-EOF:  Lines specifying matrix types, as for NEP.
 997 *           The 3-character path name is 'GSV' for the generalized
 998 *           SVD routines.
 999 *
1000 *-----------------------------------------------------------------------
1001 *
1002 *  NMAX is currently set to 132 and must be at least 12 for some of the
1003 *  precomputed examples, and LWORK = NMAX*(5*NMAX+20) in the parameter
1004 *  statements below.  For SVD, we assume NRHS may be as big as N.  The
1005 *  parameter NEED is set to 14 to allow for 14 N-by-N matrices for CGG.
1006 *
1007 *  =====================================================================
1008 *
1009 *     .. Parameters ..
1010       INTEGER            NMAX
1011       PARAMETER          ( NMAX = 132 )
1012       INTEGER            NCMAX
1013       PARAMETER          ( NCMAX = 20 )
1014       INTEGER            NEED
1015       PARAMETER          ( NEED = 14 )
1016       INTEGER            LWORK
1017       PARAMETER          ( LWORK = NMAX*5*NMAX+20 ) )
1018       INTEGER            LIWORK
1019       PARAMETER          ( LIWORK = NMAX*( NMAX+20 ) )
1020       INTEGER            MAXIN
1021       PARAMETER          ( MAXIN = 20 )
1022       INTEGER            MAXT
1023       PARAMETER          ( MAXT = 30 )
1024       INTEGER            NIN, NOUT
1025       PARAMETER          ( NIN = 5, NOUT = 6 )
1026 *     ..
1027 *     .. Local Scalars ..
1028       LOGICAL            CBB, CBK, CBL, CES, CEV, CGG, CGK, CGL, CGS,
1029      $                   CGV, CGX, CHB, CSD, CSX, CVX, CXV, FATAL, GLM,
1030      $                   GQR, GSV, LSE, NEP, SEP, SVD, TSTCHK, TSTDIF,
1031      $                   TSTDRV, TSTERR
1032       CHARACTER          C1
1033       CHARACTER*3        C3, PATH
1034       CHARACTER*32       VNAME
1035       CHARACTER*10       INTSTR
1036       CHARACTER*80       LINE
1037       INTEGER            I, I1, IC, INFO, ITMP, K, LENP, MAXTYP, NEWSD,
1038      $                   NK, NN, NPARMS, NRHS, NTYPES,
1039      $                   VERS_MAJOR, VERS_MINOR, VERS_PATCH 
1040       REAL               EPS, S1, S2, THRESH, THRSHN
1041 *     ..
1042 *     .. Local Arrays ..
1043       LOGICAL            DOTYPE( MAXT ), LOGWRK( NMAX )
1044       INTEGER            IOLDSD( 4 ), ISEED( 4 ), IWORK( LIWORK ),
1045      $                   KVAL( MAXIN ), MVAL( MAXIN ), MXBVAL( MAXIN ),
1046      $                   NBCOL( MAXIN ), NBMIN( MAXIN ), NBVAL( MAXIN ),
1047      $                   NSVAL( MAXIN ), NVAL( MAXIN ), NXVAL( MAXIN ),
1048      $                   PVAL( MAXIN )
1049       INTEGER            INMIN( MAXIN ), INWIN( MAXIN ), INIBL( MAXIN ),
1050      $                   ISHFTS( MAXIN ), IACC22( MAXIN )
1051       REAL               ALPHA( NMAX ), BETA( NMAX ), DR( NMAX, 12 ),
1052      $                   RESULT500 ), RWORK( LWORK ), S( NMAX*NMAX )
1053       COMPLEX            A( NMAX*NMAX, NEED ), B( NMAX*NMAX, 5 ),
1054      $                   C( NCMAX*NCMAX, NCMAX*NCMAX ), DC( NMAX, 6 ),
1055      $                   TAUA( NMAX ), TAUB( NMAX ), WORK( LWORK ),
1056      $                   X( 5*NMAX )
1057 *     ..
1058 *     .. External Functions ..
1059       LOGICAL            LSAMEN
1060       REAL               SECOND, SLAMCH
1061       EXTERNAL           LSAMEN, SECOND, SLAMCH
1062 *     ..
1063 *     .. External Subroutines ..
1064       EXTERNAL           ALAREQ, CCHKBB, CCHKBD, CCHKBK, CCHKBL, CCHKEC,
1065      $                   CCHKGG, CCHKGK, CCHKGL, CCHKHB, CCHKHS, CCHKST,
1066      $                   CCKCSD, CCKGLM, CCKGQR, CCKGSV, CCKLSE, CDRGES,
1067      $                   CDRGEV, CDRGSX, CDRGVX, CDRVBD, CDRVES, CDRVEV,
1068      $                   CDRVGG, CDRVSG, CDRVST, CDRVSX, CDRVVX, CERRBD,
1069      $                   CERRED, CERRGG, CERRHS, CERRST, ILAVER, XLAENV
1070 *     ..
1071 *     .. Intrinsic Functions ..
1072       INTRINSIC          LENMIN
1073 *     ..
1074 *     .. Scalars in Common ..
1075       LOGICAL            LERR, OK
1076       CHARACTER*32       SRNAMT
1077       INTEGER            INFOT, MAXB, NPROC, NSHIFT, NUNIT, SELDIM,
1078      $                   SELOPT
1079 *     ..
1080 *     .. Arrays in Common ..
1081       LOGICAL            SELVAL( 20 )
1082       INTEGER            IPARMS( 100 )
1083       REAL               SELWI( 20 ), SELWR( 20 )
1084 *     ..
1085 *     .. Common blocks ..
1086       COMMON             / CENVIR / NPROC, NSHIFT, MAXB
1087       COMMON             / CLAENV / IPARMS
1088       COMMON             / INFOC / INFOT, NUNIT, OK, LERR
1089       COMMON             / SRNAMC / SRNAMT
1090       COMMON             / SSLCT / SELOPT, SELDIM, SELVAL, SELWR, SELWI
1091 *     ..
1092 *     .. Data statements ..
1093       DATA               INTSTR / '0123456789' /
1094       DATA               IOLDSD / 0001 /
1095 *     ..
1096 *     .. Executable Statements ..
1097 *
1098       S1 = SECOND( )
1099       FATAL = .FALSE.
1100       NUNIT = NOUT
1101 *
1102 *     Return to here to read multiple sets of data
1103 *
1104    10 CONTINUE
1105 *
1106 *     Read the first line and set the 3-character test path
1107 *
1108       READ( NIN, FMT = '(A80)'END = 380 )LINE
1109       PATH = LINE( 13 )
1110       NEP = LSAMEN( 3, PATH, 'NEP' ) .OR. LSAMEN( 3, PATH, 'CHS' )
1111       SEP = LSAMEN( 3, PATH, 'SEP' ) .OR. LSAMEN( 3, PATH, 'CST' ) .OR.
1112      $      LSAMEN( 3, PATH, 'CSG' )
1113       SVD = LSAMEN( 3, PATH, 'SVD' ) .OR. LSAMEN( 3, PATH, 'CBD' )
1114       CEV = LSAMEN( 3, PATH, 'CEV' )
1115       CES = LSAMEN( 3, PATH, 'CES' )
1116       CVX = LSAMEN( 3, PATH, 'CVX' )
1117       CSX = LSAMEN( 3, PATH, 'CSX' )
1118       CGG = LSAMEN( 3, PATH, 'CGG' )
1119       CGS = LSAMEN( 3, PATH, 'CGS' )
1120       CGX = LSAMEN( 3, PATH, 'CGX' )
1121       CGV = LSAMEN( 3, PATH, 'CGV' )
1122       CXV = LSAMEN( 3, PATH, 'CXV' )
1123       CHB = LSAMEN( 3, PATH, 'CHB' )
1124       CBB = LSAMEN( 3, PATH, 'CBB' )
1125       GLM = LSAMEN( 3, PATH, 'GLM' )
1126       GQR = LSAMEN( 3, PATH, 'GQR' ) .OR. LSAMEN( 3, PATH, 'GRQ' )
1127       GSV = LSAMEN( 3, PATH, 'GSV' )
1128       CSD = LSAMEN( 3, PATH, 'CSD' )
1129       LSE = LSAMEN( 3, PATH, 'LSE' )
1130       CBL = LSAMEN( 3, PATH, 'CBL' )
1131       CBK = LSAMEN( 3, PATH, 'CBK' )
1132       CGL = LSAMEN( 3, PATH, 'CGL' )
1133       CGK = LSAMEN( 3, PATH, 'CGK' )
1134 *
1135 *     Report values of parameters.
1136 *
1137       IF( PATH.EQ.'   ' ) THEN
1138          GO TO 10
1139       ELSE IF( NEP ) THEN
1140          WRITE( NOUT, FMT = 9987 )
1141       ELSE IF( SEP ) THEN
1142          WRITE( NOUT, FMT = 9986 )
1143       ELSE IF( SVD ) THEN
1144          WRITE( NOUT, FMT = 9985 )
1145       ELSE IF( CEV ) THEN
1146          WRITE( NOUT, FMT = 9979 )
1147       ELSE IF( CES ) THEN
1148          WRITE( NOUT, FMT = 9978 )
1149       ELSE IF( CVX ) THEN
1150          WRITE( NOUT, FMT = 9977 )
1151       ELSE IF( CSX ) THEN
1152          WRITE( NOUT, FMT = 9976 )
1153       ELSE IF( CGG ) THEN
1154          WRITE( NOUT, FMT = 9975 )
1155       ELSE IF( CGS ) THEN
1156          WRITE( NOUT, FMT = 9964 )
1157       ELSE IF( CGX ) THEN
1158          WRITE( NOUT, FMT = 9965 )
1159       ELSE IF( CGV ) THEN
1160          WRITE( NOUT, FMT = 9963 )
1161       ELSE IF( CXV ) THEN
1162          WRITE( NOUT, FMT = 9962 )
1163       ELSE IF( CHB ) THEN
1164          WRITE( NOUT, FMT = 9974 )
1165       ELSE IF( CBB ) THEN
1166          WRITE( NOUT, FMT = 9967 )
1167       ELSE IF( GLM ) THEN
1168          WRITE( NOUT, FMT = 9971 )
1169       ELSE IF( GQR ) THEN
1170          WRITE( NOUT, FMT = 9970 )
1171       ELSE IF( GSV ) THEN
1172          WRITE( NOUT, FMT = 9969 )
1173       ELSE IF( CSD ) THEN
1174          WRITE( NOUT, FMT = 9960 )
1175       ELSE IF( LSE ) THEN
1176          WRITE( NOUT, FMT = 9968 )
1177       ELSE IF( CBL ) THEN
1178 *
1179 *        CGEBAL:  Balancing
1180 *
1181          CALL CCHKBL( NIN, NOUT )
1182          GO TO 380
1183       ELSE IF( CBK ) THEN
1184 *
1185 *        CGEBAK:  Back transformation
1186 *
1187          CALL CCHKBK( NIN, NOUT )
1188          GO TO 380
1189       ELSE IF( CGL ) THEN
1190 *
1191 *        CGGBAL:  Balancing
1192 *
1193          CALL CCHKGL( NIN, NOUT )
1194          GO TO 380
1195       ELSE IF( CGK ) THEN
1196 *
1197 *        CGGBAK:  Back transformation
1198 *
1199          CALL CCHKGK( NIN, NOUT )
1200          GO TO 380
1201       ELSE IF( LSAMEN( 3, PATH, 'CEC' ) ) THEN
1202 *
1203 *        CEC:  Eigencondition estimation
1204 *
1205          READ( NIN, FMT = * )THRESH
1206          CALL XLAENV( 11 )
1207          TSTERR = .TRUE.
1208          CALL CCHKEC( THRESH, TSTERR, NIN, NOUT )
1209          GO TO 380
1210       ELSE
1211          WRITE( NOUT, FMT = 9992 )PATH
1212          GO TO 380
1213       END IF
1214       CALL ILAVER( VERS_MAJOR, VERS_MINOR, VERS_PATCH ) 
1215       WRITE( NOUT, FMT = 9972 ) VERS_MAJOR, VERS_MINOR, VERS_PATCH
1216       WRITE( NOUT, FMT = 9984 )
1217 *
1218 *     Read the number of values of M, P, and N.
1219 *
1220       READ( NIN, FMT = * )NN
1221       IF( NN.LT.0 ) THEN
1222          WRITE( NOUT, FMT = 9989 )'   NN ', NN, 1
1223          NN = 0
1224          FATAL = .TRUE.
1225       ELSE IF( NN.GT.MAXIN ) THEN
1226          WRITE( NOUT, FMT = 9988 )'   NN ', NN, MAXIN
1227          NN = 0
1228          FATAL = .TRUE.
1229       END IF
1230 *
1231 *     Read the values of M
1232 *
1233       IF.NOT.( CGX .OR. CXV ) ) THEN
1234          READ( NIN, FMT = * )( MVAL( I ), I = 1, NN )
1235          IF( SVD ) THEN
1236             VNAME = '    M '
1237          ELSE
1238             VNAME = '    N '
1239          END IF
1240          DO 20 I = 1, NN
1241             IF( MVAL( I ).LT.0 ) THEN
1242                WRITE( NOUT, FMT = 9989 )VNAME, MVAL( I ), 0
1243                FATAL = .TRUE.
1244             ELSE IF( MVAL( I ).GT.NMAX ) THEN
1245                WRITE( NOUT, FMT = 9988 )VNAME, MVAL( I ), NMAX
1246                FATAL = .TRUE.
1247             END IF
1248    20    CONTINUE
1249          WRITE( NOUT, FMT = 9983 )'M:    ', ( MVAL( I ), I = 1, NN )
1250       END IF
1251 *
1252 *     Read the values of P
1253 *
1254       IF( GLM .OR. GQR .OR. GSV .OR. CSD .OR. LSE ) THEN
1255          READ( NIN, FMT = * )( PVAL( I ), I = 1, NN )
1256          DO 30 I = 1, NN
1257             IF( PVAL( I ).LT.0 ) THEN
1258                WRITE( NOUT, FMT = 9989 )' P  ', PVAL( I ), 0
1259                FATAL = .TRUE.
1260             ELSE IF( PVAL( I ).GT.NMAX ) THEN
1261                WRITE( NOUT, FMT = 9988 )' P  ', PVAL( I ), NMAX
1262                FATAL = .TRUE.
1263             END IF
1264    30    CONTINUE
1265          WRITE( NOUT, FMT = 9983 )'P:    ', ( PVAL( I ), I = 1, NN )
1266       END IF
1267 *
1268 *     Read the values of N
1269 *
1270       IF( SVD .OR. CBB .OR. GLM .OR. GQR .OR. GSV .OR. CSD .OR.
1271      $    LSE ) THEN
1272          READ( NIN, FMT = * )( NVAL( I ), I = 1, NN )
1273          DO 40 I = 1, NN
1274             IF( NVAL( I ).LT.0 ) THEN
1275                WRITE( NOUT, FMT = 9989 )'    N ', NVAL( I ), 0
1276                FATAL = .TRUE.
1277             ELSE IF( NVAL( I ).GT.NMAX ) THEN
1278                WRITE( NOUT, FMT = 9988 )'    N ', NVAL( I ), NMAX
1279                FATAL = .TRUE.
1280             END IF
1281    40    CONTINUE
1282       ELSE
1283          DO 50 I = 1, NN
1284             NVAL( I ) = MVAL( I )
1285    50    CONTINUE
1286       END IF
1287       IF.NOT.( CGX .OR. CXV ) ) THEN
1288          WRITE( NOUT, FMT = 9983 )'N:    ', ( NVAL( I ), I = 1, NN )
1289       ELSE
1290          WRITE( NOUT, FMT = 9983 )'N:    ', NN
1291       END IF
1292 *
1293 *     Read the number of values of K, followed by the values of K
1294 *
1295       IF( CHB .OR. CBB ) THEN
1296          READ( NIN, FMT = * )NK
1297          READ( NIN, FMT = * )( KVAL( I ), I = 1, NK )
1298          DO 60 I = 1, NK
1299             IF( KVAL( I ).LT.0 ) THEN
1300                WRITE( NOUT, FMT = 9989 )'    K ', KVAL( I ), 0
1301                FATAL = .TRUE.
1302             ELSE IF( KVAL( I ).GT.NMAX ) THEN
1303                WRITE( NOUT, FMT = 9988 )'    K ', KVAL( I ), NMAX
1304                FATAL = .TRUE.
1305             END IF
1306    60    CONTINUE
1307          WRITE( NOUT, FMT = 9983 )'K:    ', ( KVAL( I ), I = 1, NK )
1308       END IF
1309 *
1310       IF( CEV .OR. CES .OR. CVX .OR. CSX ) THEN
1311 *
1312 *        For the nonsymmetric QR driver routines, only one set of
1313 *        parameters is allowed.
1314 *
1315          READ( NIN, FMT = * )NBVAL( 1 ), NBMIN( 1 ), NXVAL( 1 ),
1316      $      INMIN( 1 ), INWIN( 1 ), INIBL(1), ISHFTS(1), IACC22(1)
1317          IF( NBVAL( 1 ).LT.1 ) THEN
1318             WRITE( NOUT, FMT = 9989 )'   NB ', NBVAL( 1 ), 1
1319             FATAL = .TRUE.
1320          ELSE IF( NBMIN( 1 ).LT.1 ) THEN
1321             WRITE( NOUT, FMT = 9989 )'NBMIN ', NBMIN( 1 ), 1
1322             FATAL = .TRUE.
1323          ELSE IF( NXVAL( 1 ).LT.1 ) THEN
1324             WRITE( NOUT, FMT = 9989 )'   NX ', NXVAL( 1 ), 1
1325             FATAL = .TRUE.
1326          ELSE IF( INMIN( 1 ).LT.1 ) THEN
1327             WRITE( NOUT, FMT = 9989 )'   INMIN ', INMIN( 1 ), 1
1328             FATAL = .TRUE.
1329          ELSE IF( INWIN( 1 ).LT.1 ) THEN
1330             WRITE( NOUT, FMT = 9989 )'   INWIN ', INWIN( 1 ), 1
1331             FATAL = .TRUE.
1332          ELSE IF( INIBL( 1 ).LT.1 ) THEN
1333             WRITE( NOUT, FMT = 9989 )'   INIBL ', INIBL( 1 ), 1
1334             FATAL = .TRUE.
1335          ELSE IF( ISHFTS( 1 ).LT.1 ) THEN
1336             WRITE( NOUT, FMT = 9989 )'   ISHFTS ', ISHFTS( 1 ), 1
1337             FATAL = .TRUE.
1338          ELSE IF( IACC22( 1 ).LT.0 ) THEN
1339             WRITE( NOUT, FMT = 9989 )'   IACC22 ', IACC22( 1 ), 0
1340             FATAL = .TRUE.
1341          END IF
1342          CALL XLAENV( 1, NBVAL( 1 ) )
1343          CALL XLAENV( 2, NBMIN( 1 ) )
1344          CALL XLAENV( 3, NXVAL( 1 ) )
1345          CALL XLAENV(12MAX11, INMIN( 1 ) ) )
1346          CALL XLAENV(13, INWIN( 1 ) )
1347          CALL XLAENV(14, INIBL( 1 ) )
1348          CALL XLAENV(15, ISHFTS( 1 ) )
1349          CALL XLAENV(16, IACC22( 1 ) )
1350          WRITE( NOUT, FMT = 9983 )'NB:   ', NBVAL( 1 )
1351          WRITE( NOUT, FMT = 9983 )'NBMIN:', NBMIN( 1 )
1352          WRITE( NOUT, FMT = 9983 )'NX:   ', NXVAL( 1 )
1353          WRITE( NOUT, FMT = 9983 )'INMIN:   ', INMIN( 1 )
1354          WRITE( NOUT, FMT = 9983 )'INWIN: ', INWIN( 1 )
1355          WRITE( NOUT, FMT = 9983 )'INIBL: ', INIBL( 1 )
1356          WRITE( NOUT, FMT = 9983 )'ISHFTS: ', ISHFTS( 1 )
1357          WRITE( NOUT, FMT = 9983 )'IACC22: ', IACC22( 1 )
1358 *
1359       ELSE IF( CGS .OR. CGX .OR. CGV .OR. CXV ) THEN
1360 *
1361 *        For the nonsymmetric generalized driver routines, only one set of
1362 *        parameters is allowed.
1363 *
1364          READ( NIN, FMT = * )NBVAL( 1 ), NBMIN( 1 ), NXVAL( 1 ),
1365      $      NSVAL( 1 ), MXBVAL( 1 )
1366          IF( NBVAL( 1 ).LT.1 ) THEN
1367             WRITE( NOUT, FMT = 9989 )'   NB ', NBVAL( 1 ), 1
1368             FATAL = .TRUE.
1369          ELSE IF( NBMIN( 1 ).LT.1 ) THEN
1370             WRITE( NOUT, FMT = 9989 )'NBMIN ', NBMIN( 1 ), 1
1371             FATAL = .TRUE.
1372          ELSE IF( NXVAL( 1 ).LT.1 ) THEN
1373             WRITE( NOUT, FMT = 9989 )'   NX ', NXVAL( 1 ), 1
1374             FATAL = .TRUE.
1375          ELSE IF( NSVAL( 1 ).LT.2 ) THEN
1376             WRITE( NOUT, FMT = 9989 )'   NS ', NSVAL( 1 ), 2
1377             FATAL = .TRUE.
1378          ELSE IF( MXBVAL( 1 ).LT.1 ) THEN
1379             WRITE( NOUT, FMT = 9989 )' MAXB ', MXBVAL( 1 ), 1
1380             FATAL = .TRUE.
1381          END IF
1382          CALL XLAENV( 1, NBVAL( 1 ) )
1383          CALL XLAENV( 2, NBMIN( 1 ) )
1384          CALL XLAENV( 3, NXVAL( 1 ) )
1385          CALL XLAENV( 4, NSVAL( 1 ) )
1386          CALL XLAENV( 8, MXBVAL( 1 ) )
1387          WRITE( NOUT, FMT = 9983 )'NB:   ', NBVAL( 1 )
1388          WRITE( NOUT, FMT = 9983 )'NBMIN:', NBMIN( 1 )
1389          WRITE( NOUT, FMT = 9983 )'NX:   ', NXVAL( 1 )
1390          WRITE( NOUT, FMT = 9983 )'NS:   ', NSVAL( 1 )
1391          WRITE( NOUT, FMT = 9983 )'MAXB: ', MXBVAL( 1 )
1392       ELSE IF.NOT.CHB .AND. .NOT.GLM .AND. .NOT.GQR .AND. .NOT.
1393      $         GSV .AND. .NOT.CSD .AND. .NOT.LSE ) THEN
1394 *
1395 *        For the other paths, the number of parameters can be varied
1396 *        from the input file.  Read the number of parameter values.
1397 *
1398          READ( NIN, FMT = * )NPARMS
1399          IF( NPARMS.LT.1 ) THEN
1400             WRITE( NOUT, FMT = 9989 )'NPARMS', NPARMS, 1
1401             NPARMS = 0
1402             FATAL = .TRUE.
1403          ELSE IF( NPARMS.GT.MAXIN ) THEN
1404             WRITE( NOUT, FMT = 9988 )'NPARMS', NPARMS, MAXIN
1405             NPARMS = 0
1406             FATAL = .TRUE.
1407          END IF
1408 *
1409 *        Read the values of NB
1410 *
1411          IF.NOT.CBB ) THEN
1412             READ( NIN, FMT = * )( NBVAL( I ), I = 1, NPARMS )
1413             DO 70 I = 1, NPARMS
1414                IF( NBVAL( I ).LT.0 ) THEN
1415                   WRITE( NOUT, FMT = 9989 )'   NB ', NBVAL( I ), 0
1416                   FATAL = .TRUE.
1417                ELSE IF( NBVAL( I ).GT.NMAX ) THEN
1418                   WRITE( NOUT, FMT = 9988 )'   NB ', NBVAL( I ), NMAX
1419                   FATAL = .TRUE.
1420                END IF
1421    70       CONTINUE
1422             WRITE( NOUT, FMT = 9983 )'NB:   ',
1423      $         ( NBVAL( I ), I = 1, NPARMS )
1424          END IF
1425 *
1426 *        Read the values of NBMIN
1427 *
1428          IF( NEP .OR. SEP .OR. SVD .OR. CGG ) THEN
1429             READ( NIN, FMT = * )( NBMIN( I ), I = 1, NPARMS )
1430             DO 80 I = 1, NPARMS
1431                IF( NBMIN( I ).LT.0 ) THEN
1432                   WRITE( NOUT, FMT = 9989 )'NBMIN ', NBMIN( I ), 0
1433                   FATAL = .TRUE.
1434                ELSE IF( NBMIN( I ).GT.NMAX ) THEN
1435                   WRITE( NOUT, FMT = 9988 )'NBMIN ', NBMIN( I ), NMAX
1436                   FATAL = .TRUE.
1437                END IF
1438    80       CONTINUE
1439             WRITE( NOUT, FMT = 9983 )'NBMIN:',
1440      $         ( NBMIN( I ), I = 1, NPARMS )
1441          ELSE
1442             DO 90 I = 1, NPARMS
1443                NBMIN( I ) = 1
1444    90       CONTINUE
1445          END IF
1446 *
1447 *        Read the values of NX
1448 *
1449          IF( NEP .OR. SEP .OR. SVD ) THEN
1450             READ( NIN, FMT = * )( NXVAL( I ), I = 1, NPARMS )
1451             DO 100 I = 1, NPARMS
1452                IF( NXVAL( I ).LT.0 ) THEN
1453                   WRITE( NOUT, FMT = 9989 )'   NX ', NXVAL( I ), 0
1454                   FATAL = .TRUE.
1455                ELSE IF( NXVAL( I ).GT.NMAX ) THEN
1456                   WRITE( NOUT, FMT = 9988 )'   NX ', NXVAL( I ), NMAX
1457                   FATAL = .TRUE.
1458                END IF
1459   100       CONTINUE
1460             WRITE( NOUT, FMT = 9983 )'NX:   ',
1461      $         ( NXVAL( I ), I = 1, NPARMS )
1462          ELSE
1463             DO 110 I = 1, NPARMS
1464                NXVAL( I ) = 1
1465   110       CONTINUE
1466          END IF
1467 *
1468 *        Read the values of NSHIFT (if CGG) or NRHS (if SVD
1469 *        or CBB).
1470 *
1471          IF( SVD .OR. CBB .OR. CGG ) THEN
1472             READ( NIN, FMT = * )( NSVAL( I ), I = 1, NPARMS )
1473             DO 120 I = 1, NPARMS
1474                IF( NSVAL( I ).LT.0 ) THEN
1475                   WRITE( NOUT, FMT = 9989 )'   NS ', NSVAL( I ), 0
1476                   FATAL = .TRUE.
1477                ELSE IF( NSVAL( I ).GT.NMAX ) THEN
1478                   WRITE( NOUT, FMT = 9988 )'   NS ', NSVAL( I ), NMAX
1479                   FATAL = .TRUE.
1480                END IF
1481   120       CONTINUE
1482             WRITE( NOUT, FMT = 9983 )'NS:   ',
1483      $         ( NSVAL( I ), I = 1, NPARMS )
1484          ELSE
1485             DO 130 I = 1, NPARMS
1486                NSVAL( I ) = 1
1487   130       CONTINUE
1488          END IF
1489 *
1490 *        Read the values for MAXB.
1491 *
1492          IF( CGG ) THEN
1493             READ( NIN, FMT = * )( MXBVAL( I ), I = 1, NPARMS )
1494             DO 140 I = 1, NPARMS
1495                IF( MXBVAL( I ).LT.0 ) THEN
1496                   WRITE( NOUT, FMT = 9989 )' MAXB ', MXBVAL( I ), 0
1497                   FATAL = .TRUE.
1498                ELSE IF( MXBVAL( I ).GT.NMAX ) THEN
1499                   WRITE( NOUT, FMT = 9988 )' MAXB ', MXBVAL( I ), NMAX
1500                   FATAL = .TRUE.
1501                END IF
1502   140       CONTINUE
1503             WRITE( NOUT, FMT = 9983 )'MAXB: ',
1504      $         ( MXBVAL( I ), I = 1, NPARMS )
1505          ELSE
1506             DO 150 I = 1, NPARMS
1507                MXBVAL( I ) = 1
1508   150       CONTINUE
1509          END IF
1510 *
1511 *        Read the values for INMIN.
1512 *
1513          IF( NEP ) THEN
1514             READ( NIN, FMT = * )( INMIN( I ), I = 1, NPARMS )
1515             DO 540 I = 1, NPARMS
1516                IF( INMIN( I ).LT.0 ) THEN
1517                   WRITE( NOUT, FMT = 9989 )' INMIN ', INMIN( I ), 0
1518                   FATAL = .TRUE.
1519                END IF
1520   540       CONTINUE
1521             WRITE( NOUT, FMT = 9983 )'INMIN: ',
1522      $         ( INMIN( I ), I = 1, NPARMS )
1523          ELSE
1524             DO 550 I = 1, NPARMS
1525                INMIN( I ) = 1
1526   550       CONTINUE
1527          END IF
1528 *
1529 *        Read the values for INWIN.
1530 *
1531          IF( NEP ) THEN
1532             READ( NIN, FMT = * )( INWIN( I ), I = 1, NPARMS )
1533             DO 560 I = 1, NPARMS
1534                IF( INWIN( I ).LT.0 ) THEN
1535                   WRITE( NOUT, FMT = 9989 )' INWIN ', INWIN( I ), 0
1536                   FATAL = .TRUE.
1537                END IF
1538   560       CONTINUE
1539             WRITE( NOUT, FMT = 9983 )'INWIN: ',
1540      $         ( INWIN( I ), I = 1, NPARMS )
1541          ELSE
1542             DO 570 I = 1, NPARMS
1543                INWIN( I ) = 1
1544   570       CONTINUE
1545          END IF
1546 *
1547 *        Read the values for INIBL.
1548 *
1549          IF( NEP ) THEN
1550             READ( NIN, FMT = * )( INIBL( I ), I = 1, NPARMS )
1551             DO 580 I = 1, NPARMS
1552                IF( INIBL( I ).LT.0 ) THEN
1553                   WRITE( NOUT, FMT = 9989 )' INIBL ', INIBL( I ), 0
1554                   FATAL = .TRUE.
1555                END IF
1556   580       CONTINUE
1557             WRITE( NOUT, FMT = 9983 )'INIBL: ',
1558      $         ( INIBL( I ), I = 1, NPARMS )
1559          ELSE
1560             DO 590 I = 1, NPARMS
1561                INIBL( I ) = 1
1562   590       CONTINUE
1563          END IF
1564 *
1565 *        Read the values for ISHFTS.
1566 *
1567          IF( NEP ) THEN
1568             READ( NIN, FMT = * )( ISHFTS( I ), I = 1, NPARMS )
1569             DO 600 I = 1, NPARMS
1570                IF( ISHFTS( I ).LT.0 ) THEN
1571                   WRITE( NOUT, FMT = 9989 )' ISHFTS ', ISHFTS( I ), 0
1572                   FATAL = .TRUE.
1573                END IF
1574   600       CONTINUE
1575             WRITE( NOUT, FMT = 9983 )'ISHFTS: ',
1576      $         ( ISHFTS( I ), I = 1, NPARMS )
1577          ELSE
1578             DO 610 I = 1, NPARMS
1579                ISHFTS( I ) = 1
1580   610       CONTINUE
1581          END IF
1582 *
1583 *        Read the values for IACC22.
1584 *
1585          IF( NEP ) THEN
1586             READ( NIN, FMT = * )( IACC22( I ), I = 1, NPARMS )
1587             DO 620 I = 1, NPARMS
1588                IF( IACC22( I ).LT.0 ) THEN
1589                   WRITE( NOUT, FMT = 9989 )' IACC22 ', IACC22( I ), 0
1590                   FATAL = .TRUE.
1591                END IF
1592   620       CONTINUE
1593             WRITE( NOUT, FMT = 9983 )'IACC22: ',
1594      $         ( IACC22( I ), I = 1, NPARMS )
1595          ELSE
1596             DO 630 I = 1, NPARMS
1597                IACC22( I ) = 1
1598   630       CONTINUE
1599          END IF
1600 *
1601 *        Read the values for NBCOL.
1602 *
1603          IF( CGG ) THEN
1604             READ( NIN, FMT = * )( NBCOL( I ), I = 1, NPARMS )
1605             DO 160 I = 1, NPARMS
1606                IF( NBCOL( I ).LT.0 ) THEN
1607                   WRITE( NOUT, FMT = 9989 )'NBCOL ', NBCOL( I ), 0
1608                   FATAL = .TRUE.
1609                ELSE IF( NBCOL( I ).GT.NMAX ) THEN
1610                   WRITE( NOUT, FMT = 9988 )'NBCOL ', NBCOL( I ), NMAX
1611                   FATAL = .TRUE.
1612                END IF
1613   160       CONTINUE
1614             WRITE( NOUT, FMT = 9983 )'NBCOL:',
1615      $         ( NBCOL( I ), I = 1, NPARMS )
1616          ELSE
1617             DO 170 I = 1, NPARMS
1618                NBCOL( I ) = 1
1619   170       CONTINUE
1620          END IF
1621       END IF
1622 *
1623 *     Calculate and print the machine dependent constants.
1624 *
1625       WRITE( NOUT, FMT = * )
1626       EPS = SLAMCH( 'Underflow threshold' )
1627       WRITE( NOUT, FMT = 9981 )'underflow', EPS
1628       EPS = SLAMCH( 'Overflow threshold' )
1629       WRITE( NOUT, FMT = 9981 )'overflow ', EPS
1630       EPS = SLAMCH( 'Epsilon' )
1631       WRITE( NOUT, FMT = 9981 )'precision', EPS
1632 *
1633 *     Read the threshold value for the test ratios.
1634 *
1635       READ( NIN, FMT = * )THRESH
1636       WRITE( NOUT, FMT = 9982 )THRESH
1637       IF( SEP .OR. SVD .OR. CGG ) THEN
1638 *
1639 *        Read the flag that indicates whether to test LAPACK routines.
1640 *
1641          READ( NIN, FMT = * )TSTCHK
1642 *
1643 *        Read the flag that indicates whether to test driver routines.
1644 *
1645          READ( NIN, FMT = * )TSTDRV
1646       END IF
1647 *
1648 *     Read the flag that indicates whether to test the error exits.
1649 *
1650       READ( NIN, FMT = * )TSTERR
1651 *
1652 *     Read the code describing how to set the random number seed.
1653 *
1654       READ( NIN, FMT = * )NEWSD
1655 *
1656 *     If NEWSD = 2, read another line with 4 integers for the seed.
1657 *
1658       IF( NEWSD.EQ.2 )
1659      $   READ( NIN, FMT = * )( IOLDSD( I ), I = 14 )
1660 *
1661       DO 180 I = 14
1662          ISEED( I ) = IOLDSD( I )
1663   180 CONTINUE
1664 *
1665       IF( FATAL ) THEN
1666          WRITE( NOUT, FMT = 9999 )
1667          STOP
1668       END IF
1669 *
1670 *     Read the input lines indicating the test path and its parameters.
1671 *     The first three characters indicate the test path, and the number
1672 *     of test matrix types must be the first nonblank item in columns
1673 *     4-80.
1674 *
1675   190 CONTINUE
1676 *
1677       IF.NOT.( CGX .OR. CXV ) ) THEN
1678 *
1679   200    CONTINUE
1680          READ( NIN, FMT = '(A80)'END = 380 )LINE
1681          C3 = LINE( 13 )
1682          LENP = LEN( LINE )
1683          I = 3
1684          ITMP = 0
1685          I1 = 0
1686   210    CONTINUE
1687          I = I + 1
1688          IF( I.GT.LENP ) THEN
1689             IF( I1.GT.0 ) THEN
1690                GO TO 240
1691             ELSE
1692                NTYPES = MAXT
1693                GO TO 240
1694             END IF
1695          END IF
1696          IF( LINE( I: I ).NE.' ' .AND. LINE( I: I ).NE.',' ) THEN
1697             I1 = I
1698             C1 = LINE( I1: I1 )
1699 *
1700 *        Check that a valid integer was read
1701 *
1702             DO 220 K = 110
1703                IF( C1.EQ.INTSTR( K: K ) ) THEN
1704                   IC = K - 1
1705                   GO TO 230
1706                END IF
1707   220       CONTINUE
1708             WRITE( NOUT, FMT = 9991 )I, LINE
1709             GO TO 200
1710   230       CONTINUE
1711             ITMP = 10*ITMP + IC
1712             GO TO 210
1713          ELSE IF( I1.GT.0 ) THEN
1714             GO TO 240
1715          ELSE
1716             GO TO 210
1717          END IF
1718   240    CONTINUE
1719          NTYPES = ITMP
1720 *
1721 *     Skip the tests if NTYPES is <= 0.
1722 *
1723          IF.NOT.( CEV .OR. CES .OR. CVX .OR. CSX .OR. CGV .OR.
1724      $       CGS ) .AND. NTYPES.LE.0 ) THEN
1725             WRITE( NOUT, FMT = 9990 )C3
1726             GO TO 200
1727          END IF
1728 *
1729       ELSE
1730          IF( CGX )
1731      $      C3 = 'CGX'
1732          IF( CXV )
1733      $      C3 = 'CXV'
1734       END IF
1735 *
1736 *     Reset the random number seed.
1737 *
1738       IF( NEWSD.EQ.0 ) THEN
1739          DO 250 K = 14
1740             ISEED( K ) = IOLDSD( K )
1741   250    CONTINUE
1742       END IF
1743 *
1744       IF( LSAMEN( 3, C3, 'CHS' ) .OR. LSAMEN( 3, C3, 'NEP' ) ) THEN
1745 *
1746 *        -------------------------------------
1747 *        NEP:  Nonsymmetric Eigenvalue Problem
1748 *        -------------------------------------
1749 *        Vary the parameters
1750 *           NB    = block size
1751 *           NBMIN = minimum block size
1752 *           NX    = crossover point
1753 *           NS    = number of shifts
1754 *           MAXB  = minimum submatrix size
1755 *
1756          MAXTYP = 21
1757          NTYPES = MIN( MAXTYP, NTYPES )
1758          CALL ALAREQ( C3, NTYPES, DOTYPE, MAXTYP, NIN, NOUT )
1759          CALL XLAENV( 11 )
1760          IF( TSTERR )
1761      $      CALL CERRHS( 'CHSEQR', NOUT )
1762          DO 270 I = 1, NPARMS
1763             CALL XLAENV( 1, NBVAL( I ) )
1764             CALL XLAENV( 2, NBMIN( I ) )
1765             CALL XLAENV( 3, NXVAL( I ) )
1766             CALL XLAENV(12MAX11, INMIN( I ) ) )
1767             CALL XLAENV(13, INWIN( I ) )
1768             CALL XLAENV(14, INIBL( I ) )
1769             CALL XLAENV(15, ISHFTS( I ) )
1770             CALL XLAENV(16, IACC22( I ) )
1771 *
1772             IF( NEWSD.EQ.0 ) THEN
1773                DO 260 K = 14
1774                   ISEED( K ) = IOLDSD( K )
1775   260          CONTINUE
1776             END IF
1777             WRITE( NOUT, FMT = 9961 )C3, NBVAL( I ), NBMIN( I ),
1778      $         NXVAL( I ), MAX11, INMIN(I)),
1779      $         INWIN( I ), INIBL( I ), ISHFTS( I ), IACC22( I )
1780             CALL CCHKHS( NN, NVAL, MAXTYP, DOTYPE, ISEED, THRESH, NOUT,
1781      $                   A( 11 ), NMAX, A( 12 ), A( 13 ),
1782      $                   A( 14 ), A( 15 ), NMAX, A( 16 ),
1783      $                   A( 17 ), DC( 11 ), DC( 12 ), A( 18 ),
1784      $                   A( 19 ), A( 110 ), A( 111 ), A( 112 ),
1785      $                   DC( 13 ), WORK, LWORK, RWORK, IWORK, LOGWRK,
1786      $                   RESULT, INFO )
1787             IF( INFO.NE.0 )
1788      $         WRITE( NOUT, FMT = 9980 )'CCHKHS', INFO
1789   270    CONTINUE
1790 *
1791       ELSE IF( LSAMEN( 3, C3, 'CST' ) .OR. LSAMEN( 3, C3, 'SEP' ) ) THEN
1792 *
1793 *        ----------------------------------
1794 *        SEP:  Symmetric Eigenvalue Problem
1795 *        ----------------------------------
1796 *        Vary the parameters
1797 *           NB    = block size
1798 *           NBMIN = minimum block size
1799 *           NX    = crossover point
1800 *
1801          MAXTYP = 21
1802          NTYPES = MIN( MAXTYP, NTYPES )
1803          CALL ALAREQ( C3, NTYPES, DOTYPE, MAXTYP, NIN, NOUT )
1804          CALL XLAENV( 11 )
1805          CALL XLAENV( 925 )
1806          IF( TSTERR )
1807      $      CALL CERRST( 'CST', NOUT )
1808          DO 290 I = 1, NPARMS
1809             CALL XLAENV( 1, NBVAL( I ) )
1810             CALL XLAENV( 2, NBMIN( I ) )
1811             CALL XLAENV( 3, NXVAL( I ) )
1812 *
1813             IF( NEWSD.EQ.0 ) THEN
1814                DO 280 K = 14
1815                   ISEED( K ) = IOLDSD( K )
1816   280          CONTINUE
1817             END IF
1818             WRITE( NOUT, FMT = 9997 )C3, NBVAL( I ), NBMIN( I ),
1819      $         NXVAL( I )
1820             IF( TSTCHK ) THEN
1821                CALL CCHKST( NN, NVAL, MAXTYP, DOTYPE, ISEED, THRESH,
1822      $                      NOUT, A( 11 ), NMAX, A( 12 ),
1823      $                      DR( 11 ), DR( 12 ), DR( 13 ),
1824      $                      DR( 14 ), DR( 15 ), DR( 16 ),
1825      $                      DR( 17 ), DR( 18 ), DR( 19 ),
1826      $                      DR( 110 ), DR( 111 ), A( 13 ), NMAX,
1827      $                      A( 14 ), A( 15 ), DC( 11 ), A( 16 ),
1828      $                      WORK, LWORK, RWORK, LWORK, IWORK, LIWORK, 
1829      $                      RESULT, INFO )
1830                IF( INFO.NE.0 )
1831      $            WRITE( NOUT, FMT = 9980 )'CCHKST', INFO
1832             END IF
1833             IF( TSTDRV ) THEN
1834                CALL CDRVST( NN, NVAL, 18, DOTYPE, ISEED, THRESH, NOUT,
1835      $                      A( 11 ), NMAX, DR( 13 ), DR( 14 ),
1836      $                      DR( 15 ), DR( 18 ), DR( 19 ),
1837      $                      DR( 110 ), A( 12 ), NMAX, A( 13 ),
1838      $                      DC( 11 ), A( 14 ), WORK, LWORK, RWORK,
1839      $                      LWORK, IWORK, LIWORK, RESULT, INFO )
1840                IF( INFO.NE.0 )
1841      $            WRITE( NOUT, FMT = 9980 )'CDRVST', INFO
1842             END IF
1843   290    CONTINUE
1844 *
1845       ELSE IF( LSAMEN( 3, C3, 'CSG' ) ) THEN
1846 *
1847 *        ----------------------------------------------
1848 *        CSG:  Hermitian Generalized Eigenvalue Problem
1849 *        ----------------------------------------------
1850 *        Vary the parameters
1851 *           NB    = block size
1852 *           NBMIN = minimum block size
1853 *           NX    = crossover point
1854 *
1855          MAXTYP = 21
1856          NTYPES = MIN( MAXTYP, NTYPES )
1857          CALL ALAREQ( C3, NTYPES, DOTYPE, MAXTYP, NIN, NOUT )
1858          CALL XLAENV( 925 )
1859          DO 310 I = 1, NPARMS
1860             CALL XLAENV( 1, NBVAL( I ) )
1861             CALL XLAENV( 2, NBMIN( I ) )
1862             CALL XLAENV( 3, NXVAL( I ) )
1863 *
1864             IF( NEWSD.EQ.0 ) THEN
1865                DO 300 K = 14
1866                   ISEED( K ) = IOLDSD( K )
1867   300          CONTINUE
1868             END IF
1869             WRITE( NOUT, FMT = 9997 )C3, NBVAL( I ), NBMIN( I ),
1870      $         NXVAL( I )
1871             IF( TSTCHK ) THEN
1872                CALL CDRVSG( NN, NVAL, MAXTYP, DOTYPE, ISEED, THRESH,
1873      $                      NOUT, A( 11 ), NMAX, A( 12 ), NMAX,
1874      $                      DR( 13 ), A( 13 ), NMAX, A( 14 ),
1875      $                      A( 15 ), A( 16 ), A( 17 ), WORK,
1876      $                      LWORK, RWORK, LWORK, IWORK, LIWORK, RESULT,
1877      $                      INFO )
1878                IF( INFO.NE.0 )
1879      $            WRITE( NOUT, FMT = 9980 )'CDRVSG', INFO
1880             END IF
1881   310    CONTINUE
1882 *
1883       ELSE IF( LSAMEN( 3, C3, 'CBD' ) .OR. LSAMEN( 3, C3, 'SVD' ) ) THEN
1884 *
1885 *        ----------------------------------
1886 *        SVD:  Singular Value Decomposition
1887 *        ----------------------------------
1888 *        Vary the parameters
1889 *           NB    = block size
1890 *           NBMIN = minimum block size
1891 *           NX    = crossover point
1892 *           NRHS  = number of right hand sides
1893 *
1894          MAXTYP = 16
1895          NTYPES = MIN( MAXTYP, NTYPES )
1896          CALL ALAREQ( C3, NTYPES, DOTYPE, MAXTYP, NIN, NOUT )
1897          CALL XLAENV( 925 )
1898 *
1899 *        Test the error exits
1900 *
1901          CALL XLAENV( 11 )
1902          IF( TSTERR .AND. TSTCHK )
1903      $      CALL CERRBD( 'CBD', NOUT )
1904          IF( TSTERR .AND. TSTDRV )
1905      $      CALL CERRED( 'CBD', NOUT )
1906 *
1907          DO 330 I = 1, NPARMS
1908             NRHS = NSVAL( I )
1909             CALL XLAENV( 1, NBVAL( I ) )
1910             CALL XLAENV( 2, NBMIN( I ) )
1911             CALL XLAENV( 3, NXVAL( I ) )
1912             IF( NEWSD.EQ.0 ) THEN
1913                DO 320 K = 14
1914                   ISEED( K ) = IOLDSD( K )
1915   320          CONTINUE
1916             END IF
1917             WRITE( NOUT, FMT = 9995 )C3, NBVAL( I ), NBMIN( I ),
1918      $         NXVAL( I ), NRHS
1919             IF( TSTCHK ) THEN
1920                CALL CCHKBD( NN, MVAL, NVAL, MAXTYP, DOTYPE, NRHS, ISEED,
1921      $                      THRESH, A( 11 ), NMAX, DR( 11 ),
1922      $                      DR( 12 ), DR( 13 ), DR( 14 ),
1923      $                      A( 12 ), NMAX, A( 13 ), A( 14 ),
1924      $                      A( 15 ), NMAX, A( 16 ), NMAX, A( 17 ),
1925      $                      A( 18 ), WORK, LWORK, RWORK, NOUT, INFO )
1926                IF( INFO.NE.0 )
1927      $            WRITE( NOUT, FMT = 9980 )'CCHKBD', INFO
1928             END IF
1929             IF( TSTDRV )
1930      $         CALL CDRVBD( NN, MVAL, NVAL, MAXTYP, DOTYPE, ISEED,
1931      $                      THRESH, A( 11 ), NMAX, A( 12 ), NMAX,
1932      $                      A( 13 ), NMAX, A( 14 ), A( 15 ),
1933      $                      A( 16 ), DR( 11 ), DR( 12 ),
1934      $                      DR( 13 ), WORK, LWORK, RWORK, IWORK, NOUT,
1935      $                      INFO )
1936   330    CONTINUE
1937 *
1938       ELSE IF( LSAMEN( 3, C3, 'CEV' ) ) THEN
1939 *
1940 *        --------------------------------------------
1941 *        CEV:  Nonsymmetric Eigenvalue Problem Driver
1942 *              CGEEV (eigenvalues and eigenvectors)
1943 *        --------------------------------------------
1944 *
1945          MAXTYP = 21
1946          NTYPES = MIN( MAXTYP, NTYPES )
1947          IF( NTYPES.LE.0 ) THEN
1948             WRITE( NOUT, FMT = 9990 )C3
1949          ELSE
1950             IF( TSTERR )
1951      $         CALL CERRED( C3, NOUT )
1952             CALL ALAREQ( C3, NTYPES, DOTYPE, MAXTYP, NIN, NOUT )
1953             CALL CDRVEV( NN, NVAL, NTYPES, DOTYPE, ISEED, THRESH, NOUT,
1954      $                   A( 11 ), NMAX, A( 12 ), DC( 11 ),
1955      $                   DC( 12 ), A( 13 ), NMAX, A( 14 ), NMAX,
1956      $                   A( 15 ), NMAX, RESULT, WORK, LWORK, RWORK,
1957      $                   IWORK, INFO )
1958             IF( INFO.NE.0 )
1959      $         WRITE( NOUT, FMT = 9980 )'CGEEV', INFO
1960          END IF
1961          WRITE( NOUT, FMT = 9973 )
1962          GO TO 10
1963 *
1964       ELSE IF( LSAMEN( 3, C3, 'CES' ) ) THEN
1965 *
1966 *        --------------------------------------------
1967 *        CES:  Nonsymmetric Eigenvalue Problem Driver
1968 *              CGEES (Schur form)
1969 *        --------------------------------------------
1970 *
1971          MAXTYP = 21
1972          NTYPES = MIN( MAXTYP, NTYPES )
1973          IF( NTYPES.LE.0 ) THEN
1974             WRITE( NOUT, FMT = 9990 )C3
1975          ELSE
1976             IF( TSTERR )
1977      $         CALL CERRED( C3, NOUT )
1978             CALL ALAREQ( C3, NTYPES, DOTYPE, MAXTYP, NIN, NOUT )
1979             CALL CDRVES( NN, NVAL, NTYPES, DOTYPE, ISEED, THRESH, NOUT,
1980      $                   A( 11 ), NMAX, A( 12 ), A( 13 ),
1981      $                   DC( 11 ), DC( 12 ), A( 14 ), NMAX,
1982      $                   RESULT, WORK, LWORK, RWORK, IWORK, LOGWRK,
1983      $                   INFO )
1984             IF( INFO.NE.0 )
1985      $         WRITE( NOUT, FMT = 9980 )'CGEES', INFO
1986          END IF
1987          WRITE( NOUT, FMT = 9973 )
1988          GO TO 10
1989 *
1990       ELSE IF( LSAMEN( 3, C3, 'CVX' ) ) THEN
1991 *
1992 *        --------------------------------------------------------------
1993 *        CVX:  Nonsymmetric Eigenvalue Problem Expert Driver
1994 *              CGEEVX (eigenvalues, eigenvectors and condition numbers)
1995 *        --------------------------------------------------------------
1996 *
1997          MAXTYP = 21
1998          NTYPES = MIN( MAXTYP, NTYPES )
1999          IF( NTYPES.LT.0 ) THEN
2000             WRITE( NOUT, FMT = 9990 )C3
2001          ELSE
2002             IF( TSTERR )
2003      $         CALL CERRED( C3, NOUT )
2004             CALL ALAREQ( C3, NTYPES, DOTYPE, MAXTYP, NIN, NOUT )
2005             CALL CDRVVX( NN, NVAL, NTYPES, DOTYPE, ISEED, THRESH, NIN,
2006      $                   NOUT, A( 11 ), NMAX, A( 12 ), DC( 11 ),
2007      $                   DC( 12 ), A( 13 ), NMAX, A( 14 ), NMAX,
2008      $                   A( 15 ), NMAX, DR( 11 ), DR( 12 ),
2009      $                   DR( 13 ), DR( 14 ), DR( 15 ), DR( 16 ),
2010      $                   DR( 17 ), DR( 18 ), RESULT, WORK, LWORK,
2011      $                   RWORK, INFO )
2012             IF( INFO.NE.0 )
2013      $         WRITE( NOUT, FMT = 9980 )'CGEEVX', INFO
2014          END IF
2015          WRITE( NOUT, FMT = 9973 )
2016          GO TO 10
2017 *
2018       ELSE IF( LSAMEN( 3, C3, 'CSX' ) ) THEN
2019 *
2020 *        ---------------------------------------------------
2021 *        CSX:  Nonsymmetric Eigenvalue Problem Expert Driver
2022 *              CGEESX (Schur form and condition numbers)
2023 *        ---------------------------------------------------
2024 *
2025          MAXTYP = 21
2026          NTYPES = MIN( MAXTYP, NTYPES )
2027          IF( NTYPES.LT.0 ) THEN
2028             WRITE( NOUT, FMT = 9990 )C3
2029          ELSE
2030             IF( TSTERR )
2031      $         CALL CERRED( C3, NOUT )
2032             CALL ALAREQ( C3, NTYPES, DOTYPE, MAXTYP, NIN, NOUT )
2033             CALL CDRVSX( NN, NVAL, NTYPES, DOTYPE, ISEED, THRESH, NIN,
2034      $                   NOUT, A( 11 ), NMAX, A( 12 ), A( 13 ),
2035      $                   DC( 11 ), DC( 12 ), DC( 13 ), A( 14 ),
2036      $                   NMAX, A( 15 ), RESULT, WORK, LWORK, RWORK,
2037      $                   LOGWRK, INFO )
2038             IF( INFO.NE.0 )
2039      $         WRITE( NOUT, FMT = 9980 )'CGEESX', INFO
2040          END IF
2041          WRITE( NOUT, FMT = 9973 )
2042          GO TO 10
2043 *
2044       ELSE IF( LSAMEN( 3, C3, 'CGG' ) ) THEN
2045 *
2046 *        -------------------------------------------------
2047 *        CGG:  Generalized Nonsymmetric Eigenvalue Problem
2048 *        -------------------------------------------------
2049 *        Vary the parameters
2050 *           NB    = block size
2051 *           NBMIN = minimum block size
2052 *           NS    = number of shifts
2053 *           MAXB  = minimum submatrix size
2054 *           NBCOL = minimum column dimension for blocks
2055 *
2056          MAXTYP = 26
2057          NTYPES = MIN( MAXTYP, NTYPES )
2058          CALL ALAREQ( C3, NTYPES, DOTYPE, MAXTYP, NIN, NOUT )
2059          IF( TSTCHK .AND. TSTERR )
2060      $      CALL CERRGG( C3, NOUT )
2061          DO 350 I = 1, NPARMS
2062             CALL XLAENV( 1, NBVAL( I ) )
2063             CALL XLAENV( 2, NBMIN( I ) )
2064             CALL XLAENV( 4, NSVAL( I ) )
2065             CALL XLAENV( 8, MXBVAL( I ) )
2066             CALL XLAENV( 5, NBCOL( I ) )
2067 *
2068             IF( NEWSD.EQ.0 ) THEN
2069                DO 340 K = 14
2070                   ISEED( K ) = IOLDSD( K )
2071   340          CONTINUE
2072             END IF
2073             WRITE( NOUT, FMT = 9996 )C3, NBVAL( I ), NBMIN( I ),
2074      $         NSVAL( I ), MXBVAL( I ), NBCOL( I )
2075             TSTDIF = .FALSE.
2076             THRSHN = 10.
2077             IF( TSTCHK ) THEN
2078                CALL CCHKGG( NN, NVAL, MAXTYP, DOTYPE, ISEED, THRESH,
2079      $                      TSTDIF, THRSHN, NOUT, A( 11 ), NMAX,
2080      $                      A( 12 ), A( 13 ), A( 14 ), A( 15 ),
2081      $                      A( 16 ), A( 17 ), A( 18 ), A( 19 ),
2082      $                      NMAX, A( 110 ), A( 111 ), A( 112 ),
2083      $                      DC( 11 ), DC( 12 ), DC( 13 ),
2084      $                      DC( 14 ), A( 113 ), A( 114 ), WORK,
2085      $                      LWORK, RWORK, LOGWRK, RESULT, INFO )
2086                IF( INFO.NE.0 )
2087      $            WRITE( NOUT, FMT = 9980 )'CCHKGG', INFO
2088             END IF
2089             CALL XLAENV( 11 )
2090             IF( TSTDRV ) THEN
2091                CALL CDRVGG( NN, NVAL, MAXTYP, DOTYPE, ISEED, THRESH,
2092      $                      THRSHN, NOUT, A( 11 ), NMAX, A( 12 ),
2093      $                      A( 13 ), A( 14 ), A( 15 ), A( 16 ),
2094      $                      A( 17 ), NMAX, A( 18 ), DC( 11 ),
2095      $                      DC( 12 ), DC( 13 ), DC( 14 ),
2096      $                      A( 18 ), A( 19 ), WORK, LWORK, RWORK,
2097      $                      RESULT, INFO )
2098                IF( INFO.NE.0 )
2099      $            WRITE( NOUT, FMT = 9980 )'CDRVGG', INFO
2100             END IF
2101   350    CONTINUE
2102 *
2103       ELSE IF( LSAMEN( 3, C3, 'CGS' ) ) THEN
2104 *
2105 *        -------------------------------------------------
2106 *        CGS:  Generalized Nonsymmetric Eigenvalue Problem
2107 *              CGGES (Schur form)
2108 *        -------------------------------------------------
2109 *
2110          MAXTYP = 26
2111          NTYPES = MIN( MAXTYP, NTYPES )
2112          IF( NTYPES.LE.0 ) THEN
2113             WRITE( NOUT, FMT = 9990 )C3
2114          ELSE
2115             IF( TSTERR )
2116      $         CALL CERRGG( C3, NOUT )
2117             CALL ALAREQ( C3, NTYPES, DOTYPE, MAXTYP, NIN, NOUT )
2118             CALL CDRGES( NN, NVAL, MAXTYP, DOTYPE, ISEED, THRESH, NOUT,
2119      $                   A( 11 ), NMAX, A( 12 ), A( 13 ),
2120      $                   A( 14 ), A( 17 ), NMAX, A( 18 ),
2121      $                   DC( 11 ), DC( 12 ), WORK, LWORK, RWORK,
2122      $                   RESULT, LOGWRK, INFO )
2123 *
2124             IF( INFO.NE.0 )
2125      $         WRITE( NOUT, FMT = 9980 )'CDRGES', INFO
2126          END IF
2127          WRITE( NOUT, FMT = 9973 )
2128          GO TO 10
2129 *
2130       ELSE IF( CGX ) THEN
2131 *
2132 *        -------------------------------------------------
2133 *        CGX  Generalized Nonsymmetric Eigenvalue Problem
2134 *              CGGESX (Schur form and condition numbers)
2135 *        -------------------------------------------------
2136 *
2137          MAXTYP = 5
2138          NTYPES = MAXTYP
2139          IF( NN.LT.0 ) THEN
2140             WRITE( NOUT, FMT = 9990 )C3
2141          ELSE
2142             IF( TSTERR )
2143      $         CALL CERRGG( C3, NOUT )
2144             CALL ALAREQ( C3, NTYPES, DOTYPE, MAXTYP, NIN, NOUT )
2145             CALL XLAENV( 52 )
2146             CALL CDRGSX( NN, NCMAX, THRESH, NIN, NOUT, A( 11 ), NMAX,
2147      $                   A( 12 ), A( 13 ), A( 14 ), A( 15 ),
2148      $                   A( 16 ), DC( 11 ), DC( 12 ), C,
2149      $                   NCMAX*NCMAX, S, WORK, LWORK, RWORK, IWORK,
2150      $                   LIWORK, LOGWRK, INFO )
2151             IF( INFO.NE.0 )
2152      $         WRITE( NOUT, FMT = 9980 )'CDRGSX', INFO
2153          END IF
2154          WRITE( NOUT, FMT = 9973 )
2155          GO TO 10
2156 *
2157       ELSE IF( LSAMEN( 3, C3, 'CGV' ) ) THEN
2158 *
2159 *        -------------------------------------------------
2160 *        CGV:  Generalized Nonsymmetric Eigenvalue Problem
2161 *              CGGEV (Eigenvalue/vector form)
2162 *        -------------------------------------------------
2163 *
2164          MAXTYP = 26
2165          NTYPES = MIN( MAXTYP, NTYPES )
2166          IF( NTYPES.LE.0 ) THEN
2167             WRITE( NOUT, FMT = 9990 )C3
2168          ELSE
2169             IF( TSTERR )
2170      $         CALL CERRGG( C3, NOUT )
2171             CALL ALAREQ( C3, NTYPES, DOTYPE, MAXTYP, NIN, NOUT )
2172             CALL CDRGEV( NN, NVAL, MAXTYP, DOTYPE, ISEED, THRESH, NOUT,
2173      $                   A( 11 ), NMAX, A( 12 ), A( 13 ),
2174      $                   A( 14 ), A( 17 ), NMAX, A( 18 ),
2175      $                   A( 19 ), NMAX, DC( 11 ), DC( 12 ),
2176      $                   DC( 13 ), DC( 14 ), WORK, LWORK, RWORK,
2177      $                   RESULT, INFO )
2178             IF( INFO.NE.0 )
2179      $         WRITE( NOUT, FMT = 9980 )'CDRGEV', INFO
2180          END IF
2181          WRITE( NOUT, FMT = 9973 )
2182          GO TO 10
2183 *
2184       ELSE IF( CXV ) THEN
2185 *
2186 *        -------------------------------------------------
2187 *        CXV:  Generalized Nonsymmetric Eigenvalue Problem
2188 *              CGGEVX (eigenvalue/vector with condition numbers)
2189 *        -------------------------------------------------
2190 *
2191          MAXTYP = 2
2192          NTYPES = MAXTYP
2193          IF( NN.LT.0 ) THEN
2194             WRITE( NOUT, FMT = 9990 )C3
2195          ELSE
2196             IF( TSTERR )
2197      $         CALL CERRGG( C3, NOUT )
2198             CALL ALAREQ( C3, NTYPES, DOTYPE, MAXTYP, NIN, NOUT )
2199             CALL CDRGVX( NN, THRESH, NIN, NOUT, A( 11 ), NMAX,
2200      $                   A( 12 ), A( 13 ), A( 14 ), DC( 11 ),
2201      $                   DC( 12 ), A( 15 ), A( 16 ), IWORK( 1 ),
2202      $                   IWORK( 2 ), DR( 11 ), DR( 12 ), DR( 13 ),
2203      $                   DR( 14 ), DR( 15 ), DR( 16 ), WORK,
2204      $                   LWORK, RWORK, IWORK( 3 ), LIWORK-2RESULT,
2205      $                   LOGWRK, INFO )
2206 *
2207             IF( INFO.NE.0 )
2208      $         WRITE( NOUT, FMT = 9980 )'CDRGVX', INFO
2209          END IF
2210          WRITE( NOUT, FMT = 9973 )
2211          GO TO 10
2212 *
2213       ELSE IF( LSAMEN( 3, C3, 'CHB' ) ) THEN
2214 *
2215 *        ------------------------------
2216 *        CHB:  Hermitian Band Reduction
2217 *        ------------------------------
2218 *
2219          MAXTYP = 15
2220          NTYPES = MIN( MAXTYP, NTYPES )
2221          CALL ALAREQ( C3, NTYPES, DOTYPE, MAXTYP, NIN, NOUT )
2222          IF( TSTERR )
2223      $      CALL CERRST( 'CHB', NOUT )
2224          CALL CCHKHB( NN, NVAL, NK, KVAL, MAXTYP, DOTYPE, ISEED, THRESH,
2225      $                NOUT, A( 11 ), NMAX, DR( 11 ), DR( 12 ),
2226      $                A( 12 ), NMAX, WORK, LWORK, RWORK, RESULT,
2227      $                INFO )
2228          IF( INFO.NE.0 )
2229      $      WRITE( NOUT, FMT = 9980 )'CCHKHB', INFO
2230 *
2231       ELSE IF( LSAMEN( 3, C3, 'CBB' ) ) THEN
2232 *
2233 *        ------------------------------
2234 *        CBB:  General Band Reduction
2235 *        ------------------------------
2236 *
2237          MAXTYP = 15
2238          NTYPES = MIN( MAXTYP, NTYPES )
2239          CALL ALAREQ( C3, NTYPES, DOTYPE, MAXTYP, NIN, NOUT )
2240          DO 370 I = 1, NPARMS
2241             NRHS = NSVAL( I )
2242 *
2243             IF( NEWSD.EQ.0 ) THEN
2244                DO 360 K = 14
2245                   ISEED( K ) = IOLDSD( K )
2246   360          CONTINUE
2247             END IF
2248             WRITE( NOUT, FMT = 9966 )C3, NRHS
2249             CALL CCHKBB( NN, MVAL, NVAL, NK, KVAL, MAXTYP, DOTYPE, NRHS,
2250      $                   ISEED, THRESH, NOUT, A( 11 ), NMAX,
2251      $                   A( 12 ), 2*NMAX, DR( 11 ), DR( 12 ),
2252      $                   A( 14 ), NMAX, A( 15 ), NMAX, A( 16 ),
2253      $                   NMAX, A( 17 ), WORK, LWORK, RWORK, RESULT,
2254      $                   INFO )
2255             IF( INFO.NE.0 )
2256      $         WRITE( NOUT, FMT = 9980 )'CCHKBB', INFO
2257   370    CONTINUE
2258 *
2259       ELSE IF( LSAMEN( 3, C3, 'GLM' ) ) THEN
2260 *
2261 *        -----------------------------------------
2262 *        GLM:  Generalized Linear Regression Model
2263 *        -----------------------------------------
2264 *
2265          CALL XLAENV( 11 )
2266          IF( TSTERR )
2267      $      CALL CERRGG( 'GLM', NOUT )
2268          CALL CCKGLM( NN, NVAL, MVAL, PVAL, NTYPES, ISEED, THRESH, NMAX,
2269      $                A( 11 ), A( 12 ), B( 11 ), B( 12 ), X,
2270      $                WORK, DR( 11 ), NIN, NOUT, INFO )
2271          IF( INFO.NE.0 )
2272      $      WRITE( NOUT, FMT = 9980 )'CCKGLM', INFO
2273 *
2274       ELSE IF( LSAMEN( 3, C3, 'GQR' ) ) THEN
2275 *
2276 *        ------------------------------------------
2277 *        GQR:  Generalized QR and RQ factorizations
2278 *        ------------------------------------------
2279 *
2280          CALL XLAENV( 11 )
2281          IF( TSTERR )
2282      $      CALL CERRGG( 'GQR', NOUT )
2283          CALL CCKGQR( NN, MVAL, NN, PVAL, NN, NVAL, NTYPES, ISEED,
2284      $                THRESH, NMAX, A( 11 ), A( 12 ), A( 13 ),
2285      $                A( 14 ), TAUA, B( 11 ), B( 12 ), B( 13 ),
2286      $                B( 14 ), B( 15 ), TAUB, WORK, DR( 11 ), NIN,
2287      $                NOUT, INFO )
2288          IF( INFO.NE.0 )
2289      $      WRITE( NOUT, FMT = 9980 )'CCKGQR', INFO
2290 *
2291       ELSE IF( LSAMEN( 3, C3, 'GSV' ) ) THEN
2292 *
2293 *        ----------------------------------------------
2294 *        GSV:  Generalized Singular Value Decomposition
2295 *        ----------------------------------------------
2296 *
2297          IF( TSTERR )
2298      $      CALL CERRGG( 'GSV', NOUT )
2299          CALL CCKGSV( NN, MVAL, PVAL, NVAL, NTYPES, ISEED, THRESH, NMAX,
2300      $                A( 11 ), A( 12 ), B( 11 ), B( 12 ),
2301      $                A( 13 ), B( 13 ), A( 14 ), ALPHA, BETA,
2302      $                B( 14 ), IWORK, WORK, DR( 11 ), NIN, NOUT,
2303      $                INFO )
2304          IF( INFO.NE.0 )
2305      $      WRITE( NOUT, FMT = 9980 )'CCKGSV', INFO
2306 *
2307       ELSE IF( LSAMEN( 3, C3, 'CSD' ) ) THEN
2308 *
2309 *        ----------------------------------------------
2310 *        CSD:  CS Decomposition
2311 *        ----------------------------------------------
2312 *
2313          IF( TSTERR )
2314      $      CALL CERRGG( 'CSD', NOUT )
2315          CALL CCKCSD( NN, MVAL, PVAL, NVAL, NTYPES, ISEED, THRESH, NMAX,
2316      $                A( 11 ), A( 12 ), A( 13 ), A( 14 ),
2317      $                A( 15 ), A( 16 ), A( 17 ), IWORK, WORK,
2318      $                DR( 11 ), NIN, NOUT, INFO )
2319          IF( INFO.NE.0 )
2320      $      WRITE( NOUT, FMT = 9980 )'CCKCSD', INFO
2321 *
2322       ELSE IF( LSAMEN( 3, C3, 'LSE' ) ) THEN
2323 *
2324 *        --------------------------------------
2325 *        LSE:  Constrained Linear Least Squares
2326 *        --------------------------------------
2327 *
2328          CALL XLAENV( 11 )
2329          IF( TSTERR )
2330      $      CALL CERRGG( 'LSE', NOUT )
2331          CALL CCKLSE( NN, MVAL, PVAL, NVAL, NTYPES, ISEED, THRESH, NMAX,
2332      $                A( 11 ), A( 12 ), B( 11 ), B( 12 ), X,
2333      $                WORK, DR( 11 ), NIN, NOUT, INFO )
2334          IF( INFO.NE.0 )
2335      $      WRITE( NOUT, FMT = 9980 )'CCKLSE', INFO
2336       ELSE
2337          WRITE( NOUT, FMT = * )
2338          WRITE( NOUT, FMT = * )
2339          WRITE( NOUT, FMT = 9992 )C3
2340       END IF
2341       IF.NOT.( CGX .OR. CXV ) )
2342      $   GO TO 190
2343   380 CONTINUE
2344       WRITE( NOUT, FMT = 9994 )
2345       S2 = SECOND( )
2346       WRITE( NOUT, FMT = 9993 )S2 - S1
2347 *
2348  9999 FORMAT/ ' Execution not attempted due to input errors' )
2349  9998 FORMAT/ / 1X, A3, ':  NB =', I4, ', NBMIN =', I4, ', NX =', I4,
2350      $      ', NS =', I4, ', MAXB =', I4 )
2351  9997 FORMAT/ / 1X, A3, ':  NB =', I4, ', NBMIN =', I4, ', NX =', I4 )
2352  9996 FORMAT/ / 1X, A3, ':  NB =', I4, ', NBMIN =', I4, ', NS =', I4,
2353      $      ', MAXB =', I4, ', NBCOL =', I4 )
2354  9995 FORMAT/ / 1X, A3, ':  NB =', I4, ', NBMIN =', I4, ', NX =', I4,
2355      $      ', NRHS =', I4 )
2356  9994 FORMAT/ / ' End of tests' )
2357  9993 FORMAT' Total time used = 'F12.2' seconds'/ )
2358  9992 FORMAT1X, A3, ':  Unrecognized path name' )
2359  9991 FORMAT/ / ' *** Invalid integer value in column ', I2,
2360      $      ' of input'' line:'/ A79 )
2361  9990 FORMAT/ / 1X, A3, ' routines were not tested' )
2362  9989 FORMAT' Invalid input value: ', A, '=', I6, '; must be >=',
2363      $      I6 )
2364  9988 FORMAT' Invalid input value: ', A, '=', I6, '; must be <=',
2365      $      I6 )
2366  9987 FORMAT' Tests of the Nonsymmetric Eigenvalue Problem routines' )
2367  9986 FORMAT' Tests of the Hermitian Eigenvalue Problem routines' )
2368  9985 FORMAT' Tests of the Singular Value Decomposition routines' )
2369  9984 FORMAT/ ' The following parameter values will be used:' )
2370  9983 FORMAT4X, A, 10I6, / 10X, 10I6 )
2371  9982 FORMAT/ ' Routines pass computational tests if test ratio is ',
2372      $      'less than'F8.2/ )
2373  9981 FORMAT' Relative machine ', A, ' is taken to be'E16.6 )
2374  9980 FORMAT' *** Error code from ', A, ' = ', I4 )
2375  9979 FORMAT/ ' Tests of the Nonsymmetric Eigenvalue Problem Driver',
2376      $      / '    CGEEV (eigenvalues and eigevectors)' )
2377  9978 FORMAT/ ' Tests of the Nonsymmetric Eigenvalue Problem Driver',
2378      $      / '    CGEES (Schur form)' )
2379  9977 FORMAT/ ' Tests of the Nonsymmetric Eigenvalue Problem Expert',
2380      $      ' Driver'/ '    CGEEVX (eigenvalues, eigenvectors and',
2381      $      ' condition numbers)' )
2382  9976 FORMAT/ ' Tests of the Nonsymmetric Eigenvalue Problem Expert',
2383      $      ' Driver'/ '    CGEESX (Schur form and condition',
2384      $      ' numbers)' )
2385  9975 FORMAT/ ' Tests of the Generalized Nonsymmetric Eigenvalue ',
2386      $      'Problem routines' )
2387  9974 FORMAT' Tests of CHBTRD'/ ' (reduction of a Hermitian band ',
2388      $      'matrix to real tridiagonal form)' )
2389  9973 FORMAT/ 1X71'-' ) )
2390  9972 FORMAT/ ' LAPACK VERSION ', I1, '.', I1, '.', I1 )
2391  9971 FORMAT/ ' Tests of the Generalized Linear Regression Model ',
2392      $      'routines' )
2393  9970 FORMAT/ ' Tests of the Generalized QR and RQ routines' )
2394  9969 FORMAT/ ' Tests of the Generalized Singular Value',
2395      $      ' Decomposition routines' )
2396  9968 FORMAT/ ' Tests of the Linear Least Squares routines' )
2397  9967 FORMAT' Tests of CGBBRD'/ ' (reduction of a general band ',
2398      $      'matrix to real bidiagonal form)' )
2399  9966 FORMAT/ / 1X, A3, ':  NRHS =', I4 )
2400  9965 FORMAT/ ' Tests of the Generalized Nonsymmetric Eigenvalue ',
2401      $      'Problem Expert Driver CGGESX' )
2402  9964 FORMAT/ ' Tests of the Generalized Nonsymmetric Eigenvalue ',
2403      $      'Problem Driver CGGES' )
2404  9963 FORMAT/ ' Tests of the Generalized Nonsymmetric Eigenvalue ',
2405      $      'Problem Driver CGGEV' )
2406  9962 FORMAT/ ' Tests of the Generalized Nonsymmetric Eigenvalue ',
2407      $      'Problem Expert Driver CGGEVX' )
2408  9961 FORMAT/ / 1X, A3, ':  NB =', I4, ', NBMIN =', I4, ', NX =', I4,
2409      $      ', INMIN=', I4, 
2410      $      ', INWIN =', I4, ', INIBL =', I4, ', ISHFTS =', I4,
2411      $      ', IACC22 =', I4)
2412  9960 FORMAT/ ' Tests of the CS Decomposition routines' )
2413 *
2414 *     End of CCHKEE
2415 *
2416       END