1*> \brief \b CERRQL
2*
3*  =========== DOCUMENTATION ===========
4*
5* Online html documentation available at
6*            http://www.netlib.org/lapack/explore-html/
7*
8*  Definition:
9*  ===========
10*
11*       SUBROUTINE CERRQL( PATH, NUNIT )
12*
13*       .. Scalar Arguments ..
14*       CHARACTER*3        PATH
15*       INTEGER            NUNIT
16*       ..
17*
18*
19*> \par Purpose:
20*  =============
21*>
22*> \verbatim
23*>
24*> CERRQL tests the error exits for the COMPLEX routines
25*> that use the QL decomposition of a general matrix.
26*> \endverbatim
27*
28*  Arguments:
29*  ==========
30*
31*> \param[in] PATH
32*> \verbatim
33*>          PATH is CHARACTER*3
34*>          The LAPACK path name for the routines to be tested.
35*> \endverbatim
36*>
37*> \param[in] NUNIT
38*> \verbatim
39*>          NUNIT is INTEGER
40*>          The unit number for output.
41*> \endverbatim
42*
43*  Authors:
44*  ========
45*
46*> \author Univ. of Tennessee
47*> \author Univ. of California Berkeley
48*> \author Univ. of Colorado Denver
49*> \author NAG Ltd.
50*
51*> \date November 2011
52*
53*> \ingroup complex_lin
54*
55*  =====================================================================
56      SUBROUTINE CERRQL( PATH, NUNIT )
57*
58*  -- LAPACK test routine (version 3.4.0) --
59*  -- LAPACK is a software package provided by Univ. of Tennessee,    --
60*  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
61*     November 2011
62*
63*     .. Scalar Arguments ..
64      CHARACTER*3        PATH
65      INTEGER            NUNIT
66*     ..
67*
68*  =====================================================================
69*
70*     .. Parameters ..
71      INTEGER            NMAX
72      PARAMETER          ( NMAX = 2 )
73*     ..
74*     .. Local Scalars ..
75      INTEGER            I, INFO, J
76*     ..
77*     .. Local Arrays ..
78      COMPLEX            A( NMAX, NMAX ), AF( NMAX, NMAX ), B( NMAX ),
79     $                   W( NMAX ), X( NMAX )
80*     ..
81*     .. External Subroutines ..
82      EXTERNAL           ALAESM, CGEQL2, CGEQLF, CGEQLS, CHKXER, CUNG2L,
83     $                   CUNGQL, CUNM2L, CUNMQL
84*     ..
85*     .. Scalars in Common ..
86      LOGICAL            LERR, OK
87      CHARACTER*32       SRNAMT
88      INTEGER            INFOT, NOUT
89*     ..
90*     .. Common blocks ..
91      COMMON             / INFOC / INFOT, NOUT, OK, LERR
92      COMMON             / SRNAMC / SRNAMT
93*     ..
94*     .. Intrinsic Functions ..
95      INTRINSIC          CMPLX, REAL
96*     ..
97*     .. Executable Statements ..
98*
99      NOUT = NUNIT
100      WRITE( NOUT, FMT = * )
101*
102*     Set the variables to innocuous values.
103*
104      DO 20 J = 1, NMAX
105         DO 10 I = 1, NMAX
106            A( I, J ) = CMPLX( 1. / REAL( I+J ), -1. / REAL( I+J ) )
107            AF( I, J ) = CMPLX( 1. / REAL( I+J ), -1. / REAL( I+J ) )
108   10    CONTINUE
109         B( J ) = 0.
110         W( J ) = 0.
111         X( J ) = 0.
112   20 CONTINUE
113      OK = .TRUE.
114*
115*     Error exits for QL factorization
116*
117*     CGEQLF
118*
119      SRNAMT = 'CGEQLF'
120      INFOT = 1
121      CALL CGEQLF( -1, 0, A, 1, B, W, 1, INFO )
122      CALL CHKXER( 'CGEQLF', INFOT, NOUT, LERR, OK )
123      INFOT = 2
124      CALL CGEQLF( 0, -1, A, 1, B, W, 1, INFO )
125      CALL CHKXER( 'CGEQLF', INFOT, NOUT, LERR, OK )
126      INFOT = 4
127      CALL CGEQLF( 2, 1, A, 1, B, W, 1, INFO )
128      CALL CHKXER( 'CGEQLF', INFOT, NOUT, LERR, OK )
129      INFOT = 7
130      CALL CGEQLF( 1, 2, A, 1, B, W, 1, INFO )
131      CALL CHKXER( 'CGEQLF', INFOT, NOUT, LERR, OK )
132*
133*     CGEQL2
134*
135      SRNAMT = 'CGEQL2'
136      INFOT = 1
137      CALL CGEQL2( -1, 0, A, 1, B, W, INFO )
138      CALL CHKXER( 'CGEQL2', INFOT, NOUT, LERR, OK )
139      INFOT = 2
140      CALL CGEQL2( 0, -1, A, 1, B, W, INFO )
141      CALL CHKXER( 'CGEQL2', INFOT, NOUT, LERR, OK )
142      INFOT = 4
143      CALL CGEQL2( 2, 1, A, 1, B, W, INFO )
144      CALL CHKXER( 'CGEQL2', INFOT, NOUT, LERR, OK )
145*
146*     CGEQLS
147*
148      SRNAMT = 'CGEQLS'
149      INFOT = 1
150      CALL CGEQLS( -1, 0, 0, A, 1, X, B, 1, W, 1, INFO )
151      CALL CHKXER( 'CGEQLS', INFOT, NOUT, LERR, OK )
152      INFOT = 2
153      CALL CGEQLS( 0, -1, 0, A, 1, X, B, 1, W, 1, INFO )
154      CALL CHKXER( 'CGEQLS', INFOT, NOUT, LERR, OK )
155      INFOT = 2
156      CALL CGEQLS( 1, 2, 0, A, 1, X, B, 1, W, 1, INFO )
157      CALL CHKXER( 'CGEQLS', INFOT, NOUT, LERR, OK )
158      INFOT = 3
159      CALL CGEQLS( 0, 0, -1, A, 1, X, B, 1, W, 1, INFO )
160      CALL CHKXER( 'CGEQLS', INFOT, NOUT, LERR, OK )
161      INFOT = 5
162      CALL CGEQLS( 2, 1, 0, A, 1, X, B, 2, W, 1, INFO )
163      CALL CHKXER( 'CGEQLS', INFOT, NOUT, LERR, OK )
164      INFOT = 8
165      CALL CGEQLS( 2, 1, 0, A, 2, X, B, 1, W, 1, INFO )
166      CALL CHKXER( 'CGEQLS', INFOT, NOUT, LERR, OK )
167      INFOT = 10
168      CALL CGEQLS( 1, 1, 2, A, 1, X, B, 1, W, 1, INFO )
169      CALL CHKXER( 'CGEQLS', INFOT, NOUT, LERR, OK )
170*
171*     CUNGQL
172*
173      SRNAMT = 'CUNGQL'
174      INFOT = 1
175      CALL CUNGQL( -1, 0, 0, A, 1, X, W, 1, INFO )
176      CALL CHKXER( 'CUNGQL', INFOT, NOUT, LERR, OK )
177      INFOT = 2
178      CALL CUNGQL( 0, -1, 0, A, 1, X, W, 1, INFO )
179      CALL CHKXER( 'CUNGQL', INFOT, NOUT, LERR, OK )
180      INFOT = 2
181      CALL CUNGQL( 1, 2, 0, A, 1, X, W, 2, INFO )
182      CALL CHKXER( 'CUNGQL', INFOT, NOUT, LERR, OK )
183      INFOT = 3
184      CALL CUNGQL( 0, 0, -1, A, 1, X, W, 1, INFO )
185      CALL CHKXER( 'CUNGQL', INFOT, NOUT, LERR, OK )
186      INFOT = 3
187      CALL CUNGQL( 1, 1, 2, A, 1, X, W, 1, INFO )
188      CALL CHKXER( 'CUNGQL', INFOT, NOUT, LERR, OK )
189      INFOT = 5
190      CALL CUNGQL( 2, 1, 0, A, 1, X, W, 1, INFO )
191      CALL CHKXER( 'CUNGQL', INFOT, NOUT, LERR, OK )
192      INFOT = 8
193      CALL CUNGQL( 2, 2, 0, A, 2, X, W, 1, INFO )
194      CALL CHKXER( 'CUNGQL', INFOT, NOUT, LERR, OK )
195*
196*     CUNG2L
197*
198      SRNAMT = 'CUNG2L'
199      INFOT = 1
200      CALL CUNG2L( -1, 0, 0, A, 1, X, W, INFO )
201      CALL CHKXER( 'CUNG2L', INFOT, NOUT, LERR, OK )
202      INFOT = 2
203      CALL CUNG2L( 0, -1, 0, A, 1, X, W, INFO )
204      CALL CHKXER( 'CUNG2L', INFOT, NOUT, LERR, OK )
205      INFOT = 2
206      CALL CUNG2L( 1, 2, 0, A, 1, X, W, INFO )
207      CALL CHKXER( 'CUNG2L', INFOT, NOUT, LERR, OK )
208      INFOT = 3
209      CALL CUNG2L( 0, 0, -1, A, 1, X, W, INFO )
210      CALL CHKXER( 'CUNG2L', INFOT, NOUT, LERR, OK )
211      INFOT = 3
212      CALL CUNG2L( 2, 1, 2, A, 2, X, W, INFO )
213      CALL CHKXER( 'CUNG2L', INFOT, NOUT, LERR, OK )
214      INFOT = 5
215      CALL CUNG2L( 2, 1, 0, A, 1, X, W, INFO )
216      CALL CHKXER( 'CUNG2L', INFOT, NOUT, LERR, OK )
217*
218*     CUNMQL
219*
220      SRNAMT = 'CUNMQL'
221      INFOT = 1
222      CALL CUNMQL( '/', 'N', 0, 0, 0, A, 1, X, AF, 1, W, 1, INFO )
223      CALL CHKXER( 'CUNMQL', INFOT, NOUT, LERR, OK )
224      INFOT = 2
225      CALL CUNMQL( 'L', '/', 0, 0, 0, A, 1, X, AF, 1, W, 1, INFO )
226      CALL CHKXER( 'CUNMQL', INFOT, NOUT, LERR, OK )
227      INFOT = 3
228      CALL CUNMQL( 'L', 'N', -1, 0, 0, A, 1, X, AF, 1, W, 1, INFO )
229      CALL CHKXER( 'CUNMQL', INFOT, NOUT, LERR, OK )
230      INFOT = 4
231      CALL CUNMQL( 'L', 'N', 0, -1, 0, A, 1, X, AF, 1, W, 1, INFO )
232      CALL CHKXER( 'CUNMQL', INFOT, NOUT, LERR, OK )
233      INFOT = 5
234      CALL CUNMQL( 'L', 'N', 0, 0, -1, A, 1, X, AF, 1, W, 1, INFO )
235      CALL CHKXER( 'CUNMQL', INFOT, NOUT, LERR, OK )
236      INFOT = 5
237      CALL CUNMQL( 'L', 'N', 0, 1, 1, A, 1, X, AF, 1, W, 1, INFO )
238      CALL CHKXER( 'CUNMQL', INFOT, NOUT, LERR, OK )
239      INFOT = 5
240      CALL CUNMQL( 'R', 'N', 1, 0, 1, A, 1, X, AF, 1, W, 1, INFO )
241      CALL CHKXER( 'CUNMQL', INFOT, NOUT, LERR, OK )
242      INFOT = 7
243      CALL CUNMQL( 'L', 'N', 2, 1, 0, A, 1, X, AF, 2, W, 1, INFO )
244      CALL CHKXER( 'CUNMQL', INFOT, NOUT, LERR, OK )
245      INFOT = 7
246      CALL CUNMQL( 'R', 'N', 1, 2, 0, A, 1, X, AF, 1, W, 1, INFO )
247      CALL CHKXER( 'CUNMQL', INFOT, NOUT, LERR, OK )
248      INFOT = 10
249      CALL CUNMQL( 'L', 'N', 2, 1, 0, A, 2, X, AF, 1, W, 1, INFO )
250      CALL CHKXER( 'CUNMQL', INFOT, NOUT, LERR, OK )
251      INFOT = 12
252      CALL CUNMQL( 'L', 'N', 1, 2, 0, A, 1, X, AF, 1, W, 1, INFO )
253      CALL CHKXER( 'CUNMQL', INFOT, NOUT, LERR, OK )
254      INFOT = 12
255      CALL CUNMQL( 'R', 'N', 2, 1, 0, A, 1, X, AF, 2, W, 1, INFO )
256      CALL CHKXER( 'CUNMQL', INFOT, NOUT, LERR, OK )
257*
258*     CUNM2L
259*
260      SRNAMT = 'CUNM2L'
261      INFOT = 1
262      CALL CUNM2L( '/', 'N', 0, 0, 0, A, 1, X, AF, 1, W, INFO )
263      CALL CHKXER( 'CUNM2L', INFOT, NOUT, LERR, OK )
264      INFOT = 2
265      CALL CUNM2L( 'L', '/', 0, 0, 0, A, 1, X, AF, 1, W, INFO )
266      CALL CHKXER( 'CUNM2L', INFOT, NOUT, LERR, OK )
267      INFOT = 3
268      CALL CUNM2L( 'L', 'N', -1, 0, 0, A, 1, X, AF, 1, W, INFO )
269      CALL CHKXER( 'CUNM2L', INFOT, NOUT, LERR, OK )
270      INFOT = 4
271      CALL CUNM2L( 'L', 'N', 0, -1, 0, A, 1, X, AF, 1, W, INFO )
272      CALL CHKXER( 'CUNM2L', INFOT, NOUT, LERR, OK )
273      INFOT = 5
274      CALL CUNM2L( 'L', 'N', 0, 0, -1, A, 1, X, AF, 1, W, INFO )
275      CALL CHKXER( 'CUNM2L', INFOT, NOUT, LERR, OK )
276      INFOT = 5
277      CALL CUNM2L( 'L', 'N', 0, 1, 1, A, 1, X, AF, 1, W, INFO )
278      CALL CHKXER( 'CUNM2L', INFOT, NOUT, LERR, OK )
279      INFOT = 5
280      CALL CUNM2L( 'R', 'N', 1, 0, 1, A, 1, X, AF, 1, W, INFO )
281      CALL CHKXER( 'CUNM2L', INFOT, NOUT, LERR, OK )
282      INFOT = 7
283      CALL CUNM2L( 'L', 'N', 2, 1, 0, A, 1, X, AF, 2, W, INFO )
284      CALL CHKXER( 'CUNM2L', INFOT, NOUT, LERR, OK )
285      INFOT = 7
286      CALL CUNM2L( 'R', 'N', 1, 2, 0, A, 1, X, AF, 1, W, INFO )
287      CALL CHKXER( 'CUNM2L', INFOT, NOUT, LERR, OK )
288      INFOT = 10
289      CALL CUNM2L( 'L', 'N', 2, 1, 0, A, 2, X, AF, 1, W, INFO )
290      CALL CHKXER( 'CUNM2L', INFOT, NOUT, LERR, OK )
291*
292*     Print a summary line.
293*
294      CALL ALAESM( PATH, OK, NOUT )
295*
296      RETURN
297*
298*     End of CERRQL
299*
300      END
301