167 INTEGER nmax, nn, nout, nrhs
168 DOUBLE PRECISION thresh
172 INTEGER iwork( * ), nval( * )
173 DOUBLE PRECISION rwork( * )
174 COMPLEX*16 a( * ), afac( * ), ainv( * ), b( * ),
175 $ work( * ), x( * ), xact( * )
181 DOUBLE PRECISION one, zero
182 parameter ( one = 1.0d+0, zero = 0.0d+0 )
183 INTEGER ntypes, ntests
184 parameter ( ntypes = 10, ntests = 6 )
186 parameter ( nfact = 2 )
190 CHARACTER dist, fact, packit,
TYPE, uplo, xtype
192 INTEGER i, i1, i2, ifact, imat, in, info, ioff, iuplo,
193 $ izero, j, k, k1, kl, ku, lda, mode, n, nb,
194 $ nbmin, nerrs, nfail, nimat, npp, nrun, nt
195 DOUBLE PRECISION ainvnm, anorm, cndnum, rcond, rcondc
198 CHARACTER facts( nfact )
199 INTEGER iseed( 4 ), iseedy( 4 )
200 DOUBLE PRECISION result( ntests )
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 facts /
'F',
'N' /
238 iseed( i ) = iseedy( i )
244 $
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 IF( iuplo.EQ.1 )
THEN
292 CALL zlatb4( path, imat, n, n,
TYPE, kl, ku, anorm, mode,
296 CALL zlatms( n, n, dist, iseed,
TYPE, rwork, mode,
297 $ cndnum, anorm, kl, ku, packit, a, lda, work,
303 CALL alaerh( path,
'ZLATMS', info, 0, uplo, n, n, -1,
304 $ -1, -1, imat, nfail, nerrs, nout )
314 ELSE IF( imat.EQ.4 )
THEN
324 IF( iuplo.EQ.1 )
THEN
325 ioff = ( izero-1 )*izero / 2
326 DO 20 i = 1, izero - 1
336 DO 40 i = 1, izero - 1
347 IF( iuplo.EQ.1 )
THEN
377 IF( iuplo.EQ.1 )
THEN
380 CALL zlaipd( n, a, n, -1 )
383 DO 150 ifact = 1, nfact
387 fact = facts( ifact )
397 ELSE IF( ifact.EQ.1 )
THEN
401 anorm =
zlanhp(
'1', uplo, n, a, rwork )
405 CALL zcopy( npp, a, 1, afac, 1 )
406 CALL zhptrf( uplo, n, afac, iwork, info )
410 CALL zcopy( npp, afac, 1, ainv, 1 )
411 CALL zhptri( uplo, n, ainv, iwork, work, info )
412 ainvnm =
zlanhp(
'1', uplo, n, ainv, rwork )
416 IF( anorm.LE.zero .OR. ainvnm.LE.zero )
THEN
419 rcondc = ( one / anorm ) / ainvnm
426 CALL zlarhs( path, xtype, uplo,
' ', n, n, kl, ku,
427 $ nrhs, a, lda, xact, lda, b, lda, iseed,
433 IF( ifact.EQ.2 )
THEN
434 CALL zcopy( npp, a, 1, afac, 1 )
435 CALL zlacpy(
'Full', n, nrhs, b, lda, x, lda )
440 CALL zhpsv( uplo, n, nrhs, afac, iwork, x, lda,
449 IF( iwork( k ).LT.0 )
THEN
450 IF( iwork( k ).NE.-k )
THEN
454 ELSE IF( iwork( k ).NE.k )
THEN
463 CALL alaerh( path,
'ZHPSV ', info, k, uplo, n,
464 $ n, -1, -1, nrhs, imat, nfail,
467 ELSE IF( info.NE.0 )
THEN
474 CALL zhpt01( uplo, n, a, afac, iwork, ainv, lda,
475 $ rwork, result( 1 ) )
479 CALL zlacpy(
'Full', n, nrhs, b, lda, work, lda )
480 CALL zppt02( uplo, n, nrhs, a, x, lda, work, lda,
481 $ rwork, result( 2 ) )
485 CALL zget04( n, nrhs, x, lda, xact, lda, rcondc,
493 IF( result( k ).GE.thresh )
THEN
494 IF( nfail.EQ.0 .AND. nerrs.EQ.0 )
495 $
CALL aladhd( nout, path )
496 WRITE( nout, fmt = 9999 )
'ZHPSV ', uplo, n,
497 $ imat, k, result( k )
507 IF( ifact.EQ.2 .AND. npp.GT.0 )
508 $
CALL zlaset(
'Full', npp, 1, dcmplx( zero ),
509 $ dcmplx( zero ), afac, npp )
510 CALL zlaset(
'Full', n, nrhs, dcmplx( zero ),
511 $ dcmplx( zero ), x, lda )
517 CALL zhpsvx( fact, uplo, n, nrhs, a, afac, iwork, b,
518 $ lda, x, lda, rcond, rwork,
519 $ rwork( nrhs+1 ), work, rwork( 2*nrhs+1 ),
528 IF( iwork( k ).LT.0 )
THEN
529 IF( iwork( k ).NE.-k )
THEN
533 ELSE IF( iwork( k ).NE.k )
THEN
542 CALL alaerh( path,
'ZHPSVX', info, k, fact // uplo,
543 $ n, n, -1, -1, nrhs, imat, nfail,
549 IF( ifact.GE.2 )
THEN
554 CALL zhpt01( uplo, n, a, afac, iwork, ainv, lda,
555 $ rwork( 2*nrhs+1 ), result( 1 ) )
563 CALL zlacpy(
'Full', n, nrhs, b, lda, work, lda )
564 CALL zppt02( uplo, n, nrhs, a, x, lda, work, lda,
565 $ rwork( 2*nrhs+1 ), result( 2 ) )
569 CALL zget04( n, nrhs, x, lda, xact, lda, rcondc,
574 CALL zppt05( uplo, n, nrhs, a, b, lda, x, lda,
575 $ xact, lda, rwork, rwork( nrhs+1 ),
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 )
593 WRITE( nout, fmt = 9998 )
'ZHPSVX', fact, uplo,
594 $ n, imat, k, result( k )
608 CALL alasvm( path, nout, nfail, nrun, nerrs )
610 9999
FORMAT( 1x, a,
', UPLO=''', a1,
''', N =', i5,
', type ', i2,
611 $
', test ', i2,
', ratio =', g12.5 )
612 9998
FORMAT( 1x, a,
', FACT=''', a1,
''', UPLO=''', a1,
''', N =', i5,
613 $
', type ', i2,
', test ', i2,
', ratio =', g12.5 )
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 zcopy(N, ZX, INCX, ZY, INCY)
ZCOPY
double precision function zlanhp(NORM, UPLO, N, AP, WORK)
ZLANHP 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 supplied in packed form.
subroutine zlarhs(PATH, XTYPE, UPLO, TRANS, M, N, KL, KU, NRHS, A, LDA, X, LDX, B, LDB, ISEED, INFO)
ZLARHS
subroutine zhptrf(UPLO, N, AP, IPIV, INFO)
ZHPTRF
subroutine zhptri(UPLO, N, AP, IPIV, WORK, INFO)
ZHPTRI
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 zhpsv(UPLO, N, NRHS, AP, IPIV, B, LDB, INFO)
ZHPSV computes the solution to system of linear equations A * X = B for OTHER matrices ...
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 aladhd(IOUNIT, PATH)
ALADHD
subroutine zppt02(UPLO, N, NRHS, A, X, LDX, B, LDB, RWORK, RESID)
ZPPT02
subroutine zhpt01(UPLO, N, A, AFAC, IPIV, C, LDC, RWORK, RESID)
ZHPT01
double precision function dget06(RCOND, RCONDC)
DGET06
subroutine zppt05(UPLO, N, NRHS, AP, B, LDB, X, LDX, XACT, LDXACT, FERR, BERR, RESLTS)
ZPPT05
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 zhpsvx(FACT, UPLO, N, NRHS, AP, AFP, IPIV, B, LDB, X, LDX, RCOND, FERR, BERR, WORK, RWORK, INFO)
ZHPSVX computes the solution to system of linear equations A * X = B for OTHER matrices ...