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 )
534 $ CALL
alaerh( path,
'ZPOSVX', info, izero,
535 $ fact // uplo, n, n, -1, -1, nrhs,
536 $ imat, nfail, nerrs, nout )
540 IF( .NOT.prefac )
THEN
545 CALL
zpot01( uplo, n, a, lda, afac, lda,
546 $ rwork( 2*nrhs+1 ), result( 1 ) )
554 CALL
zlacpy(
'Full', n, nrhs, bsav, lda, work,
556 CALL
zpot02( uplo, n, nrhs, asav, lda, x, lda,
557 $ work, lda, rwork( 2*nrhs+1 ),
562 IF( nofact .OR. ( prefac .AND.
lsame( equed,
564 CALL
zget04( n, nrhs, x, lda, xact, lda,
565 $ rcondc, result( 3 ) )
567 CALL
zget04( n, nrhs, x, lda, xact, lda,
568 $ roldc, result( 3 ) )
574 CALL
zpot05( uplo, n, nrhs, asav, lda, b, lda,
575 $ x, lda, xact, lda, rwork,
576 $ rwork( nrhs+1 ), result( 4 ) )
584 result( 6 ) =
dget06( rcond, rcondc )
590 IF( result( k ).GE.thresh )
THEN
591 IF( nfail.EQ.0 .AND. nerrs.EQ.0 )
592 $ CALL
aladhd( nout, path )
594 WRITE( nout, fmt = 9997 )
'ZPOSVX', fact,
595 $ uplo, n, equed, imat, k, result( k )
597 WRITE( nout, fmt = 9998 )
'ZPOSVX', fact,
598 $ uplo, n, imat, k, result( k )
609 CALL
zlacpy(
'Full', n, n, asav, lda, a, lda )
610 CALL
zlacpy(
'Full', n, nrhs, bsav, lda, b, lda )
613 $ CALL
zlaset( uplo, n, n, cmplx( zero ),
614 $ cmplx( zero ), afac, lda )
615 CALL
zlaset(
'Full', n, nrhs, cmplx( zero ),
616 $ cmplx( zero ), x, lda )
617 IF( iequed.GT.1 .AND. n.GT.0 )
THEN
622 CALL
zlaqhe( uplo, n, a, lda, s, scond, amax,
631 CALL
zposvxx( fact, uplo, n, nrhs, a, lda, afac,
632 $ lda, equed, s, b, lda, x,
633 $ lda, rcond, rpvgrw_svxx, berr, n_err_bnds,
634 $ errbnds_n, errbnds_c, 0, zero, work,
635 $ rwork( 2*nrhs+1 ), info )
639 IF( info.EQ.n+1 ) goto 90
640 IF( info.NE.izero )
THEN
641 CALL
alaerh( path,
'ZPOSVXX', info, izero,
642 $ fact // uplo, n, n, -1, -1, nrhs,
643 $ imat, nfail, nerrs, nout )
648 IF( .NOT.prefac )
THEN
653 CALL
zpot01( uplo, n, a, lda, afac, lda,
654 $ rwork( 2*nrhs+1 ), result( 1 ) )
662 CALL
zlacpy(
'Full', n, nrhs, bsav, lda, work,
664 CALL
zpot02( uplo, n, nrhs, asav, lda, x, lda,
665 $ work, lda, rwork( 2*nrhs+1 ),
670 IF( nofact .OR. ( prefac .AND.
lsame( equed,
672 CALL
zget04( n, nrhs, x, lda, xact, lda,
673 $ rcondc, result( 3 ) )
675 CALL
zget04( n, nrhs, x, lda, xact, lda,
676 $ roldc, result( 3 ) )
682 CALL
zpot05( uplo, n, nrhs, asav, lda, b, lda,
683 $ x, lda, xact, lda, rwork,
684 $ rwork( nrhs+1 ), result( 4 ) )
692 result( 6 ) =
dget06( rcond, rcondc )
698 IF( result( k ).GE.thresh )
THEN
699 IF( nfail.EQ.0 .AND. nerrs.EQ.0 )
700 $ CALL
aladhd( nout, path )
702 WRITE( nout, fmt = 9997 )
'ZPOSVXX', fact,
703 $ uplo, n, equed, imat, k, result( k )
705 WRITE( nout, fmt = 9998 )
'ZPOSVXX', fact,
706 $ uplo, n, imat, k, result( k )
720 CALL
alasvm( path, nout, nfail, nrun, nerrs )
727 9999 format( 1x, a,
', UPLO=''', a1,
''', N =', i5,
', type ', i1,
728 $
', test(', i1,
')=', g12.5 )
729 9998 format( 1x, a,
', FACT=''', a1,
''', UPLO=''', a1,
''', N=', i5,
730 $
', type ', i1,
', test(', i1,
')=', g12.5 )
731 9997 format( 1x, a,
', FACT=''', a1,
''', UPLO=''', a1,
''', N=', i5,
732 $
', EQUED=''', a1,
''', type ', i1,
', test(', i1,
') =',