OpenRadioss 2025.1.11
OpenRadioss project
Loading...
Searching...
No Matches
cerrpo.f
Go to the documentation of this file.
1*> \brief \b CERRPO
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 CERRPO( 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*> CERRPO tests the error exits for the COMPLEX routines
25*> for Hermitian 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 complex_lin
52*
53* =====================================================================
54 SUBROUTINE cerrpo( 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 REAL ANRM, RCOND
75* ..
76* .. Local Arrays ..
77 REAL R( NMAX ), R1( NMAX ), R2( NMAX )
78 COMPLEX A( NMAX, NMAX ), AF( NMAX, NMAX ), B( NMAX ),
79 $ W( 2*NMAX ), X( NMAX )
80* ..
81* .. External Functions ..
82 LOGICAL LSAMEN
83 EXTERNAL lsamen
84* ..
85* .. External Subroutines ..
86 EXTERNAL alaesm, chkxer, cpbcon, cpbequ, cpbrfs, cpbtf2,
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 cmplx, real
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 ) = cmplx( 1. / real( i+j ), -1. / real( i+j ) )
114 af( i, j ) = cmplx( 1. / real( i+j ), -1. / real( i+j ) )
115 10 CONTINUE
116 b( j ) = 0.
117 r1( j ) = 0.
118 r2( j ) = 0.
119 w( j ) = 0.
120 x( j ) = 0.
121 20 CONTINUE
122 anrm = 1.
123 ok = .true.
124*
125* Test error exits of the routines that use the Cholesky
126* decomposition of a Hermitian positive definite matrix.
127*
128 IF( lsamen( 2, c2, 'PO' ) ) THEN
129*
130* CPOTRF
131*
132 srnamt = 'CPOTRF'
133 infot = 1
134 CALL cpotrf( '/', 0, a, 1, info )
135 CALL chkxer( 'CPOTRF', infot, nout, lerr, ok )
136 infot = 2
137 CALL cpotrf( 'U', -1, a, 1, info )
138 CALL chkxer( 'CPOTRF', infot, nout, lerr, ok )
139 infot = 4
140 CALL cpotrf( 'U', 2, a, 1, info )
141 CALL chkxer( 'CPOTRF', infot, nout, lerr, ok )
142*
143* CPOTF2
144*
145 srnamt = 'CPOTF2'
146 infot = 1
147 CALL cpotf2( '/', 0, a, 1, info )
148 CALL chkxer( 'CPOTF2', infot, nout, lerr, ok )
149 infot = 2
150 CALL cpotf2( 'U', -1, a, 1, info )
151 CALL chkxer( 'CPOTF2', infot, nout, lerr, ok )
152 infot = 4
153 CALL cpotf2( 'U', 2, a, 1, info )
154 CALL chkxer( 'CPOTF2', infot, nout, lerr, ok )
155*
156* CPOTRI
157*
158 srnamt = 'CPOTRI'
159 infot = 1
160 CALL cpotri( '/', 0, a, 1, info )
161 CALL chkxer( 'CPOTRI', infot, nout, lerr, ok )
162 infot = 2
163 CALL cpotri( 'U', -1, a, 1, info )
164 CALL chkxer( 'CPOTRI', infot, nout, lerr, ok )
165 infot = 4
166 CALL cpotri( 'U', 2, a, 1, info )
167 CALL chkxer( 'CPOTRI', infot, nout, lerr, ok )
168*
169* CPOTRS
170*
171 srnamt = 'CPOTRS'
172 infot = 1
173 CALL cpotrs( '/', 0, 0, a, 1, b, 1, info )
174 CALL chkxer( 'CPOTRS', infot, nout, lerr, ok )
175 infot = 2
176 CALL cpotrs( 'U', -1, 0, a, 1, b, 1, info )
177 CALL chkxer( 'CPOTRS', infot, nout, lerr, ok )
178 infot = 3
179 CALL cpotrs( 'U', 0, -1, a, 1, b, 1, info )
180 CALL chkxer( 'CPOTRS', infot, nout, lerr, ok )
181 infot = 5
182 CALL cpotrs( 'U', 2, 1, a, 1, b, 2, info )
183 CALL chkxer( 'CPOTRS', infot, nout, lerr, ok )
184 infot = 7
185 CALL cpotrs( 'U', 2, 1, a, 2, b, 1, info )
186 CALL chkxer( 'CPOTRS', infot, nout, lerr, ok )
187*
188* CPORFS
189*
190 srnamt = 'CPORFS'
191 infot = 1
192 CALL cporfs( '/', 0, 0, a, 1, af, 1, b, 1, x, 1, r1, r2, w, r,
193 $ info )
194 CALL chkxer( 'CPORFS', infot, nout, lerr, ok )
195 infot = 2
196 CALL cporfs( 'U', -1, 0, a, 1, af, 1, b, 1, x, 1, r1, r2, w, r,
197 $ info )
198 CALL chkxer( 'CPORFS', infot, nout, lerr, ok )
199 infot = 3
200 CALL cporfs( 'U', 0, -1, a, 1, af, 1, b, 1, x, 1, r1, r2, w, r,
201 $ info )
202 CALL chkxer( 'CPORFS', infot, nout, lerr, ok )
203 infot = 5
204 CALL cporfs( 'U', 2, 1, a, 1, af, 2, b, 2, x, 2, r1, r2, w, r,
205 $ info )
206 CALL chkxer( 'CPORFS', infot, nout, lerr, ok )
207 infot = 7
208 CALL cporfs( 'U', 2, 1, a, 2, af, 1, b, 2, x, 2, r1, r2, w, r,
209 $ info )
210 CALL chkxer( 'CPORFS', infot, nout, lerr, ok )
211 infot = 9
212 CALL cporfs( 'U', 2, 1, a, 2, af, 2, b, 1, x, 2, r1, r2, w, r,
213 $ info )
214 CALL chkxer( 'CPORFS', infot, nout, lerr, ok )
215 infot = 11
216 CALL cporfs( 'U', 2, 1, a, 2, af, 2, b, 2, x, 1, r1, r2, w, r,
217 $ info )
218 CALL chkxer( 'CPORFS', infot, nout, lerr, ok )
219*
220* CPOCON
221*
222 srnamt = 'CPOCON'
223 infot = 1
224 CALL cpocon( '/', 0, a, 1, anrm, rcond, w, r, info )
225 CALL chkxer( 'CPOCON', infot, nout, lerr, ok )
226 infot = 2
227 CALL cpocon( 'U', -1, a, 1, anrm, rcond, w, r, info )
228 CALL chkxer( 'CPOCON', infot, nout, lerr, ok )
229 infot = 4
230 CALL cpocon( 'U', 2, a, 1, anrm, rcond, w, r, info )
231 CALL chkxer( 'CPOCON', infot, nout, lerr, ok )
232 infot = 5
233 CALL cpocon( 'U', 1, a, 1, -anrm, rcond, w, r, info )
234 CALL chkxer( 'CPOCON', infot, nout, lerr, ok )
235*
236* CPOEQU
237*
238 srnamt = 'CPOEQU'
239 infot = 1
240 CALL cpoequ( -1, a, 1, r1, rcond, anrm, info )
241 CALL chkxer( 'CPOEQU', infot, nout, lerr, ok )
242 infot = 3
243 CALL cpoequ( 2, a, 1, r1, rcond, anrm, info )
244 CALL chkxer( 'CPOEQU', infot, nout, lerr, ok )
245*
246* Test error exits of the routines that use the Cholesky
247* decomposition of a Hermitian positive definite packed matrix.
248*
249 ELSE IF( lsamen( 2, c2, 'PP' ) ) THEN
250*
251* CPPTRF
252*
253 srnamt = 'CPPTRF'
254 infot = 1
255 CALL cpptrf( '/', 0, a, info )
256 CALL chkxer( 'CPPTRF', infot, nout, lerr, ok )
257 infot = 2
258 CALL cpptrf( 'U', -1, a, info )
259 CALL chkxer( 'CPPTRF', infot, nout, lerr, ok )
260*
261* CPPTRI
262*
263 srnamt = 'CPPTRI'
264 infot = 1
265 CALL cpptri( '/', 0, a, info )
266 CALL chkxer( 'CPPTRI', infot, nout, lerr, ok )
267 infot = 2
268 CALL cpptri( 'U', -1, a, info )
269 CALL chkxer( 'CPPTRI', infot, nout, lerr, ok )
270*
271* CPPTRS
272*
273 srnamt = 'CPPTRS'
274 infot = 1
275 CALL cpptrs( '/', 0, 0, A, B, 1, INFO )
276 CALL CHKXER( 'cpptrs', INFOT, NOUT, LERR, OK )
277 INFOT = 2
278 CALL CPPTRS( 'u', -1, 0, A, B, 1, INFO )
279 CALL CHKXER( 'cpptrs', INFOT, NOUT, LERR, OK )
280 INFOT = 3
281 CALL CPPTRS( 'u', 0, -1, A, B, 1, INFO )
282 CALL CHKXER( 'cpptrs', INFOT, NOUT, LERR, OK )
283 INFOT = 6
284 CALL CPPTRS( 'u', 2, 1, A, B, 1, INFO )
285 CALL CHKXER( 'cpptrs', INFOT, NOUT, LERR, OK )
286*
287* CPPRFS
288*
289 SRNAMT = 'cpprfs'
290 INFOT = 1
291 CALL CPPRFS( '/', 0, 0, A, AF, B, 1, X, 1, R1, R2, W, R, INFO )
292 CALL CHKXER( 'cpprfs', INFOT, NOUT, LERR, OK )
293 INFOT = 2
294 CALL CPPRFS( 'u', -1, 0, A, AF, B, 1, X, 1, R1, R2, W, R,
295 $ INFO )
296 CALL CHKXER( 'cpprfs', INFOT, NOUT, LERR, OK )
297 INFOT = 3
298 CALL CPPRFS( 'u', 0, -1, A, AF, B, 1, X, 1, R1, R2, W, R,
299 $ INFO )
300 CALL CHKXER( 'cpprfs', INFOT, NOUT, LERR, OK )
301 INFOT = 7
302 CALL CPPRFS( 'u', 2, 1, A, AF, B, 1, X, 2, R1, R2, W, R, INFO )
303 CALL CHKXER( 'cpprfs', INFOT, NOUT, LERR, OK )
304 INFOT = 9
305 CALL CPPRFS( 'u', 2, 1, A, AF, B, 2, X, 1, R1, R2, W, R, INFO )
306 CALL CHKXER( 'cpprfs', INFOT, NOUT, LERR, OK )
307*
308* CPPCON
309*
310 SRNAMT = 'cppcon'
311 INFOT = 1
312 CALL CPPCON( '/', 0, A, ANRM, RCOND, W, R, INFO )
313 CALL CHKXER( 'cppcon', INFOT, NOUT, LERR, OK )
314 INFOT = 2
315 CALL CPPCON( 'u', -1, A, ANRM, RCOND, W, R, INFO )
316 CALL CHKXER( 'cppcon', INFOT, NOUT, LERR, OK )
317 INFOT = 4
318 CALL CPPCON( 'u', 1, A, -ANRM, RCOND, W, R, INFO )
319 CALL CHKXER( 'cppcon', INFOT, NOUT, LERR, OK )
320*
321* CPPEQU
322*
323 SRNAMT = 'cppequ'
324 INFOT = 1
325 CALL CPPEQU( '/', 0, A, R1, RCOND, ANRM, INFO )
326 CALL CHKXER( 'cppequ', INFOT, NOUT, LERR, OK )
327 INFOT = 2
328 CALL CPPEQU( 'u', -1, A, R1, RCOND, ANRM, INFO )
329 CALL CHKXER( 'cppequ', INFOT, NOUT, LERR, OK )
330*
331* Test error exits of the routines that use the Cholesky
332* decomposition of a Hermitian positive definite band matrix.
333*
334 ELSE IF( LSAMEN( 2, C2, 'pb' ) ) THEN
335*
336* CPBTRF
337*
338 SRNAMT = 'cpbtrf'
339 INFOT = 1
340 CALL CPBTRF( '/', 0, 0, A, 1, INFO )
341 CALL CHKXER( 'cpbtrf', INFOT, NOUT, LERR, OK )
342 INFOT = 2
343 CALL CPBTRF( 'u', -1, 0, A, 1, INFO )
344 CALL CHKXER( 'cpbtrf', INFOT, NOUT, LERR, OK )
345 INFOT = 3
346 CALL CPBTRF( 'u', 1, -1, A, 1, INFO )
347 CALL CHKXER( 'cpbtrf', INFOT, NOUT, LERR, OK )
348 INFOT = 5
349 CALL CPBTRF( 'u', 2, 1, A, 1, INFO )
350 CALL CHKXER( 'cpbtrf', INFOT, NOUT, LERR, OK )
351*
352* CPBTF2
353*
354 SRNAMT = 'cpbtf2'
355 INFOT = 1
356 CALL CPBTF2( '/', 0, 0, A, 1, INFO )
357 CALL CHKXER( 'cpbtf2', INFOT, NOUT, LERR, OK )
358 INFOT = 2
359 CALL CPBTF2( 'u', -1, 0, A, 1, INFO )
360 CALL CHKXER( 'cpbtf2', INFOT, NOUT, LERR, OK )
361 INFOT = 3
362 CALL CPBTF2( 'u', 1, -1, a, 1, info )
363 CALL chkxer( 'CPBTF2', infot, nout, lerr, ok )
364 infot = 5
365 CALL cpbtf2( 'U', 2, 1, a, 1, info )
366 CALL chkxer( 'CPBTF2', infot, nout, lerr, ok )
367*
368* CPBTRS
369*
370 srnamt = 'CPBTRS'
371 infot = 1
372 CALL cpbtrs( '/', 0, 0, 0, a, 1, b, 1, info )
373 CALL chkxer( 'CPBTRS', infot, nout, lerr, ok )
374 infot = 2
375 CALL cpbtrs( 'U', -1, 0, 0, a, 1, b, 1, info )
376 CALL chkxer( 'CPBTRS', infot, nout, lerr, ok )
377 infot = 3
378 CALL cpbtrs( 'U', 1, -1, 0, a, 1, b, 1, info )
379 CALL chkxer( 'CPBTRS', infot, nout, lerr, ok )
380 infot = 4
381 CALL cpbtrs( 'U', 0, 0, -1, a, 1, b, 1, info )
382 CALL chkxer( 'CPBTRS', infot, nout, lerr, ok )
383 infot = 6
384 CALL cpbtrs( 'U', 2, 1, 1, a, 1, b, 1, info )
385 CALL chkxer( 'CPBTRS', infot, nout, lerr, ok )
386 infot = 8
387 CALL cpbtrs( 'U', 2, 0, 1, a, 1, b, 1, info )
388 CALL chkxer( 'CPBTRS', infot, nout, lerr, ok )
389*
390* CPBRFS
391*
392 srnamt = 'CPBRFS'
393 infot = 1
394 CALL cpbrfs( '/', 0, 0, 0, a, 1, af, 1, b, 1, x, 1, r1, r2, w,
395 $ r, info )
396 CALL chkxer( 'CPBRFS', infot, nout, lerr, ok )
397 infot = 2
398 CALL cpbrfs( 'U', -1, 0, 0, a, 1, af, 1, b, 1, x, 1, r1, r2, w,
399 $ r, info )
400 CALL chkxer( 'CPBRFS', infot, nout, lerr, ok )
401 infot = 3
402 CALL cpbrfs( 'U', 1, -1, 0, a, 1, af, 1, b, 1, x, 1, r1, r2, w,
403 $ r, info )
404 CALL chkxer( 'CPBRFS', infot, nout, lerr, ok )
405 infot = 4
406 CALL cpbrfs( 'U', 0, 0, -1, a, 1, af, 1, b, 1, x, 1, r1, r2, w,
407 $ r, info )
408 CALL chkxer( 'CPBRFS', infot, nout, lerr, ok )
409 infot = 6
410 CALL cpbrfs( 'U', 2, 1, 1, a, 1, af, 2, b, 2, x, 2, r1, r2, w,
411 $ r, info )
412 CALL chkxer( 'CPBRFS', infot, nout, lerr, ok )
413 infot = 8
414 CALL cpbrfs( 'U', 2, 1, 1, a, 2, af, 1, b, 2, x, 2, r1, r2, w,
415 $ r, info )
416 CALL chkxer( 'CPBRFS', infot, nout, lerr, ok )
417 infot = 10
418 CALL cpbrfs( 'U', 2, 0, 1, a, 1, af, 1, b, 1, x, 2, r1, r2, w,
419 $ r, info )
420 CALL chkxer( 'CPBRFS', infot, nout, lerr, ok )
421 infot = 12
422 CALL cpbrfs( 'U', 2, 0, 1, a, 1, af, 1, b, 2, x, 1, r1, r2, w,
423 $ r, info )
424 CALL chkxer( 'CPBRFS', infot, nout, lerr, ok )
425*
426* CPBCON
427*
428 srnamt = 'CPBCON'
429 infot = 1
430 CALL cpbcon( '/', 0, 0, a, 1, anrm, rcond, w, r, info )
431 CALL chkxer( 'CPBCON', infot, nout, lerr, ok )
432 infot = 2
433 CALL cpbcon( 'U', -1, 0, a, 1, anrm, rcond, w, r, info )
434 CALL chkxer( 'CPBCON', infot, nout, lerr, ok )
435 infot = 3
436 CALL cpbcon( 'U', 1, -1, a, 1, anrm, rcond, w, r, info )
437 CALL chkxer( 'CPBCON', infot, nout, lerr, ok )
438 infot = 5
439 CALL cpbcon( 'U', 2, 1, a, 1, anrm, rcond, w, r, info )
440 CALL chkxer( 'CPBCON', infot, nout, lerr, ok )
441 infot = 6
442 CALL cpbcon( 'U', 1, 0, a, 1, -anrm, rcond, w, r, info )
443 CALL chkxer( 'CPBCON', infot, nout, lerr, ok )
444*
445* CPBEQU
446*
447 srnamt = 'CPBEQU'
448 infot = 1
449 CALL cpbequ( '/', 0, 0, a, 1, r1, rcond, anrm, info )
450 CALL chkxer( 'CPBEQU', infot, nout, lerr, ok )
451 infot = 2
452 CALL cpbequ( 'U', -1, 0, a, 1, r1, rcond, anrm, info )
453 CALL chkxer( 'CPBEQU', infot, nout, lerr, ok )
454 infot = 3
455 CALL cpbequ( 'u', 1, -1, A, 1, R1, RCOND, ANRM, INFO )
456 CALL CHKXER( 'cpbequ', INFOT, NOUT, LERR, OK )
457 INFOT = 5
458 CALL CPBEQU( 'u', 2, 1, A, 1, R1, RCOND, ANRM, INFO )
459 CALL CHKXER( 'cpbequ', INFOT, NOUT, LERR, OK )
460 END IF
461*
462* Print a summary line.
463*
464 CALL ALAESM( PATH, OK, NOUT )
465*
466 RETURN
467*
468* End of CERRPO
469*
470 END
float cmplx[2]
Definition pblas.h:136
subroutine chkxer(srnamt, infot, nout, lerr, ok)
Definition cblat2.f:3196
subroutine alaesm(path, ok, nout)
ALAESM
Definition alaesm.f:63
subroutine cppcon(uplo, n, ap, anorm, rcond, work, rwork, info)
CPPCON
Definition cppcon.f:118
subroutine cpptrf(uplo, n, ap, info)
CPPTRF
Definition cpptrf.f:119
subroutine cpbtrf(uplo, n, kd, ab, ldab, info)
CPBTRF
Definition cpbtrf.f:142
subroutine cpbtrs(uplo, n, kd, nrhs, ab, ldab, b, ldb, info)
CPBTRS
Definition cpbtrs.f:121
subroutine cppequ(uplo, n, ap, s, scond, amax, info)
CPPEQU
Definition cppequ.f:117
subroutine cpbtf2(uplo, n, kd, ab, ldab, info)
CPBTF2 computes the Cholesky factorization of a symmetric/Hermitian positive definite band matrix (un...
Definition cpbtf2.f:142
subroutine cpbrfs(uplo, n, kd, nrhs, ab, ldab, afb, ldafb, b, ldb, x, ldx, ferr, berr, work, rwork, info)
CPBRFS
Definition cpbrfs.f:189
subroutine cpbequ(uplo, n, kd, ab, ldab, s, scond, amax, info)
CPBEQU
Definition cpbequ.f:130
subroutine cpprfs(uplo, n, nrhs, ap, afp, b, ldb, x, ldx, ferr, berr, work, rwork, info)
CPPRFS
Definition cpprfs.f:171
subroutine cpptrs(uplo, n, nrhs, ap, b, ldb, info)
CPPTRS
Definition cpptrs.f:108
subroutine cpptri(uplo, n, ap, info)
CPPTRI
Definition cpptri.f:93
subroutine cpbcon(uplo, n, kd, ab, ldab, anorm, rcond, work, rwork, info)
CPBCON
Definition cpbcon.f:133
subroutine cporfs(uplo, n, nrhs, a, lda, af, ldaf, b, ldb, x, ldx, ferr, berr, work, rwork, info)
CPORFS
Definition cporfs.f:183
subroutine cpocon(uplo, n, a, lda, anorm, rcond, work, rwork, info)
CPOCON
Definition cpocon.f:121
subroutine cpotf2(uplo, n, a, lda, info)
CPOTF2 computes the Cholesky factorization of a symmetric/Hermitian positive definite matrix (unblock...
Definition cpotf2.f:109
subroutine cpotrs(uplo, n, nrhs, a, lda, b, ldb, info)
CPOTRS
Definition cpotrs.f:110
subroutine cpoequ(n, a, lda, s, scond, amax, info)
CPOEQU
Definition cpoequ.f:113
subroutine cpotri(uplo, n, a, lda, info)
CPOTRI
Definition cpotri.f:95
subroutine cpotrf(uplo, n, a, lda, info)
CPOTRF
Definition cpotrf.f:107
subroutine cerrpo(path, nunit)
CERRPO
Definition cerrpo.f:55