154 SUBROUTINE zdrvsy( 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 = 11, 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, ZLANSY
204 EXTERNAL DGET06, ZLANSY
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' /
232 path( 1: 1 ) =
'Zomplex precision'
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 )
283 IF( imat.NE.ntypes )
THEN
288 CALL zlatb4( path, imat, n, n,
TYPE, kl, ku, anorm,
289 $ mode, cndnum, dist )
292 CALL zlatms( n, n, dist, iseed,
TYPE, rwork, mode,
293 $ cndnum, anorm, kl, ku, uplo, a, lda,
299 CALL alaerh( path,
'ZLATMS', info, 0, uplo, n, n,
300 $ -1, -1, -1, imat, nfail, nerrs, nout )
310 ELSE IF( imat.EQ.4 )
THEN
320 IF( iuplo.EQ.1 )
THEN
321 ioff = ( izero-1 )*lda
322 DO 20 i = 1, izero - 1
332 DO 40 i = 1, izero - 1
342 IF( iuplo.EQ.1 )
THEN
376 CALL zlatsy( uplo, n, a, lda, iseed )
379 DO 150 ifact = 1, nfact
383 fact = facts( ifact )
393 ELSE IF( ifact.EQ.1 )
THEN
397 anorm = zlansy(
'1', uplo, n, a, lda, rwork )
401 CALL zlacpy( uplo, n, n, a, lda, afac, lda )
402 CALL zsytrf( uplo, n, afac, lda, iwork, work,
407 CALL zlacpy( uplo, n, n, afac, lda, ainv, lda )
408 lwork = (n+nb+1)*(nb+3)
409 CALL zsytri2( uplo, n, ainv, lda, iwork, work,
411 ainvnm = zlansy(
'1', uplo, n, ainv, lda, rwork )
415 IF( anorm.LE.zero .OR. ainvnm.LE.zero )
THEN
418 rcondc = ( one / anorm ) / ainvnm
425 CALL zlarhs( path, xtype, uplo,
' ', n, n, kl, ku,
426 $ nrhs, a, lda, xact, lda, b, lda, iseed,
432 IF( ifact.EQ.2 )
THEN
433 CALL zlacpy( uplo, n, n, a, lda, afac, lda )
434 CALL zlacpy(
'Full', n, nrhs, b, lda, x, lda )
439 CALL zsysv( uplo, n, nrhs, afac, lda, iwork, x,
440 $ lda, work, lwork, info )
448 IF( iwork( k ).LT.0 )
THEN
449 IF( iwork( k ).NE.-k )
THEN
453 ELSE IF( iwork( k ).NE.k )
THEN
462 CALL alaerh( path,
'ZSYSV ', info, k, uplo, n,
463 $ n, -1, -1, nrhs, imat, nfail,
466 ELSE IF( info.NE.0 )
THEN
473 CALL zsyt01( uplo, n, a, lda, afac, lda, iwork,
474 $ ainv, lda, rwork, result( 1 ) )
478 CALL zlacpy(
'Full', n, nrhs, b, lda, work, lda )
479 CALL zsyt02( uplo, n, nrhs, a, lda, x, lda, work,
480 $ lda, rwork, result( 2 ) )
484 CALL zget04( n, nrhs, x, lda, xact, lda, rcondc,
492 IF( result( k ).GE.thresh )
THEN
493 IF( nfail.EQ.0 .AND. nerrs.EQ.0 )
494 $
CALL aladhd( nout, path )
495 WRITE( nout, fmt = 9999 )
'ZSYSV ', uplo, n,
496 $ imat, k, result( k )
507 $
CALL zlaset( uplo, n, n, dcmplx( zero ),
508 $ dcmplx( zero ), afac, lda )
509 CALL zlaset(
'Full', n, nrhs, dcmplx( zero ),
510 $ dcmplx( zero ), x, lda )
516 CALL zsysvx( fact, uplo, n, nrhs, a, lda, afac, lda,
517 $ iwork, b, lda, x, lda, rcond, rwork,
518 $ rwork( nrhs+1 ), work, lwork,
519 $ rwork( 2*nrhs+1 ), info )
527 IF( iwork( k ).LT.0 )
THEN
528 IF( iwork( k ).NE.-k )
THEN
532 ELSE IF( iwork( k ).NE.k )
THEN
541 CALL alaerh( path,
'ZSYSVX', info, k, fact // uplo,
542 $ n, n, -1, -1, nrhs, imat, nfail,
548 IF( ifact.GE.2 )
THEN
553 CALL zsyt01( uplo, n, a, lda, afac, lda, iwork,
554 $ ainv, lda, rwork( 2*nrhs+1 ),
563 CALL zlacpy(
'Full', n, nrhs, b, lda, work, lda )
564 CALL zsyt02( uplo, n, nrhs, a, lda, x, lda, work,
565 $ lda, rwork( 2*nrhs+1 ), result( 2 ) )
569 CALL zget04( n, nrhs, x, lda, xact, lda, rcondc,
574 CALL zpot05( uplo, n, nrhs, a, lda, 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 )
'ZSYSVX', fact, uplo,
594 $ n, imat, k, result( k )
605 $
CALL zlaset( uplo, n, n, dcmplx( zero ),
606 $ dcmplx( zero ), afac, lda )
607 CALL zlaset(
'Full', n, nrhs, dcmplx( zero ),
608 $ dcmplx( zero ), x, lda )
616 CALL zsysvxx( fact, uplo, n, nrhs, a, lda, afac,
617 $ lda, iwork, equed, work( n+1 ), b, lda, x,
618 $ lda, rcond, rpvgrw_svxx, berr, n_err_bnds,
619 $ errbnds_n, errbnds_c, 0, zero, work,
628 IF( iwork( k ).LT.0 )
THEN
629 IF( iwork( k ).NE.-k )
THEN
633 ELSE IF( iwork( k ).NE.k )
THEN
641 IF( info.NE.k .AND. info.LE.n )
THEN
642 CALL alaerh( path,
'ZSYSVXX', info, k,
643 $ fact // uplo, n, n, -1, -1, nrhs, imat, nfail,
649 IF( ifact.GE.2 )
THEN
654 CALL zsyt01( uplo, n, a, lda, afac, lda, iwork,
655 $ ainv, lda, rwork(2*nrhs+1),
664 CALL zlacpy(
'Full', n, nrhs, b, lda, work, lda )
665 CALL zsyt02( uplo, n, nrhs, a, lda, x, lda, work,
666 $ lda, rwork( 2*nrhs+1 ), result( 2 ) )
671 CALL zget04( n, nrhs, x, lda, xact, lda, rcondc,
676 CALL zpot05( uplo, n, nrhs, a, lda, b, lda, x, lda,
677 $ xact, lda, rwork, rwork( nrhs+1 ),
686 result( 6 ) = dget06( rcond, rcondc )
692 IF( result( k ).GE.thresh )
THEN
693 IF( nfail.EQ.0 .AND. nerrs.EQ.0 )
694 $
CALL aladhd( nout, path )
695 WRITE( nout, fmt = 9998 )
'ZSYSVXX',
696 $ fact, uplo, n, imat, k,
711 CALL alasvm( path, nout, nfail, nrun, nerrs )
718 9999
FORMAT( 1x, a,
', UPLO=''', a1,
''', N =', i5,
', type ', i2,
719 $
', test ', i2,
', ratio =', g12.5 )
720 9998
FORMAT( 1x, a,
', FACT=''', a1,
''', UPLO=''', a1,
''', N =', i5,
721 $
', 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 zsysv(uplo, n, nrhs, a, lda, ipiv, b, ldb, work, lwork, info)
ZSYSV computes the solution to system of linear equations A * X = B for SY matrices
subroutine zsysvx(fact, uplo, n, nrhs, a, lda, af, ldaf, ipiv, b, ldb, x, ldx, rcond, ferr, berr, work, lwork, rwork, info)
ZSYSVX computes the solution to system of linear equations A * X = B for SY matrices
subroutine zsysvxx(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)
ZSYSVXX computes the solution to system of linear equations A * X = B for SY matrices
subroutine zsytrf(uplo, n, a, lda, ipiv, work, lwork, info)
ZSYTRF
subroutine zsytri2(uplo, n, a, lda, ipiv, work, lwork, info)
ZSYTRI2
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 zdrvsy(dotype, nn, nval, nrhs, thresh, tsterr, nmax, a, afac, ainv, b, x, xact, work, rwork, iwork, nout)
ZDRVSY
subroutine zebchvxx(thresh, path)
ZEBCHVXX
subroutine zerrvx(path, nunit)
ZERRVX
subroutine zget04(n, nrhs, x, ldx, xact, ldxact, rcond, resid)
ZGET04
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 zlatsy(uplo, n, x, ldx, iseed)
ZLATSY
subroutine zpot05(uplo, n, nrhs, a, lda, b, ldb, x, ldx, xact, ldxact, ferr, berr, reslts)
ZPOT05
subroutine zsyt01(uplo, n, a, lda, afac, ldafac, ipiv, c, ldc, rwork, resid)
ZSYT01
subroutine zsyt02(uplo, n, nrhs, a, lda, x, ldx, b, ldb, rwork, resid)
ZSYT02