169 $ THRESH, TSTERR, NMAX, A, AFAC, AINV, B, X,
170 $ XACT, WORK, RWORK, IWORK, NOUT )
178 INTEGER NMAX, NN, NNB, NNS, NOUT
179 DOUBLE PRECISION THRESH
183 INTEGER IWORK( * ), NBVAL( * ), NSVAL( * ), NVAL( * )
184 DOUBLE PRECISION A( * ), AFAC( * ), AINV( * ), B( * ),
185 $ rwork( * ), work( * ), x( * ), xact( * )
191 DOUBLE PRECISION ZERO, ONE
192 PARAMETER ( ZERO = 0.0d+0, one = 1.0d+0 )
193 DOUBLE PRECISION EIGHT, SEVTEN
194 parameter( eight = 8.0d+0, sevten = 17.0d+0 )
196 parameter( ntypes = 10 )
198 parameter( ntests = 7 )
201 LOGICAL TRFCON, ZEROT
202 CHARACTER DIST,
TYPE, UPLO, XTYPE
203 CHARACTER*3 PATH, MATPATH
204 INTEGER I, I1, I2, IMAT, IN, INB, INFO, IOFF, IRHS,
205 $ iuplo, izero, j, k, kl, ku, lda, lwork, mode,
206 $ n, nb, nerrs, nfail, nimat, nrhs, nrun, nt
207 DOUBLE PRECISION ALPHA, ANORM, CNDNUM, CONST, DTEMP, SING_MAX,
208 $ SING_MIN, RCOND, RCONDC
212 INTEGER ISEED( 4 ), ISEEDY( 4 )
213 DOUBLE PRECISION BLOCK( 2, 2 ), DDUMMY( 1 ), RESULT( NTESTS )
216 DOUBLE PRECISION DGET06, DLANGE, DLANSY
217 EXTERNAL DGET06, DLANGE, DLANSY
226 INTRINSIC max, min, sqrt
234 COMMON / infoc / infot, nunit, ok, lerr
235 COMMON / srnamc / srnamt
238 DATA iseedy / 1988, 1989, 1990, 1991 /
239 DATA uplos /
'U',
'L' /
245 alpha = ( one+sqrt( sevten ) ) / eight
249 path( 1: 1 ) =
'Double precision'
254 matpath( 1: 1 ) =
'Double precision'
255 matpath( 2: 3 ) =
'SY'
261 iseed( i ) = iseedy( i )
267 $
CALL derrsy( path, nout )
289 DO 260 imat = 1, nimat
293 IF( .NOT.dotype( imat ) )
298 zerot = imat.GE.3 .AND. imat.LE.6
299 IF( zerot .AND. n.LT.imat-2 )
305 uplo = uplos( iuplo )
312 CALL dlatb4( matpath, imat, n, n,
TYPE, kl, ku, anorm,
313 $ mode, cndnum, dist )
318 CALL dlatms( n, n, dist, iseed,
TYPE, rwork, mode,
319 $ cndnum, anorm, kl, ku, uplo, a, lda, work,
325 CALL alaerh( path,
'DLATMS', info, 0, uplo, n, n, -1,
326 $ -1, -1, imat, nfail, nerrs, nout )
340 ELSE IF( imat.EQ.4 )
THEN
350 IF( iuplo.EQ.1 )
THEN
351 ioff = ( izero-1 )*lda
352 DO 20 i = 1, izero - 1
362 DO 40 i = 1, izero - 1
372 IF( iuplo.EQ.1 )
THEN
419 CALL dlacpy( uplo, n, n, a, lda, afac, lda )
426 lwork = max( 2, nb )*lda
427 srnamt =
'DSYTRF_ROOK'
437 IF( iwork( k ).LT.0 )
THEN
438 IF( iwork( k ).NE.-k )
THEN
442 ELSE IF( iwork( k ).NE.k )
THEN
451 $
CALL alaerh( path,
'DSYTRF_ROOK', info, k,
452 $ uplo, n, n, -1, -1, nb, imat,
453 $ nfail, nerrs, nout )
466 CALL dsyt01_rook( uplo, n, a, lda, afac, lda, iwork,
467 $ ainv, lda, rwork, result( 1 ) )
476 IF( inb.EQ.1 .AND. .NOT.trfcon )
THEN
477 CALL dlacpy( uplo, n, n, afac, lda, ainv, lda )
478 srnamt =
'DSYTRI_ROOK'
485 $
CALL alaerh( path,
'DSYTRI_ROOK', info, -1,
486 $ uplo, n, n, -1, -1, -1, imat,
487 $ nfail, nerrs, nout )
492 CALL dpot03( uplo, n, a, lda, ainv, lda, work, lda,
493 $ rwork, rcondc, result( 2 ) )
501 IF( result( k ).GE.thresh )
THEN
502 IF( nfail.EQ.0 .AND. nerrs.EQ.0 )
503 $
CALL alahd( nout, path )
504 WRITE( nout, fmt = 9999 )uplo, n, nb, imat, k,
517 const = one / ( one-alpha )
519 IF( iuplo.EQ.1 )
THEN
528 IF( iwork( k ).GT.zero )
THEN
533 dtemp = dlange(
'M', k-1, 1,
534 $ afac( ( k-1 )*lda+1 ), lda, rwork )
540 dtemp = dlange(
'M', k-2, 2,
541 $ afac( ( k-2 )*lda+1 ), lda, rwork )
548 dtemp = dtemp - const + thresh
549 IF( dtemp.GT.result( 3 ) )
550 $ result( 3 ) = dtemp
566 IF( iwork( k ).GT.zero )
THEN
571 dtemp = dlange(
'M', n-k, 1,
572 $ afac( ( k-1 )*lda+k+1 ), lda, rwork )
578 dtemp = dlange(
'M', n-k-1, 2,
579 $ afac( ( k-1 )*lda+k+2 ), lda, rwork )
586 dtemp = dtemp - const + thresh
587 IF( dtemp.GT.result( 3 ) )
588 $ result( 3 ) = dtemp
604 const = ( one+alpha ) / ( one-alpha )
605 CALL dlacpy( uplo, n, n, afac, lda, ainv, lda )
607 IF( iuplo.EQ.1 )
THEN
616 IF( iwork( k ).LT.zero )
THEN
622 block( 1, 1 ) = afac( ( k-2 )*lda+k-1 )
623 block( 1, 2 ) = afac( (k-1)*lda+k-1 )
624 block( 2, 1 ) = block( 1, 2 )
625 block( 2, 2 ) = afac( (k-1)*lda+k )
627 CALL dgesvd(
'N',
'N', 2, 2, block, 2, rwork,
628 $ ddummy, 1, ddummy, 1,
631 sing_max = rwork( 1 )
632 sing_min = rwork( 2 )
634 dtemp = sing_max / sing_min
638 dtemp = dtemp - const + thresh
639 IF( dtemp.GT.result( 4 ) )
640 $ result( 4 ) = dtemp
659 IF( iwork( k ).LT.zero )
THEN
665 block( 1, 1 ) = afac( ( k-1 )*lda+k )
666 block( 2, 1 ) = afac( ( k-1 )*lda+k+1 )
667 block( 1, 2 ) = block( 2, 1 )
668 block( 2, 2 ) = afac( k*lda+k+1 )
670 CALL dgesvd(
'N',
'N', 2, 2, block, 2, rwork,
671 $ ddummy, 1, ddummy, 1,
675 sing_max = rwork( 1 )
676 sing_min = rwork( 2 )
678 dtemp = sing_max / sing_min
682 dtemp = dtemp - const + thresh
683 IF( dtemp.GT.result( 4 ) )
684 $ result( 4 ) = dtemp
699 IF( result( k ).GE.thresh )
THEN
700 IF( nfail.EQ.0 .AND. nerrs.EQ.0 )
701 $
CALL alahd( nout, path )
702 WRITE( nout, fmt = 9999 )uplo, n, nb, imat, k,
734 CALL dlarhs( matpath, xtype, uplo,
' ', n, n,
735 $ kl, ku, nrhs, a, lda, xact, lda,
736 $ b, lda, iseed, info )
737 CALL dlacpy(
'Full', n, nrhs, b, lda, x, lda )
739 srnamt =
'DSYTRS_ROOK'
746 $
CALL alaerh( path,
'DSYTRS_ROOK', info, 0,
747 $ uplo, n, n, -1, -1, nrhs, imat,
748 $ nfail, nerrs, nout )
750 CALL dlacpy(
'Full', n, nrhs, b, lda, work, lda )
754 CALL dpot02( uplo, n, nrhs, a, lda, x, lda, work,
755 $ lda, rwork, result( 5 ) )
760 CALL dget04( n, nrhs, x, lda, xact, lda, rcondc,
767 IF( result( k ).GE.thresh )
THEN
768 IF( nfail.EQ.0 .AND. nerrs.EQ.0 )
769 $
CALL alahd( nout, path )
770 WRITE( nout, fmt = 9998 )uplo, n, nrhs,
771 $ imat, k, result( k )
785 anorm = dlansy(
'1', uplo, n, a, lda, rwork )
786 srnamt =
'DSYCON_ROOK'
787 CALL dsycon_rook( uplo, n, afac, lda, iwork, anorm,
788 $ rcond, work, iwork( n+1 ), info )
793 $
CALL alaerh( path,
'DSYCON_ROOK', info, 0,
794 $ uplo, n, n, -1, -1, -1, imat,
795 $ nfail, nerrs, nout )
799 result( 7 ) = dget06( rcond, rcondc )
804 IF( result( 7 ).GE.thresh )
THEN
805 IF( nfail.EQ.0 .AND. nerrs.EQ.0 )
806 $
CALL alahd( nout, path )
807 WRITE( nout, fmt = 9997 )uplo, n, imat, 7,
820 CALL alasum( path, nout, nfail, nrun, nerrs )
822 9999
FORMAT(
' UPLO = ''', a1,
''', N =', i5,
', NB =', i4,
', type ',
823 $ i2,
', test ', i2,
', ratio =', g12.5 )
824 9998
FORMAT(
' UPLO = ''', a1,
''', N =', i5,
', NRHS=', i3,
', type ',
825 $ i2,
', test(', i2,
') =', g12.5 )
826 9997
FORMAT(
' UPLO = ''', a1,
''', N =', i5,
',', 10x,
' type ', i2,
827 $
', test(', i2,
') =', g12.5 )
subroutine alasum(type, nout, nfail, nrun, nerrs)
ALASUM
subroutine dlarhs(path, xtype, uplo, trans, m, n, kl, ku, nrhs, a, lda, x, ldx, b, ldb, iseed, info)
DLARHS
subroutine xlaenv(ispec, nvalue)
XLAENV
subroutine alaerh(path, subnam, info, infoe, opts, m, n, kl, ku, n5, imat, nfail, nerrs, nout)
ALAERH
subroutine alahd(iounit, path)
ALAHD
subroutine dchksy_rook(dotype, nn, nval, nnb, nbval, nns, nsval, thresh, tsterr, nmax, a, afac, ainv, b, x, xact, work, rwork, iwork, nout)
DCHKSY_ROOK
subroutine derrsy(path, nunit)
DERRSY
subroutine dget04(n, nrhs, x, ldx, xact, ldxact, rcond, resid)
DGET04
subroutine dlatb4(path, imat, m, n, type, kl, ku, anorm, mode, cndnum, dist)
DLATB4
subroutine dlatms(m, n, dist, iseed, sym, d, mode, cond, dmax, kl, ku, pack, a, lda, work, info)
DLATMS
subroutine dpot02(uplo, n, nrhs, a, lda, x, ldx, b, ldb, rwork, resid)
DPOT02
subroutine dpot03(uplo, n, a, lda, ainv, ldainv, work, ldwork, rwork, rcond, resid)
DPOT03
subroutine dsyt01_rook(uplo, n, a, lda, afac, ldafac, ipiv, c, ldc, rwork, resid)
DSYT01_ROOK
subroutine dgesvd(jobu, jobvt, m, n, a, lda, s, u, ldu, vt, ldvt, work, lwork, info)
DGESVD computes the singular value decomposition (SVD) for GE matrices
subroutine dsycon_rook(uplo, n, a, lda, ipiv, anorm, rcond, work, iwork, info)
DSYCON_ROOK
subroutine dsytrf_rook(uplo, n, a, lda, ipiv, work, lwork, info)
DSYTRF_ROOK
subroutine dsytri_rook(uplo, n, a, lda, ipiv, work, info)
DSYTRI_ROOK
subroutine dsytrs_rook(uplo, n, nrhs, a, lda, ipiv, b, ldb, info)
DSYTRS_ROOK
subroutine dlacpy(uplo, m, n, a, lda, b, ldb)
DLACPY copies all or part of one two-dimensional array to another.