LAPACK  3.5.0
LAPACK: Linear Algebra PACKage
 All Classes Files Functions Variables Typedefs Macros
zerrbd.f
Go to the documentation of this file.
1 *> \brief \b ZERRBD
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 ZERRBD( 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 *> ZERRBD tests the error exits for ZGEBRD, ZUNGBR, ZUNMBR, and ZBDSQR.
25 *> \endverbatim
26 *
27 * Arguments:
28 * ==========
29 *
30 *> \param[in] PATH
31 *> \verbatim
32 *> PATH is CHARACTER*3
33 *> The LAPACK path name for the routines to be tested.
34 *> \endverbatim
35 *>
36 *> \param[in] NUNIT
37 *> \verbatim
38 *> NUNIT is INTEGER
39 *> The unit number for output.
40 *> \endverbatim
41 *
42 * Authors:
43 * ========
44 *
45 *> \author Univ. of Tennessee
46 *> \author Univ. of California Berkeley
47 *> \author Univ. of Colorado Denver
48 *> \author NAG Ltd.
49 *
50 *> \date November 2011
51 *
52 *> \ingroup complex16_eig
53 *
54 * =====================================================================
55  SUBROUTINE zerrbd( PATH, NUNIT )
56 *
57 * -- LAPACK test routine (version 3.4.0) --
58 * -- LAPACK is a software package provided by Univ. of Tennessee, --
59 * -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
60 * November 2011
61 *
62 * .. Scalar Arguments ..
63  CHARACTER*3 path
64  INTEGER nunit
65 * ..
66 *
67 * =====================================================================
68 *
69 * .. Parameters ..
70  INTEGER nmax, lw
71  parameter( nmax = 4, lw = nmax )
72 * ..
73 * .. Local Scalars ..
74  CHARACTER*2 c2
75  INTEGER i, info, j, nt
76 * ..
77 * .. Local Arrays ..
78  DOUBLE PRECISION d( nmax ), e( nmax ), rw( 4*nmax )
79  COMPLEX*16 a( nmax, nmax ), tp( nmax ), tq( nmax ),
80  $ u( nmax, nmax ), v( nmax, nmax ), w( lw )
81 * ..
82 * .. External Functions ..
83  LOGICAL lsamen
84  EXTERNAL lsamen
85 * ..
86 * .. External Subroutines ..
87  EXTERNAL chkxer, zbdsqr, zgebrd, zungbr, zunmbr
88 * ..
89 * .. Scalars in Common ..
90  LOGICAL lerr, ok
91  CHARACTER*32 srnamt
92  INTEGER infot, nout
93 * ..
94 * .. Common blocks ..
95  COMMON / infoc / infot, nout, ok, lerr
96  COMMON / srnamc / srnamt
97 * ..
98 * .. Intrinsic Functions ..
99  INTRINSIC dble
100 * ..
101 * .. Executable Statements ..
102 *
103  nout = nunit
104  WRITE( nout, fmt = * )
105  c2 = path( 2: 3 )
106 *
107 * Set the variables to innocuous values.
108 *
109  DO 20 j = 1, nmax
110  DO 10 i = 1, nmax
111  a( i, j ) = 1.d0 / dble( i+j )
112  10 CONTINUE
113  20 CONTINUE
114  ok = .true.
115  nt = 0
116 *
117 * Test error exits of the SVD routines.
118 *
119  IF( lsamen( 2, c2, 'BD' ) ) THEN
120 *
121 * ZGEBRD
122 *
123  srnamt = 'ZGEBRD'
124  infot = 1
125  CALL zgebrd( -1, 0, a, 1, d, e, tq, tp, w, 1, info )
126  CALL chkxer( 'ZGEBRD', infot, nout, lerr, ok )
127  infot = 2
128  CALL zgebrd( 0, -1, a, 1, d, e, tq, tp, w, 1, info )
129  CALL chkxer( 'ZGEBRD', infot, nout, lerr, ok )
130  infot = 4
131  CALL zgebrd( 2, 1, a, 1, d, e, tq, tp, w, 2, info )
132  CALL chkxer( 'ZGEBRD', infot, nout, lerr, ok )
133  infot = 10
134  CALL zgebrd( 2, 1, a, 2, d, e, tq, tp, w, 1, info )
135  CALL chkxer( 'ZGEBRD', infot, nout, lerr, ok )
136  nt = nt + 4
137 *
138 * ZUNGBR
139 *
140  srnamt = 'ZUNGBR'
141  infot = 1
142  CALL zungbr( '/', 0, 0, 0, a, 1, tq, w, 1, info )
143  CALL chkxer( 'ZUNGBR', infot, nout, lerr, ok )
144  infot = 2
145  CALL zungbr( 'Q', -1, 0, 0, a, 1, tq, w, 1, info )
146  CALL chkxer( 'ZUNGBR', infot, nout, lerr, ok )
147  infot = 3
148  CALL zungbr( 'Q', 0, -1, 0, a, 1, tq, w, 1, info )
149  CALL chkxer( 'ZUNGBR', infot, nout, lerr, ok )
150  infot = 3
151  CALL zungbr( 'Q', 0, 1, 0, a, 1, tq, w, 1, info )
152  CALL chkxer( 'ZUNGBR', infot, nout, lerr, ok )
153  infot = 3
154  CALL zungbr( 'Q', 1, 0, 1, a, 1, tq, w, 1, info )
155  CALL chkxer( 'ZUNGBR', infot, nout, lerr, ok )
156  infot = 3
157  CALL zungbr( 'P', 1, 0, 0, a, 1, tq, w, 1, info )
158  CALL chkxer( 'ZUNGBR', infot, nout, lerr, ok )
159  infot = 3
160  CALL zungbr( 'P', 0, 1, 1, a, 1, tq, w, 1, info )
161  CALL chkxer( 'ZUNGBR', infot, nout, lerr, ok )
162  infot = 4
163  CALL zungbr( 'Q', 0, 0, -1, a, 1, tq, w, 1, info )
164  CALL chkxer( 'ZUNGBR', infot, nout, lerr, ok )
165  infot = 6
166  CALL zungbr( 'Q', 2, 1, 1, a, 1, tq, w, 1, info )
167  CALL chkxer( 'ZUNGBR', infot, nout, lerr, ok )
168  infot = 9
169  CALL zungbr( 'Q', 2, 2, 1, a, 2, tq, w, 1, info )
170  CALL chkxer( 'ZUNGBR', infot, nout, lerr, ok )
171  nt = nt + 10
172 *
173 * ZUNMBR
174 *
175  srnamt = 'ZUNMBR'
176  infot = 1
177  CALL zunmbr( '/', 'L', 'T', 0, 0, 0, a, 1, tq, u, 1, w, 1,
178  $ info )
179  CALL chkxer( 'ZUNMBR', infot, nout, lerr, ok )
180  infot = 2
181  CALL zunmbr( 'Q', '/', 'T', 0, 0, 0, a, 1, tq, u, 1, w, 1,
182  $ info )
183  CALL chkxer( 'ZUNMBR', infot, nout, lerr, ok )
184  infot = 3
185  CALL zunmbr( 'Q', 'L', '/', 0, 0, 0, a, 1, tq, u, 1, w, 1,
186  $ info )
187  CALL chkxer( 'ZUNMBR', infot, nout, lerr, ok )
188  infot = 4
189  CALL zunmbr( 'Q', 'L', 'C', -1, 0, 0, a, 1, tq, u, 1, w, 1,
190  $ info )
191  CALL chkxer( 'ZUNMBR', infot, nout, lerr, ok )
192  infot = 5
193  CALL zunmbr( 'Q', 'L', 'C', 0, -1, 0, a, 1, tq, u, 1, w, 1,
194  $ info )
195  CALL chkxer( 'ZUNMBR', infot, nout, lerr, ok )
196  infot = 6
197  CALL zunmbr( 'Q', 'L', 'C', 0, 0, -1, a, 1, tq, u, 1, w, 1,
198  $ info )
199  CALL chkxer( 'ZUNMBR', infot, nout, lerr, ok )
200  infot = 8
201  CALL zunmbr( 'Q', 'L', 'C', 2, 0, 0, a, 1, tq, u, 2, w, 1,
202  $ info )
203  CALL chkxer( 'ZUNMBR', infot, nout, lerr, ok )
204  infot = 8
205  CALL zunmbr( 'Q', 'R', 'C', 0, 2, 0, a, 1, tq, u, 1, w, 1,
206  $ info )
207  CALL chkxer( 'ZUNMBR', infot, nout, lerr, ok )
208  infot = 8
209  CALL zunmbr( 'P', 'L', 'C', 2, 0, 2, a, 1, tq, u, 2, w, 1,
210  $ info )
211  CALL chkxer( 'ZUNMBR', infot, nout, lerr, ok )
212  infot = 8
213  CALL zunmbr( 'P', 'R', 'C', 0, 2, 2, a, 1, tq, u, 1, w, 1,
214  $ info )
215  CALL chkxer( 'ZUNMBR', infot, nout, lerr, ok )
216  infot = 11
217  CALL zunmbr( 'Q', 'R', 'C', 2, 0, 0, a, 1, tq, u, 1, w, 1,
218  $ info )
219  CALL chkxer( 'ZUNMBR', infot, nout, lerr, ok )
220  infot = 13
221  CALL zunmbr( 'Q', 'L', 'C', 0, 2, 0, a, 1, tq, u, 1, w, 0,
222  $ info )
223  CALL chkxer( 'ZUNMBR', infot, nout, lerr, ok )
224  infot = 13
225  CALL zunmbr( 'Q', 'R', 'C', 2, 0, 0, a, 1, tq, u, 2, w, 0,
226  $ info )
227  CALL chkxer( 'ZUNMBR', infot, nout, lerr, ok )
228  nt = nt + 13
229 *
230 * ZBDSQR
231 *
232  srnamt = 'ZBDSQR'
233  infot = 1
234  CALL zbdsqr( '/', 0, 0, 0, 0, d, e, v, 1, u, 1, a, 1, rw,
235  $ info )
236  CALL chkxer( 'ZBDSQR', infot, nout, lerr, ok )
237  infot = 2
238  CALL zbdsqr( 'U', -1, 0, 0, 0, d, e, v, 1, u, 1, a, 1, rw,
239  $ info )
240  CALL chkxer( 'ZBDSQR', infot, nout, lerr, ok )
241  infot = 3
242  CALL zbdsqr( 'U', 0, -1, 0, 0, d, e, v, 1, u, 1, a, 1, rw,
243  $ info )
244  CALL chkxer( 'ZBDSQR', infot, nout, lerr, ok )
245  infot = 4
246  CALL zbdsqr( 'U', 0, 0, -1, 0, d, e, v, 1, u, 1, a, 1, rw,
247  $ info )
248  CALL chkxer( 'ZBDSQR', infot, nout, lerr, ok )
249  infot = 5
250  CALL zbdsqr( 'U', 0, 0, 0, -1, d, e, v, 1, u, 1, a, 1, rw,
251  $ info )
252  CALL chkxer( 'ZBDSQR', infot, nout, lerr, ok )
253  infot = 9
254  CALL zbdsqr( 'U', 2, 1, 0, 0, d, e, v, 1, u, 1, a, 1, rw,
255  $ info )
256  CALL chkxer( 'ZBDSQR', infot, nout, lerr, ok )
257  infot = 11
258  CALL zbdsqr( 'U', 0, 0, 2, 0, d, e, v, 1, u, 1, a, 1, rw,
259  $ info )
260  CALL chkxer( 'ZBDSQR', infot, nout, lerr, ok )
261  infot = 13
262  CALL zbdsqr( 'U', 2, 0, 0, 1, d, e, v, 1, u, 1, a, 1, rw,
263  $ info )
264  CALL chkxer( 'ZBDSQR', infot, nout, lerr, ok )
265  nt = nt + 8
266  END IF
267 *
268 * Print a summary line.
269 *
270  IF( ok ) THEN
271  WRITE( nout, fmt = 9999 )path, nt
272  ELSE
273  WRITE( nout, fmt = 9998 )path
274  END IF
275 *
276  9999 FORMAT( 1x, a3, ' routines passed the tests of the error exits (',
277  $ i3, ' tests done)' )
278  9998 FORMAT( ' *** ', a3, ' routines failed the tests of the error ',
279  $ 'exits ***' )
280 *
281  RETURN
282 *
283 * End of ZERRBD
284 *
285  END