156 SUBROUTINE zdrvsp( DOTYPE, NN, NVAL, NRHS, THRESH, TSTERR, NMAX,
157 $ a, afac, ainv, b, x, xact, work, rwork, iwork,
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 = 11, 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 )
203 DOUBLE PRECISION DGET06, ZLANSP
204 EXTERNAL dget06, zlansp
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' /
232 path( 1: 1 ) =
'Zomplex precision'
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
289 IF( imat.NE.ntypes )
THEN
294 CALL zlatb4( path, imat, n, n,
TYPE, KL, KU, ANORM,
295 $ mode, cndnum, dist )
298 CALL zlatms( n, n, dist, iseed,
TYPE, RWORK, MODE,
299 $ cndnum, anorm, kl, ku, packit, a, lda,
305 CALL alaerh( path,
'ZLATMS', info, 0, uplo, n, n,
306 $ -1, -1, -1, imat, nfail, nerrs, nout )
316 ELSE IF( imat.EQ.4 )
THEN
326 IF( iuplo.EQ.1 )
THEN
327 ioff = ( izero-1 )*izero / 2
328 DO 20 i = 1, izero - 1
338 DO 40 i = 1, izero - 1
348 IF( iuplo.EQ.1 )
THEN
382 CALL zlatsp( uplo, n, a, iseed )
385 DO 150 ifact = 1, nfact
389 fact = facts( ifact )
399 ELSE IF( ifact.EQ.1 )
THEN
403 anorm = zlansp(
'1', uplo, n, a, rwork )
407 CALL zcopy( npp, a, 1, afac, 1 )
408 CALL zsptrf( uplo, n, afac, iwork, info )
412 CALL zcopy( npp, afac, 1, ainv, 1 )
413 CALL zsptri( uplo, n, ainv, iwork, work, info )
414 ainvnm = zlansp(
'1', uplo, n, ainv, rwork )
418 IF( anorm.LE.zero .OR. ainvnm.LE.zero )
THEN
421 rcondc = ( one / anorm ) / ainvnm
428 CALL zlarhs( path, xtype, uplo,
' ', n, n, kl, ku,
429 $ nrhs, a, lda, xact, lda, b, lda, iseed,
435 IF( ifact.EQ.2 )
THEN
436 CALL zcopy( npp, a, 1, afac, 1 )
437 CALL zlacpy(
'Full', n, nrhs, b, lda, x, lda )
442 CALL zspsv( uplo, n, nrhs, afac, iwork, x, lda,
451 IF( iwork( k ).LT.0 )
THEN
452 IF( iwork( k ).NE.-k )
THEN
456 ELSE IF( iwork( k ).NE.k )
THEN
465 CALL alaerh( path,
'ZSPSV ', info, k, uplo, n,
466 $ n, -1, -1, nrhs, imat, nfail,
469 ELSE IF( info.NE.0 )
THEN
476 CALL zspt01( uplo, n, a, afac, iwork, ainv, lda,
477 $ rwork, result( 1 ) )
481 CALL zlacpy(
'Full', n, nrhs, b, lda, work, lda )
482 CALL zspt02( uplo, n, nrhs, a, x, lda, work, lda,
483 $ rwork, result( 2 ) )
487 CALL zget04( n, nrhs, x, lda, xact, lda, rcondc,
495 IF( result( k ).GE.thresh )
THEN
496 IF( nfail.EQ.0 .AND. nerrs.EQ.0 )
497 $
CALL aladhd( nout, path )
498 WRITE( nout, fmt = 9999 )
'ZSPSV ', uplo, n,
499 $ imat, k, result( k )
509 IF( ifact.EQ.2 .AND. npp.GT.0 )
510 $
CALL zlaset(
'Full', npp, 1, dcmplx( zero ),
511 $ dcmplx( zero ), afac, npp )
512 CALL zlaset(
'Full', n, nrhs, dcmplx( zero ),
513 $ dcmplx( zero ), x, lda )
519 CALL zspsvx( fact, uplo, n, nrhs, a, afac, iwork, b,
520 $ lda, x, lda, rcond, rwork,
521 $ rwork( nrhs+1 ), work, rwork( 2*nrhs+1 ),
530 IF( iwork( k ).LT.0 )
THEN
531 IF( iwork( k ).NE.-k )
THEN
535 ELSE IF( iwork( k ).NE.k )
THEN
544 CALL alaerh( path,
'ZSPSVX', info, k, fact // uplo,
545 $ n, n, -1, -1, nrhs, imat, nfail,
551 IF( ifact.GE.2 )
THEN
556 CALL zspt01( uplo, n, a, afac, iwork, ainv, lda,
557 $ rwork( 2*nrhs+1 ), result( 1 ) )
565 CALL zlacpy(
'Full', n, nrhs, b, lda, work, lda )
566 CALL zspt02( uplo, n, nrhs, a, x, lda, work, lda,
567 $ rwork( 2*nrhs+1 ), result( 2 ) )
571 CALL zget04( n, nrhs, x, lda, xact, lda, rcondc,
576 CALL zppt05( uplo, n, nrhs, a, b, lda, x, lda,
577 $ xact, lda, rwork, rwork( nrhs+1 ),
586 result( 6 ) = dget06( rcond, rcondc )
592 IF( result( k ).GE.thresh )
THEN
593 IF( nfail.EQ.0 .AND. nerrs.EQ.0 )
594 $
CALL aladhd( nout, path )
595 WRITE( nout, fmt = 9998 )
'ZSPSVX', fact, uplo,
596 $ n, imat, k, result( k )
610 CALL alasvm( path, nout, nfail, nrun, nerrs )
612 9999
FORMAT( 1x, a,
', UPLO=''', a1,
''', N =', i5,
', type ', i2,
613 $
', test ', i2,
', ratio =', g12.5 )
614 9998
FORMAT( 1x, a,
', FACT=''', a1,
''', UPLO=''', a1,
''', N =', i5,
615 $
', 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 zsptri(UPLO, N, AP, IPIV, WORK, INFO)
ZSPTRI
subroutine zget04(N, NRHS, X, LDX, XACT, LDXACT, RCOND, RESID)
ZGET04
subroutine zcopy(N, ZX, INCX, ZY, INCY)
ZCOPY
subroutine zsptrf(UPLO, N, AP, IPIV, INFO)
ZSPTRF
subroutine zlarhs(PATH, XTYPE, UPLO, TRANS, M, N, KL, KU, NRHS, A, LDA, X, LDX, B, LDB, ISEED, INFO)
ZLARHS
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 zspt02(UPLO, N, NRHS, A, X, LDX, B, LDB, RWORK, RESID)
ZSPT02
subroutine xlaenv(ISPEC, NVALUE)
XLAENV
subroutine zspsv(UPLO, N, NRHS, AP, IPIV, B, LDB, INFO)
ZSPSV computes the solution to system of linear equations A * X = B for OTHER matrices ...
subroutine zlatsp(UPLO, N, X, ISEED)
ZLATSP
subroutine zspsvx(FACT, UPLO, N, NRHS, AP, AFP, IPIV, B, LDB, X, LDX, RCOND, FERR, BERR, WORK, RWORK, INFO)
ZSPSVX computes the solution to system of linear equations A * X = B for OTHER matrices ...
subroutine zlatb4(PATH, IMAT, M, N, TYPE, KL, KU, ANORM, MODE, CNDNUM, DIST)
ZLATB4
subroutine aladhd(IOUNIT, PATH)
ALADHD
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 zdrvsp(DOTYPE, NN, NVAL, NRHS, THRESH, TSTERR, NMAX, A, AFAC, AINV, B, X, XACT, WORK, RWORK, IWORK, NOUT)
ZDRVSP
subroutine zspt01(UPLO, N, A, AFAC, IPIV, C, LDC, RWORK, RESID)
ZSPT01