165 SUBROUTINE cchkpo( DOTYPE, NN, NVAL, NNB, NBVAL, NNS, NSVAL,
166 $ THRESH, TSTERR, NMAX, A, AFAC, AINV, B, X,
167 $ XACT, WORK, RWORK, NOUT )
175 INTEGER NMAX, NN, NNB, NNS, NOUT
180 INTEGER NBVAL( * ), NSVAL( * ), NVAL( * )
182 COMPLEX A( * ), AFAC( * ), AINV( * ), B( * ),
183 $ work( * ), x( * ), xact( * )
190 PARAMETER ( CZERO = ( 0.0e+0, 0.0e+0 ) )
192 parameter( ntypes = 9 )
194 parameter( ntests = 8 )
198 CHARACTER DIST,
TYPE, UPLO, XTYPE
200 INTEGER I, IMAT, IN, INB, INFO, IOFF, IRHS, IUPLO,
201 $ izero, k, kl, ku, lda, mode, n, nb, nerrs,
202 $ nfail, nimat, nrhs, nrun
203 REAL ANORM, CNDNUM, RCOND, RCONDC
207 INTEGER ISEED( 4 ), ISEEDY( 4 )
208 REAL RESULT( NTESTS )
212 EXTERNAL CLANHE, SGET06
226 COMMON / infoc / infot, nunit, ok, lerr
227 COMMON / srnamc / srnamt
233 DATA iseedy / 1988, 1989, 1990, 1991 /
234 DATA uplos /
'U',
'L' /
240 path( 1: 1 ) =
'Complex precision'
246 iseed( i ) = iseedy( i )
252 $
CALL cerrpo( path, nout )
266 DO 110 imat = 1, nimat
270 IF( .NOT.dotype( imat ) )
275 zerot = imat.GE.3 .AND. imat.LE.5
276 IF( zerot .AND. n.LT.imat-2 )
282 uplo = uplos( iuplo )
287 CALL clatb4( path, imat, n, n,
TYPE, kl, ku, anorm, mode,
291 CALL clatms( n, n, dist, iseed,
TYPE, rwork, mode,
292 $ cndnum, anorm, kl, ku, uplo, a, lda, work,
298 CALL alaerh( path,
'CLATMS', info, 0, uplo, n, n, -1,
299 $ -1, -1, imat, nfail, nerrs, nout )
309 ELSE IF( imat.EQ.4 )
THEN
314 ioff = ( izero-1 )*lda
318 IF( iuplo.EQ.1 )
THEN
319 DO 20 i = 1, izero - 1
329 DO 40 i = 1, izero - 1
344 CALL claipd( n, a, lda+1, 0 )
354 CALL clacpy( uplo, n, n, a, lda, afac, lda )
356 CALL cpotrf( uplo, n, afac, lda, info )
360 IF( info.NE.izero )
THEN
361 CALL alaerh( path,
'CPOTRF', info, izero, uplo, n,
362 $ n, -1, -1, nb, imat, nfail, nerrs,
375 CALL clacpy( uplo, n, n, afac, lda, ainv, lda )
376 CALL cpot01( uplo, n, a, lda, ainv, lda, rwork,
382 CALL clacpy( uplo, n, n, afac, lda, ainv, lda )
384 CALL cpotri( uplo, n, ainv, lda, info )
389 $
CALL alaerh( path,
'CPOTRI', info, 0, uplo, n, n,
390 $ -1, -1, -1, imat, nfail, nerrs, nout )
392 CALL cpot03( uplo, n, a, lda, ainv, lda, work, lda,
393 $ rwork, rcondc, result( 2 ) )
399 IF( result( k ).GE.thresh )
THEN
400 IF( nfail.EQ.0 .AND. nerrs.EQ.0 )
401 $
CALL alahd( nout, path )
402 WRITE( nout, fmt = 9999 )uplo, n, nb, imat, k,
422 CALL clarhs( path, xtype, uplo,
' ', n, n, kl, ku,
423 $ nrhs, a, lda, xact, lda, b, lda,
425 CALL clacpy(
'Full', n, nrhs, b, lda, x, lda )
428 CALL cpotrs( uplo, n, nrhs, afac, lda, x, lda,
434 $
CALL alaerh( path,
'CPOTRS', info, 0, uplo, n,
435 $ n, -1, -1, nrhs, imat, nfail,
438 CALL clacpy(
'Full', n, nrhs, b, lda, work, lda )
439 CALL cpot02( uplo, n, nrhs, a, lda, x, lda, work,
440 $ lda, rwork, result( 3 ) )
445 CALL cget04( n, nrhs, x, lda, xact, lda, rcondc,
452 CALL cporfs( uplo, n, nrhs, a, lda, afac, lda, b,
453 $ lda, x, lda, rwork, rwork( nrhs+1 ),
454 $ work, rwork( 2*nrhs+1 ), info )
459 $
CALL alaerh( path,
'CPORFS', info, 0, uplo, n,
460 $ n, -1, -1, nrhs, imat, nfail,
463 CALL cget04( n, nrhs, x, lda, xact, lda, rcondc,
465 CALL cpot05( uplo, n, nrhs, a, lda, b, lda, x, lda,
466 $ xact, lda, rwork, rwork( nrhs+1 ),
473 IF( result( k ).GE.thresh )
THEN
474 IF( nfail.EQ.0 .AND. nerrs.EQ.0 )
475 $
CALL alahd( nout, path )
476 WRITE( nout, fmt = 9998 )uplo, n, nrhs,
477 $ imat, k, result( k )
487 anorm = clanhe(
'1', uplo, n, a, lda, rwork )
489 CALL cpocon( uplo, n, afac, lda, anorm, rcond, work,
495 $
CALL alaerh( path,
'CPOCON', info, 0, uplo, n, n,
496 $ -1, -1, -1, imat, nfail, nerrs, nout )
498 result( 8 ) = sget06( rcond, rcondc )
502 IF( result( 8 ).GE.thresh )
THEN
503 IF( nfail.EQ.0 .AND. nerrs.EQ.0 )
504 $
CALL alahd( nout, path )
505 WRITE( nout, fmt = 9997 )uplo, n, imat, 8,
517 CALL alasum( path, nout, nfail, nrun, nerrs )
519 9999
FORMAT(
' UPLO = ''', a1,
''', N =', i5,
', NB =', i4,
', type ',
520 $ i2,
', test ', i2,
', ratio =', g12.5 )
521 9998
FORMAT(
' UPLO = ''', a1,
''', N =', i5,
', NRHS=', i3,
', type ',
522 $ i2,
', test(', i2,
') =', g12.5 )
523 9997
FORMAT(
' UPLO = ''', a1,
''', N =', i5,
',', 10x,
' type ', i2,
524 $
', test(', i2,
') =', g12.5 )