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