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