LAPACK 3.12.0
LAPACK: Linear Algebra PACKage
Loading...
Searching...
No Matches
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 ZGEBD2, ZGEBRD, ZUNGBR, ZUNMBR,
25*> and ZBDSQR.
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_eig
52*
53* =====================================================================
54 SUBROUTINE zerrbd( 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, LW
69 parameter( nmax = 4, lw = nmax )
70* ..
71* .. Local Scalars ..
72 CHARACTER*2 C2
73 INTEGER I, INFO, J, NT
74* ..
75* .. Local Arrays ..
76 DOUBLE PRECISION D( NMAX ), E( NMAX ), RW( 4*NMAX )
77 COMPLEX*16 A( NMAX, NMAX ), TP( NMAX ), TQ( NMAX ),
78 $ U( NMAX, NMAX ), V( NMAX, NMAX ), W( LW )
79* ..
80* .. External Functions ..
81 LOGICAL LSAMEN
82 EXTERNAL lsamen
83* ..
84* .. External Subroutines ..
85 EXTERNAL chkxer, zbdsqr, zgebd2, zgebrd, zungbr,
86 $ zunmbr
87* ..
88* .. Scalars in Common ..
89 LOGICAL LERR, OK
90 CHARACTER*32 SRNAMT
91 INTEGER INFOT, NOUT
92* ..
93* .. Common blocks ..
94 COMMON / infoc / infot, nout, ok, lerr
95 COMMON / srnamc / srnamt
96* ..
97* .. Intrinsic Functions ..
98 INTRINSIC dble
99* ..
100* .. Executable Statements ..
101*
102 nout = nunit
103 WRITE( nout, fmt = * )
104 c2 = path( 2: 3 )
105*
106* Set the variables to innocuous values.
107*
108 DO 20 j = 1, nmax
109 DO 10 i = 1, nmax
110 a( i, j ) = 1.d0 / dble( i+j )
111 10 CONTINUE
112 20 CONTINUE
113 ok = .true.
114 nt = 0
115*
116* Test error exits of the SVD routines.
117*
118 IF( lsamen( 2, c2, 'BD' ) ) THEN
119*
120* ZGEBRD
121*
122 srnamt = 'ZGEBRD'
123 infot = 1
124 CALL zgebrd( -1, 0, a, 1, d, e, tq, tp, w, 1, info )
125 CALL chkxer( 'ZGEBRD', infot, nout, lerr, ok )
126 infot = 2
127 CALL zgebrd( 0, -1, a, 1, d, e, tq, tp, w, 1, info )
128 CALL chkxer( 'ZGEBRD', infot, nout, lerr, ok )
129 infot = 4
130 CALL zgebrd( 2, 1, a, 1, d, e, tq, tp, w, 2, info )
131 CALL chkxer( 'ZGEBRD', infot, nout, lerr, ok )
132 infot = 10
133 CALL zgebrd( 2, 1, a, 2, d, e, tq, tp, w, 1, info )
134 CALL chkxer( 'ZGEBRD', infot, nout, lerr, ok )
135 nt = nt + 4
136*
137* ZGEBD2
138*
139 srnamt = 'ZGEBD2'
140 infot = 1
141 CALL zgebd2( -1, 0, a, 1, d, e, tq, tp, w, info )
142 CALL chkxer( 'ZGEBD2', infot, nout, lerr, ok )
143 infot = 2
144 CALL zgebd2( 0, -1, a, 1, d, e, tq, tp, w, info )
145 CALL chkxer( 'ZGEBD2', infot, nout, lerr, ok )
146 infot = 4
147 CALL zgebd2( 2, 1, a, 1, d, e, tq, tp, w, info )
148 CALL chkxer( 'ZGEBD2', infot, nout, lerr, ok )
149 nt = nt + 3
150*
151* ZUNGBR
152*
153 srnamt = 'ZUNGBR'
154 infot = 1
155 CALL zungbr( '/', 0, 0, 0, a, 1, tq, w, 1, info )
156 CALL chkxer( 'ZUNGBR', infot, nout, lerr, ok )
157 infot = 2
158 CALL zungbr( 'Q', -1, 0, 0, a, 1, tq, w, 1, info )
159 CALL chkxer( 'ZUNGBR', infot, nout, lerr, ok )
160 infot = 3
161 CALL zungbr( 'Q', 0, -1, 0, a, 1, tq, w, 1, info )
162 CALL chkxer( 'ZUNGBR', infot, nout, lerr, ok )
163 infot = 3
164 CALL zungbr( 'Q', 0, 1, 0, a, 1, tq, w, 1, info )
165 CALL chkxer( 'ZUNGBR', infot, nout, lerr, ok )
166 infot = 3
167 CALL zungbr( 'Q', 1, 0, 1, a, 1, tq, w, 1, info )
168 CALL chkxer( 'ZUNGBR', infot, nout, lerr, ok )
169 infot = 3
170 CALL zungbr( 'P', 1, 0, 0, a, 1, tq, w, 1, info )
171 CALL chkxer( 'ZUNGBR', infot, nout, lerr, ok )
172 infot = 3
173 CALL zungbr( 'P', 0, 1, 1, a, 1, tq, w, 1, info )
174 CALL chkxer( 'ZUNGBR', infot, nout, lerr, ok )
175 infot = 4
176 CALL zungbr( 'Q', 0, 0, -1, a, 1, tq, w, 1, info )
177 CALL chkxer( 'ZUNGBR', infot, nout, lerr, ok )
178 infot = 6
179 CALL zungbr( 'Q', 2, 1, 1, a, 1, tq, w, 1, info )
180 CALL chkxer( 'ZUNGBR', infot, nout, lerr, ok )
181 infot = 9
182 CALL zungbr( 'Q', 2, 2, 1, a, 2, tq, w, 1, info )
183 CALL chkxer( 'ZUNGBR', infot, nout, lerr, ok )
184 nt = nt + 10
185*
186* ZUNMBR
187*
188 srnamt = 'ZUNMBR'
189 infot = 1
190 CALL zunmbr( '/', 'L', 'T', 0, 0, 0, a, 1, tq, u, 1, w, 1,
191 $ info )
192 CALL chkxer( 'ZUNMBR', infot, nout, lerr, ok )
193 infot = 2
194 CALL zunmbr( 'Q', '/', 'T', 0, 0, 0, a, 1, tq, u, 1, w, 1,
195 $ info )
196 CALL chkxer( 'ZUNMBR', infot, nout, lerr, ok )
197 infot = 3
198 CALL zunmbr( 'Q', 'L', '/', 0, 0, 0, a, 1, tq, u, 1, w, 1,
199 $ info )
200 CALL chkxer( 'ZUNMBR', infot, nout, lerr, ok )
201 infot = 4
202 CALL zunmbr( 'Q', 'L', 'C', -1, 0, 0, a, 1, tq, u, 1, w, 1,
203 $ info )
204 CALL chkxer( 'ZUNMBR', infot, nout, lerr, ok )
205 infot = 5
206 CALL zunmbr( 'Q', 'L', 'C', 0, -1, 0, a, 1, tq, u, 1, w, 1,
207 $ info )
208 CALL chkxer( 'ZUNMBR', infot, nout, lerr, ok )
209 infot = 6
210 CALL zunmbr( 'Q', 'L', 'C', 0, 0, -1, a, 1, tq, u, 1, w, 1,
211 $ info )
212 CALL chkxer( 'ZUNMBR', infot, nout, lerr, ok )
213 infot = 8
214 CALL zunmbr( 'Q', 'L', 'C', 2, 0, 0, a, 1, tq, u, 2, w, 1,
215 $ info )
216 CALL chkxer( 'ZUNMBR', infot, nout, lerr, ok )
217 infot = 8
218 CALL zunmbr( 'Q', 'R', 'C', 0, 2, 0, a, 1, tq, u, 1, w, 1,
219 $ info )
220 CALL chkxer( 'ZUNMBR', infot, nout, lerr, ok )
221 infot = 8
222 CALL zunmbr( 'P', 'L', 'C', 2, 0, 2, a, 1, tq, u, 2, w, 1,
223 $ info )
224 CALL chkxer( 'ZUNMBR', infot, nout, lerr, ok )
225 infot = 8
226 CALL zunmbr( 'P', 'R', 'C', 0, 2, 2, a, 1, tq, u, 1, w, 1,
227 $ info )
228 CALL chkxer( 'ZUNMBR', infot, nout, lerr, ok )
229 infot = 11
230 CALL zunmbr( 'Q', 'R', 'C', 2, 0, 0, a, 1, tq, u, 1, w, 1,
231 $ info )
232 CALL chkxer( 'ZUNMBR', infot, nout, lerr, ok )
233 infot = 13
234 CALL zunmbr( 'Q', 'L', 'C', 0, 2, 0, a, 1, tq, u, 1, w, 0,
235 $ info )
236 CALL chkxer( 'ZUNMBR', infot, nout, lerr, ok )
237 infot = 13
238 CALL zunmbr( 'Q', 'R', 'C', 2, 0, 0, a, 1, tq, u, 2, w, 0,
239 $ info )
240 CALL chkxer( 'ZUNMBR', infot, nout, lerr, ok )
241 nt = nt + 13
242*
243* ZBDSQR
244*
245 srnamt = 'ZBDSQR'
246 infot = 1
247 CALL zbdsqr( '/', 0, 0, 0, 0, d, e, v, 1, u, 1, a, 1, rw,
248 $ info )
249 CALL chkxer( 'ZBDSQR', infot, nout, lerr, ok )
250 infot = 2
251 CALL zbdsqr( 'U', -1, 0, 0, 0, d, e, v, 1, u, 1, a, 1, rw,
252 $ info )
253 CALL chkxer( 'ZBDSQR', infot, nout, lerr, ok )
254 infot = 3
255 CALL zbdsqr( 'U', 0, -1, 0, 0, d, e, v, 1, u, 1, a, 1, rw,
256 $ info )
257 CALL chkxer( 'ZBDSQR', infot, nout, lerr, ok )
258 infot = 4
259 CALL zbdsqr( 'U', 0, 0, -1, 0, d, e, v, 1, u, 1, a, 1, rw,
260 $ info )
261 CALL chkxer( 'ZBDSQR', infot, nout, lerr, ok )
262 infot = 5
263 CALL zbdsqr( 'U', 0, 0, 0, -1, d, e, v, 1, u, 1, a, 1, rw,
264 $ info )
265 CALL chkxer( 'ZBDSQR', infot, nout, lerr, ok )
266 infot = 9
267 CALL zbdsqr( 'U', 2, 1, 0, 0, d, e, v, 1, u, 1, a, 1, rw,
268 $ info )
269 CALL chkxer( 'ZBDSQR', infot, nout, lerr, ok )
270 infot = 11
271 CALL zbdsqr( 'U', 0, 0, 2, 0, d, e, v, 1, u, 1, a, 1, rw,
272 $ info )
273 CALL chkxer( 'ZBDSQR', infot, nout, lerr, ok )
274 infot = 13
275 CALL zbdsqr( 'U', 2, 0, 0, 1, d, e, v, 1, u, 1, a, 1, rw,
276 $ info )
277 CALL chkxer( 'ZBDSQR', infot, nout, lerr, ok )
278 nt = nt + 8
279 END IF
280*
281* Print a summary line.
282*
283 IF( ok ) THEN
284 WRITE( nout, fmt = 9999 )path, nt
285 ELSE
286 WRITE( nout, fmt = 9998 )path
287 END IF
288*
289 9999 FORMAT( 1x, a3, ' routines passed the tests of the error exits (',
290 $ i3, ' tests done)' )
291 9998 FORMAT( ' *** ', a3, ' routines failed the tests of the error ',
292 $ 'exits ***' )
293*
294 RETURN
295*
296* End of ZERRBD
297*
298 END
subroutine chkxer(srnamt, infot, nout, lerr, ok)
Definition cblat2.f:3224
subroutine zbdsqr(uplo, n, ncvt, nru, ncc, d, e, vt, ldvt, u, ldu, c, ldc, rwork, info)
ZBDSQR
Definition zbdsqr.f:233
subroutine zgebd2(m, n, a, lda, d, e, tauq, taup, work, info)
ZGEBD2 reduces a general matrix to bidiagonal form using an unblocked algorithm.
Definition zgebd2.f:189
subroutine zgebrd(m, n, a, lda, d, e, tauq, taup, work, lwork, info)
ZGEBRD
Definition zgebrd.f:205
subroutine zungbr(vect, m, n, k, a, lda, tau, work, lwork, info)
ZUNGBR
Definition zungbr.f:157
subroutine zunmbr(vect, side, trans, m, n, k, a, lda, tau, c, ldc, work, lwork, info)
ZUNMBR
Definition zunmbr.f:196
subroutine zerrbd(path, nunit)
ZERRBD
Definition zerrbd.f:55