LAPACK  3.4.0
LAPACK: Linear Algebra PACKage
schkee.f
Go to the documentation of this file.
00001 *> \brief \b SCHKEE
00002 *
00003 *  =========== DOCUMENTATION ===========
00004 *
00005 * Online html documentation available at 
00006 *            http://www.netlib.org/lapack/explore-html/ 
00007 *
00008 *  Definition:
00009 *  ===========
00010 *
00011 *       PROGRAM SCHKEE
00012 * 
00013 *
00014 *> \par Purpose:
00015 *  =============
00016 *>
00017 *> \verbatim
00018 *>
00019 *> SCHKEE tests the REAL LAPACK subroutines for the matrix
00020 *> eigenvalue problem.  The test paths in this version are
00021 *>
00022 *> NEP (Nonsymmetric Eigenvalue Problem):
00023 *>     Test SGEHRD, SORGHR, SHSEQR, STREVC, SHSEIN, and SORMHR
00024 *>
00025 *> SEP (Symmetric Eigenvalue Problem):
00026 *>     Test SSYTRD, SORGTR, SSTEQR, SSTERF, SSTEIN, SSTEDC,
00027 *>     and drivers SSYEV(X), SSBEV(X), SSPEV(X), SSTEV(X),
00028 *>                 SSYEVD,   SSBEVD,   SSPEVD,   SSTEVD
00029 *>
00030 *> SVD (Singular Value Decomposition):
00031 *>     Test SGEBRD, SORGBR, SBDSQR, SBDSDC
00032 *>     and the drivers SGESVD, SGESDD
00033 *>
00034 *> SEV (Nonsymmetric Eigenvalue/eigenvector Driver):
00035 *>     Test SGEEV
00036 *>
00037 *> SES (Nonsymmetric Schur form Driver):
00038 *>     Test SGEES
00039 *>
00040 *> SVX (Nonsymmetric Eigenvalue/eigenvector Expert Driver):
00041 *>     Test SGEEVX
00042 *>
00043 *> SSX (Nonsymmetric Schur form Expert Driver):
00044 *>     Test SGEESX
00045 *>
00046 *> SGG (Generalized Nonsymmetric Eigenvalue Problem):
00047 *>     Test SGGHRD, SGGBAL, SGGBAK, SHGEQZ, and STGEVC
00048 *>     and the driver routines SGEGS and SGEGV
00049 *>
00050 *> SGS (Generalized Nonsymmetric Schur form Driver):
00051 *>     Test SGGES
00052 *>
00053 *> SGV (Generalized Nonsymmetric Eigenvalue/eigenvector Driver):
00054 *>     Test SGGEV
00055 *>
00056 *> SGX (Generalized Nonsymmetric Schur form Expert Driver):
00057 *>     Test SGGESX
00058 *>
00059 *> SXV (Generalized Nonsymmetric Eigenvalue/eigenvector Expert Driver):
00060 *>     Test SGGEVX
00061 *>
00062 *> SSG (Symmetric Generalized Eigenvalue Problem):
00063 *>     Test SSYGST, SSYGV, SSYGVD, SSYGVX, SSPGST, SSPGV, SSPGVD,
00064 *>     SSPGVX, SSBGST, SSBGV, SSBGVD, and SSBGVX
00065 *>
00066 *> SSB (Symmetric Band Eigenvalue Problem):
00067 *>     Test SSBTRD
00068 *>
00069 *> SBB (Band Singular Value Decomposition):
00070 *>     Test SGBBRD
00071 *>
00072 *> SEC (Eigencondition estimation):
00073 *>     Test SLALN2, SLASY2, SLAEQU, SLAEXC, STRSYL, STREXC, STRSNA,
00074 *>     STRSEN, and SLAQTR
00075 *>
00076 *> SBL (Balancing a general matrix)
00077 *>     Test SGEBAL
00078 *>
00079 *> SBK (Back transformation on a balanced matrix)
00080 *>     Test SGEBAK
00081 *>
00082 *> SGL (Balancing a matrix pair)
00083 *>     Test SGGBAL
00084 *>
00085 *> SGK (Back transformation on a matrix pair)
00086 *>     Test SGGBAK
00087 *>
00088 *> GLM (Generalized Linear Regression Model):
00089 *>     Tests SGGGLM
00090 *>
00091 *> GQR (Generalized QR and RQ factorizations):
00092 *>     Tests SGGQRF and SGGRQF
00093 *>
00094 *> GSV (Generalized Singular Value Decomposition):
00095 *>     Tests SGGSVD, SGGSVP, STGSJA, SLAGS2, SLAPLL, and SLAPMT
00096 *>
00097 *> CSD (CS decomposition):
00098 *>     Tests SORCSD
00099 *>
00100 *> LSE (Constrained Linear Least Squares):
00101 *>     Tests SGGLSE
00102 *>
00103 *> Each test path has a different set of inputs, but the data sets for
00104 *> the driver routines xEV, xES, xVX, and xSX can be concatenated in a
00105 *> single input file.  The first line of input should contain one of the
00106 *> 3-character path names in columns 1-3.  The number of remaining lines
00107 *> depends on what is found on the first line.
00108 *>
00109 *> The number of matrix types used in testing is often controllable from
00110 *> the input file.  The number of matrix types for each path, and the
00111 *> test routine that describes them, is as follows:
00112 *>
00113 *> Path name(s)  Types    Test routine
00114 *>
00115 *> SHS or NEP      21     SCHKHS
00116 *> SST or SEP      21     SCHKST (routines)
00117 *>                 18     SDRVST (drivers)
00118 *> SBD or SVD      16     SCHKBD (routines)
00119 *>                  5     SDRVBD (drivers)
00120 *> SEV             21     SDRVEV
00121 *> SES             21     SDRVES
00122 *> SVX             21     SDRVVX
00123 *> SSX             21     SDRVSX
00124 *> SGG             26     SCHKGG (routines)
00125 *>                 26     SDRVGG (drivers)
00126 *> SGS             26     SDRGES
00127 *> SGX              5     SDRGSX
00128 *> SGV             26     SDRGEV
00129 *> SXV              2     SDRGVX
00130 *> SSG             21     SDRVSG
00131 *> SSB             15     SCHKSB
00132 *> SBB             15     SCHKBB
00133 *> SEC              -     SCHKEC
00134 *> SBL              -     SCHKBL
00135 *> SBK              -     SCHKBK
00136 *> SGL              -     SCHKGL
00137 *> SGK              -     SCHKGK
00138 *> GLM              8     SCKGLM
00139 *> GQR              8     SCKGQR
00140 *> GSV              8     SCKGSV
00141 *> CSD              3     SCKCSD
00142 *> LSE              8     SCKLSE
00143 *>
00144 *>-----------------------------------------------------------------------
00145 *>
00146 *> NEP input file:
00147 *>
00148 *> line 2:  NN, INTEGER
00149 *>          Number of values of N.
00150 *>
00151 *> line 3:  NVAL, INTEGER array, dimension (NN)
00152 *>          The values for the matrix dimension N.
00153 *>
00154 *> line 4:  NPARMS, INTEGER
00155 *>          Number of values of the parameters NB, NBMIN, NX, NS, and
00156 *>          MAXB.
00157 *>
00158 *> line 5:  NBVAL, INTEGER array, dimension (NPARMS)
00159 *>          The values for the blocksize NB.
00160 *>
00161 *> line 6:  NBMIN, INTEGER array, dimension (NPARMS)
00162 *>          The values for the minimum blocksize NBMIN.
00163 *>
00164 *> line 7:  NXVAL, INTEGER array, dimension (NPARMS)
00165 *>          The values for the crossover point NX.
00166 *>
00167 *> line 8:  INMIN, INTEGER array, dimension (NPARMS)
00168 *>          LAHQR vs TTQRE crossover point, >= 11
00169 *>
00170 *> line 9:  INWIN, INTEGER array, dimension (NPARMS)
00171 *>          recommended deflation window size
00172 *>
00173 *> line 10: INIBL, INTEGER array, dimension (NPARMS)
00174 *>          nibble crossover point
00175 *>
00176 *> line 11:  ISHFTS, INTEGER array, dimension (NPARMS)
00177 *>          number of simultaneous shifts)
00178 *>
00179 *> line 12:  IACC22, INTEGER array, dimension (NPARMS)
00180 *>          select structured matrix multiply: 0, 1 or 2)
00181 *>
00182 *> line 13: THRESH
00183 *>          Threshold value for the test ratios.  Information will be
00184 *>          printed about each test for which the test ratio is greater
00185 *>          than or equal to the threshold.  To have all of the test
00186 *>          ratios printed, use THRESH = 0.0 .
00187 *>
00188 *> line 14: NEWSD, INTEGER
00189 *>          A code indicating how to set the random number seed.
00190 *>          = 0:  Set the seed to a default value before each run
00191 *>          = 1:  Initialize the seed to a default value only before the
00192 *>                first run
00193 *>          = 2:  Like 1, but use the seed values on the next line
00194 *>
00195 *> If line 14 was 2:
00196 *>
00197 *> line 15: INTEGER array, dimension (4)
00198 *>          Four integer values for the random number seed.
00199 *>
00200 *> lines 15-EOF:  The remaining lines occur in sets of 1 or 2 and allow
00201 *>          the user to specify the matrix types.  Each line contains
00202 *>          a 3-character path name in columns 1-3, and the number
00203 *>          of matrix types must be the first nonblank item in columns
00204 *>          4-80.  If the number of matrix types is at least 1 but is
00205 *>          less than the maximum number of possible types, a second
00206 *>          line will be read to get the numbers of the matrix types to
00207 *>          be used.  For example,
00208 *> NEP 21
00209 *>          requests all of the matrix types for the nonsymmetric
00210 *>          eigenvalue problem, while
00211 *> NEP  4
00212 *> 9 10 11 12
00213 *>          requests only matrices of type 9, 10, 11, and 12.
00214 *>
00215 *>          The valid 3-character path names are 'NEP' or 'SHS' for the
00216 *>          nonsymmetric eigenvalue routines.
00217 *>
00218 *>-----------------------------------------------------------------------
00219 *>
00220 *> SEP or SSG input file:
00221 *>
00222 *> line 2:  NN, INTEGER
00223 *>          Number of values of N.
00224 *>
00225 *> line 3:  NVAL, INTEGER array, dimension (NN)
00226 *>          The values for the matrix dimension N.
00227 *>
00228 *> line 4:  NPARMS, INTEGER
00229 *>          Number of values of the parameters NB, NBMIN, and NX.
00230 *>
00231 *> line 5:  NBVAL, INTEGER array, dimension (NPARMS)
00232 *>          The values for the blocksize NB.
00233 *>
00234 *> line 6:  NBMIN, INTEGER array, dimension (NPARMS)
00235 *>          The values for the minimum blocksize NBMIN.
00236 *>
00237 *> line 7:  NXVAL, INTEGER array, dimension (NPARMS)
00238 *>          The values for the crossover point NX.
00239 *>
00240 *> line 8:  THRESH
00241 *>          Threshold value for the test ratios.  Information will be
00242 *>          printed about each test for which the test ratio is greater
00243 *>          than or equal to the threshold.
00244 *>
00245 *> line 9:  TSTCHK, LOGICAL
00246 *>          Flag indicating whether or not to test the LAPACK routines.
00247 *>
00248 *> line 10: TSTDRV, LOGICAL
00249 *>          Flag indicating whether or not to test the driver routines.
00250 *>
00251 *> line 11: TSTERR, LOGICAL
00252 *>          Flag indicating whether or not to test the error exits for
00253 *>          the LAPACK routines and driver routines.
00254 *>
00255 *> line 12: NEWSD, INTEGER
00256 *>          A code indicating how to set the random number seed.
00257 *>          = 0:  Set the seed to a default value before each run
00258 *>          = 1:  Initialize the seed to a default value only before the
00259 *>                first run
00260 *>          = 2:  Like 1, but use the seed values on the next line
00261 *>
00262 *> If line 12 was 2:
00263 *>
00264 *> line 13: INTEGER array, dimension (4)
00265 *>          Four integer values for the random number seed.
00266 *>
00267 *> lines 13-EOF:  Lines specifying matrix types, as for NEP.
00268 *>          The 3-character path names are 'SEP' or 'SST' for the
00269 *>          symmetric eigenvalue routines and driver routines, and
00270 *>          'SSG' for the routines for the symmetric generalized
00271 *>          eigenvalue problem.
00272 *>
00273 *>-----------------------------------------------------------------------
00274 *>
00275 *> SVD input file:
00276 *>
00277 *> line 2:  NN, INTEGER
00278 *>          Number of values of M and N.
00279 *>
00280 *> line 3:  MVAL, INTEGER array, dimension (NN)
00281 *>          The values for the matrix row dimension M.
00282 *>
00283 *> line 4:  NVAL, INTEGER array, dimension (NN)
00284 *>          The values for the matrix column dimension N.
00285 *>
00286 *> line 5:  NPARMS, INTEGER
00287 *>          Number of values of the parameter NB, NBMIN, NX, and NRHS.
00288 *>
00289 *> line 6:  NBVAL, INTEGER array, dimension (NPARMS)
00290 *>          The values for the blocksize NB.
00291 *>
00292 *> line 7:  NBMIN, INTEGER array, dimension (NPARMS)
00293 *>          The values for the minimum blocksize NBMIN.
00294 *>
00295 *> line 8:  NXVAL, INTEGER array, dimension (NPARMS)
00296 *>          The values for the crossover point NX.
00297 *>
00298 *> line 9:  NSVAL, INTEGER array, dimension (NPARMS)
00299 *>          The values for the number of right hand sides NRHS.
00300 *>
00301 *> line 10: THRESH
00302 *>          Threshold value for the test ratios.  Information will be
00303 *>          printed about each test for which the test ratio is greater
00304 *>          than or equal to the threshold.
00305 *>
00306 *> line 11: TSTCHK, LOGICAL
00307 *>          Flag indicating whether or not to test the LAPACK routines.
00308 *>
00309 *> line 12: TSTDRV, LOGICAL
00310 *>          Flag indicating whether or not to test the driver routines.
00311 *>
00312 *> line 13: TSTERR, LOGICAL
00313 *>          Flag indicating whether or not to test the error exits for
00314 *>          the LAPACK routines and driver routines.
00315 *>
00316 *> line 14: NEWSD, INTEGER
00317 *>          A code indicating how to set the random number seed.
00318 *>          = 0:  Set the seed to a default value before each run
00319 *>          = 1:  Initialize the seed to a default value only before the
00320 *>                first run
00321 *>          = 2:  Like 1, but use the seed values on the next line
00322 *>
00323 *> If line 14 was 2:
00324 *>
00325 *> line 15: INTEGER array, dimension (4)
00326 *>          Four integer values for the random number seed.
00327 *>
00328 *> lines 15-EOF:  Lines specifying matrix types, as for NEP.
00329 *>          The 3-character path names are 'SVD' or 'SBD' for both the
00330 *>          SVD routines and the SVD driver routines.
00331 *>
00332 *>-----------------------------------------------------------------------
00333 *>
00334 *> SEV and SES data files:
00335 *>
00336 *> line 1:  'SEV' or 'SES' in columns 1 to 3.
00337 *>
00338 *> line 2:  NSIZES, INTEGER
00339 *>          Number of sizes of matrices to use. Should be at least 0
00340 *>          and at most 20. If NSIZES = 0, no testing is done
00341 *>          (although the remaining  3 lines are still read).
00342 *>
00343 *> line 3:  NN, INTEGER array, dimension(NSIZES)
00344 *>          Dimensions of matrices to be tested.
00345 *>
00346 *> line 4:  NB, NBMIN, NX, NS, NBCOL, INTEGERs
00347 *>          These integer parameters determine how blocking is done
00348 *>          (see ILAENV for details)
00349 *>          NB     : block size
00350 *>          NBMIN  : minimum block size
00351 *>          NX     : minimum dimension for blocking
00352 *>          NS     : number of shifts in xHSEQR
00353 *>          NBCOL  : minimum column dimension for blocking
00354 *>
00355 *> line 5:  THRESH, REAL
00356 *>          The test threshold against which computed residuals are
00357 *>          compared. Should generally be in the range from 10. to 20.
00358 *>          If it is 0., all test case data will be printed.
00359 *>
00360 *> line 6:  TSTERR, LOGICAL
00361 *>          Flag indicating whether or not to test the error exits.
00362 *>
00363 *> line 7:  NEWSD, INTEGER
00364 *>          A code indicating how to set the random number seed.
00365 *>          = 0:  Set the seed to a default value before each run
00366 *>          = 1:  Initialize the seed to a default value only before the
00367 *>                first run
00368 *>          = 2:  Like 1, but use the seed values on the next line
00369 *>
00370 *> If line 7 was 2:
00371 *>
00372 *> line 8:  INTEGER array, dimension (4)
00373 *>          Four integer values for the random number seed.
00374 *>
00375 *> lines 9 and following:  Lines specifying matrix types, as for NEP.
00376 *>          The 3-character path name is 'SEV' to test SGEEV, or
00377 *>          'SES' to test SGEES.
00378 *>
00379 *>-----------------------------------------------------------------------
00380 *>
00381 *> The SVX data has two parts. The first part is identical to SEV,
00382 *> and the second part consists of test matrices with precomputed
00383 *> solutions.
00384 *>
00385 *> line 1:  'SVX' in columns 1-3.
00386 *>
00387 *> line 2:  NSIZES, INTEGER
00388 *>          If NSIZES = 0, no testing of randomly generated examples
00389 *>          is done, but any precomputed examples are tested.
00390 *>
00391 *> line 3:  NN, INTEGER array, dimension(NSIZES)
00392 *>
00393 *> line 4:  NB, NBMIN, NX, NS, NBCOL, INTEGERs
00394 *>
00395 *> line 5:  THRESH, REAL
00396 *>
00397 *> line 6:  TSTERR, LOGICAL
00398 *>
00399 *> line 7:  NEWSD, INTEGER
00400 *>
00401 *> If line 7 was 2:
00402 *>
00403 *> line 8:  INTEGER array, dimension (4)
00404 *>
00405 *> lines 9 and following: The first line contains 'SVX' in columns 1-3
00406 *>          followed by the number of matrix types, possibly with
00407 *>          a second line to specify certain matrix types.
00408 *>          If the number of matrix types = 0, no testing of randomly
00409 *>          generated examples is done, but any precomputed examples
00410 *>          are tested.
00411 *>
00412 *> remaining lines : Each matrix is stored on 1+2*N lines, where N is
00413 *>          its dimension. The first line contains the dimension (a
00414 *>          single integer). The next N lines contain the matrix, one
00415 *>          row per line. The last N lines correspond to each
00416 *>          eigenvalue. Each of these last N lines contains 4 real
00417 *>          values: the real part of the eigenvalue, the imaginary
00418 *>          part of the eigenvalue, the reciprocal condition number of
00419 *>          the eigenvalues, and the reciprocal condition number of the
00420 *>          eigenvector.  The end of data is indicated by dimension N=0.
00421 *>          Even if no data is to be tested, there must be at least one
00422 *>          line containing N=0.
00423 *>
00424 *>-----------------------------------------------------------------------
00425 *>
00426 *> The SSX data is like SVX. The first part is identical to SEV, and the
00427 *> second part consists of test matrices with precomputed solutions.
00428 *>
00429 *> line 1:  'SSX' in columns 1-3.
00430 *>
00431 *> line 2:  NSIZES, INTEGER
00432 *>          If NSIZES = 0, no testing of randomly generated examples
00433 *>          is done, but any precomputed examples are tested.
00434 *>
00435 *> line 3:  NN, INTEGER array, dimension(NSIZES)
00436 *>
00437 *> line 4:  NB, NBMIN, NX, NS, NBCOL, INTEGERs
00438 *>
00439 *> line 5:  THRESH, REAL
00440 *>
00441 *> line 6:  TSTERR, LOGICAL
00442 *>
00443 *> line 7:  NEWSD, INTEGER
00444 *>
00445 *> If line 7 was 2:
00446 *>
00447 *> line 8:  INTEGER array, dimension (4)
00448 *>
00449 *> lines 9 and following: The first line contains 'SSX' in columns 1-3
00450 *>          followed by the number of matrix types, possibly with
00451 *>          a second line to specify certain matrix types.
00452 *>          If the number of matrix types = 0, no testing of randomly
00453 *>          generated examples is done, but any precomputed examples
00454 *>          are tested.
00455 *>
00456 *> remaining lines : Each matrix is stored on 3+N lines, where N is its
00457 *>          dimension. The first line contains the dimension N and the
00458 *>          dimension M of an invariant subspace. The second line
00459 *>          contains M integers, identifying the eigenvalues in the
00460 *>          invariant subspace (by their position in a list of
00461 *>          eigenvalues ordered by increasing real part). The next N
00462 *>          lines contain the matrix. The last line contains the
00463 *>          reciprocal condition number for the average of the selected
00464 *>          eigenvalues, and the reciprocal condition number for the
00465 *>          corresponding right invariant subspace. The end of data is
00466 *>          indicated by a line containing N=0 and M=0. Even if no data
00467 *>          is to be tested, there must be at least one line containing
00468 *>          N=0 and M=0.
00469 *>
00470 *>-----------------------------------------------------------------------
00471 *>
00472 *> SGG input file:
00473 *>
00474 *> line 2:  NN, INTEGER
00475 *>          Number of values of N.
00476 *>
00477 *> line 3:  NVAL, INTEGER array, dimension (NN)
00478 *>          The values for the matrix dimension N.
00479 *>
00480 *> line 4:  NPARMS, INTEGER
00481 *>          Number of values of the parameters NB, NBMIN, NS, MAXB, and
00482 *>          NBCOL.
00483 *>
00484 *> line 5:  NBVAL, INTEGER array, dimension (NPARMS)
00485 *>          The values for the blocksize NB.
00486 *>
00487 *> line 6:  NBMIN, INTEGER array, dimension (NPARMS)
00488 *>          The values for NBMIN, the minimum row dimension for blocks.
00489 *>
00490 *> line 7:  NSVAL, INTEGER array, dimension (NPARMS)
00491 *>          The values for the number of shifts.
00492 *>
00493 *> line 8:  MXBVAL, INTEGER array, dimension (NPARMS)
00494 *>          The values for MAXB, used in determining minimum blocksize.
00495 *>
00496 *> line 9:  NBCOL, INTEGER array, dimension (NPARMS)
00497 *>          The values for NBCOL, the minimum column dimension for
00498 *>          blocks.
00499 *>
00500 *> line 10: THRESH
00501 *>          Threshold value for the test ratios.  Information will be
00502 *>          printed about each test for which the test ratio is greater
00503 *>          than or equal to the threshold.
00504 *>
00505 *> line 11: TSTCHK, LOGICAL
00506 *>          Flag indicating whether or not to test the LAPACK routines.
00507 *>
00508 *> line 12: TSTDRV, LOGICAL
00509 *>          Flag indicating whether or not to test the driver routines.
00510 *>
00511 *> line 13: TSTERR, LOGICAL
00512 *>          Flag indicating whether or not to test the error exits for
00513 *>          the LAPACK routines and driver routines.
00514 *>
00515 *> line 14: NEWSD, INTEGER
00516 *>          A code indicating how to set the random number seed.
00517 *>          = 0:  Set the seed to a default value before each run
00518 *>          = 1:  Initialize the seed to a default value only before the
00519 *>                first run
00520 *>          = 2:  Like 1, but use the seed values on the next line
00521 *>
00522 *> If line 14 was 2:
00523 *>
00524 *> line 15: INTEGER array, dimension (4)
00525 *>          Four integer values for the random number seed.
00526 *>
00527 *> lines 15-EOF:  Lines specifying matrix types, as for NEP.
00528 *>          The 3-character path name is 'SGG' for the generalized
00529 *>          eigenvalue problem routines and driver routines.
00530 *>
00531 *>-----------------------------------------------------------------------
00532 *>
00533 *> SGS and SGV input files:
00534 *>
00535 *> line 1:  'SGS' or 'SGV' in columns 1 to 3.
00536 *>
00537 *> line 2:  NN, INTEGER
00538 *>          Number of values of N.
00539 *>
00540 *> line 3:  NVAL, INTEGER array, dimension(NN)
00541 *>          Dimensions of matrices to be tested.
00542 *>
00543 *> line 4:  NB, NBMIN, NX, NS, NBCOL, INTEGERs
00544 *>          These integer parameters determine how blocking is done
00545 *>          (see ILAENV for details)
00546 *>          NB     : block size
00547 *>          NBMIN  : minimum block size
00548 *>          NX     : minimum dimension for blocking
00549 *>          NS     : number of shifts in xHGEQR
00550 *>          NBCOL  : minimum column dimension for blocking
00551 *>
00552 *> line 5:  THRESH, REAL
00553 *>          The test threshold against which computed residuals are
00554 *>          compared. Should generally be in the range from 10. to 20.
00555 *>          If it is 0., all test case data will be printed.
00556 *>
00557 *> line 6:  TSTERR, LOGICAL
00558 *>          Flag indicating whether or not to test the error exits.
00559 *>
00560 *> line 7:  NEWSD, INTEGER
00561 *>          A code indicating how to set the random number seed.
00562 *>          = 0:  Set the seed to a default value before each run
00563 *>          = 1:  Initialize the seed to a default value only before the
00564 *>                first run
00565 *>          = 2:  Like 1, but use the seed values on the next line
00566 *>
00567 *> If line 17 was 2:
00568 *>
00569 *> line 7:  INTEGER array, dimension (4)
00570 *>          Four integer values for the random number seed.
00571 *>
00572 *> lines 7-EOF:  Lines specifying matrix types, as for NEP.
00573 *>          The 3-character path name is 'SGS' for the generalized
00574 *>          eigenvalue problem routines and driver routines.
00575 *>
00576 *>-----------------------------------------------------------------------
00577 *>
00578 *> SXV input files:
00579 *>
00580 *> line 1:  'SXV' in columns 1 to 3.
00581 *>
00582 *> line 2:  N, INTEGER
00583 *>          Value of N.
00584 *>
00585 *> line 3:  NB, NBMIN, NX, NS, NBCOL, INTEGERs
00586 *>          These integer parameters determine how blocking is done
00587 *>          (see ILAENV for details)
00588 *>          NB     : block size
00589 *>          NBMIN  : minimum block size
00590 *>          NX     : minimum dimension for blocking
00591 *>          NS     : number of shifts in xHGEQR
00592 *>          NBCOL  : minimum column dimension for blocking
00593 *>
00594 *> line 4:  THRESH, REAL
00595 *>          The test threshold against which computed residuals are
00596 *>          compared. Should generally be in the range from 10. to 20.
00597 *>          Information will be printed about each test for which the
00598 *>          test ratio is greater than or equal to the threshold.
00599 *>
00600 *> line 5:  TSTERR, LOGICAL
00601 *>          Flag indicating whether or not to test the error exits for
00602 *>          the LAPACK routines and driver routines.
00603 *>
00604 *> line 6:  NEWSD, INTEGER
00605 *>          A code indicating how to set the random number seed.
00606 *>          = 0:  Set the seed to a default value before each run
00607 *>          = 1:  Initialize the seed to a default value only before the
00608 *>                first run
00609 *>          = 2:  Like 1, but use the seed values on the next line
00610 *>
00611 *> If line 6 was 2:
00612 *>
00613 *> line 7: INTEGER array, dimension (4)
00614 *>          Four integer values for the random number seed.
00615 *>
00616 *> If line 2 was 0:
00617 *>
00618 *> line 7-EOF: Precomputed examples are tested.
00619 *>
00620 *> remaining lines : Each example is stored on 3+2*N lines, where N is
00621 *>          its dimension. The first line contains the dimension (a
00622 *>          single integer). The next N lines contain the matrix A, one
00623 *>          row per line. The next N lines contain the matrix B.  The
00624 *>          next line contains the reciprocals of the eigenvalue
00625 *>          condition numbers.  The last line contains the reciprocals of
00626 *>          the eigenvector condition numbers.  The end of data is
00627 *>          indicated by dimension N=0.  Even if no data is to be tested,
00628 *>          there must be at least one line containing N=0.
00629 *>
00630 *>-----------------------------------------------------------------------
00631 *>
00632 *> SGX input files:
00633 *>
00634 *> line 1:  'SGX' in columns 1 to 3.
00635 *>
00636 *> line 2:  N, INTEGER
00637 *>          Value of N.
00638 *>
00639 *> line 3:  NB, NBMIN, NX, NS, NBCOL, INTEGERs
00640 *>          These integer parameters determine how blocking is done
00641 *>          (see ILAENV for details)
00642 *>          NB     : block size
00643 *>          NBMIN  : minimum block size
00644 *>          NX     : minimum dimension for blocking
00645 *>          NS     : number of shifts in xHGEQR
00646 *>          NBCOL  : minimum column dimension for blocking
00647 *>
00648 *> line 4:  THRESH, REAL
00649 *>          The test threshold against which computed residuals are
00650 *>          compared. Should generally be in the range from 10. to 20.
00651 *>          Information will be printed about each test for which the
00652 *>          test ratio is greater than or equal to the threshold.
00653 *>
00654 *> line 5:  TSTERR, LOGICAL
00655 *>          Flag indicating whether or not to test the error exits for
00656 *>          the LAPACK routines and driver routines.
00657 *>
00658 *> line 6:  NEWSD, INTEGER
00659 *>          A code indicating how to set the random number seed.
00660 *>          = 0:  Set the seed to a default value before each run
00661 *>          = 1:  Initialize the seed to a default value only before the
00662 *>                first run
00663 *>          = 2:  Like 1, but use the seed values on the next line
00664 *>
00665 *> If line 6 was 2:
00666 *>
00667 *> line 7: INTEGER array, dimension (4)
00668 *>          Four integer values for the random number seed.
00669 *>
00670 *> If line 2 was 0:
00671 *>
00672 *> line 7-EOF: Precomputed examples are tested.
00673 *>
00674 *> remaining lines : Each example is stored on 3+2*N lines, where N is
00675 *>          its dimension. The first line contains the dimension (a
00676 *>          single integer).  The next line contains an integer k such
00677 *>          that only the last k eigenvalues will be selected and appear
00678 *>          in the leading diagonal blocks of $A$ and $B$. The next N
00679 *>          lines contain the matrix A, one row per line.  The next N
00680 *>          lines contain the matrix B.  The last line contains the
00681 *>          reciprocal of the eigenvalue cluster condition number and the
00682 *>          reciprocal of the deflating subspace (associated with the
00683 *>          selected eigencluster) condition number.  The end of data is
00684 *>          indicated by dimension N=0.  Even if no data is to be tested,
00685 *>          there must be at least one line containing N=0.
00686 *>
00687 *>-----------------------------------------------------------------------
00688 *>
00689 *> SSB input file:
00690 *>
00691 *> line 2:  NN, INTEGER
00692 *>          Number of values of N.
00693 *>
00694 *> line 3:  NVAL, INTEGER array, dimension (NN)
00695 *>          The values for the matrix dimension N.
00696 *>
00697 *> line 4:  NK, INTEGER
00698 *>          Number of values of K.
00699 *>
00700 *> line 5:  KVAL, INTEGER array, dimension (NK)
00701 *>          The values for the matrix dimension K.
00702 *>
00703 *> line 6:  THRESH
00704 *>          Threshold value for the test ratios.  Information will be
00705 *>          printed about each test for which the test ratio is greater
00706 *>          than or equal to the threshold.
00707 *>
00708 *> line 7:  NEWSD, INTEGER
00709 *>          A code indicating how to set the random number seed.
00710 *>          = 0:  Set the seed to a default value before each run
00711 *>          = 1:  Initialize the seed to a default value only before the
00712 *>                first run
00713 *>          = 2:  Like 1, but use the seed values on the next line
00714 *>
00715 *> If line 7 was 2:
00716 *>
00717 *> line 8:  INTEGER array, dimension (4)
00718 *>          Four integer values for the random number seed.
00719 *>
00720 *> lines 8-EOF:  Lines specifying matrix types, as for NEP.
00721 *>          The 3-character path name is 'SSB'.
00722 *>
00723 *>-----------------------------------------------------------------------
00724 *>
00725 *> SBB input file:
00726 *>
00727 *> line 2:  NN, INTEGER
00728 *>          Number of values of M and N.
00729 *>
00730 *> line 3:  MVAL, INTEGER array, dimension (NN)
00731 *>          The values for the matrix row dimension M.
00732 *>
00733 *> line 4:  NVAL, INTEGER array, dimension (NN)
00734 *>          The values for the matrix column dimension N.
00735 *>
00736 *> line 4:  NK, INTEGER
00737 *>          Number of values of K.
00738 *>
00739 *> line 5:  KVAL, INTEGER array, dimension (NK)
00740 *>          The values for the matrix bandwidth K.
00741 *>
00742 *> line 6:  NPARMS, INTEGER
00743 *>          Number of values of the parameter NRHS
00744 *>
00745 *> line 7:  NSVAL, INTEGER array, dimension (NPARMS)
00746 *>          The values for the number of right hand sides NRHS.
00747 *>
00748 *> line 8:  THRESH
00749 *>          Threshold value for the test ratios.  Information will be
00750 *>          printed about each test for which the test ratio is greater
00751 *>          than or equal to the threshold.
00752 *>
00753 *> line 9:  NEWSD, INTEGER
00754 *>          A code indicating how to set the random number seed.
00755 *>          = 0:  Set the seed to a default value before each run
00756 *>          = 1:  Initialize the seed to a default value only before the
00757 *>                first run
00758 *>          = 2:  Like 1, but use the seed values on the next line
00759 *>
00760 *> If line 9 was 2:
00761 *>
00762 *> line 10: INTEGER array, dimension (4)
00763 *>          Four integer values for the random number seed.
00764 *>
00765 *> lines 10-EOF:  Lines specifying matrix types, as for SVD.
00766 *>          The 3-character path name is 'SBB'.
00767 *>
00768 *>-----------------------------------------------------------------------
00769 *>
00770 *> SEC input file:
00771 *>
00772 *> line  2: THRESH, REAL
00773 *>          Threshold value for the test ratios.  Information will be
00774 *>          printed about each test for which the test ratio is greater
00775 *>          than or equal to the threshold.
00776 *>
00777 *> lines  3-EOF:
00778 *>
00779 *> Input for testing the eigencondition routines consists of a set of
00780 *> specially constructed test cases and their solutions.  The data
00781 *> format is not intended to be modified by the user.
00782 *>
00783 *>-----------------------------------------------------------------------
00784 *>
00785 *> SBL and SBK input files:
00786 *>
00787 *> line 1:  'SBL' in columns 1-3 to test SGEBAL, or 'SBK' in
00788 *>          columns 1-3 to test SGEBAK.
00789 *>
00790 *> The remaining lines consist of specially constructed test cases.
00791 *>
00792 *>-----------------------------------------------------------------------
00793 *>
00794 *> SGL and SGK input files:
00795 *>
00796 *> line 1:  'SGL' in columns 1-3 to test SGGBAL, or 'SGK' in
00797 *>          columns 1-3 to test SGGBAK.
00798 *>
00799 *> The remaining lines consist of specially constructed test cases.
00800 *>
00801 *>-----------------------------------------------------------------------
00802 *>
00803 *> GLM data file:
00804 *>
00805 *> line 1:  'GLM' in columns 1 to 3.
00806 *>
00807 *> line 2:  NN, INTEGER
00808 *>          Number of values of M, P, and N.
00809 *>
00810 *> line 3:  MVAL, INTEGER array, dimension(NN)
00811 *>          Values of M (row dimension).
00812 *>
00813 *> line 4:  PVAL, INTEGER array, dimension(NN)
00814 *>          Values of P (row dimension).
00815 *>
00816 *> line 5:  NVAL, INTEGER array, dimension(NN)
00817 *>          Values of N (column dimension), note M <= N <= M+P.
00818 *>
00819 *> line 6:  THRESH, REAL
00820 *>          Threshold value for the test ratios.  Information will be
00821 *>          printed about each test for which the test ratio is greater
00822 *>          than or equal to the threshold.
00823 *>
00824 *> line 7:  TSTERR, LOGICAL
00825 *>          Flag indicating whether or not to test the error exits for
00826 *>          the LAPACK routines and driver routines.
00827 *>
00828 *> line 8:  NEWSD, INTEGER
00829 *>          A code indicating how to set the random number seed.
00830 *>          = 0:  Set the seed to a default value before each run
00831 *>          = 1:  Initialize the seed to a default value only before the
00832 *>                first run
00833 *>          = 2:  Like 1, but use the seed values on the next line
00834 *>
00835 *> If line 8 was 2:
00836 *>
00837 *> line 9:  INTEGER array, dimension (4)
00838 *>          Four integer values for the random number seed.
00839 *>
00840 *> lines 9-EOF:  Lines specifying matrix types, as for NEP.
00841 *>          The 3-character path name is 'GLM' for the generalized
00842 *>          linear regression model routines.
00843 *>
00844 *>-----------------------------------------------------------------------
00845 *>
00846 *> GQR data file:
00847 *>
00848 *> line 1:  'GQR' in columns 1 to 3.
00849 *>
00850 *> line 2:  NN, INTEGER
00851 *>          Number of values of M, P, and N.
00852 *>
00853 *> line 3:  MVAL, INTEGER array, dimension(NN)
00854 *>          Values of M.
00855 *>
00856 *> line 4:  PVAL, INTEGER array, dimension(NN)
00857 *>          Values of P.
00858 *>
00859 *> line 5:  NVAL, INTEGER array, dimension(NN)
00860 *>          Values of N.
00861 *>
00862 *> line 6:  THRESH, REAL
00863 *>          Threshold value for the test ratios.  Information will be
00864 *>          printed about each test for which the test ratio is greater
00865 *>          than or equal to the threshold.
00866 *>
00867 *> line 7:  TSTERR, LOGICAL
00868 *>          Flag indicating whether or not to test the error exits for
00869 *>          the LAPACK routines and driver routines.
00870 *>
00871 *> line 8:  NEWSD, INTEGER
00872 *>          A code indicating how to set the random number seed.
00873 *>          = 0:  Set the seed to a default value before each run
00874 *>          = 1:  Initialize the seed to a default value only before the
00875 *>                first run
00876 *>          = 2:  Like 1, but use the seed values on the next line
00877 *>
00878 *> If line 8 was 2:
00879 *>
00880 *> line 9:  INTEGER array, dimension (4)
00881 *>          Four integer values for the random number seed.
00882 *>
00883 *> lines 9-EOF:  Lines specifying matrix types, as for NEP.
00884 *>          The 3-character path name is 'GQR' for the generalized
00885 *>          QR and RQ routines.
00886 *>
00887 *>-----------------------------------------------------------------------
00888 *>
00889 *> GSV data file:
00890 *>
00891 *> line 1:  'GSV' in columns 1 to 3.
00892 *>
00893 *> line 2:  NN, INTEGER
00894 *>          Number of values of M, P, and N.
00895 *>
00896 *> line 3:  MVAL, INTEGER array, dimension(NN)
00897 *>          Values of M (row dimension).
00898 *>
00899 *> line 4:  PVAL, INTEGER array, dimension(NN)
00900 *>          Values of P (row dimension).
00901 *>
00902 *> line 5:  NVAL, INTEGER array, dimension(NN)
00903 *>          Values of N (column dimension).
00904 *>
00905 *> line 6:  THRESH, REAL
00906 *>          Threshold value for the test ratios.  Information will be
00907 *>          printed about each test for which the test ratio is greater
00908 *>          than or equal to the threshold.
00909 *>
00910 *> line 7:  TSTERR, LOGICAL
00911 *>          Flag indicating whether or not to test the error exits for
00912 *>          the LAPACK routines and driver routines.
00913 *>
00914 *> line 8:  NEWSD, INTEGER
00915 *>          A code indicating how to set the random number seed.
00916 *>          = 0:  Set the seed to a default value before each run
00917 *>          = 1:  Initialize the seed to a default value only before the
00918 *>                first run
00919 *>          = 2:  Like 1, but use the seed values on the next line
00920 *>
00921 *> If line 8 was 2:
00922 *>
00923 *> line 9:  INTEGER array, dimension (4)
00924 *>          Four integer values for the random number seed.
00925 *>
00926 *> lines 9-EOF:  Lines specifying matrix types, as for NEP.
00927 *>          The 3-character path name is 'GSV' for the generalized
00928 *>          SVD routines.
00929 *>
00930 *>-----------------------------------------------------------------------
00931 *>
00932 *> CSD data file:
00933 *>
00934 *> line 1:  'CSD' in columns 1 to 3.
00935 *>
00936 *> line 2:  NM, INTEGER
00937 *>          Number of values of M, P, and N.
00938 *>
00939 *> line 3:  MVAL, INTEGER array, dimension(NM)
00940 *>          Values of M (row and column dimension of orthogonal matrix).
00941 *>
00942 *> line 4:  PVAL, INTEGER array, dimension(NM)
00943 *>          Values of P (row dimension of top-left block).
00944 *>
00945 *> line 5:  NVAL, INTEGER array, dimension(NM)
00946 *>          Values of N (column dimension of top-left block).
00947 *>
00948 *> line 6:  THRESH, REAL
00949 *>          Threshold value for the test ratios.  Information will be
00950 *>          printed about each test for which the test ratio is greater
00951 *>          than or equal to the threshold.
00952 *>
00953 *> line 7:  TSTERR, LOGICAL
00954 *>          Flag indicating whether or not to test the error exits for
00955 *>          the LAPACK routines and driver routines.
00956 *>
00957 *> line 8:  NEWSD, INTEGER
00958 *>          A code indicating how to set the random number seed.
00959 *>          = 0:  Set the seed to a default value before each run
00960 *>          = 1:  Initialize the seed to a default value only before the
00961 *>                first run
00962 *>          = 2:  Like 1, but use the seed values on the next line
00963 *>
00964 *> If line 8 was 2:
00965 *>
00966 *> line 9:  INTEGER array, dimension (4)
00967 *>          Four integer values for the random number seed.
00968 *>
00969 *> lines 9-EOF:  Lines specifying matrix types, as for NEP.
00970 *>          The 3-character path name is 'CSD' for the CSD routine.
00971 *>
00972 *>-----------------------------------------------------------------------
00973 *>
00974 *> LSE data file:
00975 *>
00976 *> line 1:  'LSE' in columns 1 to 3.
00977 *>
00978 *> line 2:  NN, INTEGER
00979 *>          Number of values of M, P, and N.
00980 *>
00981 *> line 3:  MVAL, INTEGER array, dimension(NN)
00982 *>          Values of M.
00983 *>
00984 *> line 4:  PVAL, INTEGER array, dimension(NN)
00985 *>          Values of P.
00986 *>
00987 *> line 5:  NVAL, INTEGER array, dimension(NN)
00988 *>          Values of N, note P <= N <= P+M.
00989 *>
00990 *> line 6:  THRESH, REAL
00991 *>          Threshold value for the test ratios.  Information will be
00992 *>          printed about each test for which the test ratio is greater
00993 *>          than or equal to the threshold.
00994 *>
00995 *> line 7:  TSTERR, LOGICAL
00996 *>          Flag indicating whether or not to test the error exits for
00997 *>          the LAPACK routines and driver routines.
00998 *>
00999 *> line 8:  NEWSD, INTEGER
01000 *>          A code indicating how to set the random number seed.
01001 *>          = 0:  Set the seed to a default value before each run
01002 *>          = 1:  Initialize the seed to a default value only before the
01003 *>                first run
01004 *>          = 2:  Like 1, but use the seed values on the next line
01005 *>
01006 *> If line 8 was 2:
01007 *>
01008 *> line 9:  INTEGER array, dimension (4)
01009 *>          Four integer values for the random number seed.
01010 *>
01011 *> lines 9-EOF:  Lines specifying matrix types, as for NEP.
01012 *>          The 3-character path name is 'GSV' for the generalized
01013 *>          SVD routines.
01014 *>
01015 *>-----------------------------------------------------------------------
01016 *>
01017 *> NMAX is currently set to 132 and must be at least 12 for some of the
01018 *> precomputed examples, and LWORK = NMAX*(5*NMAX+5)+1 in the parameter
01019 *> statements below.  For SVD, we assume NRHS may be as big as N.  The
01020 *> parameter NEED is set to 14 to allow for 14 N-by-N matrices for SGG.
01021 *> \endverbatim
01022 *
01023 *  Arguments:
01024 *  ==========
01025 *
01026 *
01027 *  Authors:
01028 *  ========
01029 *
01030 *> \author Univ. of Tennessee 
01031 *> \author Univ. of California Berkeley 
01032 *> \author Univ. of Colorado Denver 
01033 *> \author NAG Ltd. 
01034 *
01035 *> \date November 2011
01036 *
01037 *> \ingroup single_eig
01038 *
01039 *  =====================================================================      PROGRAM SCHKEE
01040 *
01041 *  -- LAPACK test routine (version 3.4.0) --
01042 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
01043 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
01044 *     November 2011
01045 *
01046 *  =====================================================================
01047 *
01048 *     .. Parameters ..
01049       INTEGER            NMAX
01050       PARAMETER          ( NMAX = 132 )
01051       INTEGER            NCMAX
01052       PARAMETER          ( NCMAX = 20 )
01053       INTEGER            NEED
01054       PARAMETER          ( NEED = 14 )
01055       INTEGER            LWORK
01056       PARAMETER          ( LWORK = NMAX*( 5*NMAX+5 )+1 )
01057       INTEGER            LIWORK
01058       PARAMETER          ( LIWORK = NMAX*( 5*NMAX+20 ) )
01059       INTEGER            MAXIN
01060       PARAMETER          ( MAXIN = 20 )
01061       INTEGER            MAXT
01062       PARAMETER          ( MAXT = 30 )
01063       INTEGER            NIN, NOUT
01064       PARAMETER          ( NIN = 5, NOUT = 6 )
01065 *     ..
01066 *     .. Local Scalars ..
01067       LOGICAL            CSD, FATAL, GLM, GQR, GSV, LSE, NEP, SBB, SBK,
01068      $                   SBL, SEP, SES, SEV, SGG, SGK, SGL, SGS, SGV,
01069      $                   SGX, SSB, SSX, SVD, SVX, SXV, TSTCHK, TSTDIF,
01070      $                   TSTDRV, TSTERR
01071       CHARACTER          C1
01072       CHARACTER*3        C3, PATH
01073       CHARACTER*32       VNAME
01074       CHARACTER*10       INTSTR
01075       CHARACTER*80       LINE
01076       INTEGER            I, I1, IC, INFO, ITMP, K, LENP, MAXTYP, NEWSD,
01077      $                   NK, NN, NPARMS, NRHS, NTYPES,
01078      $                   VERS_MAJOR, VERS_MINOR, VERS_PATCH
01079       REAL               EPS, S1, S2, THRESH, THRSHN
01080 *     ..
01081 *     .. Local Arrays ..
01082       LOGICAL            DOTYPE( MAXT ), LOGWRK( NMAX )
01083       INTEGER            IOLDSD( 4 ), ISEED( 4 ), IWORK( LIWORK ),
01084      $                   KVAL( MAXIN ), MVAL( MAXIN ), MXBVAL( MAXIN ),
01085      $                   NBCOL( MAXIN ), NBMIN( MAXIN ), NBVAL( MAXIN ),
01086      $                   NSVAL( MAXIN ), NVAL( MAXIN ), NXVAL( MAXIN ),
01087      $                   PVAL( MAXIN )
01088       INTEGER            INMIN( MAXIN ), INWIN( MAXIN ), INIBL( MAXIN ),
01089      $                   ISHFTS( MAXIN ), IACC22( MAXIN )
01090       REAL               A( NMAX*NMAX, NEED ), B( NMAX*NMAX, 5 ),
01091      $                   C( NCMAX*NCMAX, NCMAX*NCMAX ), D( NMAX, 12 ),
01092      $                   RESULT( 500 ), TAUA( NMAX ), TAUB( NMAX ),
01093      $                   WORK( LWORK ), X( 5*NMAX )
01094 *     ..
01095 *     .. External Functions ..
01096       LOGICAL            LSAMEN
01097       REAL               SECOND, SLAMCH
01098       EXTERNAL           LSAMEN, SECOND, SLAMCH
01099 *     ..
01100 *     .. External Subroutines ..
01101       EXTERNAL           ALAREQ, SCHKBB, SCHKBD, SCHKBK, SCHKBL, SCHKEC,
01102      $                   SCHKGG, SCHKGK, SCHKGL, SCHKHS, SCHKSB, SCHKST,
01103      $                   SCKCSD, SCKGLM, SCKGQR, SCKGSV, SCKLSE, SDRGES,
01104      $                   SDRGEV, SDRGSX, SDRGVX, SDRVBD, SDRVES, SDRVEV,
01105      $                   SDRVGG, SDRVSG, SDRVST, SDRVSX, SDRVVX, SERRBD,
01106      $                   SERRED, SERRGG, SERRHS, SERRST, ILAVER, XLAENV
01107 *     ..
01108 *     .. Intrinsic Functions ..
01109       INTRINSIC          LEN, MIN
01110 *     ..
01111 *     .. Scalars in Common ..
01112       LOGICAL            LERR, OK
01113       CHARACTER*32       SRNAMT
01114       INTEGER            INFOT, MAXB, NPROC, NSHIFT, NUNIT, SELDIM,
01115      $                   SELOPT
01116 *     ..
01117 *     .. Arrays in Common ..
01118       LOGICAL            SELVAL( 20 )
01119       INTEGER            IPARMS( 100 )
01120       REAL               SELWI( 20 ), SELWR( 20 )
01121 *     ..
01122 *     .. Common blocks ..
01123       COMMON             / CENVIR / NPROC, NSHIFT, MAXB
01124       COMMON             / CLAENV / IPARMS
01125       COMMON             / INFOC / INFOT, NUNIT, OK, LERR
01126       COMMON             / SRNAMC / SRNAMT
01127       COMMON             / SSLCT / SELOPT, SELDIM, SELVAL, SELWR, SELWI
01128 *     ..
01129 *     .. Data statements ..
01130       DATA               INTSTR / '0123456789' /
01131       DATA               IOLDSD / 0, 0, 0, 1 /
01132 *     ..
01133 *     .. Executable Statements ..
01134 *
01135       S1 = SECOND( )
01136       FATAL = .FALSE.
01137       NUNIT = NOUT
01138 *
01139 *     Return to here to read multiple sets of data
01140 *
01141    10 CONTINUE
01142 *
01143 *     Read the first line and set the 3-character test path
01144 *
01145       READ( NIN, FMT = '(A80)', END = 380 )LINE
01146       PATH = LINE( 1: 3 )
01147       NEP = LSAMEN( 3, PATH, 'NEP' ) .OR. LSAMEN( 3, PATH, 'SHS' )
01148       SEP = LSAMEN( 3, PATH, 'SEP' ) .OR. LSAMEN( 3, PATH, 'SST' ) .OR.
01149      $      LSAMEN( 3, PATH, 'SSG' )
01150       SVD = LSAMEN( 3, PATH, 'SVD' ) .OR. LSAMEN( 3, PATH, 'SBD' )
01151       SEV = LSAMEN( 3, PATH, 'SEV' )
01152       SES = LSAMEN( 3, PATH, 'SES' )
01153       SVX = LSAMEN( 3, PATH, 'SVX' )
01154       SSX = LSAMEN( 3, PATH, 'SSX' )
01155       SGG = LSAMEN( 3, PATH, 'SGG' )
01156       SGS = LSAMEN( 3, PATH, 'SGS' )
01157       SGX = LSAMEN( 3, PATH, 'SGX' )
01158       SGV = LSAMEN( 3, PATH, 'SGV' )
01159       SXV = LSAMEN( 3, PATH, 'SXV' )
01160       SSB = LSAMEN( 3, PATH, 'SSB' )
01161       SBB = LSAMEN( 3, PATH, 'SBB' )
01162       GLM = LSAMEN( 3, PATH, 'GLM' )
01163       GQR = LSAMEN( 3, PATH, 'GQR' ) .OR. LSAMEN( 3, PATH, 'GRQ' )
01164       GSV = LSAMEN( 3, PATH, 'GSV' )
01165       CSD = LSAMEN( 3, PATH, 'CSD' )
01166       LSE = LSAMEN( 3, PATH, 'LSE' )
01167       SBL = LSAMEN( 3, PATH, 'SBL' )
01168       SBK = LSAMEN( 3, PATH, 'SBK' )
01169       SGL = LSAMEN( 3, PATH, 'SGL' )
01170       SGK = LSAMEN( 3, PATH, 'SGK' )
01171 *
01172 *     Report values of parameters.
01173 *
01174       IF( PATH.EQ.'   ' ) THEN
01175          GO TO 10
01176       ELSE IF( NEP ) THEN
01177          WRITE( NOUT, FMT = 9987 )
01178       ELSE IF( SEP ) THEN
01179          WRITE( NOUT, FMT = 9986 )
01180       ELSE IF( SVD ) THEN
01181          WRITE( NOUT, FMT = 9985 )
01182       ELSE IF( SEV ) THEN
01183          WRITE( NOUT, FMT = 9979 )
01184       ELSE IF( SES ) THEN
01185          WRITE( NOUT, FMT = 9978 )
01186       ELSE IF( SVX ) THEN
01187          WRITE( NOUT, FMT = 9977 )
01188       ELSE IF( SSX ) THEN
01189          WRITE( NOUT, FMT = 9976 )
01190       ELSE IF( SGG ) THEN
01191          WRITE( NOUT, FMT = 9975 )
01192       ELSE IF( SGS ) THEN
01193          WRITE( NOUT, FMT = 9964 )
01194       ELSE IF( SGX ) THEN
01195          WRITE( NOUT, FMT = 9965 )
01196       ELSE IF( SGV ) THEN
01197          WRITE( NOUT, FMT = 9963 )
01198       ELSE IF( SXV ) THEN
01199          WRITE( NOUT, FMT = 9962 )
01200       ELSE IF( SSB ) THEN
01201          WRITE( NOUT, FMT = 9974 )
01202       ELSE IF( SBB ) THEN
01203          WRITE( NOUT, FMT = 9967 )
01204       ELSE IF( GLM ) THEN
01205          WRITE( NOUT, FMT = 9971 )
01206       ELSE IF( GQR ) THEN
01207          WRITE( NOUT, FMT = 9970 )
01208       ELSE IF( GSV ) THEN
01209          WRITE( NOUT, FMT = 9969 )
01210       ELSE IF( CSD ) THEN
01211          WRITE( NOUT, FMT = 9960 )
01212       ELSE IF( LSE ) THEN
01213          WRITE( NOUT, FMT = 9968 )
01214       ELSE IF( SBL ) THEN
01215 *
01216 *        SGEBAL:  Balancing
01217 *
01218          CALL SCHKBL( NIN, NOUT )
01219          GO TO 10
01220       ELSE IF( SBK ) THEN
01221 *
01222 *        SGEBAK:  Back transformation
01223 *
01224          CALL SCHKBK( NIN, NOUT )
01225          GO TO 10
01226       ELSE IF( SGL ) THEN
01227 *
01228 *        SGGBAL:  Balancing
01229 *
01230          CALL SCHKGL( NIN, NOUT )
01231          GO TO 10
01232       ELSE IF( SGK ) THEN
01233 *
01234 *        SGGBAK:  Back transformation
01235 *
01236          CALL SCHKGK( NIN, NOUT )
01237          GO TO 10
01238       ELSE IF( LSAMEN( 3, PATH, 'SEC' ) ) THEN
01239 *
01240 *        SEC:  Eigencondition estimation
01241 *
01242          READ( NIN, FMT = * )THRESH
01243          CALL XLAENV( 1, 1 )
01244          CALL XLAENV( 12, 11 )
01245          CALL XLAENV( 13, 2 )
01246          CALL XLAENV( 14, 0 )
01247          CALL XLAENV( 15, 2 )
01248          CALL XLAENV( 16, 2 )
01249          TSTERR = .TRUE.
01250          CALL SCHKEC( THRESH, TSTERR, NIN, NOUT )
01251          GO TO 10
01252       ELSE
01253          WRITE( NOUT, FMT = 9992 )PATH
01254          GO TO 10
01255       END IF
01256       CALL ILAVER( VERS_MAJOR, VERS_MINOR, VERS_PATCH )
01257       WRITE( NOUT, FMT = 9972 ) VERS_MAJOR, VERS_MINOR, VERS_PATCH
01258       WRITE( NOUT, FMT = 9984 )
01259 *
01260 *     Read the number of values of M, P, and N.
01261 *
01262       READ( NIN, FMT = * )NN
01263       IF( NN.LT.0 ) THEN
01264          WRITE( NOUT, FMT = 9989 )'   NN ', NN, 1
01265          NN = 0
01266          FATAL = .TRUE.
01267       ELSE IF( NN.GT.MAXIN ) THEN
01268          WRITE( NOUT, FMT = 9988 )'   NN ', NN, MAXIN
01269          NN = 0
01270          FATAL = .TRUE.
01271       END IF
01272 *
01273 *     Read the values of M
01274 *
01275       IF( .NOT.( SGX .OR. SXV ) ) THEN
01276          READ( NIN, FMT = * )( MVAL( I ), I = 1, NN )
01277          IF( SVD ) THEN
01278             VNAME = '    M '
01279          ELSE
01280             VNAME = '    N '
01281          END IF
01282          DO 20 I = 1, NN
01283             IF( MVAL( I ).LT.0 ) THEN
01284                WRITE( NOUT, FMT = 9989 )VNAME, MVAL( I ), 0
01285                FATAL = .TRUE.
01286             ELSE IF( MVAL( I ).GT.NMAX ) THEN
01287                WRITE( NOUT, FMT = 9988 )VNAME, MVAL( I ), NMAX
01288                FATAL = .TRUE.
01289             END IF
01290    20    CONTINUE
01291          WRITE( NOUT, FMT = 9983 )'M:    ', ( MVAL( I ), I = 1, NN )
01292       END IF
01293 *
01294 *     Read the values of P
01295 *
01296       IF( GLM .OR. GQR .OR. GSV .OR. CSD .OR. LSE ) THEN
01297          READ( NIN, FMT = * )( PVAL( I ), I = 1, NN )
01298          DO 30 I = 1, NN
01299             IF( PVAL( I ).LT.0 ) THEN
01300                WRITE( NOUT, FMT = 9989 )' P  ', PVAL( I ), 0
01301                FATAL = .TRUE.
01302             ELSE IF( PVAL( I ).GT.NMAX ) THEN
01303                WRITE( NOUT, FMT = 9988 )' P  ', PVAL( I ), NMAX
01304                FATAL = .TRUE.
01305             END IF
01306    30    CONTINUE
01307          WRITE( NOUT, FMT = 9983 )'P:    ', ( PVAL( I ), I = 1, NN )
01308       END IF
01309 *
01310 *     Read the values of N
01311 *
01312       IF( SVD .OR. SBB .OR. GLM .OR. GQR .OR. GSV .OR. CSD .OR.
01313      $    LSE ) THEN
01314          READ( NIN, FMT = * )( NVAL( I ), I = 1, NN )
01315          DO 40 I = 1, NN
01316             IF( NVAL( I ).LT.0 ) THEN
01317                WRITE( NOUT, FMT = 9989 )'    N ', NVAL( I ), 0
01318                FATAL = .TRUE.
01319             ELSE IF( NVAL( I ).GT.NMAX ) THEN
01320                WRITE( NOUT, FMT = 9988 )'    N ', NVAL( I ), NMAX
01321                FATAL = .TRUE.
01322             END IF
01323    40    CONTINUE
01324       ELSE
01325          DO 50 I = 1, NN
01326             NVAL( I ) = MVAL( I )
01327    50    CONTINUE
01328       END IF
01329       IF( .NOT.( SGX .OR. SXV ) ) THEN
01330          WRITE( NOUT, FMT = 9983 )'N:    ', ( NVAL( I ), I = 1, NN )
01331       ELSE
01332          WRITE( NOUT, FMT = 9983 )'N:    ', NN
01333       END IF
01334 *
01335 *     Read the number of values of K, followed by the values of K
01336 *
01337       IF( SSB .OR. SBB ) THEN
01338          READ( NIN, FMT = * )NK
01339          READ( NIN, FMT = * )( KVAL( I ), I = 1, NK )
01340          DO 60 I = 1, NK
01341             IF( KVAL( I ).LT.0 ) THEN
01342                WRITE( NOUT, FMT = 9989 )'    K ', KVAL( I ), 0
01343                FATAL = .TRUE.
01344             ELSE IF( KVAL( I ).GT.NMAX ) THEN
01345                WRITE( NOUT, FMT = 9988 )'    K ', KVAL( I ), NMAX
01346                FATAL = .TRUE.
01347             END IF
01348    60    CONTINUE
01349          WRITE( NOUT, FMT = 9983 )'K:    ', ( KVAL( I ), I = 1, NK )
01350       END IF
01351 *
01352       IF( SEV .OR. SES .OR. SVX .OR. SSX ) THEN
01353 *
01354 *        For the nonsymmetric QR driver routines, only one set of
01355 *        parameters is allowed.
01356 *
01357          READ( NIN, FMT = * )NBVAL( 1 ), NBMIN( 1 ), NXVAL( 1 ),
01358      $      INMIN( 1 ), INWIN( 1 ), INIBL(1), ISHFTS(1), IACC22(1)
01359          IF( NBVAL( 1 ).LT.1 ) THEN
01360             WRITE( NOUT, FMT = 9989 )'   NB ', NBVAL( 1 ), 1
01361             FATAL = .TRUE.
01362          ELSE IF( NBMIN( 1 ).LT.1 ) THEN
01363             WRITE( NOUT, FMT = 9989 )'NBMIN ', NBMIN( 1 ), 1
01364             FATAL = .TRUE.
01365          ELSE IF( NXVAL( 1 ).LT.1 ) THEN
01366             WRITE( NOUT, FMT = 9989 )'   NX ', NXVAL( 1 ), 1
01367             FATAL = .TRUE.
01368          ELSE IF( INMIN( 1 ).LT.1 ) THEN
01369             WRITE( NOUT, FMT = 9989 )'   INMIN ', INMIN( 1 ), 1
01370             FATAL = .TRUE.
01371          ELSE IF( INWIN( 1 ).LT.1 ) THEN
01372             WRITE( NOUT, FMT = 9989 )'   INWIN ', INWIN( 1 ), 1
01373             FATAL = .TRUE.
01374          ELSE IF( INIBL( 1 ).LT.1 ) THEN
01375             WRITE( NOUT, FMT = 9989 )'   INIBL ', INIBL( 1 ), 1
01376             FATAL = .TRUE.
01377          ELSE IF( ISHFTS( 1 ).LT.1 ) THEN
01378             WRITE( NOUT, FMT = 9989 )'   ISHFTS ', ISHFTS( 1 ), 1
01379             FATAL = .TRUE.
01380          ELSE IF( IACC22( 1 ).LT.0 ) THEN
01381             WRITE( NOUT, FMT = 9989 )'   IACC22 ', IACC22( 1 ), 0
01382             FATAL = .TRUE.
01383          END IF
01384          CALL XLAENV( 1, NBVAL( 1 ) )
01385          CALL XLAENV( 2, NBMIN( 1 ) )
01386          CALL XLAENV( 3, NXVAL( 1 ) )
01387          CALL XLAENV(12, MAX( 11, INMIN( 1 ) ) )
01388          CALL XLAENV(13, INWIN( 1 ) )
01389          CALL XLAENV(14, INIBL( 1 ) )
01390          CALL XLAENV(15, ISHFTS( 1 ) )
01391          CALL XLAENV(16, IACC22( 1 ) )
01392          WRITE( NOUT, FMT = 9983 )'NB:   ', NBVAL( 1 )
01393          WRITE( NOUT, FMT = 9983 )'NBMIN:', NBMIN( 1 )
01394          WRITE( NOUT, FMT = 9983 )'NX:   ', NXVAL( 1 )
01395          WRITE( NOUT, FMT = 9983 )'INMIN:   ', INMIN( 1 )
01396          WRITE( NOUT, FMT = 9983 )'INWIN: ', INWIN( 1 )
01397          WRITE( NOUT, FMT = 9983 )'INIBL: ', INIBL( 1 )
01398          WRITE( NOUT, FMT = 9983 )'ISHFTS: ', ISHFTS( 1 )
01399          WRITE( NOUT, FMT = 9983 )'IACC22: ', IACC22( 1 )
01400 *
01401       ELSE IF( SGS .OR. SGX .OR. SGV .OR. SXV ) THEN
01402 *
01403 *        For the nonsymmetric generalized driver routines, only one set
01404 *        of parameters is allowed.
01405 *
01406          READ( NIN, FMT = * )NBVAL( 1 ), NBMIN( 1 ), NXVAL( 1 ),
01407      $      NSVAL( 1 ), MXBVAL( 1 )
01408          IF( NBVAL( 1 ).LT.1 ) THEN
01409             WRITE( NOUT, FMT = 9989 )'   NB ', NBVAL( 1 ), 1
01410             FATAL = .TRUE.
01411          ELSE IF( NBMIN( 1 ).LT.1 ) THEN
01412             WRITE( NOUT, FMT = 9989 )'NBMIN ', NBMIN( 1 ), 1
01413             FATAL = .TRUE.
01414          ELSE IF( NXVAL( 1 ).LT.1 ) THEN
01415             WRITE( NOUT, FMT = 9989 )'   NX ', NXVAL( 1 ), 1
01416             FATAL = .TRUE.
01417          ELSE IF( NSVAL( 1 ).LT.2 ) THEN
01418             WRITE( NOUT, FMT = 9989 )'   NS ', NSVAL( 1 ), 2
01419             FATAL = .TRUE.
01420          ELSE IF( MXBVAL( 1 ).LT.1 ) THEN
01421             WRITE( NOUT, FMT = 9989 )' MAXB ', MXBVAL( 1 ), 1
01422             FATAL = .TRUE.
01423          END IF
01424          CALL XLAENV( 1, NBVAL( 1 ) )
01425          CALL XLAENV( 2, NBMIN( 1 ) )
01426          CALL XLAENV( 3, NXVAL( 1 ) )
01427          CALL XLAENV( 4, NSVAL( 1 ) )
01428          CALL XLAENV( 8, MXBVAL( 1 ) )
01429          WRITE( NOUT, FMT = 9983 )'NB:   ', NBVAL( 1 )
01430          WRITE( NOUT, FMT = 9983 )'NBMIN:', NBMIN( 1 )
01431          WRITE( NOUT, FMT = 9983 )'NX:   ', NXVAL( 1 )
01432          WRITE( NOUT, FMT = 9983 )'NS:   ', NSVAL( 1 )
01433          WRITE( NOUT, FMT = 9983 )'MAXB: ', MXBVAL( 1 )
01434 *
01435       ELSE IF( .NOT.SSB .AND. .NOT.GLM .AND. .NOT.GQR .AND. .NOT.
01436      $         GSV .AND. .NOT.CSD .AND. .NOT.LSE ) THEN
01437 *
01438 *        For the other paths, the number of parameters can be varied
01439 *        from the input file.  Read the number of parameter values.
01440 *
01441          READ( NIN, FMT = * )NPARMS
01442          IF( NPARMS.LT.1 ) THEN
01443             WRITE( NOUT, FMT = 9989 )'NPARMS', NPARMS, 1
01444             NPARMS = 0
01445             FATAL = .TRUE.
01446          ELSE IF( NPARMS.GT.MAXIN ) THEN
01447             WRITE( NOUT, FMT = 9988 )'NPARMS', NPARMS, MAXIN
01448             NPARMS = 0
01449             FATAL = .TRUE.
01450          END IF
01451 *
01452 *        Read the values of NB
01453 *
01454          IF( .NOT.SBB ) THEN
01455             READ( NIN, FMT = * )( NBVAL( I ), I = 1, NPARMS )
01456             DO 70 I = 1, NPARMS
01457                IF( NBVAL( I ).LT.0 ) THEN
01458                   WRITE( NOUT, FMT = 9989 )'   NB ', NBVAL( I ), 0
01459                   FATAL = .TRUE.
01460                ELSE IF( NBVAL( I ).GT.NMAX ) THEN
01461                   WRITE( NOUT, FMT = 9988 )'   NB ', NBVAL( I ), NMAX
01462                   FATAL = .TRUE.
01463                END IF
01464    70       CONTINUE
01465             WRITE( NOUT, FMT = 9983 )'NB:   ',
01466      $         ( NBVAL( I ), I = 1, NPARMS )
01467          END IF
01468 *
01469 *        Read the values of NBMIN
01470 *
01471          IF( NEP .OR. SEP .OR. SVD .OR. SGG ) THEN
01472             READ( NIN, FMT = * )( NBMIN( I ), I = 1, NPARMS )
01473             DO 80 I = 1, NPARMS
01474                IF( NBMIN( I ).LT.0 ) THEN
01475                   WRITE( NOUT, FMT = 9989 )'NBMIN ', NBMIN( I ), 0
01476                   FATAL = .TRUE.
01477                ELSE IF( NBMIN( I ).GT.NMAX ) THEN
01478                   WRITE( NOUT, FMT = 9988 )'NBMIN ', NBMIN( I ), NMAX
01479                   FATAL = .TRUE.
01480                END IF
01481    80       CONTINUE
01482             WRITE( NOUT, FMT = 9983 )'NBMIN:',
01483      $         ( NBMIN( I ), I = 1, NPARMS )
01484          ELSE
01485             DO 90 I = 1, NPARMS
01486                NBMIN( I ) = 1
01487    90       CONTINUE
01488          END IF
01489 *
01490 *        Read the values of NX
01491 *
01492          IF( NEP .OR. SEP .OR. SVD ) THEN
01493             READ( NIN, FMT = * )( NXVAL( I ), I = 1, NPARMS )
01494             DO 100 I = 1, NPARMS
01495                IF( NXVAL( I ).LT.0 ) THEN
01496                   WRITE( NOUT, FMT = 9989 )'   NX ', NXVAL( I ), 0
01497                   FATAL = .TRUE.
01498                ELSE IF( NXVAL( I ).GT.NMAX ) THEN
01499                   WRITE( NOUT, FMT = 9988 )'   NX ', NXVAL( I ), NMAX
01500                   FATAL = .TRUE.
01501                END IF
01502   100       CONTINUE
01503             WRITE( NOUT, FMT = 9983 )'NX:   ',
01504      $         ( NXVAL( I ), I = 1, NPARMS )
01505          ELSE
01506             DO 110 I = 1, NPARMS
01507                NXVAL( I ) = 1
01508   110       CONTINUE
01509          END IF
01510 *
01511 *        Read the values of NSHIFT (if SGG) or NRHS (if SVD
01512 *        or SBB).
01513 *
01514          IF( SVD .OR. SBB .OR. SGG ) THEN
01515             READ( NIN, FMT = * )( NSVAL( I ), I = 1, NPARMS )
01516             DO 120 I = 1, NPARMS
01517                IF( NSVAL( I ).LT.0 ) THEN
01518                   WRITE( NOUT, FMT = 9989 )'   NS ', NSVAL( I ), 0
01519                   FATAL = .TRUE.
01520                ELSE IF( NSVAL( I ).GT.NMAX ) THEN
01521                   WRITE( NOUT, FMT = 9988 )'   NS ', NSVAL( I ), NMAX
01522                   FATAL = .TRUE.
01523                END IF
01524   120       CONTINUE
01525             WRITE( NOUT, FMT = 9983 )'NS:   ',
01526      $         ( NSVAL( I ), I = 1, NPARMS )
01527          ELSE
01528             DO 130 I = 1, NPARMS
01529                NSVAL( I ) = 1
01530   130       CONTINUE
01531          END IF
01532 *
01533 *        Read the values for MAXB.
01534 *
01535          IF( SGG ) THEN
01536             READ( NIN, FMT = * )( MXBVAL( I ), I = 1, NPARMS )
01537             DO 140 I = 1, NPARMS
01538                IF( MXBVAL( I ).LT.0 ) THEN
01539                   WRITE( NOUT, FMT = 9989 )' MAXB ', MXBVAL( I ), 0
01540                   FATAL = .TRUE.
01541                ELSE IF( MXBVAL( I ).GT.NMAX ) THEN
01542                   WRITE( NOUT, FMT = 9988 )' MAXB ', MXBVAL( I ), NMAX
01543                   FATAL = .TRUE.
01544                END IF
01545   140       CONTINUE
01546             WRITE( NOUT, FMT = 9983 )'MAXB: ',
01547      $         ( MXBVAL( I ), I = 1, NPARMS )
01548          ELSE
01549             DO 150 I = 1, NPARMS
01550                MXBVAL( I ) = 1
01551   150       CONTINUE
01552          END IF
01553 *
01554 *        Read the values for INMIN.
01555 *
01556          IF( NEP ) THEN
01557             READ( NIN, FMT = * )( INMIN( I ), I = 1, NPARMS )
01558             DO 540 I = 1, NPARMS
01559                IF( INMIN( I ).LT.0 ) THEN
01560                   WRITE( NOUT, FMT = 9989 )' INMIN ', INMIN( I ), 0
01561                   FATAL = .TRUE.
01562                END IF
01563   540       CONTINUE
01564             WRITE( NOUT, FMT = 9983 )'INMIN: ',
01565      $         ( INMIN( I ), I = 1, NPARMS )
01566          ELSE
01567             DO 550 I = 1, NPARMS
01568                INMIN( I ) = 1
01569   550       CONTINUE
01570          END IF
01571 *
01572 *        Read the values for INWIN.
01573 *
01574          IF( NEP ) THEN
01575             READ( NIN, FMT = * )( INWIN( I ), I = 1, NPARMS )
01576             DO 560 I = 1, NPARMS
01577                IF( INWIN( I ).LT.0 ) THEN
01578                   WRITE( NOUT, FMT = 9989 )' INWIN ', INWIN( I ), 0
01579                   FATAL = .TRUE.
01580                END IF
01581   560       CONTINUE
01582             WRITE( NOUT, FMT = 9983 )'INWIN: ',
01583      $         ( INWIN( I ), I = 1, NPARMS )
01584          ELSE
01585             DO 570 I = 1, NPARMS
01586                INWIN( I ) = 1
01587   570       CONTINUE
01588          END IF
01589 *
01590 *        Read the values for INIBL.
01591 *
01592          IF( NEP ) THEN
01593             READ( NIN, FMT = * )( INIBL( I ), I = 1, NPARMS )
01594             DO 580 I = 1, NPARMS
01595                IF( INIBL( I ).LT.0 ) THEN
01596                   WRITE( NOUT, FMT = 9989 )' INIBL ', INIBL( I ), 0
01597                   FATAL = .TRUE.
01598                END IF
01599   580       CONTINUE
01600             WRITE( NOUT, FMT = 9983 )'INIBL: ',
01601      $         ( INIBL( I ), I = 1, NPARMS )
01602          ELSE
01603             DO 590 I = 1, NPARMS
01604                INIBL( I ) = 1
01605   590       CONTINUE
01606          END IF
01607 *
01608 *        Read the values for ISHFTS.
01609 *
01610          IF( NEP ) THEN
01611             READ( NIN, FMT = * )( ISHFTS( I ), I = 1, NPARMS )
01612             DO 600 I = 1, NPARMS
01613                IF( ISHFTS( I ).LT.0 ) THEN
01614                   WRITE( NOUT, FMT = 9989 )' ISHFTS ', ISHFTS( I ), 0
01615                   FATAL = .TRUE.
01616                END IF
01617   600       CONTINUE
01618             WRITE( NOUT, FMT = 9983 )'ISHFTS: ',
01619      $         ( ISHFTS( I ), I = 1, NPARMS )
01620          ELSE
01621             DO 610 I = 1, NPARMS
01622                ISHFTS( I ) = 1
01623   610       CONTINUE
01624          END IF
01625 *
01626 *        Read the values for IACC22.
01627 *
01628          IF( NEP ) THEN
01629             READ( NIN, FMT = * )( IACC22( I ), I = 1, NPARMS )
01630             DO 620 I = 1, NPARMS
01631                IF( IACC22( I ).LT.0 ) THEN
01632                   WRITE( NOUT, FMT = 9989 )' IACC22 ', IACC22( I ), 0
01633                   FATAL = .TRUE.
01634                END IF
01635   620       CONTINUE
01636             WRITE( NOUT, FMT = 9983 )'IACC22: ',
01637      $         ( IACC22( I ), I = 1, NPARMS )
01638          ELSE
01639             DO 630 I = 1, NPARMS
01640                IACC22( I ) = 1
01641   630       CONTINUE
01642          END IF
01643 *
01644 *        Read the values for NBCOL.
01645 *
01646          IF( SGG ) THEN
01647             READ( NIN, FMT = * )( NBCOL( I ), I = 1, NPARMS )
01648             DO 160 I = 1, NPARMS
01649                IF( NBCOL( I ).LT.0 ) THEN
01650                   WRITE( NOUT, FMT = 9989 )'NBCOL ', NBCOL( I ), 0
01651                   FATAL = .TRUE.
01652                ELSE IF( NBCOL( I ).GT.NMAX ) THEN
01653                   WRITE( NOUT, FMT = 9988 )'NBCOL ', NBCOL( I ), NMAX
01654                   FATAL = .TRUE.
01655                END IF
01656   160       CONTINUE
01657             WRITE( NOUT, FMT = 9983 )'NBCOL:',
01658      $         ( NBCOL( I ), I = 1, NPARMS )
01659          ELSE
01660             DO 170 I = 1, NPARMS
01661                NBCOL( I ) = 1
01662   170       CONTINUE
01663          END IF
01664       END IF
01665 *
01666 *     Calculate and print the machine dependent constants.
01667 *
01668       WRITE( NOUT, FMT = * )
01669       EPS = SLAMCH( 'Underflow threshold' )
01670       WRITE( NOUT, FMT = 9981 )'underflow', EPS
01671       EPS = SLAMCH( 'Overflow threshold' )
01672       WRITE( NOUT, FMT = 9981 )'overflow ', EPS
01673       EPS = SLAMCH( 'Epsilon' )
01674       WRITE( NOUT, FMT = 9981 )'precision', EPS
01675 *
01676 *     Read the threshold value for the test ratios.
01677 *
01678       READ( NIN, FMT = * )THRESH
01679       WRITE( NOUT, FMT = 9982 )THRESH
01680       IF( SEP .OR. SVD .OR. SGG ) THEN
01681 *
01682 *        Read the flag that indicates whether to test LAPACK routines.
01683 *
01684          READ( NIN, FMT = * )TSTCHK
01685 *
01686 *        Read the flag that indicates whether to test driver routines.
01687 *
01688          READ( NIN, FMT = * )TSTDRV
01689       END IF
01690 *
01691 *     Read the flag that indicates whether to test the error exits.
01692 *
01693       READ( NIN, FMT = * )TSTERR
01694 *
01695 *     Read the code describing how to set the random number seed.
01696 *
01697       READ( NIN, FMT = * )NEWSD
01698 *
01699 *     If NEWSD = 2, read another line with 4 integers for the seed.
01700 *
01701       IF( NEWSD.EQ.2 )
01702      $   READ( NIN, FMT = * )( IOLDSD( I ), I = 1, 4 )
01703 *
01704       DO 180 I = 1, 4
01705          ISEED( I ) = IOLDSD( I )
01706   180 CONTINUE
01707 *
01708       IF( FATAL ) THEN
01709          WRITE( NOUT, FMT = 9999 )
01710          STOP
01711       END IF
01712 *
01713 *     Read the input lines indicating the test path and its parameters.
01714 *     The first three characters indicate the test path, and the number
01715 *     of test matrix types must be the first nonblank item in columns
01716 *     4-80.
01717 *
01718   190 CONTINUE
01719 *
01720       IF( .NOT.( SGX .OR. SXV ) ) THEN
01721 *
01722   200    CONTINUE
01723          READ( NIN, FMT = '(A80)', END = 380 )LINE
01724          C3 = LINE( 1: 3 )
01725          LENP = LEN( LINE )
01726          I = 3
01727          ITMP = 0
01728          I1 = 0
01729   210    CONTINUE
01730          I = I + 1
01731          IF( I.GT.LENP ) THEN
01732             IF( I1.GT.0 ) THEN
01733                GO TO 240
01734             ELSE
01735                NTYPES = MAXT
01736                GO TO 240
01737             END IF
01738          END IF
01739          IF( LINE( I: I ).NE.' ' .AND. LINE( I: I ).NE.',' ) THEN
01740             I1 = I
01741             C1 = LINE( I1: I1 )
01742 *
01743 *        Check that a valid integer was read
01744 *
01745             DO 220 K = 1, 10
01746                IF( C1.EQ.INTSTR( K: K ) ) THEN
01747                   IC = K - 1
01748                   GO TO 230
01749                END IF
01750   220       CONTINUE
01751             WRITE( NOUT, FMT = 9991 )I, LINE
01752             GO TO 200
01753   230       CONTINUE
01754             ITMP = 10*ITMP + IC
01755             GO TO 210
01756          ELSE IF( I1.GT.0 ) THEN
01757             GO TO 240
01758          ELSE
01759             GO TO 210
01760          END IF
01761   240    CONTINUE
01762          NTYPES = ITMP
01763 *
01764 *     Skip the tests if NTYPES is <= 0.
01765 *
01766          IF( .NOT.( SEV .OR. SES .OR. SVX .OR. SSX .OR. SGV .OR.
01767      $       SGS ) .AND. NTYPES.LE.0 ) THEN
01768             WRITE( NOUT, FMT = 9990 )C3
01769             GO TO 200
01770          END IF
01771 *
01772       ELSE
01773          IF( SXV )
01774      $      C3 = 'SXV'
01775          IF( SGX )
01776      $      C3 = 'SGX'
01777       END IF
01778 *
01779 *     Reset the random number seed.
01780 *
01781       IF( NEWSD.EQ.0 ) THEN
01782          DO 250 K = 1, 4
01783             ISEED( K ) = IOLDSD( K )
01784   250    CONTINUE
01785       END IF
01786 *
01787       IF( LSAMEN( 3, C3, 'SHS' ) .OR. LSAMEN( 3, C3, 'NEP' ) ) THEN
01788 *
01789 *        -------------------------------------
01790 *        NEP:  Nonsymmetric Eigenvalue Problem
01791 *        -------------------------------------
01792 *        Vary the parameters
01793 *           NB    = block size
01794 *           NBMIN = minimum block size
01795 *           NX    = crossover point
01796 *           NS    = number of shifts
01797 *           MAXB  = minimum submatrix size
01798 *
01799          MAXTYP = 21
01800          NTYPES = MIN( MAXTYP, NTYPES )
01801          CALL ALAREQ( C3, NTYPES, DOTYPE, MAXTYP, NIN, NOUT )
01802          CALL XLAENV( 1, 1 )
01803          IF( TSTERR )
01804      $      CALL SERRHS( 'SHSEQR', NOUT )
01805          DO 270 I = 1, NPARMS
01806             CALL XLAENV( 1, NBVAL( I ) )
01807             CALL XLAENV( 2, NBMIN( I ) )
01808             CALL XLAENV( 3, NXVAL( I ) )
01809             CALL XLAENV(12, MAX( 11, INMIN( I ) ) )
01810             CALL XLAENV(13, INWIN( I ) )
01811             CALL XLAENV(14, INIBL( I ) )
01812             CALL XLAENV(15, ISHFTS( I ) )
01813             CALL XLAENV(16, IACC22( I ) )
01814 *
01815             IF( NEWSD.EQ.0 ) THEN
01816                DO 260 K = 1, 4
01817                   ISEED( K ) = IOLDSD( K )
01818   260          CONTINUE
01819             END IF
01820             WRITE( NOUT, FMT = 9961 )C3, NBVAL( I ), NBMIN( I ),
01821      $         NXVAL( I ), MAX( 11, INMIN(I)),
01822      $         INWIN( I ), INIBL( I ), ISHFTS( I ), IACC22( I )
01823             CALL SCHKHS( NN, NVAL, MAXTYP, DOTYPE, ISEED, THRESH, NOUT,
01824      $                   A( 1, 1 ), NMAX, A( 1, 2 ), A( 1, 3 ),
01825      $                   A( 1, 4 ), A( 1, 5 ), NMAX, A( 1, 6 ),
01826      $                   A( 1, 7 ), D( 1, 1 ), D( 1, 2 ), D( 1, 3 ),
01827      $                   D( 1, 4 ), A( 1, 8 ), A( 1, 9 ), A( 1, 10 ),
01828      $                   A( 1, 11 ), A( 1, 12 ), D( 1, 5 ), WORK, LWORK,
01829      $                   IWORK, LOGWRK, RESULT, INFO )
01830             IF( INFO.NE.0 )
01831      $         WRITE( NOUT, FMT = 9980 )'SCHKHS', INFO
01832   270    CONTINUE
01833 *
01834       ELSE IF( LSAMEN( 3, C3, 'SST' ) .OR. LSAMEN( 3, C3, 'SEP' ) ) THEN
01835 *
01836 *        ----------------------------------
01837 *        SEP:  Symmetric Eigenvalue Problem
01838 *        ----------------------------------
01839 *        Vary the parameters
01840 *           NB    = block size
01841 *           NBMIN = minimum block size
01842 *           NX    = crossover point
01843 *
01844          MAXTYP = 21
01845          NTYPES = MIN( MAXTYP, NTYPES )
01846          CALL ALAREQ( C3, NTYPES, DOTYPE, MAXTYP, NIN, NOUT )
01847          CALL XLAENV( 1, 1 )
01848          CALL XLAENV( 9, 25 )
01849          IF( TSTERR )
01850      $      CALL SERRST( 'SST', NOUT )
01851          DO 290 I = 1, NPARMS
01852             CALL XLAENV( 1, NBVAL( I ) )
01853             CALL XLAENV( 2, NBMIN( I ) )
01854             CALL XLAENV( 3, NXVAL( I ) )
01855 *
01856             IF( NEWSD.EQ.0 ) THEN
01857                DO 280 K = 1, 4
01858                   ISEED( K ) = IOLDSD( K )
01859   280          CONTINUE
01860             END IF
01861             WRITE( NOUT, FMT = 9997 )C3, NBVAL( I ), NBMIN( I ),
01862      $         NXVAL( I )
01863             IF( TSTCHK ) THEN
01864                CALL SCHKST( NN, NVAL, MAXTYP, DOTYPE, ISEED, THRESH,
01865      $                      NOUT, A( 1, 1 ), NMAX, A( 1, 2 ), D( 1, 1 ),
01866      $                      D( 1, 2 ), D( 1, 3 ), D( 1, 4 ), D( 1, 5 ),
01867      $                      D( 1, 6 ), D( 1, 7 ), D( 1, 8 ), D( 1, 9 ),
01868      $                      D( 1, 10 ), D( 1, 11 ), A( 1, 3 ), NMAX,
01869      $                      A( 1, 4 ), A( 1, 5 ), D( 1, 12 ), A( 1, 6 ),
01870      $                      WORK, LWORK, IWORK, LIWORK, RESULT, INFO )
01871                IF( INFO.NE.0 )
01872      $            WRITE( NOUT, FMT = 9980 )'SCHKST', INFO
01873             END IF
01874             IF( TSTDRV ) THEN
01875                CALL SDRVST( NN, NVAL, 18, DOTYPE, ISEED, THRESH,
01876      $                      NOUT, A( 1, 1 ), NMAX, D( 1, 3 ), D( 1, 4 ),
01877      $                      D( 1, 5 ), D( 1, 6 ), D( 1, 8 ), D( 1, 9 ),
01878      $                      D( 1, 10 ), D( 1, 11), A( 1, 2 ), NMAX, 
01879      $                      A( 1, 3 ), D( 1, 12 ), A( 1, 4 ), WORK, 
01880      $                      LWORK, IWORK, LIWORK, RESULT, INFO )
01881                IF( INFO.NE.0 )
01882      $            WRITE( NOUT, FMT = 9980 )'SDRVST', INFO
01883             END IF
01884   290    CONTINUE
01885 *
01886       ELSE IF( LSAMEN( 3, C3, 'SSG' ) ) THEN
01887 *
01888 *        ----------------------------------------------
01889 *        SSG:  Symmetric Generalized Eigenvalue Problem
01890 *        ----------------------------------------------
01891 *        Vary the parameters
01892 *           NB    = block size
01893 *           NBMIN = minimum block size
01894 *           NX    = crossover point
01895 *
01896          MAXTYP = 21
01897          NTYPES = MIN( MAXTYP, NTYPES )
01898          CALL ALAREQ( C3, NTYPES, DOTYPE, MAXTYP, NIN, NOUT )
01899          CALL XLAENV( 9, 25 )
01900          DO 310 I = 1, NPARMS
01901             CALL XLAENV( 1, NBVAL( I ) )
01902             CALL XLAENV( 2, NBMIN( I ) )
01903             CALL XLAENV( 3, NXVAL( I ) )
01904 *
01905             IF( NEWSD.EQ.0 ) THEN
01906                DO 300 K = 1, 4
01907                   ISEED( K ) = IOLDSD( K )
01908   300          CONTINUE
01909             END IF
01910             WRITE( NOUT, FMT = 9997 )C3, NBVAL( I ), NBMIN( I ),
01911      $         NXVAL( I )
01912             IF( TSTCHK ) THEN
01913                CALL SDRVSG( NN, NVAL, MAXTYP, DOTYPE, ISEED, THRESH,
01914      $                      NOUT, A( 1, 1 ), NMAX, A( 1, 2 ), NMAX,
01915      $                      D( 1, 3 ), A( 1, 3 ), NMAX, A( 1, 4 ),
01916      $                      A( 1, 5 ), A( 1, 6 ), A( 1, 7 ), WORK,
01917      $                      LWORK, IWORK, LIWORK, RESULT, INFO )
01918                IF( INFO.NE.0 )
01919      $            WRITE( NOUT, FMT = 9980 )'SDRVSG', INFO
01920             END IF
01921   310    CONTINUE
01922 *
01923       ELSE IF( LSAMEN( 3, C3, 'SBD' ) .OR. LSAMEN( 3, C3, 'SVD' ) ) THEN
01924 *
01925 *        ----------------------------------
01926 *        SVD:  Singular Value Decomposition
01927 *        ----------------------------------
01928 *        Vary the parameters
01929 *           NB    = block size
01930 *           NBMIN = minimum block size
01931 *           NX    = crossover point
01932 *           NRHS  = number of right hand sides
01933 *
01934          MAXTYP = 16
01935          NTYPES = MIN( MAXTYP, NTYPES )
01936          CALL ALAREQ( C3, NTYPES, DOTYPE, MAXTYP, NIN, NOUT )
01937          CALL XLAENV( 1, 1 )
01938          CALL XLAENV( 9, 25 )
01939 *
01940 *        Test the error exits
01941 *
01942          IF( TSTERR .AND. TSTCHK )
01943      $      CALL SERRBD( 'SBD', NOUT )
01944          IF( TSTERR .AND. TSTDRV )
01945      $      CALL SERRED( 'SBD', NOUT )
01946 *
01947          DO 330 I = 1, NPARMS
01948             NRHS = NSVAL( I )
01949             CALL XLAENV( 1, NBVAL( I ) )
01950             CALL XLAENV( 2, NBMIN( I ) )
01951             CALL XLAENV( 3, NXVAL( I ) )
01952             IF( NEWSD.EQ.0 ) THEN
01953                DO 320 K = 1, 4
01954                   ISEED( K ) = IOLDSD( K )
01955   320          CONTINUE
01956             END IF
01957             WRITE( NOUT, FMT = 9995 )C3, NBVAL( I ), NBMIN( I ),
01958      $         NXVAL( I ), NRHS
01959             IF( TSTCHK ) THEN
01960                CALL SCHKBD( NN, MVAL, NVAL, MAXTYP, DOTYPE, NRHS, ISEED,
01961      $                      THRESH, A( 1, 1 ), NMAX, D( 1, 1 ),
01962      $                      D( 1, 2 ), D( 1, 3 ), D( 1, 4 ), A( 1, 2 ),
01963      $                      NMAX, A( 1, 3 ), A( 1, 4 ), A( 1, 5 ), NMAX,
01964      $                      A( 1, 6 ), NMAX, A( 1, 7 ), A( 1, 8 ), WORK,
01965      $                      LWORK, IWORK, NOUT, INFO )
01966                IF( INFO.NE.0 )
01967      $            WRITE( NOUT, FMT = 9980 )'SCHKBD', INFO
01968             END IF
01969             IF( TSTDRV )
01970      $         CALL SDRVBD( NN, MVAL, NVAL, MAXTYP, DOTYPE, ISEED,
01971      $                      THRESH, A( 1, 1 ), NMAX, A( 1, 2 ), NMAX,
01972      $                      A( 1, 3 ), NMAX, A( 1, 4 ), A( 1, 5 ),
01973      $                      A( 1, 6 ), D( 1, 1 ), D( 1, 2 ), D( 1, 3 ),
01974      $                      WORK, LWORK, IWORK, NOUT, INFO )
01975   330    CONTINUE
01976 *
01977       ELSE IF( LSAMEN( 3, C3, 'SEV' ) ) THEN
01978 *
01979 *        --------------------------------------------
01980 *        SEV:  Nonsymmetric Eigenvalue Problem Driver
01981 *              SGEEV (eigenvalues and eigenvectors)
01982 *        --------------------------------------------
01983 *
01984          MAXTYP = 21
01985          NTYPES = MIN( MAXTYP, NTYPES )
01986          IF( NTYPES.LE.0 ) THEN
01987             WRITE( NOUT, FMT = 9990 )C3
01988          ELSE
01989             IF( TSTERR )
01990      $         CALL SERRED( C3, NOUT )
01991             CALL ALAREQ( C3, NTYPES, DOTYPE, MAXTYP, NIN, NOUT )
01992             CALL SDRVEV( NN, NVAL, NTYPES, DOTYPE, ISEED, THRESH, NOUT,
01993      $                   A( 1, 1 ), NMAX, A( 1, 2 ), D( 1, 1 ),
01994      $                   D( 1, 2 ), D( 1, 3 ), D( 1, 4 ), A( 1, 3 ),
01995      $                   NMAX, A( 1, 4 ), NMAX, A( 1, 5 ), NMAX, RESULT,
01996      $                   WORK, LWORK, IWORK, INFO )
01997             IF( INFO.NE.0 )
01998      $         WRITE( NOUT, FMT = 9980 )'SGEEV', INFO
01999          END IF
02000          WRITE( NOUT, FMT = 9973 )
02001          GO TO 10
02002 *
02003       ELSE IF( LSAMEN( 3, C3, 'SES' ) ) THEN
02004 *
02005 *        --------------------------------------------
02006 *        SES:  Nonsymmetric Eigenvalue Problem Driver
02007 *              SGEES (Schur form)
02008 *        --------------------------------------------
02009 *
02010          MAXTYP = 21
02011          NTYPES = MIN( MAXTYP, NTYPES )
02012          IF( NTYPES.LE.0 ) THEN
02013             WRITE( NOUT, FMT = 9990 )C3
02014          ELSE
02015             IF( TSTERR )
02016      $         CALL SERRED( C3, NOUT )
02017             CALL ALAREQ( C3, NTYPES, DOTYPE, MAXTYP, NIN, NOUT )
02018             CALL SDRVES( NN, NVAL, NTYPES, DOTYPE, ISEED, THRESH, NOUT,
02019      $                   A( 1, 1 ), NMAX, A( 1, 2 ), A( 1, 3 ),
02020      $                   D( 1, 1 ), D( 1, 2 ), D( 1, 3 ), D( 1, 4 ),
02021      $                   A( 1, 4 ), NMAX, RESULT, WORK, LWORK, IWORK,
02022      $                   LOGWRK, INFO )
02023             IF( INFO.NE.0 )
02024      $         WRITE( NOUT, FMT = 9980 )'SGEES', INFO
02025          END IF
02026          WRITE( NOUT, FMT = 9973 )
02027          GO TO 10
02028 *
02029       ELSE IF( LSAMEN( 3, C3, 'SVX' ) ) THEN
02030 *
02031 *        --------------------------------------------------------------
02032 *        SVX:  Nonsymmetric Eigenvalue Problem Expert Driver
02033 *              SGEEVX (eigenvalues, eigenvectors and condition numbers)
02034 *        --------------------------------------------------------------
02035 *
02036          MAXTYP = 21
02037          NTYPES = MIN( MAXTYP, NTYPES )
02038          IF( NTYPES.LT.0 ) THEN
02039             WRITE( NOUT, FMT = 9990 )C3
02040          ELSE
02041             IF( TSTERR )
02042      $         CALL SERRED( C3, NOUT )
02043             CALL ALAREQ( C3, NTYPES, DOTYPE, MAXTYP, NIN, NOUT )
02044             CALL SDRVVX( NN, NVAL, NTYPES, DOTYPE, ISEED, THRESH, NIN,
02045      $                   NOUT, A( 1, 1 ), NMAX, A( 1, 2 ), D( 1, 1 ),
02046      $                   D( 1, 2 ), D( 1, 3 ), D( 1, 4 ), A( 1, 3 ),
02047      $                   NMAX, A( 1, 4 ), NMAX, A( 1, 5 ), NMAX,
02048      $                   D( 1, 5 ), D( 1, 6 ), D( 1, 7 ), D( 1, 8 ),
02049      $                   D( 1, 9 ), D( 1, 10 ), D( 1, 11 ), D( 1, 12 ),
02050      $                   RESULT, WORK, LWORK, IWORK, INFO )
02051             IF( INFO.NE.0 )
02052      $         WRITE( NOUT, FMT = 9980 )'SGEEVX', INFO
02053          END IF
02054          WRITE( NOUT, FMT = 9973 )
02055          GO TO 10
02056 *
02057       ELSE IF( LSAMEN( 3, C3, 'SSX' ) ) THEN
02058 *
02059 *        ---------------------------------------------------
02060 *        SSX:  Nonsymmetric Eigenvalue Problem Expert Driver
02061 *              SGEESX (Schur form and condition numbers)
02062 *        ---------------------------------------------------
02063 *
02064          MAXTYP = 21
02065          NTYPES = MIN( MAXTYP, NTYPES )
02066          IF( NTYPES.LT.0 ) THEN
02067             WRITE( NOUT, FMT = 9990 )C3
02068          ELSE
02069             IF( TSTERR )
02070      $         CALL SERRED( C3, NOUT )
02071             CALL ALAREQ( C3, NTYPES, DOTYPE, MAXTYP, NIN, NOUT )
02072             CALL SDRVSX( NN, NVAL, NTYPES, DOTYPE, ISEED, THRESH, NIN,
02073      $                   NOUT, A( 1, 1 ), NMAX, A( 1, 2 ), A( 1, 3 ),
02074      $                   D( 1, 1 ), D( 1, 2 ), D( 1, 3 ), D( 1, 4 ),
02075      $                   D( 1, 5 ), D( 1, 6 ), A( 1, 4 ), NMAX,
02076      $                   A( 1, 5 ), RESULT, WORK, LWORK, IWORK, LOGWRK,
02077      $                   INFO )
02078             IF( INFO.NE.0 )
02079      $         WRITE( NOUT, FMT = 9980 )'SGEESX', INFO
02080          END IF
02081          WRITE( NOUT, FMT = 9973 )
02082          GO TO 10
02083 *
02084       ELSE IF( LSAMEN( 3, C3, 'SGG' ) ) THEN
02085 *
02086 *        -------------------------------------------------
02087 *        SGG:  Generalized Nonsymmetric Eigenvalue Problem
02088 *        -------------------------------------------------
02089 *        Vary the parameters
02090 *           NB    = block size
02091 *           NBMIN = minimum block size
02092 *           NS    = number of shifts
02093 *           MAXB  = minimum submatrix size
02094 *           NBCOL = minimum column dimension for blocks
02095 *
02096          MAXTYP = 26
02097          NTYPES = MIN( MAXTYP, NTYPES )
02098          CALL ALAREQ( C3, NTYPES, DOTYPE, MAXTYP, NIN, NOUT )
02099          IF( TSTCHK .AND. TSTERR )
02100      $      CALL SERRGG( C3, NOUT )
02101          DO 350 I = 1, NPARMS
02102             CALL XLAENV( 1, NBVAL( I ) )
02103             CALL XLAENV( 2, NBMIN( I ) )
02104             CALL XLAENV( 4, NSVAL( I ) )
02105             CALL XLAENV( 8, MXBVAL( I ) )
02106             CALL XLAENV( 5, NBCOL( I ) )
02107 *
02108             IF( NEWSD.EQ.0 ) THEN
02109                DO 340 K = 1, 4
02110                   ISEED( K ) = IOLDSD( K )
02111   340          CONTINUE
02112             END IF
02113             WRITE( NOUT, FMT = 9996 )C3, NBVAL( I ), NBMIN( I ),
02114      $         NSVAL( I ), MXBVAL( I ), NBCOL( I )
02115             TSTDIF = .FALSE.
02116             THRSHN = 10.
02117             IF( TSTCHK ) THEN
02118                CALL SCHKGG( NN, NVAL, MAXTYP, DOTYPE, ISEED, THRESH,
02119      $                      TSTDIF, THRSHN, NOUT, A( 1, 1 ), NMAX,
02120      $                      A( 1, 2 ), A( 1, 3 ), A( 1, 4 ), A( 1, 5 ),
02121      $                      A( 1, 6 ), A( 1, 7 ), A( 1, 8 ), A( 1, 9 ),
02122      $                      NMAX, A( 1, 10 ), A( 1, 11 ), A( 1, 12 ),
02123      $                      D( 1, 1 ), D( 1, 2 ), D( 1, 3 ), D( 1, 4 ),
02124      $                      D( 1, 5 ), D( 1, 6 ), A( 1, 13 ),
02125      $                      A( 1, 14 ), WORK, LWORK, LOGWRK, RESULT,
02126      $                      INFO )
02127                IF( INFO.NE.0 )
02128      $            WRITE( NOUT, FMT = 9980 )'SCHKGG', INFO
02129             END IF
02130             CALL XLAENV( 1, 1 )
02131             IF( TSTDRV ) THEN
02132                CALL SDRVGG( NN, NVAL, MAXTYP, DOTYPE, ISEED, THRESH,
02133      $                      THRSHN, NOUT, A( 1, 1 ), NMAX, A( 1, 2 ),
02134      $                      A( 1, 3 ), A( 1, 4 ), A( 1, 5 ), A( 1, 6 ),
02135      $                      A( 1, 7 ), NMAX, A( 1, 8 ), D( 1, 1 ),
02136      $                      D( 1, 2 ), D( 1, 3 ), D( 1, 4 ), D( 1, 5 ),
02137      $                      D( 1, 6 ), A( 1, 13 ), A( 1, 14 ), WORK,
02138      $                      LWORK, RESULT, INFO )
02139                IF( INFO.NE.0 )
02140      $            WRITE( NOUT, FMT = 9980 )'SDRVGG', INFO
02141             END IF
02142   350    CONTINUE
02143 *
02144       ELSE IF( LSAMEN( 3, C3, 'SGS' ) ) THEN
02145 *
02146 *        -------------------------------------------------
02147 *        SGS:  Generalized Nonsymmetric Eigenvalue Problem
02148 *              SGGES (Schur form)
02149 *        -------------------------------------------------
02150 *
02151          MAXTYP = 26
02152          NTYPES = MIN( MAXTYP, NTYPES )
02153          IF( NTYPES.LE.0 ) THEN
02154             WRITE( NOUT, FMT = 9990 )C3
02155          ELSE
02156             IF( TSTERR )
02157      $         CALL SERRGG( C3, NOUT )
02158             CALL ALAREQ( C3, NTYPES, DOTYPE, MAXTYP, NIN, NOUT )
02159             CALL SDRGES( NN, NVAL, MAXTYP, DOTYPE, ISEED, THRESH, NOUT,
02160      $                   A( 1, 1 ), NMAX, A( 1, 2 ), A( 1, 3 ),
02161      $                   A( 1, 4 ), A( 1, 7 ), NMAX, A( 1, 8 ),
02162      $                   D( 1, 1 ), D( 1, 2 ), D( 1, 3 ), WORK, LWORK,
02163      $                   RESULT, LOGWRK, INFO )
02164 *
02165             IF( INFO.NE.0 )
02166      $         WRITE( NOUT, FMT = 9980 )'SDRGES', INFO
02167          END IF
02168          WRITE( NOUT, FMT = 9973 )
02169          GO TO 10
02170 *
02171       ELSE IF( SGX ) THEN
02172 *
02173 *        -------------------------------------------------
02174 *        SGX:  Generalized Nonsymmetric Eigenvalue Problem
02175 *              SGGESX (Schur form and condition numbers)
02176 *        -------------------------------------------------
02177 *
02178          MAXTYP = 5
02179          NTYPES = MAXTYP
02180          IF( NN.LT.0 ) THEN
02181             WRITE( NOUT, FMT = 9990 )C3
02182          ELSE
02183             IF( TSTERR )
02184      $         CALL SERRGG( C3, NOUT )
02185             CALL ALAREQ( C3, NTYPES, DOTYPE, MAXTYP, NIN, NOUT )
02186             CALL XLAENV( 5, 2 )
02187             CALL SDRGSX( NN, NCMAX, THRESH, NIN, NOUT, A( 1, 1 ), NMAX,
02188      $                   A( 1, 2 ), A( 1, 3 ), A( 1, 4 ), A( 1, 5 ),
02189      $                   A( 1, 6 ), D( 1, 1 ), D( 1, 2 ), D( 1, 3 ),
02190      $                   C( 1, 1 ), NCMAX*NCMAX, A( 1, 12 ), WORK,
02191      $                   LWORK, IWORK, LIWORK, LOGWRK, INFO )
02192             IF( INFO.NE.0 )
02193      $         WRITE( NOUT, FMT = 9980 )'SDRGSX', INFO
02194          END IF
02195          WRITE( NOUT, FMT = 9973 )
02196          GO TO 10
02197 *
02198       ELSE IF( LSAMEN( 3, C3, 'SGV' ) ) THEN
02199 *
02200 *        -------------------------------------------------
02201 *        SGV:  Generalized Nonsymmetric Eigenvalue Problem
02202 *              SGGEV (Eigenvalue/vector form)
02203 *        -------------------------------------------------
02204 *
02205          MAXTYP = 26
02206          NTYPES = MIN( MAXTYP, NTYPES )
02207          IF( NTYPES.LE.0 ) THEN
02208             WRITE( NOUT, FMT = 9990 )C3
02209          ELSE
02210             IF( TSTERR )
02211      $         CALL SERRGG( C3, NOUT )
02212             CALL ALAREQ( C3, NTYPES, DOTYPE, MAXTYP, NIN, NOUT )
02213             CALL SDRGEV( NN, NVAL, MAXTYP, DOTYPE, ISEED, THRESH, NOUT,
02214      $                   A( 1, 1 ), NMAX, A( 1, 2 ), A( 1, 3 ),
02215      $                   A( 1, 4 ), A( 1, 7 ), NMAX, A( 1, 8 ),
02216      $                   A( 1, 9 ), NMAX, D( 1, 1 ), D( 1, 2 ),
02217      $                   D( 1, 3 ), D( 1, 4 ), D( 1, 5 ), D( 1, 6 ),
02218      $                   WORK, LWORK, RESULT, INFO )
02219             IF( INFO.NE.0 )
02220      $         WRITE( NOUT, FMT = 9980 )'SDRGEV', INFO
02221          END IF
02222          WRITE( NOUT, FMT = 9973 )
02223          GO TO 10
02224 *
02225       ELSE IF( SXV ) THEN
02226 *
02227 *        -------------------------------------------------
02228 *        SXV:  Generalized Nonsymmetric Eigenvalue Problem
02229 *              SGGEVX (eigenvalue/vector with condition numbers)
02230 *        -------------------------------------------------
02231 *
02232          MAXTYP = 2
02233          NTYPES = MAXTYP
02234          IF( NN.LT.0 ) THEN
02235             WRITE( NOUT, FMT = 9990 )C3
02236          ELSE
02237             IF( TSTERR )
02238      $         CALL SERRGG( C3, NOUT )
02239             CALL ALAREQ( C3, NTYPES, DOTYPE, MAXTYP, NIN, NOUT )
02240             CALL SDRGVX( NN, THRESH, NIN, NOUT, A( 1, 1 ), NMAX,
02241      $                   A( 1, 2 ), A( 1, 3 ), A( 1, 4 ), D( 1, 1 ),
02242      $                   D( 1, 2 ), D( 1, 3 ), A( 1, 5 ), A( 1, 6 ),
02243      $                   IWORK( 1 ), IWORK( 2 ), D( 1, 4 ), D( 1, 5 ),
02244      $                   D( 1, 6 ), D( 1, 7 ), D( 1, 8 ), D( 1, 9 ),
02245      $                   WORK, LWORK, IWORK( 3 ), LIWORK-2, RESULT,
02246      $                   LOGWRK, INFO )
02247 *
02248             IF( INFO.NE.0 )
02249      $         WRITE( NOUT, FMT = 9980 )'SDRGVX', INFO
02250          END IF
02251          WRITE( NOUT, FMT = 9973 )
02252          GO TO 10
02253 *
02254       ELSE IF( LSAMEN( 3, C3, 'SSB' ) ) THEN
02255 *
02256 *        ------------------------------
02257 *        SSB:  Symmetric Band Reduction
02258 *        ------------------------------
02259 *
02260          MAXTYP = 15
02261          NTYPES = MIN( MAXTYP, NTYPES )
02262          CALL ALAREQ( C3, NTYPES, DOTYPE, MAXTYP, NIN, NOUT )
02263          IF( TSTERR )
02264      $      CALL SERRST( 'SSB', NOUT )
02265          CALL SCHKSB( NN, NVAL, NK, KVAL, MAXTYP, DOTYPE, ISEED, THRESH,
02266      $                NOUT, A( 1, 1 ), NMAX, D( 1, 1 ), D( 1, 2 ),
02267      $                A( 1, 2 ), NMAX, WORK, LWORK, RESULT, INFO )
02268          IF( INFO.NE.0 )
02269      $      WRITE( NOUT, FMT = 9980 )'SCHKSB', INFO
02270 *
02271       ELSE IF( LSAMEN( 3, C3, 'SBB' ) ) THEN
02272 *
02273 *        ------------------------------
02274 *        SBB:  General Band Reduction
02275 *        ------------------------------
02276 *
02277          MAXTYP = 15
02278          NTYPES = MIN( MAXTYP, NTYPES )
02279          CALL ALAREQ( C3, NTYPES, DOTYPE, MAXTYP, NIN, NOUT )
02280          DO 370 I = 1, NPARMS
02281             NRHS = NSVAL( I )
02282 *
02283             IF( NEWSD.EQ.0 ) THEN
02284                DO 360 K = 1, 4
02285                   ISEED( K ) = IOLDSD( K )
02286   360          CONTINUE
02287             END IF
02288             WRITE( NOUT, FMT = 9966 )C3, NRHS
02289             CALL SCHKBB( NN, MVAL, NVAL, NK, KVAL, MAXTYP, DOTYPE, NRHS,
02290      $                   ISEED, THRESH, NOUT, A( 1, 1 ), NMAX,
02291      $                   A( 1, 2 ), 2*NMAX, D( 1, 1 ), D( 1, 2 ),
02292      $                   A( 1, 4 ), NMAX, A( 1, 5 ), NMAX, A( 1, 6 ),
02293      $                   NMAX, A( 1, 7 ), WORK, LWORK, RESULT, INFO )
02294             IF( INFO.NE.0 )
02295      $         WRITE( NOUT, FMT = 9980 )'SCHKBB', INFO
02296   370    CONTINUE
02297 *
02298       ELSE IF( LSAMEN( 3, C3, 'GLM' ) ) THEN
02299 *
02300 *        -----------------------------------------
02301 *        GLM:  Generalized Linear Regression Model
02302 *        -----------------------------------------
02303 *
02304          CALL XLAENV( 1, 1 )
02305          IF( TSTERR )
02306      $      CALL SERRGG( 'GLM', NOUT )
02307          CALL SCKGLM( NN, MVAL, PVAL, NVAL, NTYPES, ISEED, THRESH, NMAX,
02308      $                A( 1, 1 ), A( 1, 2 ), B( 1, 1 ), B( 1, 2 ), X,
02309      $                WORK, D( 1, 1 ), NIN, NOUT, INFO )
02310          IF( INFO.NE.0 )
02311      $      WRITE( NOUT, FMT = 9980 )'SCKGLM', INFO
02312 *
02313       ELSE IF( LSAMEN( 3, C3, 'GQR' ) ) THEN
02314 *
02315 *        ------------------------------------------
02316 *        GQR:  Generalized QR and RQ factorizations
02317 *        ------------------------------------------
02318 *
02319          CALL XLAENV( 1, 1 )
02320          IF( TSTERR )
02321      $      CALL SERRGG( 'GQR', NOUT )
02322          CALL SCKGQR( NN, MVAL, NN, PVAL, NN, NVAL, NTYPES, ISEED,
02323      $                THRESH, NMAX, A( 1, 1 ), A( 1, 2 ), A( 1, 3 ),
02324      $                A( 1, 4 ), TAUA, B( 1, 1 ), B( 1, 2 ), B( 1, 3 ),
02325      $                B( 1, 4 ), B( 1, 5 ), TAUB, WORK, D( 1, 1 ), NIN,
02326      $                NOUT, INFO )
02327          IF( INFO.NE.0 )
02328      $      WRITE( NOUT, FMT = 9980 )'SCKGQR', INFO
02329 *
02330       ELSE IF( LSAMEN( 3, C3, 'GSV' ) ) THEN
02331 *
02332 *        ----------------------------------------------
02333 *        GSV:  Generalized Singular Value Decomposition
02334 *        ----------------------------------------------
02335 *
02336          IF( TSTERR )
02337      $      CALL SERRGG( 'GSV', NOUT )
02338          CALL SCKGSV( NN, MVAL, PVAL, NVAL, NTYPES, ISEED, THRESH, NMAX,
02339      $                A( 1, 1 ), A( 1, 2 ), B( 1, 1 ), B( 1, 2 ),
02340      $                A( 1, 3 ), B( 1, 3 ), A( 1, 4 ), TAUA, TAUB,
02341      $                B( 1, 4 ), IWORK, WORK, D( 1, 1 ), NIN, NOUT,
02342      $                INFO )
02343          IF( INFO.NE.0 )
02344      $      WRITE( NOUT, FMT = 9980 )'SCKGSV', INFO
02345 *
02346       ELSE IF( LSAMEN( 3, C3, 'CSD' ) ) THEN
02347 *
02348 *        ----------------------------------------------
02349 *        CSD:  CS Decomposition
02350 *        ----------------------------------------------
02351 *
02352          CALL XLAENV(1,1)
02353          IF( TSTERR )
02354      $      CALL SERRGG( 'CSD', NOUT )
02355          CALL SCKCSD( NN, MVAL, PVAL, NVAL, NTYPES, ISEED, THRESH, NMAX,
02356      $                A( 1, 1 ), A( 1, 2 ), A( 1, 3 ), A( 1, 4 ),
02357      $                A( 1, 5 ), A( 1, 6 ), A( 1, 7 ), IWORK, WORK,
02358      $                D( 1, 1 ), NIN, NOUT, INFO )
02359          IF( INFO.NE.0 )
02360      $      WRITE( NOUT, FMT = 9980 )'SCKCSD', INFO
02361 *
02362       ELSE IF( LSAMEN( 3, C3, 'LSE' ) ) THEN
02363 *
02364 *        --------------------------------------
02365 *        LSE:  Constrained Linear Least Squares
02366 *        --------------------------------------
02367 *
02368          CALL XLAENV( 1, 1 )
02369          IF( TSTERR )
02370      $      CALL SERRGG( 'LSE', NOUT )
02371          CALL SCKLSE( NN, MVAL, PVAL, NVAL, NTYPES, ISEED, THRESH, NMAX,
02372      $                A( 1, 1 ), A( 1, 2 ), B( 1, 1 ), B( 1, 2 ), X,
02373      $                WORK, D( 1, 1 ), NIN, NOUT, INFO )
02374          IF( INFO.NE.0 )
02375      $      WRITE( NOUT, FMT = 9980 )'SCKLSE', INFO
02376 *
02377       ELSE
02378          WRITE( NOUT, FMT = * )
02379          WRITE( NOUT, FMT = * )
02380          WRITE( NOUT, FMT = 9992 )C3
02381       END IF
02382       IF( .NOT.( SGX .OR. SXV ) )
02383      $   GO TO 190
02384   380 CONTINUE
02385       WRITE( NOUT, FMT = 9994 )
02386       S2 = SECOND( )
02387       WRITE( NOUT, FMT = 9993 )S2 - S1
02388 *
02389  9999 FORMAT( / ' Execution not attempted due to input errors' )
02390  9997 FORMAT( / / 1X, A3, ':  NB =', I4, ', NBMIN =', I4, ', NX =', I4 )
02391  9996 FORMAT( / / 1X, A3, ':  NB =', I4, ', NBMIN =', I4, ', NS =', I4,
02392      $      ', MAXB =', I4, ', NBCOL =', I4 )
02393  9995 FORMAT( / / 1X, A3, ':  NB =', I4, ', NBMIN =', I4, ', NX =', I4,
02394      $      ', NRHS =', I4 )
02395  9994 FORMAT( / / ' End of tests' )
02396  9993 FORMAT( ' Total time used = ', F12.2, ' seconds', / )
02397  9992 FORMAT( 1X, A3, ':  Unrecognized path name' )
02398  9991 FORMAT( / / ' *** Invalid integer value in column ', I2,
02399      $      ' of input', ' line:', / A79 )
02400  9990 FORMAT( / / 1X, A3, ' routines were not tested' )
02401  9989 FORMAT( ' Invalid input value: ', A, '=', I6, '; must be >=',
02402      $      I6 )
02403  9988 FORMAT( ' Invalid input value: ', A, '=', I6, '; must be <=',
02404      $      I6 )
02405  9987 FORMAT( ' Tests of the Nonsymmetric Eigenvalue Problem routines' )
02406  9986 FORMAT( ' Tests of the Symmetric Eigenvalue Problem routines' )
02407  9985 FORMAT( ' Tests of the Singular Value Decomposition routines' )
02408  9984 FORMAT( / ' The following parameter values will be used:' )
02409  9983 FORMAT( 4X, A, 10I6, / 10X, 10I6 )
02410  9982 FORMAT( / ' Routines pass computational tests if test ratio is ',
02411      $      'less than', F8.2, / )
02412  9981 FORMAT( ' Relative machine ', A, ' is taken to be', E16.6 )
02413  9980 FORMAT( ' *** Error code from ', A, ' = ', I4 )
02414  9979 FORMAT( / ' Tests of the Nonsymmetric Eigenvalue Problem Driver',
02415      $      / '    SGEEV (eigenvalues and eigevectors)' )
02416  9978 FORMAT( / ' Tests of the Nonsymmetric Eigenvalue Problem Driver',
02417      $      / '    SGEES (Schur form)' )
02418  9977 FORMAT( / ' Tests of the Nonsymmetric Eigenvalue Problem Expert',
02419      $      ' Driver', / '    SGEEVX (eigenvalues, eigenvectors and',
02420      $      ' condition numbers)' )
02421  9976 FORMAT( / ' Tests of the Nonsymmetric Eigenvalue Problem Expert',
02422      $      ' Driver', / '    SGEESX (Schur form and condition',
02423      $      ' numbers)' )
02424  9975 FORMAT( / ' Tests of the Generalized Nonsymmetric Eigenvalue ',
02425      $      'Problem routines' )
02426  9974 FORMAT( ' Tests of SSBTRD', / ' (reduction of a symmetric band ',
02427      $      'matrix to tridiagonal form)' )
02428  9973 FORMAT( / 1X, 71( '-' ) )
02429  9972 FORMAT( / ' LAPACK VERSION ', I1, '.', I1, '.', I1 )
02430  9971 FORMAT( / ' Tests of the Generalized Linear Regression Model ',
02431      $      'routines' )
02432  9970 FORMAT( / ' Tests of the Generalized QR and RQ routines' )
02433  9969 FORMAT( / ' Tests of the Generalized Singular Value',
02434      $      ' Decomposition routines' )
02435  9968 FORMAT( / ' Tests of the Linear Least Squares routines' )
02436  9967 FORMAT( ' Tests of SGBBRD', / ' (reduction of a general band ',
02437      $      'matrix to real bidiagonal form)' )
02438  9966 FORMAT( / / 1X, A3, ':  NRHS =', I4 )
02439  9965 FORMAT( / ' Tests of the Generalized Nonsymmetric Eigenvalue ',
02440      $      'Problem Expert Driver SGGESX' )
02441  9964 FORMAT( / ' Tests of the Generalized Nonsymmetric Eigenvalue ',
02442      $      'Problem Driver SGGES' )
02443  9963 FORMAT( / ' Tests of the Generalized Nonsymmetric Eigenvalue ',
02444      $      'Problem Driver SGGEV' )
02445  9962 FORMAT( / ' Tests of the Generalized Nonsymmetric Eigenvalue ',
02446      $      'Problem Expert Driver SGGEVX' )
02447  9961 FORMAT( / / 1X, A3, ':  NB =', I4, ', NBMIN =', I4, ', NX =', I4,
02448      $      ', INMIN=', I4, 
02449      $      ', INWIN =', I4, ', INIBL =', I4, ', ISHFTS =', I4,
02450      $      ', IACC22 =', I4)
02451  9960 FORMAT( / ' Tests of the CS Decomposition routines' )
02452 *
02453 *     End of SCHKEE
02454 *
02455       END
 All Files Functions