1*> \brief \b ZCHKEE
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 ZCHKEE
12*
13*
14*> \par Purpose:
15*  =============
16*>
17*> \verbatim
18*>
19*> ZCHKEE tests the COMPLEX*16 LAPACK subroutines for the matrix
20*> eigenvalue problem.  The test paths in this version are
21*>
22*> NEP (Nonsymmetric Eigenvalue Problem):
23*>     Test ZGEHRD, ZUNGHR, ZHSEQR, ZTREVC, ZHSEIN, and ZUNMHR
24*>
25*> SEP (Hermitian Eigenvalue Problem):
26*>     Test ZHETRD, ZUNGTR, ZSTEQR, ZSTERF, ZSTEIN, ZSTEDC,
27*>     and drivers ZHEEV(X), ZHBEV(X), ZHPEV(X),
28*>                 ZHEEVD,   ZHBEVD,   ZHPEVD
29*>
30*> SVD (Singular Value Decomposition):
31*>     Test ZGEBRD, ZUNGBR, and ZBDSQR
32*>     and the drivers ZGESVD, ZGESDD
33*>
34*> ZEV (Nonsymmetric Eigenvalue/eigenvector Driver):
35*>     Test ZGEEV
36*>
37*> ZES (Nonsymmetric Schur form Driver):
38*>     Test ZGEES
39*>
40*> ZVX (Nonsymmetric Eigenvalue/eigenvector Expert Driver):
41*>     Test ZGEEVX
42*>
43*> ZSX (Nonsymmetric Schur form Expert Driver):
44*>     Test ZGEESX
45*>
46*> ZGG (Generalized Nonsymmetric Eigenvalue Problem):
47*>     Test ZGGHRD, ZGGBAL, ZGGBAK, ZHGEQZ, and ZTGEVC
48*>     and the driver routines ZGEGS and ZGEGV
49*>
50*> ZGS (Generalized Nonsymmetric Schur form Driver):
51*>     Test ZGGES
52*>
53*> ZGV (Generalized Nonsymmetric Eigenvalue/eigenvector Driver):
54*>     Test ZGGEV
55*>
56*> ZGX (Generalized Nonsymmetric Schur form Expert Driver):
57*>     Test ZGGESX
58*>
59*> ZXV (Generalized Nonsymmetric Eigenvalue/eigenvector Expert Driver):
60*>     Test ZGGEVX
61*>
62*> ZSG (Hermitian Generalized Eigenvalue Problem):
63*>     Test ZHEGST, ZHEGV, ZHEGVD, ZHEGVX, ZHPGST, ZHPGV, ZHPGVD,
64*>     ZHPGVX, ZHBGST, ZHBGV, ZHBGVD, and ZHBGVX
65*>
66*> ZHB (Hermitian Band Eigenvalue Problem):
67*>     Test ZHBTRD
68*>
69*> ZBB (Band Singular Value Decomposition):
70*>     Test ZGBBRD
71*>
72*> ZEC (Eigencondition estimation):
73*>     Test ZTRSYL, ZTREXC, ZTRSNA, and ZTRSEN
74*>
75*> ZBL (Balancing a general matrix)
76*>     Test ZGEBAL
77*>
78*> ZBK (Back transformation on a balanced matrix)
79*>     Test ZGEBAK
80*>
81*> ZGL (Balancing a matrix pair)
82*>     Test ZGGBAL
83*>
84*> ZGK (Back transformation on a matrix pair)
85*>     Test ZGGBAK
86*>
87*> GLM (Generalized Linear Regression Model):
88*>     Tests ZGGGLM
89*>
90*> GQR (Generalized QR and RQ factorizations):
91*>     Tests ZGGQRF and ZGGRQF
92*>
93*> GSV (Generalized Singular Value Decomposition):
94*>     Tests ZGGSVD, ZGGSVP, ZTGSJA, ZLAGS2, ZLAPLL, and ZLAPMT
95*>
96*> CSD (CS decomposition):
97*>     Tests ZUNCSD
98*>
99*> LSE (Constrained Linear Least Squares):
100*>     Tests ZGGLSE
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*> ZHS or NEP      21     ZCHKHS
115*> ZST or SEP      21     ZCHKST (routines)
116*>                 18     ZDRVST (drivers)
117*> ZBD or SVD      16     ZCHKBD (routines)
118*>                  5     ZDRVBD (drivers)
119*> ZEV             21     ZDRVEV
120*> ZES             21     ZDRVES
121*> ZVX             21     ZDRVVX
122*> ZSX             21     ZDRVSX
123*> ZGG             26     ZCHKGG (routines)
124*>                 26     ZDRVGG (drivers)
125*> ZGS             26     ZDRGES
126*> ZGX              5     ZDRGSX
127*> ZGV             26     ZDRGEV
128*> ZXV              2     ZDRGVX
129*> ZSG             21     ZDRVSG
130*> ZHB             15     ZCHKHB
131*> ZBB             15     ZCHKBB
132*> ZEC              -     ZCHKEC
133*> ZBL              -     ZCHKBL
134*> ZBK              -     ZCHKBK
135*> ZGL              -     ZCHKGL
136*> ZGK              -     ZCHKGK
137*> GLM              8     ZCKGLM
138*> GQR              8     ZCKGQR
139*> GSV              8     ZCKGSV
140*> CSD              3     ZCKCSD
141*> LSE              8     ZCKLSE
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 'ZHS' for the
215*>          nonsymmetric eigenvalue routines.
216*>
217*>-----------------------------------------------------------------------
218*>
219*> SEP or ZSG 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 'ZST' for the
268*>          Hermitian eigenvalue routines and driver routines, and
269*>          'ZSG' 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 'ZBD' for both the
329*>          SVD routines and the SVD driver routines.
330*>
331*>-----------------------------------------------------------------------
332*>
333*> ZEV and ZES data files:
334*>
335*> line 1:  'ZEV' or 'ZES' 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 'ZEV' to test CGEEV, or
373*>          'ZES' to test CGEES.
374*>
375*>-----------------------------------------------------------------------
376*>
377*> The ZVX data has two parts. The first part is identical to ZEV,
378*> and the second part consists of test matrices with precomputed
379*> solutions.
380*>
381*> line 1:  'ZVX' 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 'ZVX' 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 ZSX data is like ZVX. The first part is identical to ZEV, and the
424*> second part consists of test matrices with precomputed solutions.
425*>
426*> line 1:  'ZSX' 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 'ZSX' 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*> ZGG 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 'ZGG' for the generalized
525*>          eigenvalue problem routines and driver routines.
526*>
527*>-----------------------------------------------------------------------
528*>
529*> ZGS and ZGV input files:
530*>
531*> line 1:  'ZGS' or 'ZGV' 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 'ZGS' for the generalized
570*>          eigenvalue problem routines and driver routines.
571*>
572*>-----------------------------------------------------------------------
573*>
574*> ZGX input file:
575*> line 1:  'ZGX' 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*> ZXV input files:
631*> line 1:  'ZXV' 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*> ZHB 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 'ZHB'.
716*>
717*>-----------------------------------------------------------------------
718*>
719*> ZBB 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 'ZBB'.
761*>
762*>-----------------------------------------------------------------------
763*>
764*> ZEC 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*> ZBL and ZBK input files:
780*>
781*> line 1:  'ZBL' in columns 1-3 to test CGEBAL, or 'ZBK' in
782*>          columns 1-3 to test CGEBAK.
783*>
784*> The remaining lines consist of specially constructed test cases.
785*>
786*>-----------------------------------------------------------------------
787*>
788*> ZGL and ZGK input files:
789*>
790*> line 1:  'ZGL' in columns 1-3 to test ZGGBAL, or 'ZGK' in
791*>          columns 1-3 to test ZGGBAK.
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 ZGG.
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 April 2012
1030*
1031*> \ingroup complex16_eig
1032*
1033*  =====================================================================
1034      PROGRAM ZCHKEE
1035*
1036*  -- LAPACK test routine (version 3.4.1) --
1037*  -- LAPACK is a software package provided by Univ. of Tennessee,    --
1038*  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
1039*     April 2012
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            ZBK, ZBL, ZES, ZEV, ZGK, ZGL, ZGS, ZGV, ZGX,
1063     $                   ZSX, ZVX, ZXV, CSD, FATAL, GLM, GQR, GSV, LSE,
1064     $                   NEP, SEP, SVD, TSTCHK, TSTDIF, TSTDRV, TSTERR,
1065     $                   ZBB, ZGG, ZHB
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      DOUBLE PRECISION   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      DOUBLE PRECISION   ALPHA( NMAX ), BETA( NMAX ), DR( NMAX, 12 ),
1086     $                   RESULT( 500 ), RWORK( LWORK ), S( NMAX*NMAX )
1087      COMPLEX*16         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      DOUBLE PRECISION   DLAMCH, DSECND
1095      EXTERNAL           LSAMEN, DLAMCH, DSECND
1096*     ..
1097*     .. External Subroutines ..
1098      EXTERNAL           ALAREQ, XLAENV, ZCHKBB, ZCHKBD, ZCHKBK, ZCHKBL,
1099     $                   ZCHKEC, ZCHKGG, ZCHKGK, ZCHKGL, ZCHKHB, ZCHKHS,
1100     $                   ZCHKST, ZCKCSD, ZCKGLM, ZCKGQR, ZCKGSV, ZCKLSE,
1101     $                   ZDRGES, ZDRGEV, ZDRGSX, ZDRGVX, ZDRVBD, ZDRVES,
1102     $                   ZDRVEV, ZDRVGG, ZDRVSG, ZDRVST, ZDRVSX, ZDRVVX,
1103     $                   ZERRBD, ZERRED, ZERRGG, ZERRHS, ZERRST, ILAVER
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      DOUBLE PRECISION   SELWI( 20 ), SELWR( 20 )
1118*     ..
1119*     .. Common blocks ..
1120      COMMON             / CENVIR / NPROC, NSHIFT, MAXB
1121      COMMON             / INFOC / INFOT, NUNIT, OK, LERR
1122      COMMON             / SRNAMC / SRNAMT
1123      COMMON             / SSLCT / SELOPT, SELDIM, SELVAL, SELWR, SELWI
1124      COMMON             / CLAENV / IPARMS
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      S1 = DSECND( )
1136      FATAL = .FALSE.
1137      NUNIT = NOUT
1138*
1139*     Return to here to read multiple sets of data
1140*
1141   10 CONTINUE
1142*
1143*     Read the first line and set the 3-character test path
1144*
1145      READ( NIN, FMT = '(A80)', END = 380 )LINE
1146      PATH = LINE( 1: 3 )
1147      NEP = LSAMEN( 3, PATH, 'NEP' ) .OR. LSAMEN( 3, PATH, 'ZHS' )
1148      SEP = LSAMEN( 3, PATH, 'SEP' ) .OR. LSAMEN( 3, PATH, 'ZST' ) .OR.
1149     $      LSAMEN( 3, PATH, 'ZSG' )
1150      SVD = LSAMEN( 3, PATH, 'SVD' ) .OR. LSAMEN( 3, PATH, 'ZBD' )
1151      ZEV = LSAMEN( 3, PATH, 'ZEV' )
1152      ZES = LSAMEN( 3, PATH, 'ZES' )
1153      ZVX = LSAMEN( 3, PATH, 'ZVX' )
1154      ZSX = LSAMEN( 3, PATH, 'ZSX' )
1155      ZGG = LSAMEN( 3, PATH, 'ZGG' )
1156      ZGS = LSAMEN( 3, PATH, 'ZGS' )
1157      ZGX = LSAMEN( 3, PATH, 'ZGX' )
1158      ZGV = LSAMEN( 3, PATH, 'ZGV' )
1159      ZXV = LSAMEN( 3, PATH, 'ZXV' )
1160      ZHB = LSAMEN( 3, PATH, 'ZHB' )
1161      ZBB = LSAMEN( 3, PATH, 'ZBB' )
1162      GLM = LSAMEN( 3, PATH, 'GLM' )
1163      GQR = LSAMEN( 3, PATH, 'GQR' ) .OR. LSAMEN( 3, PATH, 'GRQ' )
1164      GSV = LSAMEN( 3, PATH, 'GSV' )
1165      CSD = LSAMEN( 3, PATH, 'CSD' )
1166      LSE = LSAMEN( 3, PATH, 'LSE' )
1167      ZBL = LSAMEN( 3, PATH, 'ZBL' )
1168      ZBK = LSAMEN( 3, PATH, 'ZBK' )
1169      ZGL = LSAMEN( 3, PATH, 'ZGL' )
1170      ZGK = LSAMEN( 3, PATH, 'ZGK' )
1171*
1172*     Report values of parameters.
1173*
1174      IF( PATH.EQ.'   ' ) THEN
1175         GO TO 10
1176      ELSE IF( NEP ) THEN
1177         WRITE( NOUT, FMT = 9987 )
1178      ELSE IF( SEP ) THEN
1179         WRITE( NOUT, FMT = 9986 )
1180      ELSE IF( SVD ) THEN
1181         WRITE( NOUT, FMT = 9985 )
1182      ELSE IF( ZEV ) THEN
1183         WRITE( NOUT, FMT = 9979 )
1184      ELSE IF( ZES ) THEN
1185         WRITE( NOUT, FMT = 9978 )
1186      ELSE IF( ZVX ) THEN
1187         WRITE( NOUT, FMT = 9977 )
1188      ELSE IF( ZSX ) THEN
1189         WRITE( NOUT, FMT = 9976 )
1190      ELSE IF( ZGG ) THEN
1191         WRITE( NOUT, FMT = 9975 )
1192      ELSE IF( ZGS ) THEN
1193         WRITE( NOUT, FMT = 9964 )
1194      ELSE IF( ZGX ) THEN
1195         WRITE( NOUT, FMT = 9965 )
1196      ELSE IF( ZGV ) THEN
1197         WRITE( NOUT, FMT = 9963 )
1198      ELSE IF( ZXV ) THEN
1199         WRITE( NOUT, FMT = 9962 )
1200      ELSE IF( ZHB ) THEN
1201         WRITE( NOUT, FMT = 9974 )
1202      ELSE IF( ZBB ) THEN
1203         WRITE( NOUT, FMT = 9967 )
1204      ELSE IF( GLM ) THEN
1205         WRITE( NOUT, FMT = 9971 )
1206      ELSE IF( GQR ) THEN
1207         WRITE( NOUT, FMT = 9970 )
1208      ELSE IF( GSV ) THEN
1209         WRITE( NOUT, FMT = 9969 )
1210      ELSE IF( CSD ) THEN
1211         WRITE( NOUT, FMT = 9960 )
1212      ELSE IF( LSE ) THEN
1213         WRITE( NOUT, FMT = 9968 )
1214      ELSE IF( ZBL ) THEN
1215*
1216*        ZGEBAL:  Balancing
1217*
1218         CALL ZCHKBL( NIN, NOUT )
1219         GO TO 380
1220      ELSE IF( ZBK ) THEN
1221*
1222*        ZGEBAK:  Back transformation
1223*
1224         CALL ZCHKBK( NIN, NOUT )
1225         GO TO 380
1226      ELSE IF( ZGL ) THEN
1227*
1228*        ZGGBAL:  Balancing
1229*
1230         CALL ZCHKGL( NIN, NOUT )
1231         GO TO 380
1232      ELSE IF( ZGK ) THEN
1233*
1234*        ZGGBAK:  Back transformation
1235*
1236         CALL ZCHKGK( NIN, NOUT )
1237         GO TO 380
1238      ELSE IF( LSAMEN( 3, PATH, 'ZEC' ) ) THEN
1239*
1240*        ZEC:  Eigencondition estimation
1241*
1242         READ( NIN, FMT = * )THRESH
1243         CALL XLAENV( 1, 1 )
1244         CALL XLAENV( 12, 1 )
1245         TSTERR = .TRUE.
1246         CALL ZCHKEC( THRESH, TSTERR, NIN, NOUT )
1247         GO TO 380
1248      ELSE
1249         WRITE( NOUT, FMT = 9992 )PATH
1250         GO TO 380
1251      END IF
1252      CALL ILAVER( VERS_MAJOR, VERS_MINOR, VERS_PATCH )
1253      WRITE( NOUT, FMT = 9972 ) VERS_MAJOR, VERS_MINOR, VERS_PATCH
1254      WRITE( NOUT, FMT = 9984 )
1255*
1256*     Read the number of values of M, P, and N.
1257*
1258      READ( NIN, FMT = * )NN
1259      IF( NN.LT.0 ) THEN
1260         WRITE( NOUT, FMT = 9989 )'   NN ', NN, 1
1261         NN = 0
1262         FATAL = .TRUE.
1263      ELSE IF( NN.GT.MAXIN ) THEN
1264         WRITE( NOUT, FMT = 9988 )'   NN ', NN, MAXIN
1265         NN = 0
1266         FATAL = .TRUE.
1267      END IF
1268*
1269*     Read the values of M
1270*
1271      IF( .NOT.( ZGX .OR. ZXV ) ) THEN
1272         READ( NIN, FMT = * )( MVAL( I ), I = 1, NN )
1273         IF( SVD ) THEN
1274            VNAME = '    M '
1275         ELSE
1276            VNAME = '    N '
1277         END IF
1278         DO 20 I = 1, NN
1279            IF( MVAL( I ).LT.0 ) THEN
1280               WRITE( NOUT, FMT = 9989 )VNAME, MVAL( I ), 0
1281               FATAL = .TRUE.
1282            ELSE IF( MVAL( I ).GT.NMAX ) THEN
1283               WRITE( NOUT, FMT = 9988 )VNAME, MVAL( I ), NMAX
1284               FATAL = .TRUE.
1285            END IF
1286   20    CONTINUE
1287         WRITE( NOUT, FMT = 9983 )'M:    ', ( MVAL( I ), I = 1, NN )
1288      END IF
1289*
1290*     Read the values of P
1291*
1292      IF( GLM .OR. GQR .OR. GSV .OR. CSD .OR. LSE ) THEN
1293         READ( NIN, FMT = * )( PVAL( I ), I = 1, NN )
1294         DO 30 I = 1, NN
1295            IF( PVAL( I ).LT.0 ) THEN
1296               WRITE( NOUT, FMT = 9989 )' P  ', PVAL( I ), 0
1297               FATAL = .TRUE.
1298            ELSE IF( PVAL( I ).GT.NMAX ) THEN
1299               WRITE( NOUT, FMT = 9988 )' P  ', PVAL( I ), NMAX
1300               FATAL = .TRUE.
1301            END IF
1302   30    CONTINUE
1303         WRITE( NOUT, FMT = 9983 )'P:    ', ( PVAL( I ), I = 1, NN )
1304      END IF
1305*
1306*     Read the values of N
1307*
1308      IF( SVD .OR. ZBB .OR. GLM .OR. GQR .OR. GSV .OR. CSD .OR.
1309     $    LSE ) THEN
1310         READ( NIN, FMT = * )( NVAL( I ), I = 1, NN )
1311         DO 40 I = 1, NN
1312            IF( NVAL( I ).LT.0 ) THEN
1313               WRITE( NOUT, FMT = 9989 )'    N ', NVAL( I ), 0
1314               FATAL = .TRUE.
1315            ELSE IF( NVAL( I ).GT.NMAX ) THEN
1316               WRITE( NOUT, FMT = 9988 )'    N ', NVAL( I ), NMAX
1317               FATAL = .TRUE.
1318            END IF
1319   40    CONTINUE
1320      ELSE
1321         DO 50 I = 1, NN
1322            NVAL( I ) = MVAL( I )
1323   50    CONTINUE
1324      END IF
1325      IF( .NOT.( ZGX .OR. ZXV ) ) THEN
1326         WRITE( NOUT, FMT = 9983 )'N:    ', ( NVAL( I ), I = 1, NN )
1327      ELSE
1328         WRITE( NOUT, FMT = 9983 )'N:    ', NN
1329      END IF
1330*
1331*     Read the number of values of K, followed by the values of K
1332*
1333      IF( ZHB .OR. ZBB ) THEN
1334         READ( NIN, FMT = * )NK
1335         READ( NIN, FMT = * )( KVAL( I ), I = 1, NK )
1336         DO 60 I = 1, NK
1337            IF( KVAL( I ).LT.0 ) THEN
1338               WRITE( NOUT, FMT = 9989 )'    K ', KVAL( I ), 0
1339               FATAL = .TRUE.
1340            ELSE IF( KVAL( I ).GT.NMAX ) THEN
1341               WRITE( NOUT, FMT = 9988 )'    K ', KVAL( I ), NMAX
1342               FATAL = .TRUE.
1343            END IF
1344   60    CONTINUE
1345         WRITE( NOUT, FMT = 9983 )'K:    ', ( KVAL( I ), I = 1, NK )
1346      END IF
1347*
1348      IF( ZEV .OR. ZES .OR. ZVX .OR. ZSX ) THEN
1349*
1350*        For the nonsymmetric QR driver routines, only one set of
1351*        parameters is allowed.
1352*
1353         READ( NIN, FMT = * )NBVAL( 1 ), NBMIN( 1 ), NXVAL( 1 ),
1354     $      INMIN( 1 ), INWIN( 1 ), INIBL(1), ISHFTS(1), IACC22(1)
1355         IF( NBVAL( 1 ).LT.1 ) THEN
1356            WRITE( NOUT, FMT = 9989 )'   NB ', NBVAL( 1 ), 1
1357            FATAL = .TRUE.
1358         ELSE IF( NBMIN( 1 ).LT.1 ) THEN
1359            WRITE( NOUT, FMT = 9989 )'NBMIN ', NBMIN( 1 ), 1
1360            FATAL = .TRUE.
1361         ELSE IF( NXVAL( 1 ).LT.1 ) THEN
1362            WRITE( NOUT, FMT = 9989 )'   NX ', NXVAL( 1 ), 1
1363            FATAL = .TRUE.
1364         ELSE IF( INMIN( 1 ).LT.1 ) THEN
1365            WRITE( NOUT, FMT = 9989 )'   INMIN ', INMIN( 1 ), 1
1366            FATAL = .TRUE.
1367         ELSE IF( INWIN( 1 ).LT.1 ) THEN
1368            WRITE( NOUT, FMT = 9989 )'   INWIN ', INWIN( 1 ), 1
1369            FATAL = .TRUE.
1370         ELSE IF( INIBL( 1 ).LT.1 ) THEN
1371            WRITE( NOUT, FMT = 9989 )'   INIBL ', INIBL( 1 ), 1
1372            FATAL = .TRUE.
1373         ELSE IF( ISHFTS( 1 ).LT.1 ) THEN
1374            WRITE( NOUT, FMT = 9989 )'   ISHFTS ', ISHFTS( 1 ), 1
1375            FATAL = .TRUE.
1376         ELSE IF( IACC22( 1 ).LT.0 ) THEN
1377            WRITE( NOUT, FMT = 9989 )'   IACC22 ', IACC22( 1 ), 0
1378            FATAL = .TRUE.
1379         END IF
1380         CALL XLAENV( 1, NBVAL( 1 ) )
1381         CALL XLAENV( 2, NBMIN( 1 ) )
1382         CALL XLAENV( 3, NXVAL( 1 ) )
1383         CALL XLAENV(12, MAX( 11, INMIN( 1 ) ) )
1384         CALL XLAENV(13, INWIN( 1 ) )
1385         CALL XLAENV(14, INIBL( 1 ) )
1386         CALL XLAENV(15, ISHFTS( 1 ) )
1387         CALL XLAENV(16, IACC22( 1 ) )
1388         WRITE( NOUT, FMT = 9983 )'NB:   ', NBVAL( 1 )
1389         WRITE( NOUT, FMT = 9983 )'NBMIN:', NBMIN( 1 )
1390         WRITE( NOUT, FMT = 9983 )'NX:   ', NXVAL( 1 )
1391         WRITE( NOUT, FMT = 9983 )'INMIN:   ', INMIN( 1 )
1392         WRITE( NOUT, FMT = 9983 )'INWIN: ', INWIN( 1 )
1393         WRITE( NOUT, FMT = 9983 )'INIBL: ', INIBL( 1 )
1394         WRITE( NOUT, FMT = 9983 )'ISHFTS: ', ISHFTS( 1 )
1395         WRITE( NOUT, FMT = 9983 )'IACC22: ', IACC22( 1 )
1396*
1397      ELSE IF( ZGS .OR. ZGX .OR. ZGV .OR. ZXV ) THEN
1398*
1399*        For the nonsymmetric generalized driver routines, only one set of
1400*        parameters is allowed.
1401*
1402         READ( NIN, FMT = * )NBVAL( 1 ), NBMIN( 1 ), NXVAL( 1 ),
1403     $      NSVAL( 1 ), MXBVAL( 1 )
1404         IF( NBVAL( 1 ).LT.1 ) THEN
1405            WRITE( NOUT, FMT = 9989 )'   NB ', NBVAL( 1 ), 1
1406            FATAL = .TRUE.
1407         ELSE IF( NBMIN( 1 ).LT.1 ) THEN
1408            WRITE( NOUT, FMT = 9989 )'NBMIN ', NBMIN( 1 ), 1
1409            FATAL = .TRUE.
1410         ELSE IF( NXVAL( 1 ).LT.1 ) THEN
1411            WRITE( NOUT, FMT = 9989 )'   NX ', NXVAL( 1 ), 1
1412            FATAL = .TRUE.
1413         ELSE IF( NSVAL( 1 ).LT.2 ) THEN
1414            WRITE( NOUT, FMT = 9989 )'   NS ', NSVAL( 1 ), 2
1415            FATAL = .TRUE.
1416         ELSE IF( MXBVAL( 1 ).LT.1 ) THEN
1417            WRITE( NOUT, FMT = 9989 )' MAXB ', MXBVAL( 1 ), 1
1418            FATAL = .TRUE.
1419         END IF
1420         CALL XLAENV( 1, NBVAL( 1 ) )
1421         CALL XLAENV( 2, NBMIN( 1 ) )
1422         CALL XLAENV( 3, NXVAL( 1 ) )
1423         CALL XLAENV( 4, NSVAL( 1 ) )
1424         CALL XLAENV( 8, MXBVAL( 1 ) )
1425         WRITE( NOUT, FMT = 9983 )'NB:   ', NBVAL( 1 )
1426         WRITE( NOUT, FMT = 9983 )'NBMIN:', NBMIN( 1 )
1427         WRITE( NOUT, FMT = 9983 )'NX:   ', NXVAL( 1 )
1428         WRITE( NOUT, FMT = 9983 )'NS:   ', NSVAL( 1 )
1429         WRITE( NOUT, FMT = 9983 )'MAXB: ', MXBVAL( 1 )
1430      ELSE IF( .NOT.ZHB .AND. .NOT.GLM .AND. .NOT.GQR .AND. .NOT.
1431     $         GSV .AND. .NOT.CSD .AND. .NOT.LSE ) THEN
1432*
1433*        For the other paths, the number of parameters can be varied
1434*        from the input file.  Read the number of parameter values.
1435*
1436         READ( NIN, FMT = * )NPARMS
1437         IF( NPARMS.LT.1 ) THEN
1438            WRITE( NOUT, FMT = 9989 )'NPARMS', NPARMS, 1
1439            NPARMS = 0
1440            FATAL = .TRUE.
1441         ELSE IF( NPARMS.GT.MAXIN ) THEN
1442            WRITE( NOUT, FMT = 9988 )'NPARMS', NPARMS, MAXIN
1443            NPARMS = 0
1444            FATAL = .TRUE.
1445         END IF
1446*
1447*        Read the values of NB
1448*
1449         IF( .NOT.ZBB ) THEN
1450            READ( NIN, FMT = * )( NBVAL( I ), I = 1, NPARMS )
1451            DO 70 I = 1, NPARMS
1452               IF( NBVAL( I ).LT.0 ) THEN
1453                  WRITE( NOUT, FMT = 9989 )'   NB ', NBVAL( I ), 0
1454                  FATAL = .TRUE.
1455               ELSE IF( NBVAL( I ).GT.NMAX ) THEN
1456                  WRITE( NOUT, FMT = 9988 )'   NB ', NBVAL( I ), NMAX
1457                  FATAL = .TRUE.
1458               END IF
1459   70       CONTINUE
1460            WRITE( NOUT, FMT = 9983 )'NB:   ',
1461     $         ( NBVAL( I ), I = 1, NPARMS )
1462         END IF
1463*
1464*        Read the values of NBMIN
1465*
1466         IF( NEP .OR. SEP .OR. SVD .OR. ZGG ) THEN
1467            READ( NIN, FMT = * )( NBMIN( I ), I = 1, NPARMS )
1468            DO 80 I = 1, NPARMS
1469               IF( NBMIN( I ).LT.0 ) THEN
1470                  WRITE( NOUT, FMT = 9989 )'NBMIN ', NBMIN( I ), 0
1471                  FATAL = .TRUE.
1472               ELSE IF( NBMIN( I ).GT.NMAX ) THEN
1473                  WRITE( NOUT, FMT = 9988 )'NBMIN ', NBMIN( I ), NMAX
1474                  FATAL = .TRUE.
1475               END IF
1476   80       CONTINUE
1477            WRITE( NOUT, FMT = 9983 )'NBMIN:',
1478     $         ( NBMIN( I ), I = 1, NPARMS )
1479         ELSE
1480            DO 90 I = 1, NPARMS
1481               NBMIN( I ) = 1
1482   90       CONTINUE
1483         END IF
1484*
1485*        Read the values of NX
1486*
1487         IF( NEP .OR. SEP .OR. SVD ) THEN
1488            READ( NIN, FMT = * )( NXVAL( I ), I = 1, NPARMS )
1489            DO 100 I = 1, NPARMS
1490               IF( NXVAL( I ).LT.0 ) THEN
1491                  WRITE( NOUT, FMT = 9989 )'   NX ', NXVAL( I ), 0
1492                  FATAL = .TRUE.
1493               ELSE IF( NXVAL( I ).GT.NMAX ) THEN
1494                  WRITE( NOUT, FMT = 9988 )'   NX ', NXVAL( I ), NMAX
1495                  FATAL = .TRUE.
1496               END IF
1497  100       CONTINUE
1498            WRITE( NOUT, FMT = 9983 )'NX:   ',
1499     $         ( NXVAL( I ), I = 1, NPARMS )
1500         ELSE
1501            DO 110 I = 1, NPARMS
1502               NXVAL( I ) = 1
1503  110       CONTINUE
1504         END IF
1505*
1506*        Read the values of NSHIFT (if ZGG) or NRHS (if SVD
1507*        or ZBB).
1508*
1509         IF( SVD .OR. ZBB .OR. ZGG ) THEN
1510            READ( NIN, FMT = * )( NSVAL( I ), I = 1, NPARMS )
1511            DO 120 I = 1, NPARMS
1512               IF( NSVAL( I ).LT.0 ) THEN
1513                  WRITE( NOUT, FMT = 9989 )'   NS ', NSVAL( I ), 0
1514                  FATAL = .TRUE.
1515               ELSE IF( NSVAL( I ).GT.NMAX ) THEN
1516                  WRITE( NOUT, FMT = 9988 )'   NS ', NSVAL( I ), NMAX
1517                  FATAL = .TRUE.
1518               END IF
1519  120       CONTINUE
1520            WRITE( NOUT, FMT = 9983 )'NS:   ',
1521     $         ( NSVAL( I ), I = 1, NPARMS )
1522         ELSE
1523            DO 130 I = 1, NPARMS
1524               NSVAL( I ) = 1
1525  130       CONTINUE
1526         END IF
1527*
1528*        Read the values for MAXB.
1529*
1530         IF( ZGG ) THEN
1531            READ( NIN, FMT = * )( MXBVAL( I ), I = 1, NPARMS )
1532            DO 140 I = 1, NPARMS
1533               IF( MXBVAL( I ).LT.0 ) THEN
1534                  WRITE( NOUT, FMT = 9989 )' MAXB ', MXBVAL( I ), 0
1535                  FATAL = .TRUE.
1536               ELSE IF( MXBVAL( I ).GT.NMAX ) THEN
1537                  WRITE( NOUT, FMT = 9988 )' MAXB ', MXBVAL( I ), NMAX
1538                  FATAL = .TRUE.
1539               END IF
1540  140       CONTINUE
1541            WRITE( NOUT, FMT = 9983 )'MAXB: ',
1542     $         ( MXBVAL( I ), I = 1, NPARMS )
1543         ELSE
1544            DO 150 I = 1, NPARMS
1545               MXBVAL( I ) = 1
1546  150       CONTINUE
1547         END IF
1548*
1549*        Read the values for INMIN.
1550*
1551         IF( NEP ) THEN
1552            READ( NIN, FMT = * )( INMIN( I ), I = 1, NPARMS )
1553            DO 540 I = 1, NPARMS
1554               IF( INMIN( I ).LT.0 ) THEN
1555                  WRITE( NOUT, FMT = 9989 )' INMIN ', INMIN( I ), 0
1556                  FATAL = .TRUE.
1557               END IF
1558  540       CONTINUE
1559            WRITE( NOUT, FMT = 9983 )'INMIN: ',
1560     $         ( INMIN( I ), I = 1, NPARMS )
1561         ELSE
1562            DO 550 I = 1, NPARMS
1563               INMIN( I ) = 1
1564  550       CONTINUE
1565         END IF
1566*
1567*        Read the values for INWIN.
1568*
1569         IF( NEP ) THEN
1570            READ( NIN, FMT = * )( INWIN( I ), I = 1, NPARMS )
1571            DO 560 I = 1, NPARMS
1572               IF( INWIN( I ).LT.0 ) THEN
1573                  WRITE( NOUT, FMT = 9989 )' INWIN ', INWIN( I ), 0
1574                  FATAL = .TRUE.
1575               END IF
1576  560       CONTINUE
1577            WRITE( NOUT, FMT = 9983 )'INWIN: ',
1578     $         ( INWIN( I ), I = 1, NPARMS )
1579         ELSE
1580            DO 570 I = 1, NPARMS
1581               INWIN( I ) = 1
1582  570       CONTINUE
1583         END IF
1584*
1585*        Read the values for INIBL.
1586*
1587         IF( NEP ) THEN
1588            READ( NIN, FMT = * )( INIBL( I ), I = 1, NPARMS )
1589            DO 580 I = 1, NPARMS
1590               IF( INIBL( I ).LT.0 ) THEN
1591                  WRITE( NOUT, FMT = 9989 )' INIBL ', INIBL( I ), 0
1592                  FATAL = .TRUE.
1593               END IF
1594  580       CONTINUE
1595            WRITE( NOUT, FMT = 9983 )'INIBL: ',
1596     $         ( INIBL( I ), I = 1, NPARMS )
1597         ELSE
1598            DO 590 I = 1, NPARMS
1599               INIBL( I ) = 1
1600  590       CONTINUE
1601         END IF
1602*
1603*        Read the values for ISHFTS.
1604*
1605         IF( NEP ) THEN
1606            READ( NIN, FMT = * )( ISHFTS( I ), I = 1, NPARMS )
1607            DO 600 I = 1, NPARMS
1608               IF( ISHFTS( I ).LT.0 ) THEN
1609                  WRITE( NOUT, FMT = 9989 )' ISHFTS ', ISHFTS( I ), 0
1610                  FATAL = .TRUE.
1611               END IF
1612  600       CONTINUE
1613            WRITE( NOUT, FMT = 9983 )'ISHFTS: ',
1614     $         ( ISHFTS( I ), I = 1, NPARMS )
1615         ELSE
1616            DO 610 I = 1, NPARMS
1617               ISHFTS( I ) = 1
1618  610       CONTINUE
1619         END IF
1620*
1621*        Read the values for IACC22.
1622*
1623         IF( NEP ) THEN
1624            READ( NIN, FMT = * )( IACC22( I ), I = 1, NPARMS )
1625            DO 620 I = 1, NPARMS
1626               IF( IACC22( I ).LT.0 ) THEN
1627                  WRITE( NOUT, FMT = 9989 )' IACC22 ', IACC22( I ), 0
1628                  FATAL = .TRUE.
1629               END IF
1630  620       CONTINUE
1631            WRITE( NOUT, FMT = 9983 )'IACC22: ',
1632     $         ( IACC22( I ), I = 1, NPARMS )
1633         ELSE
1634            DO 630 I = 1, NPARMS
1635               IACC22( I ) = 1
1636  630       CONTINUE
1637         END IF
1638*
1639*        Read the values for NBCOL.
1640*
1641         IF( ZGG ) THEN
1642            READ( NIN, FMT = * )( NBCOL( I ), I = 1, NPARMS )
1643            DO 160 I = 1, NPARMS
1644               IF( NBCOL( I ).LT.0 ) THEN
1645                  WRITE( NOUT, FMT = 9989 )'NBCOL ', NBCOL( I ), 0
1646                  FATAL = .TRUE.
1647               ELSE IF( NBCOL( I ).GT.NMAX ) THEN
1648                  WRITE( NOUT, FMT = 9988 )'NBCOL ', NBCOL( I ), NMAX
1649                  FATAL = .TRUE.
1650               END IF
1651  160       CONTINUE
1652            WRITE( NOUT, FMT = 9983 )'NBCOL:',
1653     $         ( NBCOL( I ), I = 1, NPARMS )
1654         ELSE
1655            DO 170 I = 1, NPARMS
1656               NBCOL( I ) = 1
1657  170       CONTINUE
1658         END IF
1659      END IF
1660*
1661*     Calculate and print the machine dependent constants.
1662*
1663      WRITE( NOUT, FMT = * )
1664      EPS = DLAMCH( 'Underflow threshold' )
1665      WRITE( NOUT, FMT = 9981 )'underflow', EPS
1666      EPS = DLAMCH( 'Overflow threshold' )
1667      WRITE( NOUT, FMT = 9981 )'overflow ', EPS
1668      EPS = DLAMCH( 'Epsilon' )
1669      WRITE( NOUT, FMT = 9981 )'precision', EPS
1670*
1671*     Read the threshold value for the test ratios.
1672*
1673      READ( NIN, FMT = * )THRESH
1674      WRITE( NOUT, FMT = 9982 )THRESH
1675      IF( SEP .OR. SVD .OR. ZGG ) THEN
1676*
1677*        Read the flag that indicates whether to test LAPACK routines.
1678*
1679         READ( NIN, FMT = * )TSTCHK
1680*
1681*        Read the flag that indicates whether to test driver routines.
1682*
1683         READ( NIN, FMT = * )TSTDRV
1684      END IF
1685*
1686*     Read the flag that indicates whether to test the error exits.
1687*
1688      READ( NIN, FMT = * )TSTERR
1689*
1690*     Read the code describing how to set the random number seed.
1691*
1692      READ( NIN, FMT = * )NEWSD
1693*
1694*     If NEWSD = 2, read another line with 4 integers for the seed.
1695*
1696      IF( NEWSD.EQ.2 )
1697     $   READ( NIN, FMT = * )( IOLDSD( I ), I = 1, 4 )
1698*
1699      DO 180 I = 1, 4
1700         ISEED( I ) = IOLDSD( I )
1701  180 CONTINUE
1702*
1703      IF( FATAL ) THEN
1704         WRITE( NOUT, FMT = 9999 )
1705         STOP
1706      END IF
1707*
1708*     Read the input lines indicating the test path and its parameters.
1709*     The first three characters indicate the test path, and the number
1710*     of test matrix types must be the first nonblank item in columns
1711*     4-80.
1712*
1713  190 CONTINUE
1714*
1715      IF( .NOT.( ZGX .OR. ZXV ) ) THEN
1716*
1717  200    CONTINUE
1718         READ( NIN, FMT = '(A80)', END = 380 )LINE
1719         C3 = LINE( 1: 3 )
1720         LENP = LEN( LINE )
1721         I = 3
1722         ITMP = 0
1723         I1 = 0
1724  210    CONTINUE
1725         I = I + 1
1726         IF( I.GT.LENP ) THEN
1727            IF( I1.GT.0 ) THEN
1728               GO TO 240
1729            ELSE
1730               NTYPES = MAXT
1731               GO TO 240
1732            END IF
1733         END IF
1734         IF( LINE( I: I ).NE.' ' .AND. LINE( I: I ).NE.',' ) THEN
1735            I1 = I
1736            C1 = LINE( I1: I1 )
1737*
1738*        Check that a valid integer was read
1739*
1740            DO 220 K = 1, 10
1741               IF( C1.EQ.INTSTR( K: K ) ) THEN
1742                  IC = K - 1
1743                  GO TO 230
1744               END IF
1745  220       CONTINUE
1746            WRITE( NOUT, FMT = 9991 )I, LINE
1747            GO TO 200
1748  230       CONTINUE
1749            ITMP = 10*ITMP + IC
1750            GO TO 210
1751         ELSE IF( I1.GT.0 ) THEN
1752            GO TO 240
1753         ELSE
1754            GO TO 210
1755         END IF
1756  240    CONTINUE
1757         NTYPES = ITMP
1758*
1759*     Skip the tests if NTYPES is <= 0.
1760*
1761         IF( .NOT.( ZEV .OR. ZES .OR. ZVX .OR. ZSX .OR. ZGV .OR.
1762     $       ZGS ) .AND. NTYPES.LE.0 ) THEN
1763            WRITE( NOUT, FMT = 9990 )C3
1764            GO TO 200
1765         END IF
1766*
1767      ELSE
1768         IF( ZGX )
1769     $      C3 = 'ZGX'
1770         IF( ZXV )
1771     $      C3 = 'ZXV'
1772      END IF
1773*
1774*     Reset the random number seed.
1775*
1776      IF( NEWSD.EQ.0 ) THEN
1777         DO 250 K = 1, 4
1778            ISEED( K ) = IOLDSD( K )
1779  250    CONTINUE
1780      END IF
1781*
1782      IF( LSAMEN( 3, C3, 'ZHS' ) .OR. LSAMEN( 3, C3, 'NEP' ) ) THEN
1783*
1784*        -------------------------------------
1785*        NEP:  Nonsymmetric Eigenvalue Problem
1786*        -------------------------------------
1787*        Vary the parameters
1788*           NB    = block size
1789*           NBMIN = minimum block size
1790*           NX    = crossover point
1791*           NS    = number of shifts
1792*           MAXB  = minimum submatrix size
1793*
1794         MAXTYP = 21
1795         NTYPES = MIN( MAXTYP, NTYPES )
1796         CALL ALAREQ( C3, NTYPES, DOTYPE, MAXTYP, NIN, NOUT )
1797         CALL XLAENV( 1, 1 )
1798         IF( TSTERR )
1799     $      CALL ZERRHS( 'ZHSEQR', NOUT )
1800         DO 270 I = 1, NPARMS
1801            CALL XLAENV( 1, NBVAL( I ) )
1802            CALL XLAENV( 2, NBMIN( I ) )
1803            CALL XLAENV( 3, NXVAL( I ) )
1804            CALL XLAENV(12, MAX( 11, INMIN( I ) ) )
1805            CALL XLAENV(13, INWIN( I ) )
1806            CALL XLAENV(14, INIBL( I ) )
1807            CALL XLAENV(15, ISHFTS( I ) )
1808            CALL XLAENV(16, IACC22( I ) )
1809*
1810            IF( NEWSD.EQ.0 ) THEN
1811               DO 260 K = 1, 4
1812                  ISEED( K ) = IOLDSD( K )
1813  260          CONTINUE
1814            END IF
1815            WRITE( NOUT, FMT = 9961 )C3, NBVAL( I ), NBMIN( I ),
1816     $         NXVAL( I ), MAX( 11, INMIN(I)),
1817     $         INWIN( I ), INIBL( I ), ISHFTS( I ), IACC22( I )
1818            CALL ZCHKHS( NN, NVAL, MAXTYP, DOTYPE, ISEED, THRESH, NOUT,
1819     $                   A( 1, 1 ), NMAX, A( 1, 2 ), A( 1, 3 ),
1820     $                   A( 1, 4 ), A( 1, 5 ), NMAX, A( 1, 6 ),
1821     $                   A( 1, 7 ), DC( 1, 1 ), DC( 1, 2 ), A( 1, 8 ),
1822     $                   A( 1, 9 ), A( 1, 10 ), A( 1, 11 ), A( 1, 12 ),
1823     $                   DC( 1, 3 ), WORK, LWORK, RWORK, IWORK, LOGWRK,
1824     $                   RESULT, INFO )
1825            IF( INFO.NE.0 )
1826     $         WRITE( NOUT, FMT = 9980 )'ZCHKHS', INFO
1827  270    CONTINUE
1828*
1829      ELSE IF( LSAMEN( 3, C3, 'ZST' ) .OR. LSAMEN( 3, C3, 'SEP' ) ) THEN
1830*
1831*        ----------------------------------
1832*        SEP:  Symmetric Eigenvalue Problem
1833*        ----------------------------------
1834*        Vary the parameters
1835*           NB    = block size
1836*           NBMIN = minimum block size
1837*           NX    = crossover point
1838*
1839         MAXTYP = 21
1840         NTYPES = MIN( MAXTYP, NTYPES )
1841         CALL ALAREQ( C3, NTYPES, DOTYPE, MAXTYP, NIN, NOUT )
1842         CALL XLAENV( 1, 1 )
1843         CALL XLAENV( 9, 25 )
1844         IF( TSTERR )
1845     $      CALL ZERRST( 'ZST', NOUT )
1846         DO 290 I = 1, NPARMS
1847            CALL XLAENV( 1, NBVAL( I ) )
1848            CALL XLAENV( 2, NBMIN( I ) )
1849            CALL XLAENV( 3, NXVAL( I ) )
1850*
1851            IF( NEWSD.EQ.0 ) THEN
1852               DO 280 K = 1, 4
1853                  ISEED( K ) = IOLDSD( K )
1854  280          CONTINUE
1855            END IF
1856            WRITE( NOUT, FMT = 9997 )C3, NBVAL( I ), NBMIN( I ),
1857     $         NXVAL( I )
1858            IF( TSTCHK ) THEN
1859               CALL ZCHKST( NN, NVAL, MAXTYP, DOTYPE, ISEED, THRESH,
1860     $                      NOUT, A( 1, 1 ), NMAX, A( 1, 2 ),
1861     $                      DR( 1, 1 ), DR( 1, 2 ), DR( 1, 3 ),
1862     $                      DR( 1, 4 ), DR( 1, 5 ), DR( 1, 6 ),
1863     $                      DR( 1, 7 ), DR( 1, 8 ), DR( 1, 9 ),
1864     $                      DR( 1, 10 ), DR( 1, 11 ), A( 1, 3 ), NMAX,
1865     $                      A( 1, 4 ), A( 1, 5 ), DC( 1, 1 ), A( 1, 6 ),
1866     $                      WORK, LWORK, RWORK, LWORK, IWORK, LIWORK,
1867     $                      RESULT, INFO )
1868               IF( INFO.NE.0 )
1869     $            WRITE( NOUT, FMT = 9980 )'ZCHKST', INFO
1870            END IF
1871            IF( TSTDRV ) THEN
1872               CALL ZDRVST( NN, NVAL, 18, DOTYPE, ISEED, THRESH, NOUT,
1873     $                      A( 1, 1 ), NMAX, DR( 1, 3 ), DR( 1, 4 ),
1874     $                      DR( 1, 5 ), DR( 1, 8 ), DR( 1, 9 ),
1875     $                      DR( 1, 10 ), A( 1, 2 ), NMAX, A( 1, 3 ),
1876     $                      DC( 1, 1 ), A( 1, 4 ), WORK, LWORK, RWORK,
1877     $                      LWORK, IWORK, LIWORK, RESULT, INFO )
1878               IF( INFO.NE.0 )
1879     $            WRITE( NOUT, FMT = 9980 )'ZDRVST', INFO
1880            END IF
1881  290    CONTINUE
1882*
1883      ELSE IF( LSAMEN( 3, C3, 'ZSG' ) ) THEN
1884*
1885*        ----------------------------------------------
1886*        ZSG:  Hermitian Generalized Eigenvalue Problem
1887*        ----------------------------------------------
1888*        Vary the parameters
1889*           NB    = block size
1890*           NBMIN = minimum block size
1891*           NX    = crossover point
1892*
1893         MAXTYP = 21
1894         NTYPES = MIN( MAXTYP, NTYPES )
1895         CALL ALAREQ( C3, NTYPES, DOTYPE, MAXTYP, NIN, NOUT )
1896         CALL XLAENV( 9, 25 )
1897         DO 310 I = 1, NPARMS
1898            CALL XLAENV( 1, NBVAL( I ) )
1899            CALL XLAENV( 2, NBMIN( I ) )
1900            CALL XLAENV( 3, NXVAL( I ) )
1901*
1902            IF( NEWSD.EQ.0 ) THEN
1903               DO 300 K = 1, 4
1904                  ISEED( K ) = IOLDSD( K )
1905  300          CONTINUE
1906            END IF
1907            WRITE( NOUT, FMT = 9997 )C3, NBVAL( I ), NBMIN( I ),
1908     $         NXVAL( I )
1909            IF( TSTCHK ) THEN
1910               CALL ZDRVSG( NN, NVAL, MAXTYP, DOTYPE, ISEED, THRESH,
1911     $                      NOUT, A( 1, 1 ), NMAX, A( 1, 2 ), NMAX,
1912     $                      DR( 1, 3 ), A( 1, 3 ), NMAX, A( 1, 4 ),
1913     $                      A( 1, 5 ), A( 1, 6 ), A( 1, 7 ), WORK,
1914     $                      LWORK, RWORK, LWORK, IWORK, LIWORK, RESULT,
1915     $                      INFO )
1916               IF( INFO.NE.0 )
1917     $            WRITE( NOUT, FMT = 9980 )'ZDRVSG', INFO
1918            END IF
1919  310    CONTINUE
1920*
1921      ELSE IF( LSAMEN( 3, C3, 'ZBD' ) .OR. LSAMEN( 3, C3, 'SVD' ) ) THEN
1922*
1923*        ----------------------------------
1924*        SVD:  Singular Value Decomposition
1925*        ----------------------------------
1926*        Vary the parameters
1927*           NB    = block size
1928*           NBMIN = minimum block size
1929*           NX    = crossover point
1930*           NRHS  = number of right hand sides
1931*
1932         MAXTYP = 16
1933         NTYPES = MIN( MAXTYP, NTYPES )
1934         CALL ALAREQ( C3, NTYPES, DOTYPE, MAXTYP, NIN, NOUT )
1935         CALL XLAENV( 9, 25 )
1936*
1937*        Test the error exits
1938*
1939         CALL XLAENV( 1, 1 )
1940         IF( TSTERR .AND. TSTCHK )
1941     $      CALL ZERRBD( 'ZBD', NOUT )
1942         IF( TSTERR .AND. TSTDRV )
1943     $      CALL ZERRED( 'ZBD', NOUT )
1944*
1945         DO 330 I = 1, NPARMS
1946            NRHS = NSVAL( I )
1947            CALL XLAENV( 1, NBVAL( I ) )
1948            CALL XLAENV( 2, NBMIN( I ) )
1949            CALL XLAENV( 3, NXVAL( I ) )
1950            IF( NEWSD.EQ.0 ) THEN
1951               DO 320 K = 1, 4
1952                  ISEED( K ) = IOLDSD( K )
1953  320          CONTINUE
1954            END IF
1955            WRITE( NOUT, FMT = 9995 )C3, NBVAL( I ), NBMIN( I ),
1956     $         NXVAL( I ), NRHS
1957            IF( TSTCHK ) THEN
1958               CALL ZCHKBD( NN, MVAL, NVAL, MAXTYP, DOTYPE, NRHS, ISEED,
1959     $                      THRESH, A( 1, 1 ), NMAX, DR( 1, 1 ),
1960     $                      DR( 1, 2 ), DR( 1, 3 ), DR( 1, 4 ),
1961     $                      A( 1, 2 ), NMAX, A( 1, 3 ), A( 1, 4 ),
1962     $                      A( 1, 5 ), NMAX, A( 1, 6 ), NMAX, A( 1, 7 ),
1963     $                      A( 1, 8 ), WORK, LWORK, RWORK, NOUT, INFO )
1964               IF( INFO.NE.0 )
1965     $            WRITE( NOUT, FMT = 9980 )'ZCHKBD', INFO
1966            END IF
1967            IF( TSTDRV )
1968     $         CALL ZDRVBD( NN, MVAL, NVAL, MAXTYP, DOTYPE, ISEED,
1969     $                      THRESH, A( 1, 1 ), NMAX, A( 1, 2 ), NMAX,
1970     $                      A( 1, 3 ), NMAX, A( 1, 4 ), A( 1, 5 ),
1971     $                      A( 1, 6 ), DR( 1, 1 ), DR( 1, 2 ),
1972     $                      DR( 1, 3 ), WORK, LWORK, RWORK, IWORK, NOUT,
1973     $                      INFO )
1974  330    CONTINUE
1975*
1976      ELSE IF( LSAMEN( 3, C3, 'ZEV' ) ) THEN
1977*
1978*        --------------------------------------------
1979*        ZEV:  Nonsymmetric Eigenvalue Problem Driver
1980*              ZGEEV (eigenvalues and eigenvectors)
1981*        --------------------------------------------
1982*
1983         MAXTYP = 21
1984         NTYPES = MIN( MAXTYP, NTYPES )
1985         IF( NTYPES.LE.0 ) THEN
1986            WRITE( NOUT, FMT = 9990 )C3
1987         ELSE
1988            IF( TSTERR )
1989     $         CALL ZERRED( C3, NOUT )
1990            CALL ALAREQ( C3, NTYPES, DOTYPE, MAXTYP, NIN, NOUT )
1991            CALL ZDRVEV( NN, NVAL, NTYPES, DOTYPE, ISEED, THRESH, NOUT,
1992     $                   A( 1, 1 ), NMAX, A( 1, 2 ), DC( 1, 1 ),
1993     $                   DC( 1, 2 ), A( 1, 3 ), NMAX, A( 1, 4 ), NMAX,
1994     $                   A( 1, 5 ), NMAX, RESULT, WORK, LWORK, RWORK,
1995     $                   IWORK, INFO )
1996            IF( INFO.NE.0 )
1997     $         WRITE( NOUT, FMT = 9980 )'ZGEEV', INFO
1998         END IF
1999         WRITE( NOUT, FMT = 9973 )
2000         GO TO 10
2001*
2002      ELSE IF( LSAMEN( 3, C3, 'ZES' ) ) THEN
2003*
2004*        --------------------------------------------
2005*        ZES:  Nonsymmetric Eigenvalue Problem Driver
2006*              ZGEES (Schur form)
2007*        --------------------------------------------
2008*
2009         MAXTYP = 21
2010         NTYPES = MIN( MAXTYP, NTYPES )
2011         IF( NTYPES.LE.0 ) THEN
2012            WRITE( NOUT, FMT = 9990 )C3
2013         ELSE
2014            IF( TSTERR )
2015     $         CALL ZERRED( C3, NOUT )
2016            CALL ALAREQ( C3, NTYPES, DOTYPE, MAXTYP, NIN, NOUT )
2017            CALL ZDRVES( NN, NVAL, NTYPES, DOTYPE, ISEED, THRESH, NOUT,
2018     $                   A( 1, 1 ), NMAX, A( 1, 2 ), A( 1, 3 ),
2019     $                   DC( 1, 1 ), DC( 1, 2 ), A( 1, 4 ), NMAX,
2020     $                   RESULT, WORK, LWORK, RWORK, IWORK, LOGWRK,
2021     $                   INFO )
2022            IF( INFO.NE.0 )
2023     $         WRITE( NOUT, FMT = 9980 )'ZGEES', INFO
2024         END IF
2025         WRITE( NOUT, FMT = 9973 )
2026         GO TO 10
2027*
2028      ELSE IF( LSAMEN( 3, C3, 'ZVX' ) ) THEN
2029*
2030*        --------------------------------------------------------------
2031*        ZVX:  Nonsymmetric Eigenvalue Problem Expert Driver
2032*              ZGEEVX (eigenvalues, eigenvectors and condition numbers)
2033*        --------------------------------------------------------------
2034*
2035         MAXTYP = 21
2036         NTYPES = MIN( MAXTYP, NTYPES )
2037         IF( NTYPES.LT.0 ) THEN
2038            WRITE( NOUT, FMT = 9990 )C3
2039         ELSE
2040            IF( TSTERR )
2041     $         CALL ZERRED( C3, NOUT )
2042            CALL ALAREQ( C3, NTYPES, DOTYPE, MAXTYP, NIN, NOUT )
2043            CALL ZDRVVX( NN, NVAL, NTYPES, DOTYPE, ISEED, THRESH, NIN,
2044     $                   NOUT, A( 1, 1 ), NMAX, A( 1, 2 ), DC( 1, 1 ),
2045     $                   DC( 1, 2 ), A( 1, 3 ), NMAX, A( 1, 4 ), NMAX,
2046     $                   A( 1, 5 ), NMAX, DR( 1, 1 ), DR( 1, 2 ),
2047     $                   DR( 1, 3 ), DR( 1, 4 ), DR( 1, 5 ), DR( 1, 6 ),
2048     $                   DR( 1, 7 ), DR( 1, 8 ), RESULT, WORK, LWORK,
2049     $                   RWORK, INFO )
2050            IF( INFO.NE.0 )
2051     $         WRITE( NOUT, FMT = 9980 )'ZGEEVX', INFO
2052         END IF
2053         WRITE( NOUT, FMT = 9973 )
2054         GO TO 10
2055*
2056      ELSE IF( LSAMEN( 3, C3, 'ZSX' ) ) THEN
2057*
2058*        ---------------------------------------------------
2059*        ZSX:  Nonsymmetric Eigenvalue Problem Expert Driver
2060*              ZGEESX (Schur form and condition numbers)
2061*        ---------------------------------------------------
2062*
2063         MAXTYP = 21
2064         NTYPES = MIN( MAXTYP, NTYPES )
2065         IF( NTYPES.LT.0 ) THEN
2066            WRITE( NOUT, FMT = 9990 )C3
2067         ELSE
2068            IF( TSTERR )
2069     $         CALL ZERRED( C3, NOUT )
2070            CALL ALAREQ( C3, NTYPES, DOTYPE, MAXTYP, NIN, NOUT )
2071            CALL ZDRVSX( NN, NVAL, NTYPES, DOTYPE, ISEED, THRESH, NIN,
2072     $                   NOUT, A( 1, 1 ), NMAX, A( 1, 2 ), A( 1, 3 ),
2073     $                   DC( 1, 1 ), DC( 1, 2 ), DC( 1, 3 ), A( 1, 4 ),
2074     $                   NMAX, A( 1, 5 ), RESULT, WORK, LWORK, RWORK,
2075     $                   LOGWRK, INFO )
2076            IF( INFO.NE.0 )
2077     $         WRITE( NOUT, FMT = 9980 )'ZGEESX', INFO
2078         END IF
2079         WRITE( NOUT, FMT = 9973 )
2080         GO TO 10
2081*
2082      ELSE IF( LSAMEN( 3, C3, 'ZGG' ) ) THEN
2083*
2084*        -------------------------------------------------
2085*        ZGG:  Generalized Nonsymmetric Eigenvalue Problem
2086*        -------------------------------------------------
2087*        Vary the parameters
2088*           NB    = block size
2089*           NBMIN = minimum block size
2090*           NS    = number of shifts
2091*           MAXB  = minimum submatrix size
2092*           NBCOL = minimum column dimension for blocks
2093*
2094         MAXTYP = 26
2095         NTYPES = MIN( MAXTYP, NTYPES )
2096         CALL ALAREQ( C3, NTYPES, DOTYPE, MAXTYP, NIN, NOUT )
2097         IF( TSTCHK .AND. TSTERR )
2098     $      CALL ZERRGG( C3, NOUT )
2099         DO 350 I = 1, NPARMS
2100            CALL XLAENV( 1, NBVAL( I ) )
2101            CALL XLAENV( 2, NBMIN( I ) )
2102            CALL XLAENV( 4, NSVAL( I ) )
2103            CALL XLAENV( 8, MXBVAL( I ) )
2104            CALL XLAENV( 5, NBCOL( I ) )
2105*
2106            IF( NEWSD.EQ.0 ) THEN
2107               DO 340 K = 1, 4
2108                  ISEED( K ) = IOLDSD( K )
2109  340          CONTINUE
2110            END IF
2111            WRITE( NOUT, FMT = 9996 )C3, NBVAL( I ), NBMIN( I ),
2112     $         NSVAL( I ), MXBVAL( I ), NBCOL( I )
2113            TSTDIF = .FALSE.
2114            THRSHN = 10.D0
2115            IF( TSTCHK ) THEN
2116               CALL ZCHKGG( NN, NVAL, MAXTYP, DOTYPE, ISEED, THRESH,
2117     $                      TSTDIF, THRSHN, NOUT, A( 1, 1 ), NMAX,
2118     $                      A( 1, 2 ), A( 1, 3 ), A( 1, 4 ), A( 1, 5 ),
2119     $                      A( 1, 6 ), A( 1, 7 ), A( 1, 8 ), A( 1, 9 ),
2120     $                      NMAX, A( 1, 10 ), A( 1, 11 ), A( 1, 12 ),
2121     $                      DC( 1, 1 ), DC( 1, 2 ), DC( 1, 3 ),
2122     $                      DC( 1, 4 ), A( 1, 13 ), A( 1, 14 ), WORK,
2123     $                      LWORK, RWORK, LOGWRK, RESULT, INFO )
2124               IF( INFO.NE.0 )
2125     $            WRITE( NOUT, FMT = 9980 )'ZCHKGG', INFO
2126            END IF
2127            CALL XLAENV( 1, 1 )
2128            IF( TSTDRV ) THEN
2129               CALL ZDRVGG( NN, NVAL, MAXTYP, DOTYPE, ISEED, THRESH,
2130     $                      THRSHN, NOUT, A( 1, 1 ), NMAX, A( 1, 2 ),
2131     $                      A( 1, 3 ), A( 1, 4 ), A( 1, 5 ), A( 1, 6 ),
2132     $                      A( 1, 7 ), NMAX, A( 1, 8 ), DC( 1, 1 ),
2133     $                      DC( 1, 2 ), DC( 1, 3 ), DC( 1, 4 ),
2134     $                      A( 1, 8 ), A( 1, 9 ), WORK, LWORK, RWORK,
2135     $                      RESULT, INFO )
2136               IF( INFO.NE.0 )
2137     $            WRITE( NOUT, FMT = 9980 )'ZDRVGG', INFO
2138            END IF
2139  350    CONTINUE
2140*
2141      ELSE IF( LSAMEN( 3, C3, 'ZGS' ) ) THEN
2142*
2143*        -------------------------------------------------
2144*        ZGS:  Generalized Nonsymmetric Eigenvalue Problem
2145*              ZGGES (Schur form)
2146*        -------------------------------------------------
2147*
2148         MAXTYP = 26
2149         NTYPES = MIN( MAXTYP, NTYPES )
2150         IF( NTYPES.LE.0 ) THEN
2151            WRITE( NOUT, FMT = 9990 )C3
2152         ELSE
2153            IF( TSTERR )
2154     $         CALL ZERRGG( C3, NOUT )
2155            CALL ALAREQ( C3, NTYPES, DOTYPE, MAXTYP, NIN, NOUT )
2156            CALL ZDRGES( NN, NVAL, MAXTYP, DOTYPE, ISEED, THRESH, NOUT,
2157     $                   A( 1, 1 ), NMAX, A( 1, 2 ), A( 1, 3 ),
2158     $                   A( 1, 4 ), A( 1, 7 ), NMAX, A( 1, 8 ),
2159     $                   DC( 1, 1 ), DC( 1, 2 ), WORK, LWORK, RWORK,
2160     $                   RESULT, LOGWRK, INFO )
2161*
2162            IF( INFO.NE.0 )
2163     $         WRITE( NOUT, FMT = 9980 )'ZDRGES', INFO
2164         END IF
2165         WRITE( NOUT, FMT = 9973 )
2166         GO TO 10
2167*
2168      ELSE IF( ZGX ) THEN
2169*
2170*        -------------------------------------------------
2171*        ZGX  Generalized Nonsymmetric Eigenvalue Problem
2172*              ZGGESX (Schur form and condition numbers)
2173*        -------------------------------------------------
2174*
2175         MAXTYP = 5
2176         NTYPES = MAXTYP
2177         IF( NN.LT.0 ) THEN
2178            WRITE( NOUT, FMT = 9990 )C3
2179         ELSE
2180            IF( TSTERR )
2181     $         CALL ZERRGG( C3, NOUT )
2182            CALL ALAREQ( C3, NTYPES, DOTYPE, MAXTYP, NIN, NOUT )
2183            CALL XLAENV( 5, 2 )
2184            CALL ZDRGSX( NN, NCMAX, THRESH, NIN, NOUT, A( 1, 1 ), NMAX,
2185     $                   A( 1, 2 ), A( 1, 3 ), A( 1, 4 ), A( 1, 5 ),
2186     $                   A( 1, 6 ), DC( 1, 1 ), DC( 1, 2 ), C,
2187     $                   NCMAX*NCMAX, S, WORK, LWORK, RWORK, IWORK,
2188     $                   LIWORK, LOGWRK, INFO )
2189            IF( INFO.NE.0 )
2190     $         WRITE( NOUT, FMT = 9980 )'ZDRGSX', INFO
2191         END IF
2192         WRITE( NOUT, FMT = 9973 )
2193         GO TO 10
2194*
2195      ELSE IF( LSAMEN( 3, C3, 'ZGV' ) ) THEN
2196*
2197*        -------------------------------------------------
2198*        ZGV:  Generalized Nonsymmetric Eigenvalue Problem
2199*              ZGGEV (Eigenvalue/vector form)
2200*        -------------------------------------------------
2201*
2202         MAXTYP = 26
2203         NTYPES = MIN( MAXTYP, NTYPES )
2204         IF( NTYPES.LE.0 ) THEN
2205            WRITE( NOUT, FMT = 9990 )C3
2206         ELSE
2207            IF( TSTERR )
2208     $         CALL ZERRGG( C3, NOUT )
2209            CALL ALAREQ( C3, NTYPES, DOTYPE, MAXTYP, NIN, NOUT )
2210            CALL ZDRGEV( NN, NVAL, MAXTYP, DOTYPE, ISEED, THRESH, NOUT,
2211     $                   A( 1, 1 ), NMAX, A( 1, 2 ), A( 1, 3 ),
2212     $                   A( 1, 4 ), A( 1, 7 ), NMAX, A( 1, 8 ),
2213     $                   A( 1, 9 ), NMAX, DC( 1, 1 ), DC( 1, 2 ),
2214     $                   DC( 1, 3 ), DC( 1, 4 ), WORK, LWORK, RWORK,
2215     $                   RESULT, INFO )
2216            IF( INFO.NE.0 )
2217     $         WRITE( NOUT, FMT = 9980 )'ZDRGEV', INFO
2218         END IF
2219         WRITE( NOUT, FMT = 9973 )
2220         GO TO 10
2221*
2222      ELSE IF( ZXV ) THEN
2223*
2224*        -------------------------------------------------
2225*        ZXV:  Generalized Nonsymmetric Eigenvalue Problem
2226*              ZGGEVX (eigenvalue/vector with condition numbers)
2227*        -------------------------------------------------
2228*
2229         MAXTYP = 2
2230         NTYPES = MAXTYP
2231         IF( NN.LT.0 ) THEN
2232            WRITE( NOUT, FMT = 9990 )C3
2233         ELSE
2234            IF( TSTERR )
2235     $         CALL ZERRGG( C3, NOUT )
2236            CALL ALAREQ( C3, NTYPES, DOTYPE, MAXTYP, NIN, NOUT )
2237            CALL ZDRGVX( NN, THRESH, NIN, NOUT, A( 1, 1 ), NMAX,
2238     $                   A( 1, 2 ), A( 1, 3 ), A( 1, 4 ), DC( 1, 1 ),
2239     $                   DC( 1, 2 ), A( 1, 5 ), A( 1, 6 ), IWORK( 1 ),
2240     $                   IWORK( 2 ), DR( 1, 1 ), DR( 1, 2 ), DR( 1, 3 ),
2241     $                   DR( 1, 4 ), DR( 1, 5 ), DR( 1, 6 ), WORK,
2242     $                   LWORK, RWORK, IWORK( 3 ), LIWORK-2, RESULT,
2243     $                   LOGWRK, INFO )
2244*
2245            IF( INFO.NE.0 )
2246     $         WRITE( NOUT, FMT = 9980 )'ZDRGVX', INFO
2247         END IF
2248         WRITE( NOUT, FMT = 9973 )
2249         GO TO 10
2250*
2251      ELSE IF( LSAMEN( 3, C3, 'ZHB' ) ) THEN
2252*
2253*        ------------------------------
2254*        ZHB:  Hermitian Band Reduction
2255*        ------------------------------
2256*
2257         MAXTYP = 15
2258         NTYPES = MIN( MAXTYP, NTYPES )
2259         CALL ALAREQ( C3, NTYPES, DOTYPE, MAXTYP, NIN, NOUT )
2260         IF( TSTERR )
2261     $      CALL ZERRST( 'ZHB', NOUT )
2262         CALL ZCHKHB( NN, NVAL, NK, KVAL, MAXTYP, DOTYPE, ISEED, THRESH,
2263     $                NOUT, A( 1, 1 ), NMAX, DR( 1, 1 ), DR( 1, 2 ),
2264     $                A( 1, 2 ), NMAX, WORK, LWORK, RWORK, RESULT,
2265     $                INFO )
2266         IF( INFO.NE.0 )
2267     $      WRITE( NOUT, FMT = 9980 )'ZCHKHB', INFO
2268*
2269      ELSE IF( LSAMEN( 3, C3, 'ZBB' ) ) THEN
2270*
2271*        ------------------------------
2272*        ZBB:  General Band Reduction
2273*        ------------------------------
2274*
2275         MAXTYP = 15
2276         NTYPES = MIN( MAXTYP, NTYPES )
2277         CALL ALAREQ( C3, NTYPES, DOTYPE, MAXTYP, NIN, NOUT )
2278         DO 370 I = 1, NPARMS
2279            NRHS = NSVAL( I )
2280*
2281            IF( NEWSD.EQ.0 ) THEN
2282               DO 360 K = 1, 4
2283                  ISEED( K ) = IOLDSD( K )
2284  360          CONTINUE
2285            END IF
2286            WRITE( NOUT, FMT = 9966 )C3, NRHS
2287            CALL ZCHKBB( NN, MVAL, NVAL, NK, KVAL, MAXTYP, DOTYPE, NRHS,
2288     $                   ISEED, THRESH, NOUT, A( 1, 1 ), NMAX,
2289     $                   A( 1, 2 ), 2*NMAX, DR( 1, 1 ), DR( 1, 2 ),
2290     $                   A( 1, 4 ), NMAX, A( 1, 5 ), NMAX, A( 1, 6 ),
2291     $                   NMAX, A( 1, 7 ), WORK, LWORK, RWORK, RESULT,
2292     $                   INFO )
2293            IF( INFO.NE.0 )
2294     $         WRITE( NOUT, FMT = 9980 )'ZCHKBB', INFO
2295  370    CONTINUE
2296*
2297      ELSE IF( LSAMEN( 3, C3, 'GLM' ) ) THEN
2298*
2299*        -----------------------------------------
2300*        GLM:  Generalized Linear Regression Model
2301*        -----------------------------------------
2302*
2303         CALL XLAENV( 1, 1 )
2304         IF( TSTERR )
2305     $      CALL ZERRGG( 'GLM', NOUT )
2306         CALL ZCKGLM( NN, NVAL, MVAL, PVAL, NTYPES, ISEED, THRESH, NMAX,
2307     $                A( 1, 1 ), A( 1, 2 ), B( 1, 1 ), B( 1, 2 ), X,
2308     $                WORK, DR( 1, 1 ), NIN, NOUT, INFO )
2309         IF( INFO.NE.0 )
2310     $      WRITE( NOUT, FMT = 9980 )'ZCKGLM', INFO
2311*
2312      ELSE IF( LSAMEN( 3, C3, 'GQR' ) ) THEN
2313*
2314*        ------------------------------------------
2315*        GQR:  Generalized QR and RQ factorizations
2316*        ------------------------------------------
2317*
2318         CALL XLAENV( 1, 1 )
2319         IF( TSTERR )
2320     $      CALL ZERRGG( 'GQR', NOUT )
2321         CALL ZCKGQR( NN, MVAL, NN, PVAL, NN, NVAL, NTYPES, ISEED,
2322     $                THRESH, NMAX, A( 1, 1 ), A( 1, 2 ), A( 1, 3 ),
2323     $                A( 1, 4 ), TAUA, B( 1, 1 ), B( 1, 2 ), B( 1, 3 ),
2324     $                B( 1, 4 ), B( 1, 5 ), TAUB, WORK, DR( 1, 1 ), NIN,
2325     $                NOUT, INFO )
2326         IF( INFO.NE.0 )
2327     $      WRITE( NOUT, FMT = 9980 )'ZCKGQR', INFO
2328*
2329      ELSE IF( LSAMEN( 3, C3, 'GSV' ) ) THEN
2330*
2331*        ----------------------------------------------
2332*        GSV:  Generalized Singular Value Decomposition
2333*        ----------------------------------------------
2334*
2335         IF( TSTERR )
2336     $      CALL ZERRGG( 'GSV', NOUT )
2337         CALL ZCKGSV( NN, MVAL, PVAL, NVAL, NTYPES, ISEED, THRESH, NMAX,
2338     $                A( 1, 1 ), A( 1, 2 ), B( 1, 1 ), B( 1, 2 ),
2339     $                A( 1, 3 ), B( 1, 3 ), A( 1, 4 ), ALPHA, BETA,
2340     $                B( 1, 4 ), IWORK, WORK, DR( 1, 1 ), NIN, NOUT,
2341     $                INFO )
2342         IF( INFO.NE.0 )
2343     $      WRITE( NOUT, FMT = 9980 )'ZCKGSV', INFO
2344*
2345      ELSE IF( LSAMEN( 3, C3, 'CSD' ) ) THEN
2346*
2347*        ----------------------------------------------
2348*        CSD:  CS Decomposition
2349*        ----------------------------------------------
2350*
2351         CALL XLAENV(1,1)
2352         IF( TSTERR )
2353     $      CALL ZERRGG( 'CSD', NOUT )
2354         CALL ZCKCSD( NN, MVAL, PVAL, NVAL, NTYPES, ISEED, THRESH, NMAX,
2355     $                A( 1, 1 ), A( 1, 2 ), A( 1, 3 ), A( 1, 4 ),
2356     $                A( 1, 5 ), A( 1, 6 ), RWORK, IWORK, WORK,
2357     $                DR( 1, 1 ), NIN, NOUT, INFO )
2358         IF( INFO.NE.0 )
2359     $      WRITE( NOUT, FMT = 9980 )'ZCKCSD', INFO
2360*
2361      ELSE IF( LSAMEN( 3, C3, 'LSE' ) ) THEN
2362*
2363*        --------------------------------------
2364*        LSE:  Constrained Linear Least Squares
2365*        --------------------------------------
2366*
2367         CALL XLAENV( 1, 1 )
2368         IF( TSTERR )
2369     $      CALL ZERRGG( 'LSE', NOUT )
2370         CALL ZCKLSE( NN, MVAL, PVAL, NVAL, NTYPES, ISEED, THRESH, NMAX,
2371     $                A( 1, 1 ), A( 1, 2 ), B( 1, 1 ), B( 1, 2 ), X,
2372     $                WORK, DR( 1, 1 ), NIN, NOUT, INFO )
2373         IF( INFO.NE.0 )
2374     $      WRITE( NOUT, FMT = 9980 )'ZCKLSE', INFO
2375      ELSE
2376         WRITE( NOUT, FMT = * )
2377         WRITE( NOUT, FMT = * )
2378         WRITE( NOUT, FMT = 9992 )C3
2379      END IF
2380      IF( .NOT.( ZGX .OR. ZXV ) )
2381     $   GO TO 190
2382  380 CONTINUE
2383      WRITE( NOUT, FMT = 9994 )
2384      S2 = DSECND( )
2385      WRITE( NOUT, FMT = 9993 )S2 - S1
2386*
2387 9999 FORMAT( / ' Execution not attempted due to input errors' )
2388 9997 FORMAT( / / 1X, A3, ':  NB =', I4, ', NBMIN =', I4, ', NX =', I4 )
2389 9996 FORMAT( / / 1X, A3, ':  NB =', I4, ', NBMIN =', I4, ', NS =', I4,
2390     $      ', MAXB =', I4, ', NBCOL =', I4 )
2391 9995 FORMAT( / / 1X, A3, ':  NB =', I4, ', NBMIN =', I4, ', NX =', I4,
2392     $      ', NRHS =', I4 )
2393 9994 FORMAT( / / ' End of tests' )
2394 9993 FORMAT( ' Total time used = ', F12.2, ' seconds', / )
2395 9992 FORMAT( 1X, A3, ':  Unrecognized path name' )
2396 9991 FORMAT( / / ' *** Invalid integer value in column ', I2,
2397     $      ' of input', ' line:', / A79 )
2398 9990 FORMAT( / / 1X, A3, ' routines were not tested' )
2399 9989 FORMAT( ' Invalid input value: ', A, '=', I6, '; must be >=',
2400     $      I6 )
2401 9988 FORMAT( ' Invalid input value: ', A, '=', I6, '; must be <=',
2402     $      I6 )
2403 9987 FORMAT( ' Tests of the Nonsymmetric Eigenvalue Problem routines' )
2404 9986 FORMAT( ' Tests of the Hermitian Eigenvalue Problem routines' )
2405 9985 FORMAT( ' Tests of the Singular Value Decomposition routines' )
2406 9984 FORMAT( / ' The following parameter values will be used:' )
2407 9983 FORMAT( 4X, A, 10I6, / 10X, 10I6 )
2408 9982 FORMAT( / ' Routines pass computational tests if test ratio is ',
2409     $      'less than', F8.2, / )
2410 9981 FORMAT( ' Relative machine ', A, ' is taken to be', D16.6 )
2411 9980 FORMAT( ' *** Error code from ', A, ' = ', I4 )
2412 9979 FORMAT( / ' Tests of the Nonsymmetric Eigenvalue Problem Driver',
2413     $      / '    ZGEEV (eigenvalues and eigevectors)' )
2414 9978 FORMAT( / ' Tests of the Nonsymmetric Eigenvalue Problem Driver',
2415     $      / '    ZGEES (Schur form)' )
2416 9977 FORMAT( / ' Tests of the Nonsymmetric Eigenvalue Problem Expert',
2417     $      ' Driver', / '    ZGEEVX (eigenvalues, eigenvectors and',
2418     $      ' condition numbers)' )
2419 9976 FORMAT( / ' Tests of the Nonsymmetric Eigenvalue Problem Expert',
2420     $      ' Driver', / '    ZGEESX (Schur form and condition',
2421     $      ' numbers)' )
2422 9975 FORMAT( / ' Tests of the Generalized Nonsymmetric Eigenvalue ',
2423     $      'Problem routines' )
2424 9974 FORMAT( ' Tests of ZHBTRD', / ' (reduction of a Hermitian band ',
2425     $      'matrix to real tridiagonal form)' )
2426 9973 FORMAT( / 1X, 71( '-' ) )
2427 9972 FORMAT( / ' LAPACK VERSION ', I1, '.', I1, '.', I1 )
2428 9971 FORMAT( / ' Tests of the Generalized Linear Regression Model ',
2429     $      'routines' )
2430 9970 FORMAT( / ' Tests of the Generalized QR and RQ routines' )
2431 9969 FORMAT( / ' Tests of the Generalized Singular Value',
2432     $      ' Decomposition routines' )
2433 9968 FORMAT( / ' Tests of the Linear Least Squares routines' )
2434 9967 FORMAT( ' Tests of ZGBBRD', / ' (reduction of a general band ',
2435     $      'matrix to real bidiagonal form)' )
2436 9966 FORMAT( / / 1X, A3, ':  NRHS =', I4 )
2437 9965 FORMAT( / ' Tests of the Generalized Nonsymmetric Eigenvalue ',
2438     $      'Problem Expert Driver ZGGESX' )
2439 9964 FORMAT( / ' Tests of the Generalized Nonsymmetric Eigenvalue ',
2440     $      'Problem Driver ZGGES' )
2441 9963 FORMAT( / ' Tests of the Generalized Nonsymmetric Eigenvalue ',
2442     $      'Problem Driver ZGGEV' )
2443 9962 FORMAT( / ' Tests of the Generalized Nonsymmetric Eigenvalue ',
2444     $      'Problem Expert Driver ZGGEVX' )
2445 9961 FORMAT( / / 1X, A3, ':  NB =', I4, ', NBMIN =', I4, ', NX =', I4,
2446     $      ', INMIN=', I4,
2447     $      ', INWIN =', I4, ', INIBL =', I4, ', ISHFTS =', I4,
2448     $      ', IACC22 =', I4)
2449 9960 FORMAT( / ' Tests of the CS Decomposition routines' )
2450#ifdef __FLAME__
2451      CALL FLA_FINALIZE
2452#endif
2453*
2454*     End of ZCHKEE
2455*
2456      END
2457