154 SUBROUTINE zdrvhe( DOTYPE, NN, NVAL, NRHS, THRESH, TSTERR, NMAX,
155 $ A, AFAC, AINV, B, X, XACT, WORK, RWORK, IWORK,
164 INTEGER NMAX, NN, NOUT, NRHS
165 DOUBLE PRECISION THRESH
169 INTEGER IWORK( * ), NVAL( * )
170 DOUBLE PRECISION RWORK( * )
171 COMPLEX*16 A( * ), AFAC( * ), AINV( * ), B( * ),
172 $ work( * ), x( * ), xact( * )
178 DOUBLE PRECISION ONE, ZERO
179 PARAMETER ( ONE = 1.0d+0, zero = 0.0d+0 )
180 INTEGER NTYPES, NTESTS
181 parameter( ntypes = 10, ntests = 6 )
183 parameter( nfact = 2 )
187 CHARACTER DIST, EQUED, FACT,
TYPE, UPLO, XTYPE
189 INTEGER I, I1, I2, IFACT, IMAT, IN, INFO, IOFF, IUPLO,
190 $ izero, j, k, k1, kl, ku, lda, lwork, mode, n,
191 $ nb, nbmin, nerrs, nfail, nimat, nrun, nt,
193 DOUBLE PRECISION AINVNM, ANORM, CNDNUM, RCOND, RCONDC,
197 CHARACTER FACTS( NFACT ), UPLOS( 2 )
198 INTEGER ISEED( 4 ), ISEEDY( 4 )
199 DOUBLE PRECISION RESULT( NTESTS ), BERR( NRHS ),
200 $ errbnds_n( nrhs, 3 ), errbnds_c( nrhs, 3 )
203 DOUBLE PRECISION DGET06, ZLANHE
204 EXTERNAL DGET06, ZLANHE
218 COMMON / infoc / infot, nunit, ok, lerr
219 COMMON / srnamc / srnamt
222 INTRINSIC dcmplx, max, min
225 DATA iseedy / 1988, 1989, 1990, 1991 /
226 DATA uplos /
'U',
'L' / , facts /
'F',
'N' /
238 iseed( i ) = iseedy( i )
240 lwork = max( 2*nmax, nmax*nrhs )
245 $
CALL zerrvx( path, nout )
265 DO 170 imat = 1, nimat
269 IF( .NOT.dotype( imat ) )
274 zerot = imat.GE.3 .AND. imat.LE.6
275 IF( zerot .AND. n.LT.imat-2 )
281 uplo = uplos( iuplo )
286 CALL zlatb4( path, imat, n, n,
TYPE, kl, ku, anorm, mode,
290 CALL zlatms( n, n, dist, iseed,
TYPE, rwork, mode,
291 $ cndnum, anorm, kl, ku, uplo, a, lda, work,
297 CALL alaerh( path,
'ZLATMS', info, 0, uplo, n, n, -1,
298 $ -1, -1, imat, nfail, nerrs, nout )
308 ELSE IF( imat.EQ.4 )
THEN
318 IF( iuplo.EQ.1 )
THEN
319 ioff = ( izero-1 )*lda
320 DO 20 i = 1, izero - 1
330 DO 40 i = 1, izero - 1
341 IF( iuplo.EQ.1 )
THEN
371 CALL zlaipd( n, a, lda+1, 0 )
373 DO 150 ifact = 1, nfact
377 fact = facts( ifact )
387 ELSE IF( ifact.EQ.1 )
THEN
391 anorm = zlanhe(
'1', uplo, n, a, lda, rwork )
395 CALL zlacpy( uplo, n, n, a, lda, afac, lda )
396 CALL zhetrf( uplo, n, afac, lda, iwork, work,
401 CALL zlacpy( uplo, n, n, afac, lda, ainv, lda )
402 lwork = (n+nb+1)*(nb+3)
403 CALL zhetri2( uplo, n, ainv, lda, iwork, work,
405 ainvnm = zlanhe(
'1', uplo, n, ainv, lda, rwork )
409 IF( anorm.LE.zero .OR. ainvnm.LE.zero )
THEN
412 rcondc = ( one / anorm ) / ainvnm
419 CALL zlarhs( path, xtype, uplo,
' ', n, n, kl, ku,
420 $ nrhs, a, lda, xact, lda, b, lda, iseed,
426 IF( ifact.EQ.2 )
THEN
427 CALL zlacpy( uplo, n, n, a, lda, afac, lda )
428 CALL zlacpy(
'Full', n, nrhs, b, lda, x, lda )
433 CALL zhesv( uplo, n, nrhs, afac, lda, iwork, x,
434 $ lda, work, lwork, info )
442 IF( iwork( k ).LT.0 )
THEN
443 IF( iwork( k ).NE.-k )
THEN
447 ELSE IF( iwork( k ).NE.k )
THEN
456 CALL alaerh( path,
'ZHESV ', info, k, uplo, n,
457 $ n, -1, -1, nrhs, imat, nfail,
460 ELSE IF( info.NE.0 )
THEN
467 CALL zhet01( uplo, n, a, lda, afac, lda, iwork,
468 $ ainv, lda, rwork, result( 1 ) )
472 CALL zlacpy(
'Full', n, nrhs, b, lda, work, lda )
473 CALL zpot02( uplo, n, nrhs, a, lda, x, lda, work,
474 $ lda, rwork, result( 2 ) )
478 CALL zget04( 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 )
'ZHESV ', uplo, n,
490 $ imat, k, result( k )
501 $
CALL zlaset( uplo, n, n, dcmplx( zero ),
502 $ dcmplx( zero ), afac, lda )
503 CALL zlaset(
'Full', n, nrhs, dcmplx( zero ),
504 $ dcmplx( zero ), x, lda )
510 CALL zhesvx( fact, uplo, n, nrhs, a, lda, afac, lda,
511 $ iwork, b, lda, x, lda, rcond, rwork,
512 $ rwork( nrhs+1 ), work, lwork,
513 $ rwork( 2*nrhs+1 ), info )
521 IF( iwork( k ).LT.0 )
THEN
522 IF( iwork( k ).NE.-k )
THEN
526 ELSE IF( iwork( k ).NE.k )
THEN
535 CALL alaerh( path,
'ZHESVX', info, k, fact // uplo,
536 $ n, n, -1, -1, nrhs, imat, nfail,
542 IF( ifact.GE.2 )
THEN
547 CALL zhet01( uplo, n, a, lda, afac, lda, iwork,
548 $ ainv, lda, rwork( 2*nrhs+1 ),
557 CALL zlacpy(
'Full', n, nrhs, b, lda, work, lda )
558 CALL zpot02( uplo, n, nrhs, a, lda, x, lda, work,
559 $ lda, rwork( 2*nrhs+1 ), result( 2 ) )
563 CALL zget04( n, nrhs, x, lda, xact, lda, rcondc,
568 CALL zpot05( uplo, n, nrhs, a, lda, b, lda, x, lda,
569 $ xact, lda, rwork, rwork( nrhs+1 ),
578 result( 6 ) = dget06( rcond, rcondc )
584 IF( result( k ).GE.thresh )
THEN
585 IF( nfail.EQ.0 .AND. nerrs.EQ.0 )
586 $
CALL aladhd( nout, path )
587 WRITE( nout, fmt = 9998 )
'ZHESVX', fact, uplo,
588 $ n, imat, k, result( k )
599 $
CALL zlaset( uplo, n, n, dcmplx( zero ),
600 $ dcmplx( zero ), afac, lda )
601 CALL zlaset(
'Full', n, nrhs, dcmplx( zero ),
602 $ dcmplx( zero ), x, lda )
610 CALL zhesvxx( fact, uplo, n, nrhs, a, lda, afac,
611 $ lda, iwork, equed, work( n+1 ), b, lda, x,
612 $ lda, rcond, rpvgrw_svxx, berr, n_err_bnds,
613 $ errbnds_n, errbnds_c, 0, zero, work,
614 $ rwork(2*nrhs+1), info )
622 IF( iwork( k ).LT.0 )
THEN
623 IF( iwork( k ).NE.-k )
THEN
627 ELSE IF( iwork( k ).NE.k )
THEN
635 IF( info.NE.k .AND. info.LE.n)
THEN
636 CALL alaerh( path,
'ZHESVXX', info, k,
637 $ fact // uplo, n, n, -1, -1, nrhs, imat, nfail,
643 IF( ifact.GE.2 )
THEN
648 CALL zhet01( uplo, n, a, lda, afac, lda, iwork,
649 $ ainv, lda, rwork(2*nrhs+1),
658 CALL zlacpy(
'Full', n, nrhs, b, lda, work, lda )
659 CALL zpot02( uplo, n, nrhs, a, lda, x, lda, work,
660 $ lda, rwork( 2*nrhs+1 ), result( 2 ) )
665 CALL zget04( n, nrhs, x, lda, xact, lda, rcondc,
670 CALL zpot05( uplo, n, nrhs, a, lda, b, lda, x, lda,
671 $ xact, lda, rwork, rwork( nrhs+1 ),
680 result( 6 ) = dget06( rcond, rcondc )
686 IF( result( k ).GE.thresh )
THEN
687 IF( nfail.EQ.0 .AND. nerrs.EQ.0 )
688 $
CALL aladhd( nout, path )
689 WRITE( nout, fmt = 9998 )
'ZHESVXX',
690 $ fact, uplo, n, imat, k,
705 CALL alasvm( path, nout, nfail, nrun, nerrs )
712 9999
FORMAT( 1x, a,
', UPLO=''', a1,
''', N =', i5,
', type ', i2,
713 $
', test ', i2,
', ratio =', g12.5 )
714 9998
FORMAT( 1x, a,
', FACT=''', a1,
''', UPLO=''', a1,
''', N =', i5,
715 $
', type ', i2,
', test ', i2,
', ratio =', g12.5 )
subroutine alasvm(type, nout, nfail, nrun, nerrs)
ALASVM
subroutine xlaenv(ispec, nvalue)
XLAENV
subroutine zlarhs(path, xtype, uplo, trans, m, n, kl, ku, nrhs, a, lda, x, ldx, b, ldb, iseed, info)
ZLARHS
subroutine aladhd(iounit, path)
ALADHD
subroutine alaerh(path, subnam, info, infoe, opts, m, n, kl, ku, n5, imat, nfail, nerrs, nout)
ALAERH
subroutine zhesv(uplo, n, nrhs, a, lda, ipiv, b, ldb, work, lwork, info)
ZHESV computes the solution to system of linear equations A * X = B for HE matrices
subroutine zhesvx(fact, uplo, n, nrhs, a, lda, af, ldaf, ipiv, b, ldb, x, ldx, rcond, ferr, berr, work, lwork, rwork, info)
ZHESVX computes the solution to system of linear equations A * X = B for HE matrices
subroutine zhesvxx(fact, uplo, n, nrhs, a, lda, af, ldaf, ipiv, equed, s, b, ldb, x, ldx, rcond, rpvgrw, berr, n_err_bnds, err_bnds_norm, err_bnds_comp, nparams, params, work, rwork, info)
ZHESVXX computes the solution to system of linear equations A * X = B for HE matrices
subroutine zhetrf(uplo, n, a, lda, ipiv, work, lwork, info)
ZHETRF
subroutine zhetri2(uplo, n, a, lda, ipiv, work, lwork, info)
ZHETRI2
subroutine zlacpy(uplo, m, n, a, lda, b, ldb)
ZLACPY copies all or part of one two-dimensional array to another.
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 zdrvhe(dotype, nn, nval, nrhs, thresh, tsterr, nmax, a, afac, ainv, b, x, xact, work, rwork, iwork, nout)
ZDRVHE
subroutine zebchvxx(thresh, path)
ZEBCHVXX
subroutine zerrvx(path, nunit)
ZERRVX
subroutine zget04(n, nrhs, x, ldx, xact, ldxact, rcond, resid)
ZGET04
subroutine zhet01(uplo, n, a, lda, afac, ldafac, ipiv, c, ldc, rwork, resid)
ZHET01
subroutine zlaipd(n, a, inda, vinda)
ZLAIPD
subroutine zlatb4(path, imat, m, n, type, kl, ku, anorm, mode, cndnum, dist)
ZLATB4
subroutine zlatms(m, n, dist, iseed, sym, d, mode, cond, dmax, kl, ku, pack, a, lda, work, info)
ZLATMS
subroutine zpot02(uplo, n, nrhs, a, lda, x, ldx, b, ldb, rwork, resid)
ZPOT02
subroutine zpot05(uplo, n, nrhs, a, lda, b, ldb, x, ldx, xact, ldxact, ferr, berr, reslts)
ZPOT05