OpenRadioss 2025.1.11
OpenRadioss project
Loading...
Searching...
No Matches
derrpo.f
Go to the documentation of this file.
1*> \brief \b DERRPO
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 DERRPO( 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*> DERRPO tests the error exits for the DOUBLE PRECISION routines
25*> for symmetric positive definite matrices.
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 double_lin
52*
53* =====================================================================
54 SUBROUTINE derrpo( 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 = 4 )
70* ..
71* .. Local Scalars ..
72 CHARACTER*2 C2
73 INTEGER I, INFO, J
74 DOUBLE PRECISION ANRM, RCOND
75* ..
76* .. Local Arrays ..
77 INTEGER IW( NMAX )
78 DOUBLE PRECISION A( NMAX, NMAX ), AF( NMAX, NMAX ), B( NMAX ),
79 $ R1( NMAX ), R2( NMAX ), W( 3*NMAX ), X( NMAX )
80* ..
81* .. External Functions ..
82 LOGICAL LSAMEN
83 EXTERNAL lsamen
84* ..
85* .. External Subroutines ..
86 EXTERNAL alaesm, chkxer, dpbcon, dpbequ, dpbrfs, dpbtf2,
90* ..
91* .. Scalars in Common ..
92 LOGICAL LERR, OK
93 CHARACTER*32 SRNAMT
94 INTEGER INFOT, NOUT
95* ..
96* .. Common blocks ..
97 COMMON / infoc / infot, nout, ok, lerr
98 COMMON / srnamc / srnamt
99* ..
100* .. Intrinsic Functions ..
101 INTRINSIC dble
102* ..
103* .. Executable Statements ..
104*
105 nout = nunit
106 WRITE( nout, fmt = * )
107 c2 = path( 2: 3 )
108*
109* Set the variables to innocuous values.
110*
111 DO 20 j = 1, nmax
112 DO 10 i = 1, nmax
113 a( i, j ) = 1.d0 / dble( i+j )
114 af( i, j ) = 1.d0 / dble( i+j )
115 10 CONTINUE
116 b( j ) = 0.d0
117 r1( j ) = 0.d0
118 r2( j ) = 0.d0
119 w( j ) = 0.d0
120 x( j ) = 0.d0
121 iw( j ) = j
122 20 CONTINUE
123 ok = .true.
124*
125 IF( lsamen( 2, c2, 'PO' ) ) THEN
126*
127* Test error exits of the routines that use the Cholesky
128* decomposition of a symmetric positive definite matrix.
129*
130* DPOTRF
131*
132 srnamt = 'DPOTRF'
133 infot = 1
134 CALL dpotrf( '/', 0, a, 1, info )
135 CALL chkxer( 'DPOTRF', infot, nout, lerr, ok )
136 infot = 2
137 CALL dpotrf( 'u', -1, A, 1, INFO )
138 CALL CHKXER( 'dpotrf', INFOT, NOUT, LERR, OK )
139 INFOT = 4
140 CALL DPOTRF( 'u', 2, A, 1, INFO )
141 CALL CHKXER( 'dpotrf', INFOT, NOUT, LERR, OK )
142*
143* DPOTF2
144*
145 SRNAMT = 'dpotf2'
146 INFOT = 1
147 CALL DPOTF2( '/', 0, A, 1, INFO )
148 CALL CHKXER( 'dpotf2', INFOT, NOUT, LERR, OK )
149 INFOT = 2
150 CALL DPOTF2( 'u', -1, A, 1, INFO )
151 CALL CHKXER( 'dpotf2', INFOT, NOUT, LERR, OK )
152 INFOT = 4
153 CALL DPOTF2( 'u', 2, A, 1, INFO )
154 CALL CHKXER( 'dpotf2', INFOT, NOUT, LERR, OK )
155*
156* DPOTRI
157*
158 SRNAMT = 'dpotri'
159 INFOT = 1
160 CALL DPOTRI( '/', 0, A, 1, INFO )
161 CALL CHKXER( 'dpotri', INFOT, NOUT, LERR, OK )
162 INFOT = 2
163 CALL DPOTRI( 'u', -1, A, 1, INFO )
164 CALL CHKXER( 'dpotri', INFOT, NOUT, LERR, OK )
165 INFOT = 4
166 CALL DPOTRI( 'u', 2, A, 1, INFO )
167 CALL CHKXER( 'dpotri', INFOT, NOUT, LERR, OK )
168*
169* DPOTRS
170*
171 SRNAMT = 'dpotrs'
172 infot = 1
173 CALL dpotrs( '/', 0, 0, a, 1, b, 1, info )
174 CALL chkxer( 'DPOTRS', infot, nout, lerr, ok )
175 infot = 2
176 CALL dpotrs( 'U', -1, 0, a, 1, b, 1, info )
177 CALL chkxer( 'DPOTRS', infot, nout, lerr, ok )
178 infot = 3
179 CALL dpotrs( 'U', 0, -1, a, 1, b, 1, info )
180 CALL chkxer( 'DPOTRS', infot, nout, lerr, ok )
181 infot = 5
182 CALL dpotrs( 'U', 2, 1, a, 1, b, 2, info )
183 CALL chkxer( 'DPOTRS', infot, nout, lerr, ok )
184 infot = 7
185 CALL dpotrs( 'U', 2, 1, a, 2, b, 1, info )
186 CALL chkxer( 'DPOTRS', infot, nout, lerr, ok )
187*
188* DPORFS
189*
190 srnamt = 'DPORFS'
191 infot = 1
192 CALL dporfs( '/', 0, 0, a, 1, af, 1, b, 1, x, 1, r1, r2, w, iw,
193 $ info )
194 CALL chkxer( 'DPORFS', infot, nout, lerr, ok )
195 infot = 2
196 CALL dporfs( 'U', -1, 0, a, 1, af, 1, b, 1, x, 1, r1, r2, w,
197 $ iw, info )
198 CALL chkxer( 'DPORFS', infot, nout, lerr, ok )
199 infot = 3
200 CALL dporfs( 'U', 0, -1, a, 1, af, 1, b, 1, x, 1, r1, r2, w,
201 $ iw, info )
202 CALL chkxer( 'DPORFS', infot, nout, lerr, ok )
203 infot = 5
204 CALL dporfs( 'U', 2, 1, a, 1, af, 2, b, 2, x, 2, r1, r2, w, iw,
205 $ info )
206 CALL chkxer( 'DPORFS', infot, nout, lerr, ok )
207 infot = 7
208 CALL dporfs( 'U', 2, 1, a, 2, af, 1, b, 2, x, 2, r1, r2, w, iw,
209 $ info )
210 CALL chkxer( 'DPORFS', infot, nout, lerr, ok )
211 infot = 9
212 CALL dporfs( 'U', 2, 1, a, 2, af, 2, b, 1, x, 2, r1, r2, w, iw,
213 $ info )
214 CALL chkxer( 'DPORFS', infot, nout, lerr, ok )
215 infot = 11
216 CALL dporfs( 'U', 2, 1, a, 2, af, 2, b, 2, x, 1, r1, r2, w, iw,
217 $ info )
218 CALL chkxer( 'DPORFS', infot, nout, lerr, ok )
219*
220* DPOCON
221*
222 srnamt = 'DPOCON'
223 infot = 1
224 CALL dpocon( '/', 0, a, 1, anrm, rcond, w, iw, info )
225 CALL chkxer( 'DPOCON', infot, nout, lerr, ok )
226 infot = 2
227 CALL dpocon( 'U', -1, a, 1, anrm, rcond, w, iw, info )
228 CALL chkxer( 'DPOCON', infot, nout, lerr, ok )
229 infot = 4
230 CALL dpocon( 'U', 2, a, 1, anrm, rcond, w, iw, info )
231 CALL chkxer( 'DPOCON', infot, nout, lerr, ok )
232*
233* DPOEQU
234*
235 srnamt = 'DPOEQU'
236 infot = 1
237 CALL dpoequ( -1, a, 1, r1, rcond, anrm, info )
238 CALL chkxer( 'DPOEQU', infot, nout, lerr, ok )
239 infot = 3
240 CALL dpoequ( 2, a, 1, r1, rcond, anrm, info )
241 CALL chkxer( 'DPOEQU', infot, nout, lerr, ok )
242*
243 ELSE IF( lsamen( 2, c2, 'PP' ) ) THEN
244*
245* Test error exits of the routines that use the Cholesky
246* decomposition of a symmetric positive definite packed matrix.
247*
248* DPPTRF
249*
250 srnamt = 'DPPTRF'
251 infot = 1
252 CALL dpptrf( '/', 0, a, info )
253 CALL chkxer( 'DPPTRF', infot, nout, lerr, ok )
254 infot = 2
255 CALL dpptrf( 'U', -1, a, info )
256 CALL chkxer( 'DPPTRF', infot, nout, lerr, ok )
257*
258* DPPTRI
259*
260 srnamt = 'DPPTRI'
261 infot = 1
262 CALL dpptri( '/', 0, a, info )
263 CALL chkxer( 'DPPTRI', infot, nout, lerr, ok )
264 infot = 2
265 CALL dpptri( 'U', -1, a, info )
266 CALL chkxer( 'DPPTRI', infot, nout, lerr, ok )
267*
268* DPPTRS
269*
270 srnamt = 'DPPTRS'
271 infot = 1
272 CALL dpptrs( '/', 0, 0, a, b, 1, info )
273 CALL chkxer( 'DPPTRS', infot, nout, lerr, ok )
274 infot = 2
275 CALL dpptrs( 'U', -1, 0, a, b, 1, info )
276 CALL chkxer( 'DPPTRS', infot, nout, lerr, ok )
277 infot = 3
278 CALL dpptrs( 'u', 0, -1, A, B, 1, INFO )
279 CALL CHKXER( 'dpptrs', INFOT, NOUT, LERR, OK )
280 INFOT = 6
281 CALL DPPTRS( 'u', 2, 1, A, B, 1, INFO )
282 CALL CHKXER( 'dpptrs', INFOT, NOUT, LERR, OK )
283*
284* DPPRFS
285*
286 SRNAMT = 'dpprfs'
287 INFOT = 1
288 CALL DPPRFS( '/', 0, 0, A, AF, B, 1, X, 1, R1, R2, W, IW,
289 $ INFO )
290 CALL CHKXER( 'dpprfs', INFOT, NOUT, LERR, OK )
291 INFOT = 2
292 CALL DPPRFS( 'u', -1, 0, A, AF, B, 1, X, 1, R1, R2, W, IW,
293 $ INFO )
294 CALL CHKXER( 'dpprfs', INFOT, NOUT, LERR, OK )
295 INFOT = 3
296 CALL DPPRFS( 'u', 0, -1, A, AF, B, 1, X, 1, R1, R2, W, IW,
297 $ INFO )
298 CALL CHKXER( 'dpprfs', INFOT, NOUT, LERR, OK )
299 INFOT = 7
300 CALL DPPRFS( 'u', 2, 1, A, AF, B, 1, X, 2, R1, R2, W, IW,
301 $ INFO )
302 CALL CHKXER( 'dpprfs', INFOT, NOUT, LERR, OK )
303 INFOT = 9
304 CALL DPPRFS( 'u', 2, 1, A, AF, B, 2, X, 1, R1, R2, W, IW,
305 $ INFO )
306 CALL CHKXER( 'dpprfs', INFOT, NOUT, LERR, OK )
307*
308* DPPCON
309*
310 SRNAMT = 'dppcon'
311 INFOT = 1
312 CALL DPPCON( '/', 0, A, ANRM, RCOND, W, IW, INFO )
313 CALL CHKXER( 'dppcon', INFOT, NOUT, LERR, OK )
314 INFOT = 2
315 CALL DPPCON( 'u', -1, A, ANRM, RCOND, W, IW, INFO )
316 CALL CHKXER( 'dppcon', infot, nout, lerr, ok )
317*
318* DPPEQU
319*
320 srnamt = 'DPPEQU'
321 infot = 1
322 CALL dppequ( '/', 0, a, r1, rcond, anrm, info )
323 CALL chkxer( 'DPPEQU', infot, nout, lerr, ok )
324 infot = 2
325 CALL dppequ( 'U', -1, a, r1, rcond, anrm, info )
326 CALL chkxer( 'DPPEQU', infot, nout, lerr, ok )
327*
328 ELSE IF( lsamen( 2, c2, 'PB' ) ) THEN
329*
330* Test error exits of the routines that use the Cholesky
331* decomposition of a symmetric positive definite band matrix.
332*
333* DPBTRF
334*
335 srnamt = 'DPBTRF'
336 infot = 1
337 CALL dpbtrf( '/', 0, 0, a, 1, info )
338 CALL chkxer( 'DPBTRF', infot, nout, lerr, ok )
339 infot = 2
340 CALL dpbtrf( 'U', -1, 0, a, 1, info )
341 CALL chkxer( 'DPBTRF', infot, nout, lerr, ok )
342 infot = 3
343 CALL dpbtrf( 'U', 1, -1, a, 1, info )
344 CALL chkxer( 'DPBTRF', infot, nout, lerr, ok )
345 infot = 5
346 CALL dpbtrf( 'U', 2, 1, a, 1, info )
347 CALL chkxer( 'DPBTRF', infot, nout, lerr, ok )
348*
349* DPBTF2
350*
351 srnamt = 'DPBTF2'
352 infot = 1
353 CALL dpbtf2( '/', 0, 0, a, 1, info )
354 CALL chkxer( 'DPBTF2', infot, nout, lerr, ok )
355 infot = 2
356 CALL dpbtf2( 'U', -1, 0, a, 1, info )
357 CALL chkxer( 'DPBTF2', infot, nout, lerr, ok )
358 infot = 3
359 CALL dpbtf2( 'U', 1, -1, a, 1, info )
360 CALL chkxer( 'DPBTF2', infot, nout, lerr, ok )
361 infot = 5
362 CALL dpbtf2( 'U', 2, 1, a, 1, info )
363 CALL chkxer( 'DPBTF2', infot, nout, lerr, ok )
364*
365* DPBTRS
366*
367 srnamt = 'DPBTRS'
368 infot = 1
369 CALL dpbtrs( '/', 0, 0, 0, a, 1, b, 1, info )
370 CALL chkxer( 'DPBTRS', infot, nout, lerr, ok )
371 infot = 2
372 CALL dpbtrs( 'U', -1, 0, 0, a, 1, b, 1, info )
373 CALL chkxer( 'DPBTRS', infot, nout, lerr, ok )
374 infot = 3
375 CALL dpbtrs( 'U', 1, -1, 0, a, 1, b, 1, info )
376 CALL chkxer( 'DPBTRS', infot, nout, lerr, ok )
377 infot = 4
378 CALL dpbtrs( 'U', 0, 0, -1, a, 1, b, 1, info )
379 CALL chkxer( 'DPBTRS', infot, nout, lerr, ok )
380 infot = 6
381 CALL dpbtrs( 'U', 2, 1, 1, a, 1, b, 1, info )
382 CALL chkxer( 'DPBTRS', infot, nout, lerr, ok )
383 infot = 8
384 CALL dpbtrs( 'U', 2, 0, 1, a, 1, b, 1, info )
385 CALL chkxer( 'DPBTRS', infot, nout, lerr, ok )
386*
387* DPBRFS
388*
389 srnamt = 'DPBRFS'
390 infot = 1
391 CALL dpbrfs( '/', 0, 0, 0, a, 1, af, 1, b, 1, x, 1, r1, r2, w,
392 $ iw, info )
393 CALL chkxer( 'DPBRFS', infot, nout, lerr, ok )
394 infot = 2
395 CALL dpbrfs( 'U', -1, 0, 0, a, 1, af, 1, b, 1, x, 1, r1, r2, w,
396 $ iw, info )
397 CALL chkxer( 'DPBRFS', infot, nout, lerr, ok )
398 infot = 3
399 CALL dpbrfs( 'U', 1, -1, 0, a, 1, af, 1, b, 1, x, 1, r1, r2, w,
400 $ iw, info )
401 CALL chkxer( 'DPBRFS', infot, nout, lerr, ok )
402 infot = 4
403 CALL dpbrfs( 'U', 0, 0, -1, a, 1, af, 1, b, 1, x, 1, r1, r2, w,
404 $ iw, info )
405 CALL chkxer( 'DPBRFS', infot, nout, lerr, ok )
406 infot = 6
407 CALL dpbrfs( 'U', 2, 1, 1, a, 1, af, 2, b, 2, x, 2, r1, r2, w,
408 $ iw, info )
409 CALL chkxer( 'DPBRFS', infot, nout, lerr, ok )
410 infot = 8
411 CALL dpbrfs( 'U', 2, 1, 1, a, 2, af, 1, b, 2, x, 2, r1, r2, w,
412 $ iw, info )
413 CALL chkxer( 'DPBRFS', infot, nout, lerr, ok )
414 infot = 10
415 CALL dpbrfs( 'U', 2, 0, 1, a, 1, af, 1, b, 1, x, 2, r1, r2, w,
416 $ iw, info )
417 CALL chkxer( 'DPBRFS', infot, nout, lerr, ok )
418 infot = 12
419 CALL dpbrfs( 'u', 2, 0, 1, A, 1, AF, 1, B, 2, X, 1, R1, R2, W,
420 $ IW, INFO )
421 CALL CHKXER( 'dpbrfs', INFOT, NOUT, LERR, OK )
422*
423* DPBCON
424*
425 SRNAMT = 'dpbcon'
426 INFOT = 1
427 CALL DPBCON( '/', 0, 0, A, 1, ANRM, RCOND, W, IW, INFO )
428 CALL CHKXER( 'dpbcon', INFOT, NOUT, LERR, OK )
429 INFOT = 2
430 CALL DPBCON( 'u', -1, 0, A, 1, ANRM, RCOND, W, IW, INFO )
431 CALL CHKXER( 'dpbcon', INFOT, NOUT, LERR, OK )
432 INFOT = 3
433 CALL DPBCON( 'u', 1, -1, A, 1, ANRM, RCOND, W, IW, INFO )
434 CALL CHKXER( 'dpbcon', INFOT, NOUT, LERR, OK )
435 INFOT = 5
436 CALL DPBCON( 'u', 2, 1, A, 1, ANRM, RCOND, W, IW, INFO )
437 CALL CHKXER( 'dpbcon', INFOT, NOUT, LERR, OK )
438*
439* DPBEQU
440*
441 SRNAMT = 'dpbequ'
442 INFOT = 1
443 CALL DPBEQU( '/', 0, 0, A, 1, R1, RCOND, ANRM, INFO )
444 CALL CHKXER( 'dpbequ', INFOT, NOUT, LERR, OK )
445 INFOT = 2
446 CALL DPBEQU( 'u', -1, 0, A, 1, R1, RCOND, ANRM, INFO )
447 CALL CHKXER( 'dpbequ', INFOT, NOUT, LERR, OK )
448 INFOT = 3
449 CALL DPBEQU( 'u', 1, -1, A, 1, R1, RCOND, ANRM, INFO )
450 CALL CHKXER( 'dpbequ', INFOT, NOUT, LERR, OK )
451 INFOT = 5
452 CALL DPBEQU( 'u', 2, 1, A, 1, R1, RCOND, ANRM, INFO )
453 CALL CHKXER( 'dpbequ', INFOT, NOUT, LERR, OK )
454 END IF
455*
456* Print a summary line.
457*
458 CALL ALAESM( PATH, OK, NOUT )
459*
460 RETURN
461*
462* End of DERRPO
463*
464 END
subroutine chkxer(srnamt, infot, nout, lerr, ok)
Definition cblat2.f:3196
subroutine alaesm(path, ok, nout)
ALAESM
Definition alaesm.f:63
subroutine dpbtf2(uplo, n, kd, ab, ldab, info)
DPBTF2 computes the Cholesky factorization of a symmetric/Hermitian positive definite band matrix (un...
Definition dpbtf2.f:142
subroutine dpbtrs(uplo, n, kd, nrhs, ab, ldab, b, ldb, info)
DPBTRS
Definition dpbtrs.f:121
subroutine dppcon(uplo, n, ap, anorm, rcond, work, iwork, info)
DPPCON
Definition dppcon.f:118
subroutine dpbequ(uplo, n, kd, ab, ldab, s, scond, amax, info)
DPBEQU
Definition dpbequ.f:129
subroutine dpptrs(uplo, n, nrhs, ap, b, ldb, info)
DPPTRS
Definition dpptrs.f:108
subroutine dpbcon(uplo, n, kd, ab, ldab, anorm, rcond, work, iwork, info)
DPBCON
Definition dpbcon.f:132
subroutine dpbrfs(uplo, n, kd, nrhs, ab, ldab, afb, ldafb, b, ldb, x, ldx, ferr, berr, work, iwork, info)
DPBRFS
Definition dpbrfs.f:189
subroutine dpptri(uplo, n, ap, info)
DPPTRI
Definition dpptri.f:93
subroutine dpptrf(uplo, n, ap, info)
DPPTRF
Definition dpptrf.f:119
subroutine dpprfs(uplo, n, nrhs, ap, afp, b, ldb, x, ldx, ferr, berr, work, iwork, info)
DPPRFS
Definition dpprfs.f:171
subroutine dppequ(uplo, n, ap, s, scond, amax, info)
DPPEQU
Definition dppequ.f:116
subroutine dpbtrf(uplo, n, kd, ab, ldab, info)
DPBTRF
Definition dpbtrf.f:142
subroutine dpoequ(n, a, lda, s, scond, amax, info)
DPOEQU
Definition dpoequ.f:112
subroutine dpotrs(uplo, n, nrhs, a, lda, b, ldb, info)
DPOTRS
Definition dpotrs.f:110
subroutine dpotrf(uplo, n, a, lda, info)
DPOTRF
Definition dpotrf.f:107
subroutine dpocon(uplo, n, a, lda, anorm, rcond, work, iwork, info)
DPOCON
Definition dpocon.f:121
subroutine dpotf2(uplo, n, a, lda, info)
DPOTF2 computes the Cholesky factorization of a symmetric/Hermitian positive definite matrix (unblock...
Definition dpotf2.f:109
subroutine dpotri(uplo, n, a, lda, info)
DPOTRI
Definition dpotri.f:95
subroutine dporfs(uplo, n, nrhs, a, lda, af, ldaf, b, ldb, x, ldx, ferr, berr, work, iwork, info)
DPORFS
Definition dporfs.f:183
subroutine derrpo(path, nunit)
DERRPO
Definition derrpo.f:55