161 SUBROUTINE zdrvpo( DOTYPE, NN, NVAL, NRHS, THRESH, TSTERR, NMAX,
162 $ a, afac, asav, b, bsav, x, xact, s, work,
172 INTEGER nmax, nn, nout, nrhs
173 DOUBLE PRECISION thresh
178 DOUBLE PRECISION rwork( * ), s( * )
179 COMPLEX*16 a( * ), afac( * ), asav( * ), b( * ),
180 $ bsav( * ), work( * ), x( * ), xact( * )
186 DOUBLE PRECISION one, zero
187 parameter ( one = 1.0d+0, zero = 0.0d+0 )
189 parameter ( ntypes = 9 )
191 parameter ( ntests = 6 )
194 LOGICAL equil, nofact, prefac, zerot
195 CHARACTER dist, equed, fact,
TYPE, uplo, xtype
197 INTEGER i, iequed, ifact, imat, in, info, ioff, iuplo,
198 $ izero, k, k1, kl, ku, lda, mode, n, nb, nbmin,
199 $ nerrs, nfact, nfail, nimat, nrun, nt,
201 DOUBLE PRECISION ainvnm, amax, anorm, cndnum, rcond, rcondc,
202 $ roldc, scond, rpvgrw_svxx
205 CHARACTER equeds( 2 ), facts( 3 ), uplos( 2 )
206 INTEGER iseed( 4 ), iseedy( 4 )
207 DOUBLE PRECISION result( ntests ), berr( nrhs ),
208 $ errbnds_n( nrhs, 3 ), errbnds_c( nrhs, 3 )
227 COMMON / infoc / infot, nunit, ok, lerr
228 COMMON / srnamc / srnamt
231 INTRINSIC dcmplx, max
234 DATA iseedy / 1988, 1989, 1990, 1991 /
235 DATA uplos /
'U',
'L' /
236 DATA facts /
'F',
'N',
'E' /
237 DATA equeds /
'N',
'Y' /
243 path( 1: 1 ) =
'Zomplex precision'
249 iseed( i ) = iseedy( i )
255 $
CALL zerrvx( path, nout )
275 DO 120 imat = 1, nimat
279 IF( .NOT.dotype( imat ) )
284 zerot = imat.GE.3 .AND. imat.LE.5
285 IF( zerot .AND. n.LT.imat-2 )
291 uplo = uplos( iuplo )
296 CALL zlatb4( path, imat, n, n,
TYPE, kl, ku, anorm, mode,
300 CALL zlatms( n, n, dist, iseed,
TYPE, rwork, mode,
301 $ cndnum, anorm, kl, ku, uplo, a, lda, work,
307 CALL alaerh( path,
'ZLATMS', info, 0, uplo, n, n, -1,
308 $ -1, -1, imat, nfail, nerrs, nout )
318 ELSE IF( imat.EQ.4 )
THEN
323 ioff = ( izero-1 )*lda
327 IF( iuplo.EQ.1 )
THEN
328 DO 20 i = 1, izero - 1
338 DO 40 i = 1, izero - 1
353 CALL zlaipd( n, a, lda+1, 0 )
357 CALL zlacpy( uplo, n, n, a, lda, asav, lda )
360 equed = equeds( iequed )
361 IF( iequed.EQ.1 )
THEN
367 DO 90 ifact = 1, nfact
368 fact = facts( ifact )
369 prefac =
lsame( fact,
'F' )
370 nofact =
lsame( fact,
'N' )
371 equil =
lsame( fact,
'E' )
378 ELSE IF( .NOT.
lsame( fact,
'N' ) )
THEN
385 CALL zlacpy( uplo, n, n, asav, lda, afac, lda )
386 IF( equil .OR. iequed.GT.1 )
THEN
391 CALL zpoequ( n, afac, lda, s, scond, amax,
393 IF( info.EQ.0 .AND. n.GT.0 )
THEN
399 CALL zlaqhe( uplo, n, afac, lda, s, scond,
412 anorm =
zlanhe(
'1', uplo, n, afac, lda, rwork )
416 CALL zpotrf( uplo, n, afac, lda, info )
420 CALL zlacpy( uplo, n, n, afac, lda, a, lda )
421 CALL zpotri( uplo, n, a, lda, info )
425 ainvnm =
zlanhe(
'1', uplo, n, a, lda, rwork )
426 IF( anorm.LE.zero .OR. ainvnm.LE.zero )
THEN
429 rcondc = ( one / anorm ) / ainvnm
435 CALL zlacpy( uplo, n, n, asav, lda, a, lda )
440 CALL zlarhs( path, xtype, uplo,
' ', n, n, kl, ku,
441 $ nrhs, a, lda, xact, lda, b, lda,
444 CALL zlacpy(
'Full', n, nrhs, b, lda, bsav, lda )
453 CALL zlacpy( uplo, n, n, a, lda, afac, lda )
454 CALL zlacpy(
'Full', n, nrhs, b, lda, x, lda )
457 CALL zposv( uplo, n, nrhs, afac, lda, x, lda,
462 IF( info.NE.izero )
THEN
463 CALL alaerh( path,
'ZPOSV ', info, izero,
464 $ uplo, n, n, -1, -1, nrhs, imat,
465 $ nfail, nerrs, nout )
467 ELSE IF( info.NE.0 )
THEN
474 CALL zpot01( uplo, n, a, lda, afac, lda, rwork,
479 CALL zlacpy(
'Full', n, nrhs, b, lda, work,
481 CALL zpot02( uplo, n, nrhs, a, lda, x, lda,
482 $ work, lda, rwork, result( 2 ) )
486 CALL zget04( n, nrhs, x, lda, xact, lda, rcondc,
494 IF( result( k ).GE.thresh )
THEN
495 IF( nfail.EQ.0 .AND. nerrs.EQ.0 )
496 $
CALL aladhd( nout, path )
497 WRITE( nout, fmt = 9999 )
'ZPOSV ', uplo,
498 $ n, imat, k, result( k )
509 $
CALL zlaset( uplo, n, n, dcmplx( zero ),
510 $ dcmplx( zero ), afac, lda )
511 CALL zlaset(
'Full', n, nrhs, dcmplx( zero ),
512 $ dcmplx( zero ), x, lda )
513 IF( iequed.GT.1 .AND. n.GT.0 )
THEN
518 CALL zlaqhe( uplo, n, a, lda, s, scond, amax,
526 CALL zposvx( fact, uplo, n, nrhs, a, lda, afac,
527 $ lda, equed, s, b, lda, x, lda, rcond,
528 $ rwork, rwork( nrhs+1 ), work,
529 $ rwork( 2*nrhs+1 ), info )
533 IF( info.NE.izero )
THEN
534 CALL alaerh( path,
'ZPOSVX', info, izero,
535 $ fact // uplo, n, n, -1, -1, nrhs,
536 $ imat, nfail, nerrs, nout )
541 IF( .NOT.prefac )
THEN
546 CALL zpot01( uplo, n, a, lda, afac, lda,
547 $ rwork( 2*nrhs+1 ), result( 1 ) )
555 CALL zlacpy(
'Full', n, nrhs, bsav, lda, work,
557 CALL zpot02( uplo, n, nrhs, asav, lda, x, lda,
558 $ work, lda, rwork( 2*nrhs+1 ),
563 IF( nofact .OR. ( prefac .AND.
lsame( equed,
565 CALL zget04( n, nrhs, x, lda, xact, lda,
566 $ rcondc, result( 3 ) )
568 CALL zget04( n, nrhs, x, lda, xact, lda,
569 $ roldc, result( 3 ) )
575 CALL zpot05( uplo, n, nrhs, asav, lda, b, lda,
576 $ x, lda, xact, lda, rwork,
577 $ rwork( nrhs+1 ), result( 4 ) )
585 result( 6 ) =
dget06( rcond, rcondc )
591 IF( result( k ).GE.thresh )
THEN
592 IF( nfail.EQ.0 .AND. nerrs.EQ.0 )
593 $
CALL aladhd( nout, path )
595 WRITE( nout, fmt = 9997 )
'ZPOSVX', fact,
596 $ uplo, n, equed, imat, k, result( k )
598 WRITE( nout, fmt = 9998 )
'ZPOSVX', fact,
599 $ uplo, n, imat, k, result( k )
610 CALL zlacpy(
'Full', n, n, asav, lda, a, lda )
611 CALL zlacpy(
'Full', n, nrhs, bsav, lda, b, lda )
614 $
CALL zlaset( uplo, n, n, cmplx( zero ),
615 $ cmplx( zero ), afac, lda )
616 CALL zlaset(
'Full', n, nrhs, cmplx( zero ),
617 $ cmplx( zero ), x, lda )
618 IF( iequed.GT.1 .AND. n.GT.0 )
THEN
623 CALL zlaqhe( uplo, n, a, lda, s, scond, amax,
632 CALL zposvxx( fact, uplo, n, nrhs, a, lda, afac,
633 $ lda, equed, s, b, lda, x,
634 $ lda, rcond, rpvgrw_svxx, berr, n_err_bnds,
635 $ errbnds_n, errbnds_c, 0, zero, work,
636 $ rwork( 2*nrhs+1 ), info )
640 IF( info.EQ.n+1 )
GOTO 90
641 IF( info.NE.izero )
THEN
642 CALL alaerh( path,
'ZPOSVXX', info, izero,
643 $ fact // uplo, n, n, -1, -1, nrhs,
644 $ imat, nfail, nerrs, nout )
649 IF( .NOT.prefac )
THEN
654 CALL zpot01( uplo, n, a, lda, afac, lda,
655 $ rwork( 2*nrhs+1 ), result( 1 ) )
663 CALL zlacpy(
'Full', n, nrhs, bsav, lda, work,
665 CALL zpot02( uplo, n, nrhs, asav, lda, x, lda,
666 $ work, lda, rwork( 2*nrhs+1 ),
671 IF( nofact .OR. ( prefac .AND.
lsame( equed,
673 CALL zget04( n, nrhs, x, lda, xact, lda,
674 $ rcondc, result( 3 ) )
676 CALL zget04( n, nrhs, x, lda, xact, lda,
677 $ roldc, result( 3 ) )
683 CALL zpot05( uplo, n, nrhs, asav, lda, b, lda,
684 $ x, lda, xact, lda, rwork,
685 $ rwork( nrhs+1 ), result( 4 ) )
693 result( 6 ) =
dget06( rcond, rcondc )
699 IF( result( k ).GE.thresh )
THEN
700 IF( nfail.EQ.0 .AND. nerrs.EQ.0 )
701 $
CALL aladhd( nout, path )
703 WRITE( nout, fmt = 9997 )
'ZPOSVXX', fact,
704 $ uplo, n, equed, imat, k, result( k )
706 WRITE( nout, fmt = 9998 )
'ZPOSVXX', fact,
707 $ uplo, n, imat, k, result( k )
721 CALL alasvm( path, nout, nfail, nrun, nerrs )
728 9999
FORMAT( 1x, a,
', UPLO=''', a1,
''', N =', i5,
', type ', i1,
729 $
', test(', i1,
')=', g12.5 )
730 9998
FORMAT( 1x, a,
', FACT=''', a1,
''', UPLO=''', a1,
''', N=', i5,
731 $
', type ', i1,
', test(', i1,
')=', g12.5 )
732 9997
FORMAT( 1x, a,
', FACT=''', a1,
''', UPLO=''', a1,
''', N=', i5,
733 $
', EQUED=''', a1,
''', type ', i1,
', test(', i1,
') =',
subroutine zpotrf(UPLO, N, A, LDA, INFO)
ZPOTRF VARIANT: right looking block version of the algorithm, calling Level 3 BLAS.
subroutine alasvm(TYPE, NOUT, NFAIL, NRUN, NERRS)
ALASVM
subroutine alaerh(PATH, SUBNAM, INFO, INFOE, OPTS, M, N, KL, KU, N5, IMAT, NFAIL, NERRS, NOUT)
ALAERH
subroutine zlacpy(UPLO, M, N, A, LDA, B, LDB)
ZLACPY copies all or part of one two-dimensional array to another.
subroutine zget04(N, NRHS, X, LDX, XACT, LDXACT, RCOND, RESID)
ZGET04
subroutine zlaqhe(UPLO, N, A, LDA, S, SCOND, AMAX, EQUED)
ZLAQHE scales a Hermitian matrix.
subroutine zpot02(UPLO, N, NRHS, A, LDA, X, LDX, B, LDB, RWORK, RESID)
ZPOT02
double precision function zlanhe(NORM, UPLO, N, A, LDA, WORK)
ZLANHE returns the value of the 1-norm, or the Frobenius norm, or the infinity norm, or the element of largest absolute value of a complex Hermitian matrix.
subroutine zlarhs(PATH, XTYPE, UPLO, TRANS, M, N, KL, KU, NRHS, A, LDA, X, LDX, B, LDB, ISEED, INFO)
ZLARHS
subroutine zposv(UPLO, N, NRHS, A, LDA, B, LDB, INFO)
ZPOSV computes the solution to system of linear equations A * X = B for PO matrices ...
subroutine zlaset(UPLO, M, N, ALPHA, BETA, A, LDA)
ZLASET initializes the off-diagonal elements and the diagonal elements of a matrix to given values...
subroutine xlaenv(ISPEC, NVALUE)
XLAENV
subroutine zlatb4(PATH, IMAT, M, N, TYPE, KL, KU, ANORM, MODE, CNDNUM, DIST)
ZLATB4
subroutine zlaipd(N, A, INDA, VINDA)
ZLAIPD
subroutine zebchvxx(THRESH, PATH)
ZEBCHVXX
subroutine aladhd(IOUNIT, PATH)
ALADHD
subroutine zpot01(UPLO, N, A, LDA, AFAC, LDAFAC, RWORK, RESID)
ZPOT01
subroutine zpoequ(N, A, LDA, S, SCOND, AMAX, INFO)
ZPOEQU
double precision function dget06(RCOND, RCONDC)
DGET06
subroutine zerrvx(PATH, NUNIT)
ZERRVX
subroutine zlatms(M, N, DIST, ISEED, SYM, D, MODE, COND, DMAX, KL, KU, PACK, A, LDA, WORK, INFO)
ZLATMS
subroutine zposvxx(FACT, UPLO, N, NRHS, A, LDA, AF, LDAF, EQUED, S, B, LDB, X, LDX, RCOND, RPVGRW, BERR, N_ERR_BNDS, ERR_BNDS_NORM, ERR_BNDS_COMP, NPARAMS, PARAMS, WORK, RWORK, INFO)
ZPOSVXX computes the solution to system of linear equations A * X = B for PO matrices ...
subroutine zpotri(UPLO, N, A, LDA, INFO)
ZPOTRI
subroutine zpot05(UPLO, N, NRHS, A, LDA, B, LDB, X, LDX, XACT, LDXACT, FERR, BERR, RESLTS)
ZPOT05
subroutine zposvx(FACT, UPLO, N, NRHS, A, LDA, AF, LDAF, EQUED, S, B, LDB, X, LDX, RCOND, FERR, BERR, WORK, RWORK, INFO)
ZPOSVX computes the solution to system of linear equations A * X = B for PO matrices ...
subroutine zdrvpo(DOTYPE, NN, NVAL, NRHS, THRESH, TSTERR, NMAX, A, AFAC, ASAV, B, BSAV, X, XACT, S, WORK, RWORK, NOUT)
ZDRVPO
logical function lsame(CA, CB)
LSAME