1*> \brief \b ZERRQR
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 ZERRQR( 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*> ZERRQR tests the error exits for the COMPLEX*16 routines
25*> that use the QR 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*> \ingroup complex16_lin
52*
53*  =====================================================================
54      SUBROUTINE ZERRQR( PATH, NUNIT )
55*
56*  -- LAPACK test routine (--
57*  -- LAPACK is a software package provided by Univ. of Tennessee,    --
58*  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
59*
60*     .. Scalar Arguments ..
61      CHARACTER*3        PATH
62      INTEGER            NUNIT
63*     ..
64*
65*  =====================================================================
66*
67*     .. Parameters ..
68      INTEGER            NMAX
69      PARAMETER          ( NMAX = 2 )
70*     ..
71*     .. Local Scalars ..
72      INTEGER            I, INFO, J
73*     ..
74*     .. Local Arrays ..
75      COMPLEX*16         A( NMAX, NMAX ), AF( NMAX, NMAX ), B( NMAX ),
76     $                   W( NMAX ), X( NMAX )
77*     ..
78*     .. External Subroutines ..
79      EXTERNAL           ALAESM, CHKXER, ZGEQR2, ZGEQR2P, ZGEQRF,
80     $                   ZGEQRFP, ZGEQRS, ZUNG2R, ZUNGQR, ZUNM2R,
81     $                   ZUNMQR
82*     ..
83*     .. Scalars in Common ..
84      LOGICAL            LERR, OK
85      CHARACTER*32       SRNAMT
86      INTEGER            INFOT, NOUT
87*     ..
88*     .. Common blocks ..
89      COMMON             / INFOC / INFOT, NOUT, OK, LERR
90      COMMON             / SRNAMC / SRNAMT
91*     ..
92*     .. Intrinsic Functions ..
93      INTRINSIC          DBLE, DCMPLX
94*     ..
95*     .. Executable Statements ..
96*
97      NOUT = NUNIT
98      WRITE( NOUT, FMT = * )
99*
100*     Set the variables to innocuous values.
101*
102      DO 20 J = 1, NMAX
103         DO 10 I = 1, NMAX
104            A( I, J ) = DCMPLX( 1.D0 / DBLE( I+J ),
105     $                  -1.D0 / DBLE( I+J ) )
106            AF( I, J ) = DCMPLX( 1.D0 / DBLE( I+J ),
107     $                   -1.D0 / DBLE( I+J ) )
108   10    CONTINUE
109         B( J ) = 0.D0
110         W( J ) = 0.D0
111         X( J ) = 0.D0
112   20 CONTINUE
113      OK = .TRUE.
114*
115*     Error exits for QR factorization
116*
117*     ZGEQRF
118*
119      SRNAMT = 'ZGEQRF'
120      INFOT = 1
121      CALL ZGEQRF( -1, 0, A, 1, B, W, 1, INFO )
122      CALL CHKXER( 'ZGEQRF', INFOT, NOUT, LERR, OK )
123      INFOT = 2
124      CALL ZGEQRF( 0, -1, A, 1, B, W, 1, INFO )
125      CALL CHKXER( 'ZGEQRF', INFOT, NOUT, LERR, OK )
126      INFOT = 4
127      CALL ZGEQRF( 2, 1, A, 1, B, W, 1, INFO )
128      CALL CHKXER( 'ZGEQRF', INFOT, NOUT, LERR, OK )
129      INFOT = 7
130      CALL ZGEQRF( 1, 2, A, 1, B, W, 1, INFO )
131      CALL CHKXER( 'ZGEQRF', INFOT, NOUT, LERR, OK )
132*
133*     ZGEQRFP
134*
135      SRNAMT = 'ZGEQRFP'
136      INFOT = 1
137      CALL ZGEQRFP( -1, 0, A, 1, B, W, 1, INFO )
138      CALL CHKXER( 'ZGEQRFP', INFOT, NOUT, LERR, OK )
139      INFOT = 2
140      CALL ZGEQRFP( 0, -1, A, 1, B, W, 1, INFO )
141      CALL CHKXER( 'ZGEQRFP', INFOT, NOUT, LERR, OK )
142      INFOT = 4
143      CALL ZGEQRFP( 2, 1, A, 1, B, W, 1, INFO )
144      CALL CHKXER( 'ZGEQRFP', INFOT, NOUT, LERR, OK )
145      INFOT = 7
146      CALL ZGEQRFP( 1, 2, A, 1, B, W, 1, INFO )
147      CALL CHKXER( 'ZGEQRFP', INFOT, NOUT, LERR, OK )
148*
149*     ZGEQR2
150*
151      SRNAMT = 'ZGEQR2'
152      INFOT = 1
153      CALL ZGEQR2( -1, 0, A, 1, B, W, INFO )
154      CALL CHKXER( 'ZGEQR2', INFOT, NOUT, LERR, OK )
155      INFOT = 2
156      CALL ZGEQR2( 0, -1, A, 1, B, W, INFO )
157      CALL CHKXER( 'ZGEQR2', INFOT, NOUT, LERR, OK )
158      INFOT = 4
159      CALL ZGEQR2( 2, 1, A, 1, B, W, INFO )
160      CALL CHKXER( 'ZGEQR2', INFOT, NOUT, LERR, OK )
161*
162*     ZGEQR2P
163*
164      SRNAMT = 'ZGEQR2P'
165      INFOT = 1
166      CALL ZGEQR2P( -1, 0, A, 1, B, W, INFO )
167      CALL CHKXER( 'ZGEQR2P', INFOT, NOUT, LERR, OK )
168      INFOT = 2
169      CALL ZGEQR2P( 0, -1, A, 1, B, W, INFO )
170      CALL CHKXER( 'ZGEQR2P', INFOT, NOUT, LERR, OK )
171      INFOT = 4
172      CALL ZGEQR2P( 2, 1, A, 1, B, W, INFO )
173      CALL CHKXER( 'ZGEQR2P', INFOT, NOUT, LERR, OK )
174*
175*     ZGEQRS
176*
177      SRNAMT = 'ZGEQRS'
178      INFOT = 1
179      CALL ZGEQRS( -1, 0, 0, A, 1, X, B, 1, W, 1, INFO )
180      CALL CHKXER( 'ZGEQRS', INFOT, NOUT, LERR, OK )
181      INFOT = 2
182      CALL ZGEQRS( 0, -1, 0, A, 1, X, B, 1, W, 1, INFO )
183      CALL CHKXER( 'ZGEQRS', INFOT, NOUT, LERR, OK )
184      INFOT = 2
185      CALL ZGEQRS( 1, 2, 0, A, 2, X, B, 2, W, 1, INFO )
186      CALL CHKXER( 'ZGEQRS', INFOT, NOUT, LERR, OK )
187      INFOT = 3
188      CALL ZGEQRS( 0, 0, -1, A, 1, X, B, 1, W, 1, INFO )
189      CALL CHKXER( 'ZGEQRS', INFOT, NOUT, LERR, OK )
190      INFOT = 5
191      CALL ZGEQRS( 2, 1, 0, A, 1, X, B, 2, W, 1, INFO )
192      CALL CHKXER( 'ZGEQRS', INFOT, NOUT, LERR, OK )
193      INFOT = 8
194      CALL ZGEQRS( 2, 1, 0, A, 2, X, B, 1, W, 1, INFO )
195      CALL CHKXER( 'ZGEQRS', INFOT, NOUT, LERR, OK )
196      INFOT = 10
197      CALL ZGEQRS( 1, 1, 2, A, 1, X, B, 1, W, 1, INFO )
198      CALL CHKXER( 'ZGEQRS', INFOT, NOUT, LERR, OK )
199*
200*     ZUNGQR
201*
202      SRNAMT = 'ZUNGQR'
203      INFOT = 1
204      CALL ZUNGQR( -1, 0, 0, A, 1, X, W, 1, INFO )
205      CALL CHKXER( 'ZUNGQR', INFOT, NOUT, LERR, OK )
206      INFOT = 2
207      CALL ZUNGQR( 0, -1, 0, A, 1, X, W, 1, INFO )
208      CALL CHKXER( 'ZUNGQR', INFOT, NOUT, LERR, OK )
209      INFOT = 2
210      CALL ZUNGQR( 1, 2, 0, A, 1, X, W, 2, INFO )
211      CALL CHKXER( 'ZUNGQR', INFOT, NOUT, LERR, OK )
212      INFOT = 3
213      CALL ZUNGQR( 0, 0, -1, A, 1, X, W, 1, INFO )
214      CALL CHKXER( 'ZUNGQR', INFOT, NOUT, LERR, OK )
215      INFOT = 3
216      CALL ZUNGQR( 1, 1, 2, A, 1, X, W, 1, INFO )
217      CALL CHKXER( 'ZUNGQR', INFOT, NOUT, LERR, OK )
218      INFOT = 5
219      CALL ZUNGQR( 2, 2, 0, A, 1, X, W, 2, INFO )
220      CALL CHKXER( 'ZUNGQR', INFOT, NOUT, LERR, OK )
221      INFOT = 8
222      CALL ZUNGQR( 2, 2, 0, A, 2, X, W, 1, INFO )
223      CALL CHKXER( 'ZUNGQR', INFOT, NOUT, LERR, OK )
224*
225*     ZUNG2R
226*
227      SRNAMT = 'ZUNG2R'
228      INFOT = 1
229      CALL ZUNG2R( -1, 0, 0, A, 1, X, W, INFO )
230      CALL CHKXER( 'ZUNG2R', INFOT, NOUT, LERR, OK )
231      INFOT = 2
232      CALL ZUNG2R( 0, -1, 0, A, 1, X, W, INFO )
233      CALL CHKXER( 'ZUNG2R', INFOT, NOUT, LERR, OK )
234      INFOT = 2
235      CALL ZUNG2R( 1, 2, 0, A, 1, X, W, INFO )
236      CALL CHKXER( 'ZUNG2R', INFOT, NOUT, LERR, OK )
237      INFOT = 3
238      CALL ZUNG2R( 0, 0, -1, A, 1, X, W, INFO )
239      CALL CHKXER( 'ZUNG2R', INFOT, NOUT, LERR, OK )
240      INFOT = 3
241      CALL ZUNG2R( 2, 1, 2, A, 2, X, W, INFO )
242      CALL CHKXER( 'ZUNG2R', INFOT, NOUT, LERR, OK )
243      INFOT = 5
244      CALL ZUNG2R( 2, 1, 0, A, 1, X, W, INFO )
245      CALL CHKXER( 'ZUNG2R', INFOT, NOUT, LERR, OK )
246*
247*     ZUNMQR
248*
249      SRNAMT = 'ZUNMQR'
250      INFOT = 1
251      CALL ZUNMQR( '/', 'N', 0, 0, 0, A, 1, X, AF, 1, W, 1, INFO )
252      CALL CHKXER( 'ZUNMQR', INFOT, NOUT, LERR, OK )
253      INFOT = 2
254      CALL ZUNMQR( 'L', '/', 0, 0, 0, A, 1, X, AF, 1, W, 1, INFO )
255      CALL CHKXER( 'ZUNMQR', INFOT, NOUT, LERR, OK )
256      INFOT = 3
257      CALL ZUNMQR( 'L', 'N', -1, 0, 0, A, 1, X, AF, 1, W, 1, INFO )
258      CALL CHKXER( 'ZUNMQR', INFOT, NOUT, LERR, OK )
259      INFOT = 4
260      CALL ZUNMQR( 'L', 'N', 0, -1, 0, A, 1, X, AF, 1, W, 1, INFO )
261      CALL CHKXER( 'ZUNMQR', INFOT, NOUT, LERR, OK )
262      INFOT = 5
263      CALL ZUNMQR( 'L', 'N', 0, 0, -1, A, 1, X, AF, 1, W, 1, INFO )
264      CALL CHKXER( 'ZUNMQR', INFOT, NOUT, LERR, OK )
265      INFOT = 5
266      CALL ZUNMQR( 'L', 'N', 0, 1, 1, A, 1, X, AF, 1, W, 1, INFO )
267      CALL CHKXER( 'ZUNMQR', INFOT, NOUT, LERR, OK )
268      INFOT = 5
269      CALL ZUNMQR( 'R', 'N', 1, 0, 1, A, 1, X, AF, 1, W, 1, INFO )
270      CALL CHKXER( 'ZUNMQR', INFOT, NOUT, LERR, OK )
271      INFOT = 7
272      CALL ZUNMQR( 'L', 'N', 2, 1, 0, A, 1, X, AF, 2, W, 1, INFO )
273      CALL CHKXER( 'ZUNMQR', INFOT, NOUT, LERR, OK )
274      INFOT = 7
275      CALL ZUNMQR( 'R', 'N', 1, 2, 0, A, 1, X, AF, 1, W, 1, INFO )
276      CALL CHKXER( 'ZUNMQR', INFOT, NOUT, LERR, OK )
277      INFOT = 10
278      CALL ZUNMQR( 'L', 'N', 2, 1, 0, A, 2, X, AF, 1, W, 1, INFO )
279      CALL CHKXER( 'ZUNMQR', INFOT, NOUT, LERR, OK )
280      INFOT = 12
281      CALL ZUNMQR( 'L', 'N', 1, 2, 0, A, 1, X, AF, 1, W, 1, INFO )
282      CALL CHKXER( 'ZUNMQR', INFOT, NOUT, LERR, OK )
283      INFOT = 12
284      CALL ZUNMQR( 'R', 'N', 2, 1, 0, A, 1, X, AF, 2, W, 1, INFO )
285      CALL CHKXER( 'ZUNMQR', INFOT, NOUT, LERR, OK )
286*
287*     ZUNM2R
288*
289      SRNAMT = 'ZUNM2R'
290      INFOT = 1
291      CALL ZUNM2R( '/', 'N', 0, 0, 0, A, 1, X, AF, 1, W, INFO )
292      CALL CHKXER( 'ZUNM2R', INFOT, NOUT, LERR, OK )
293      INFOT = 2
294      CALL ZUNM2R( 'L', '/', 0, 0, 0, A, 1, X, AF, 1, W, INFO )
295      CALL CHKXER( 'ZUNM2R', INFOT, NOUT, LERR, OK )
296      INFOT = 3
297      CALL ZUNM2R( 'L', 'N', -1, 0, 0, A, 1, X, AF, 1, W, INFO )
298      CALL CHKXER( 'ZUNM2R', INFOT, NOUT, LERR, OK )
299      INFOT = 4
300      CALL ZUNM2R( 'L', 'N', 0, -1, 0, A, 1, X, AF, 1, W, INFO )
301      CALL CHKXER( 'ZUNM2R', INFOT, NOUT, LERR, OK )
302      INFOT = 5
303      CALL ZUNM2R( 'L', 'N', 0, 0, -1, A, 1, X, AF, 1, W, INFO )
304      CALL CHKXER( 'ZUNM2R', INFOT, NOUT, LERR, OK )
305      INFOT = 5
306      CALL ZUNM2R( 'L', 'N', 0, 1, 1, A, 1, X, AF, 1, W, INFO )
307      CALL CHKXER( 'ZUNM2R', INFOT, NOUT, LERR, OK )
308      INFOT = 5
309      CALL ZUNM2R( 'R', 'N', 1, 0, 1, A, 1, X, AF, 1, W, INFO )
310      CALL CHKXER( 'ZUNM2R', INFOT, NOUT, LERR, OK )
311      INFOT = 7
312      CALL ZUNM2R( 'L', 'N', 2, 1, 0, A, 1, X, AF, 2, W, INFO )
313      CALL CHKXER( 'ZUNM2R', INFOT, NOUT, LERR, OK )
314      INFOT = 7
315      CALL ZUNM2R( 'R', 'N', 1, 2, 0, A, 1, X, AF, 1, W, INFO )
316      CALL CHKXER( 'ZUNM2R', INFOT, NOUT, LERR, OK )
317      INFOT = 10
318      CALL ZUNM2R( 'L', 'N', 2, 1, 0, A, 2, X, AF, 1, W, INFO )
319      CALL CHKXER( 'ZUNM2R', INFOT, NOUT, LERR, OK )
320*
321*     Print a summary line.
322*
323      CALL ALAESM( PATH, OK, NOUT )
324*
325      RETURN
326*
327*     End of ZERRQR
328*
329      END
330