156 SUBROUTINE cdrvpo( DOTYPE, NN, NVAL, NRHS, THRESH, TSTERR, NMAX,
157 $ A, AFAC, ASAV, B, BSAV, X, XACT, S, WORK,
166 INTEGER NMAX, NN, NOUT, NRHS
172 REAL RWORK( * ), S( * )
173 COMPLEX A( * ), AFAC( * ), ASAV( * ), B( * ),
174 $ bsav( * ), work( * ), x( * ), xact( * )
181 PARAMETER ( ONE = 1.0e+0, zero = 0.0e+0 )
183 parameter( ntypes = 9 )
185 parameter( ntests = 6 )
188 LOGICAL EQUIL, NOFACT, PREFAC, ZEROT
189 CHARACTER DIST, EQUED, FACT,
TYPE, UPLO, XTYPE
191 INTEGER I, IEQUED, IFACT, IMAT, IN, INFO, IOFF, IUPLO,
192 $ izero, k, k1, kl, ku, lda, mode, n, nb, nbmin,
193 $ nerrs, nfact, nfail, nimat, nrun, nt
194 REAL AINVNM, AMAX, ANORM, CNDNUM, RCOND, RCONDC,
198 CHARACTER EQUEDS( 2 ), FACTS( 3 ), UPLOS( 2 )
199 INTEGER ISEED( 4 ), ISEEDY( 4 )
200 REAL RESULT( NTESTS )
205 EXTERNAL lsame, clanhe, sget06
219 COMMON / infoc / infot, nunit, ok, lerr
220 COMMON / srnamc / srnamt
226 DATA iseedy / 1988, 1989, 1990, 1991 /
227 DATA uplos /
'U',
'L' /
228 DATA facts /
'F',
'N',
'E' /
229 DATA equeds /
'N',
'Y' /
235 path( 1: 1 ) =
'Complex precision'
241 iseed( i ) = iseedy( i )
247 $
CALL cerrvx( path, nout )
267 DO 120 imat = 1, nimat
271 IF( .NOT.dotype( imat ) )
276 zerot = imat.GE.3 .AND. imat.LE.5
277 IF( zerot .AND. n.LT.imat-2 )
283 uplo = uplos( iuplo )
288 CALL clatb4( path, imat, n, n,
TYPE, kl, ku, anorm, mode,
292 CALL clatms( n, n, dist, iseed,
TYPE, rwork, mode,
293 $ cndnum, anorm, kl, ku, uplo, a, lda, work,
299 CALL alaerh( path,
'CLATMS', info, 0, uplo, n, n, -1,
300 $ -1, -1, imat, nfail, nerrs, nout )
310 ELSE IF( imat.EQ.4 )
THEN
315 ioff = ( izero-1 )*lda
319 IF( iuplo.EQ.1 )
THEN
320 DO 20 i = 1, izero - 1
330 DO 40 i = 1, izero - 1
345 CALL claipd( n, a, lda+1, 0 )
349 CALL clacpy( uplo, n, n, a, lda, asav, lda )
352 equed = equeds( iequed )
353 IF( iequed.EQ.1 )
THEN
359 DO 90 ifact = 1, nfact
360 fact = facts( ifact )
361 prefac = lsame( fact,
'F' )
362 nofact = lsame( fact,
'N' )
363 equil = lsame( fact,
'E' )
370 ELSE IF( .NOT.lsame( fact,
'N' ) )
THEN
377 CALL clacpy( uplo, n, n, asav, lda, afac, lda )
378 IF( equil .OR. iequed.GT.1 )
THEN
383 CALL cpoequ( n, afac, lda, s, scond, amax,
385 IF( info.EQ.0 .AND. n.GT.0 )
THEN
391 CALL claqhe( uplo, n, afac, lda, s, scond,
404 anorm = clanhe(
'1', uplo, n, afac, lda, rwork )
408 CALL cpotrf( uplo, n, afac, lda, info )
412 CALL clacpy( uplo, n, n, afac, lda, a, lda )
413 CALL cpotri( uplo, n, a, lda, info )
417 ainvnm = clanhe(
'1', uplo, n, a, lda, rwork )
418 IF( anorm.LE.zero .OR. ainvnm.LE.zero )
THEN
421 rcondc = ( one / anorm ) / ainvnm
427 CALL clacpy( uplo, n, n, asav, lda, a, lda )
432 CALL clarhs( path, xtype, uplo,
' ', n, n, kl, ku,
433 $ nrhs, a, lda, xact, lda, b, lda,
436 CALL clacpy(
'Full', n, nrhs, b, lda, bsav, lda )
445 CALL clacpy( uplo, n, n, a, lda, afac, lda )
446 CALL clacpy(
'Full', n, nrhs, b, lda, x, lda )
449 CALL cposv( uplo, n, nrhs, afac, lda, x, lda,
454 IF( info.NE.izero )
THEN
455 CALL alaerh( path,
'CPOSV ', info, izero,
456 $ uplo, n, n, -1, -1, nrhs, imat,
457 $ nfail, nerrs, nout )
459 ELSE IF( info.NE.0 )
THEN
466 CALL cpot01( uplo, n, a, lda, afac, lda, rwork,
471 CALL clacpy(
'Full', n, nrhs, b, lda, work,
473 CALL cpot02( uplo, n, nrhs, a, lda, x, lda,
474 $ work, lda, rwork, result( 2 ) )
478 CALL cget04( n, nrhs, x, lda, xact, lda, rcondc,
486 IF( result( k ).GE.thresh )
THEN
487 IF( nfail.EQ.0 .AND. nerrs.EQ.0 )
488 $
CALL aladhd( nout, path )
489 WRITE( nout, fmt = 9999 )
'CPOSV ', uplo,
490 $ n, imat, k, result( k )
501 $
CALL claset( uplo, n, n, cmplx( zero ),
502 $ cmplx( zero ), afac, lda )
503 CALL claset(
'Full', n, nrhs, cmplx( zero ),
504 $ cmplx( zero ), x, lda )
505 IF( iequed.GT.1 .AND. n.GT.0 )
THEN
510 CALL claqhe( uplo, n, a, lda, s, scond, amax,
518 CALL cposvx( fact, uplo, n, nrhs, a, lda, afac,
519 $ lda, equed, s, b, lda, x, lda, rcond,
520 $ rwork, rwork( nrhs+1 ), work,
521 $ rwork( 2*nrhs+1 ), info )
525 IF( info.NE.izero )
THEN
526 CALL alaerh( path,
'CPOSVX', info, izero,
527 $ fact // uplo, n, n, -1, -1, nrhs,
528 $ imat, nfail, nerrs, nout )
533 IF( .NOT.prefac )
THEN
538 CALL cpot01( uplo, n, a, lda, afac, lda,
539 $ rwork( 2*nrhs+1 ), result( 1 ) )
547 CALL clacpy(
'Full', n, nrhs, bsav, lda, work,
549 CALL cpot02( uplo, n, nrhs, asav, lda, x, lda,
550 $ work, lda, rwork( 2*nrhs+1 ),
555 IF( nofact .OR. ( prefac .AND. lsame( equed,
557 CALL cget04( n, nrhs, x, lda, xact, lda,
558 $ rcondc, result( 3 ) )
560 CALL cget04( n, nrhs, x, lda, xact, lda,
561 $ roldc, result( 3 ) )
567 CALL cpot05( uplo, n, nrhs, asav, lda, b, lda,
568 $ x, lda, xact, lda, rwork,
569 $ rwork( nrhs+1 ), result( 4 ) )
577 result( 6 ) = sget06( rcond, rcondc )
583 IF( result( k ).GE.thresh )
THEN
584 IF( nfail.EQ.0 .AND. nerrs.EQ.0 )
585 $
CALL aladhd( nout, path )
587 WRITE( nout, fmt = 9997 )
'CPOSVX', fact,
588 $ uplo, n, equed, imat, k, result( k )
590 WRITE( nout, fmt = 9998 )
'CPOSVX', fact,
591 $ uplo, n, imat, k, result( k )
605 CALL alasvm( path, nout, nfail, nrun, nerrs )
607 9999
FORMAT( 1x, a,
', UPLO=''', a1,
''', N =', i5,
', type ', i1,
608 $
', test(', i1,
')=', g12.5 )
609 9998
FORMAT( 1x, a,
', FACT=''', a1,
''', UPLO=''', a1,
''', N=', i5,
610 $
', type ', i1,
', test(', i1,
')=', g12.5 )
611 9997
FORMAT( 1x, a,
', FACT=''', a1,
''', UPLO=''', a1,
''', N=', i5,
612 $
', EQUED=''', a1,
''', type ', i1,
', test(', i1,
') =',
subroutine alasvm(type, nout, nfail, nrun, nerrs)
ALASVM
subroutine clarhs(path, xtype, uplo, trans, m, n, kl, ku, nrhs, a, lda, x, ldx, b, ldb, iseed, info)
CLARHS
subroutine xlaenv(ispec, nvalue)
XLAENV
subroutine aladhd(iounit, path)
ALADHD
subroutine alaerh(path, subnam, info, infoe, opts, m, n, kl, ku, n5, imat, nfail, nerrs, nout)
ALAERH
subroutine cdrvpo(dotype, nn, nval, nrhs, thresh, tsterr, nmax, a, afac, asav, b, bsav, x, xact, s, work, rwork, nout)
CDRVPO
subroutine cerrvx(path, nunit)
CERRVX
subroutine cget04(n, nrhs, x, ldx, xact, ldxact, rcond, resid)
CGET04
subroutine claipd(n, a, inda, vinda)
CLAIPD
subroutine clatb4(path, imat, m, n, type, kl, ku, anorm, mode, cndnum, dist)
CLATB4
subroutine clatms(m, n, dist, iseed, sym, d, mode, cond, dmax, kl, ku, pack, a, lda, work, info)
CLATMS
subroutine cpot01(uplo, n, a, lda, afac, ldafac, rwork, resid)
CPOT01
subroutine cpot02(uplo, n, nrhs, a, lda, x, ldx, b, ldb, rwork, resid)
CPOT02
subroutine cpot05(uplo, n, nrhs, a, lda, b, ldb, x, ldx, xact, ldxact, ferr, berr, reslts)
CPOT05
subroutine clacpy(uplo, m, n, a, lda, b, ldb)
CLACPY copies all or part of one two-dimensional array to another.
subroutine claqhe(uplo, n, a, lda, s, scond, amax, equed)
CLAQHE scales a Hermitian matrix.
subroutine claset(uplo, m, n, alpha, beta, a, lda)
CLASET initializes the off-diagonal elements and the diagonal elements of a matrix to given values.
subroutine cpoequ(n, a, lda, s, scond, amax, info)
CPOEQU
subroutine cposv(uplo, n, nrhs, a, lda, b, ldb, info)
CPOSV computes the solution to system of linear equations A * X = B for PO matrices
subroutine cposvx(fact, uplo, n, nrhs, a, lda, af, ldaf, equed, s, b, ldb, x, ldx, rcond, ferr, berr, work, rwork, info)
CPOSVX computes the solution to system of linear equations A * X = B for PO matrices
subroutine cpotrf(uplo, n, a, lda, info)
CPOTRF
subroutine cpotri(uplo, n, a, lda, info)
CPOTRI