158 SUBROUTINE zdrvpo( DOTYPE, NN, NVAL, NRHS, THRESH, TSTERR, NMAX,
159 $ a, afac, asav, b, bsav, x, xact, s, work,
169 INTEGER nmax, nn, nout, nrhs
170 DOUBLE PRECISION thresh
175 DOUBLE PRECISION rwork( * ), s( * )
176 COMPLEX*16 a( * ), afac( * ), asav( * ), b( * ),
177 $ bsav( * ), work( * ), x( * ), xact( * )
183 DOUBLE PRECISION one, zero
184 parameter( one = 1.0d+0, zero = 0.0d+0 )
186 parameter( ntypes = 9 )
188 parameter( ntests = 6 )
191 LOGICAL equil, nofact, prefac, zerot
192 CHARACTER dist, equed, fact, type, uplo, xtype
194 INTEGER i, iequed, ifact, imat, in, info, ioff, iuplo,
195 $ izero, k, k1, kl, ku, lda, mode, n, nb, nbmin,
196 $ nerrs, nfact, nfail, nimat, nrun, nt
197 DOUBLE PRECISION ainvnm, amax, anorm, cndnum, rcond, rcondc,
201 CHARACTER equeds( 2 ), facts( 3 ), uplos( 2 )
202 INTEGER iseed( 4 ), iseedy( 4 )
203 DOUBLE PRECISION result( ntests )
222 common / infoc / infot, nunit, ok, lerr
223 common / srnamc / srnamt
226 INTRINSIC dcmplx, max
229 DATA iseedy / 1988, 1989, 1990, 1991 /
230 DATA uplos /
'U',
'L' /
231 DATA facts /
'F',
'N',
'E' /
232 DATA equeds /
'N',
'Y' /
238 path( 1: 1 ) =
'Zomplex precision'
244 iseed( i ) = iseedy( i )
250 $ CALL
zerrvx( path, nout )
270 DO 120 imat = 1, nimat
274 IF( .NOT.dotype( imat ) )
279 zerot = imat.GE.3 .AND. imat.LE.5
280 IF( zerot .AND. n.LT.imat-2 )
286 uplo = uplos( iuplo )
291 CALL
zlatb4( path, imat, n, n, type, kl, ku, anorm, mode,
295 CALL
zlatms( n, n, dist, iseed, type, rwork, mode,
296 $ cndnum, anorm, kl, ku, uplo, a, lda, work,
302 CALL
alaerh( path,
'ZLATMS', info, 0, uplo, n, n, -1,
303 $ -1, -1, imat, nfail, nerrs, nout )
313 ELSE IF( imat.EQ.4 )
THEN
318 ioff = ( izero-1 )*lda
322 IF( iuplo.EQ.1 )
THEN
323 DO 20 i = 1, izero - 1
333 DO 40 i = 1, izero - 1
348 CALL
zlaipd( n, a, lda+1, 0 )
352 CALL
zlacpy( uplo, n, n, a, lda, asav, lda )
355 equed = equeds( iequed )
356 IF( iequed.EQ.1 )
THEN
362 DO 90 ifact = 1, nfact
363 fact = facts( ifact )
364 prefac =
lsame( fact,
'F' )
365 nofact =
lsame( fact,
'N' )
366 equil =
lsame( fact,
'E' )
373 ELSE IF( .NOT.
lsame( fact,
'N' ) )
THEN
380 CALL
zlacpy( uplo, n, n, asav, lda, afac, lda )
381 IF( equil .OR. iequed.GT.1 )
THEN
386 CALL
zpoequ( n, afac, lda, s, scond, amax,
388 IF( info.EQ.0 .AND. n.GT.0 )
THEN
394 CALL
zlaqhe( uplo, n, afac, lda, s, scond,
407 anorm =
zlanhe(
'1', uplo, n, afac, lda, rwork )
411 CALL
zpotrf( uplo, n, afac, lda, info )
415 CALL
zlacpy( uplo, n, n, afac, lda, a, lda )
416 CALL
zpotri( uplo, n, a, lda, info )
420 ainvnm =
zlanhe(
'1', uplo, n, a, lda, rwork )
421 IF( anorm.LE.zero .OR. ainvnm.LE.zero )
THEN
424 rcondc = ( one / anorm ) / ainvnm
430 CALL
zlacpy( uplo, n, n, asav, lda, a, lda )
435 CALL
zlarhs( path, xtype, uplo,
' ', n, n, kl, ku,
436 $ nrhs, a, lda, xact, lda, b, lda,
439 CALL
zlacpy(
'Full', n, nrhs, b, lda, bsav, lda )
448 CALL
zlacpy( uplo, n, n, a, lda, afac, lda )
449 CALL
zlacpy(
'Full', n, nrhs, b, lda, x, lda )
452 CALL
zposv( uplo, n, nrhs, afac, lda, x, lda,
457 IF( info.NE.izero )
THEN
458 CALL
alaerh( path,
'ZPOSV ', info, izero,
459 $ uplo, n, n, -1, -1, nrhs, imat,
460 $ nfail, nerrs, nout )
462 ELSE IF( info.NE.0 )
THEN
469 CALL
zpot01( uplo, n, a, lda, afac, lda, rwork,
474 CALL
zlacpy(
'Full', n, nrhs, b, lda, work,
476 CALL
zpot02( uplo, n, nrhs, a, lda, x, lda,
477 $ work, lda, rwork, result( 2 ) )
481 CALL
zget04( n, nrhs, x, lda, xact, lda, rcondc,
489 IF( result( k ).GE.thresh )
THEN
490 IF( nfail.EQ.0 .AND. nerrs.EQ.0 )
491 $ CALL
aladhd( nout, path )
492 WRITE( nout, fmt = 9999 )
'ZPOSV ', uplo,
493 $ n, imat, k, result( k )
504 $ CALL
zlaset( uplo, n, n, dcmplx( zero ),
505 $ dcmplx( zero ), afac, lda )
506 CALL
zlaset(
'Full', n, nrhs, dcmplx( zero ),
507 $ dcmplx( zero ), x, lda )
508 IF( iequed.GT.1 .AND. n.GT.0 )
THEN
513 CALL
zlaqhe( uplo, n, a, lda, s, scond, amax,
521 CALL
zposvx( fact, uplo, n, nrhs, a, lda, afac,
522 $ lda, equed, s, b, lda, x, lda, rcond,
523 $ rwork, rwork( nrhs+1 ), work,
524 $ rwork( 2*nrhs+1 ), info )
528 IF( info.NE.izero )
THEN
529 CALL
alaerh( path,
'ZPOSVX', info, izero,
530 $ fact // uplo, n, n, -1, -1, nrhs,
531 $ imat, nfail, nerrs, nout )
536 IF( .NOT.prefac )
THEN
541 CALL
zpot01( uplo, n, a, lda, afac, lda,
542 $ rwork( 2*nrhs+1 ), result( 1 ) )
550 CALL
zlacpy(
'Full', n, nrhs, bsav, lda, work,
552 CALL
zpot02( uplo, n, nrhs, asav, lda, x, lda,
553 $ work, lda, rwork( 2*nrhs+1 ),
558 IF( nofact .OR. ( prefac .AND.
lsame( equed,
560 CALL
zget04( n, nrhs, x, lda, xact, lda,
561 $ rcondc, result( 3 ) )
563 CALL
zget04( n, nrhs, x, lda, xact, lda,
564 $ roldc, result( 3 ) )
570 CALL
zpot05( uplo, n, nrhs, asav, lda, b, lda,
571 $ x, lda, xact, lda, rwork,
572 $ rwork( nrhs+1 ), result( 4 ) )
580 result( 6 ) =
dget06( rcond, rcondc )
586 IF( result( k ).GE.thresh )
THEN
587 IF( nfail.EQ.0 .AND. nerrs.EQ.0 )
588 $ CALL
aladhd( nout, path )
590 WRITE( nout, fmt = 9997 )
'ZPOSVX', fact,
591 $ uplo, n, equed, imat, k, result( k )
593 WRITE( nout, fmt = 9998 )
'ZPOSVX', fact,
594 $ uplo, n, imat, k, result( k )
608 CALL
alasvm( path, nout, nfail, nrun, nerrs )
610 9999 format( 1x, a,
', UPLO=''', a1,
''', N =', i5,
', type ', i1,
611 $
', test(', i1,
')=', g12.5 )
612 9998 format( 1x, a,
', FACT=''', a1,
''', UPLO=''', a1,
''', N=', i5,
613 $
', type ', i1,
', test(', i1,
')=', g12.5 )
614 9997 format( 1x, a,
', FACT=''', a1,
''', UPLO=''', a1,
''', N=', i5,
615 $
', EQUED=''', a1,
''', type ', i1,
', test(', i1,
') =',