181 INTEGER nmax, nn, nnb, nns, nout
182 DOUBLE PRECISION thresh
186 INTEGER iwork( * ), nbval( * ), nsval( * ), nval( * )
187 DOUBLE PRECISION a( * ), afac( * ), ainv( * ), b( * ),
188 $ rwork( * ), work( * ), x( * ), xact( * )
194 DOUBLE PRECISION zero, one
195 parameter ( zero = 0.0d+0, one = 1.0d+0 )
196 DOUBLE PRECISION eight, sevten
197 parameter ( eight = 8.0d+0, sevten = 17.0d+0 )
199 parameter ( ntypes = 10 )
201 parameter ( ntests = 7 )
204 LOGICAL trfcon, zerot
205 CHARACTER dist,
TYPE, uplo, xtype
206 CHARACTER*3 path, matpath
207 INTEGER i, i1, i2, imat, in, inb, info, ioff, irhs,
208 $ iuplo, izero, j, k, kl, ku, lda, lwork, mode,
209 $ n, nb, nerrs, nfail, nimat, nrhs, nrun, nt
210 DOUBLE PRECISION alpha, anorm, cndnum, const, dtemp, sing_max,
211 $ sing_min, rcond, rcondc
215 INTEGER iseed( 4 ), iseedy( 4 )
216 DOUBLE PRECISION block( 2, 2 ), ddummy( 1 ), result( ntests )
229 INTRINSIC max, min, sqrt
237 COMMON / infoc / infot, nunit, ok, lerr
238 COMMON / srnamc / srnamt
241 DATA iseedy / 1988, 1989, 1990, 1991 /
242 DATA uplos /
'U',
'L' /
248 alpha = ( one+sqrt( sevten ) ) / eight
252 path( 1: 1 ) =
'Double precision'
257 matpath( 1: 1 ) =
'Double precision'
258 matpath( 2: 3 ) =
'SY'
264 iseed( i ) = iseedy( i )
270 $
CALL derrsy( path, nout )
292 DO 260 imat = 1, nimat
296 IF( .NOT.dotype( imat ) )
301 zerot = imat.GE.3 .AND. imat.LE.6
302 IF( zerot .AND. n.LT.imat-2 )
308 uplo = uplos( iuplo )
315 CALL dlatb4( matpath, imat, n, n,
TYPE, kl, ku, anorm,
316 $ mode, cndnum, dist )
321 CALL dlatms( n, n, dist, iseed,
TYPE, rwork, mode,
322 $ cndnum, anorm, kl, ku, uplo, a, lda, work,
328 CALL alaerh( path,
'DLATMS', info, 0, uplo, n, n, -1,
329 $ -1, -1, imat, nfail, nerrs, nout )
343 ELSE IF( imat.EQ.4 )
THEN
353 IF( iuplo.EQ.1 )
THEN
354 ioff = ( izero-1 )*lda
355 DO 20 i = 1, izero - 1
365 DO 40 i = 1, izero - 1
375 IF( iuplo.EQ.1 )
THEN
422 CALL dlacpy( uplo, n, n, a, lda, afac, lda )
429 lwork = max( 2, nb )*lda
430 srnamt =
'DSYTRF_ROOK'
440 IF( iwork( k ).LT.0 )
THEN
441 IF( iwork( k ).NE.-k )
THEN
445 ELSE IF( iwork( k ).NE.k )
THEN
454 $
CALL alaerh( path,
'DSYTRF_ROOK', info, k,
455 $ uplo, n, n, -1, -1, nb, imat,
456 $ nfail, nerrs, nout )
469 CALL dsyt01_rook( uplo, n, a, lda, afac, lda, iwork,
470 $ ainv, lda, rwork, result( 1 ) )
479 IF( inb.EQ.1 .AND. .NOT.trfcon )
THEN
480 CALL dlacpy( uplo, n, n, afac, lda, ainv, lda )
481 srnamt =
'DSYTRI_ROOK'
488 $
CALL alaerh( path,
'DSYTRI_ROOK', info, -1,
489 $ uplo, n, n, -1, -1, -1, imat,
490 $ nfail, nerrs, nout )
495 CALL dpot03( uplo, n, a, lda, ainv, lda, work, lda,
496 $ rwork, rcondc, result( 2 ) )
504 IF( result( k ).GE.thresh )
THEN
505 IF( nfail.EQ.0 .AND. nerrs.EQ.0 )
506 $
CALL alahd( nout, path )
507 WRITE( nout, fmt = 9999 )uplo, n, nb, imat, k,
520 const = one / ( one-alpha )
522 IF( iuplo.EQ.1 )
THEN
531 IF( iwork( k ).GT.zero )
THEN
536 dtemp =
dlange(
'M', k-1, 1,
537 $ afac( ( k-1 )*lda+1 ), lda, rwork )
543 dtemp =
dlange(
'M', k-2, 2,
544 $ afac( ( k-2 )*lda+1 ), lda, rwork )
551 dtemp = dtemp - const + thresh
552 IF( dtemp.GT.result( 3 ) )
553 $ result( 3 ) = dtemp
569 IF( iwork( k ).GT.zero )
THEN
574 dtemp =
dlange(
'M', n-k, 1,
575 $ afac( ( k-1 )*lda+k+1 ), lda, rwork )
581 dtemp =
dlange(
'M', n-k-1, 2,
582 $ afac( ( k-1 )*lda+k+2 ), lda, rwork )
589 dtemp = dtemp - const + thresh
590 IF( dtemp.GT.result( 3 ) )
591 $ result( 3 ) = dtemp
607 const = ( one+alpha ) / ( one-alpha )
608 CALL dlacpy( uplo, n, n, afac, lda, ainv, lda )
610 IF( iuplo.EQ.1 )
THEN
619 IF( iwork( k ).LT.zero )
THEN
625 block( 1, 1 ) = afac( ( k-2 )*lda+k-1 )
626 block( 1, 2 ) = afac( (k-1)*lda+k-1 )
627 block( 2, 1 ) = block( 1, 2 )
628 block( 2, 2 ) = afac( (k-1)*lda+k )
630 CALL dgesvd(
'N',
'N', 2, 2, block, 2, rwork,
631 $ ddummy, 1, ddummy, 1,
634 sing_max = rwork( 1 )
635 sing_min = rwork( 2 )
637 dtemp = sing_max / sing_min
641 dtemp = dtemp - const + thresh
642 IF( dtemp.GT.result( 4 ) )
643 $ result( 4 ) = dtemp
662 IF( iwork( k ).LT.zero )
THEN
668 block( 1, 1 ) = afac( ( k-1 )*lda+k )
669 block( 2, 1 ) = afac( ( k-1 )*lda+k+1 )
670 block( 1, 2 ) = block( 2, 1 )
671 block( 2, 2 ) = afac( k*lda+k+1 )
673 CALL dgesvd(
'N',
'N', 2, 2, block, 2, rwork,
674 $ ddummy, 1, ddummy, 1,
678 sing_max = rwork( 1 )
679 sing_min = rwork( 2 )
681 dtemp = sing_max / sing_min
685 dtemp = dtemp - const + thresh
686 IF( dtemp.GT.result( 4 ) )
687 $ result( 4 ) = dtemp
702 IF( result( k ).GE.thresh )
THEN
703 IF( nfail.EQ.0 .AND. nerrs.EQ.0 )
704 $
CALL alahd( nout, path )
705 WRITE( nout, fmt = 9999 )uplo, n, nb, imat, k,
737 CALL dlarhs( matpath, xtype, uplo,
' ', n, n,
738 $ kl, ku, nrhs, a, lda, xact, lda,
739 $ b, lda, iseed, info )
740 CALL dlacpy(
'Full', n, nrhs, b, lda, x, lda )
742 srnamt =
'DSYTRS_ROOK'
749 $
CALL alaerh( path,
'DSYTRS_ROOK', info, 0,
750 $ uplo, n, n, -1, -1, nrhs, imat,
751 $ nfail, nerrs, nout )
753 CALL dlacpy(
'Full', n, nrhs, b, lda, work, lda )
757 CALL dpot02( uplo, n, nrhs, a, lda, x, lda, work,
758 $ lda, rwork, result( 5 ) )
763 CALL dget04( n, nrhs, x, lda, xact, lda, rcondc,
770 IF( result( k ).GE.thresh )
THEN
771 IF( nfail.EQ.0 .AND. nerrs.EQ.0 )
772 $
CALL alahd( nout, path )
773 WRITE( nout, fmt = 9998 )uplo, n, nrhs,
774 $ imat, k, result( k )
788 anorm =
dlansy(
'1', uplo, n, a, lda, rwork )
789 srnamt =
'DSYCON_ROOK'
790 CALL dsycon_rook( uplo, n, afac, lda, iwork, anorm,
791 $ rcond, work, iwork( n+1 ), info )
796 $
CALL alaerh( path,
'DSYCON_ROOK', info, 0,
797 $ uplo, n, n, -1, -1, -1, imat,
798 $ nfail, nerrs, nout )
802 result( 7 ) =
dget06( rcond, rcondc )
807 IF( result( 7 ).GE.thresh )
THEN
808 IF( nfail.EQ.0 .AND. nerrs.EQ.0 )
809 $
CALL alahd( nout, path )
810 WRITE( nout, fmt = 9997 )uplo, n, imat, 7,
823 CALL alasum( path, nout, nfail, nrun, nerrs )
825 9999
FORMAT(
' UPLO = ''', a1,
''', N =', i5,
', NB =', i4,
', type ',
826 $ i2,
', test ', i2,
', ratio =', g12.5 )
827 9998
FORMAT(
' UPLO = ''', a1,
''', N =', i5,
', NRHS=', i3,
', type ',
828 $ i2,
', test(', i2,
') =', g12.5 )
829 9997
FORMAT(
' UPLO = ''', a1,
''', N =', i5,
',', 10x,
' type ', i2,
830 $
', test(', i2,
') =', g12.5 )
subroutine dlacpy(UPLO, M, N, A, LDA, B, LDB)
DLACPY copies all or part of one two-dimensional array to another.
subroutine dsyt01_rook(UPLO, N, A, LDA, AFAC, LDAFAC, IPIV, C, LDC, RWORK, RESID)
DSYT01_ROOK
subroutine alahd(IOUNIT, PATH)
ALAHD
double precision function dlansy(NORM, UPLO, N, A, LDA, WORK)
DLANSY returns the value of the 1-norm, or the Frobenius norm, or the infinity norm, or the element of largest absolute value of a real symmetric matrix.
subroutine dsytrs_rook(UPLO, N, NRHS, A, LDA, IPIV, B, LDB, INFO)
DSYTRS_ROOK
subroutine alaerh(PATH, SUBNAM, INFO, INFOE, OPTS, M, N, KL, KU, N5, IMAT, NFAIL, NERRS, NOUT)
ALAERH
subroutine dlarhs(PATH, XTYPE, UPLO, TRANS, M, N, KL, KU, NRHS, A, LDA, X, LDX, B, LDB, ISEED, INFO)
DLARHS
subroutine dsytri_rook(UPLO, N, A, LDA, IPIV, WORK, INFO)
DSYTRI_ROOK
subroutine xlaenv(ISPEC, NVALUE)
XLAENV
subroutine dsycon_rook(UPLO, N, A, LDA, IPIV, ANORM, RCOND, WORK, IWORK, INFO)
DSYCON_ROOK
double precision function dlange(NORM, M, N, A, LDA, WORK)
DLANGE returns the value of the 1-norm, Frobenius norm, infinity-norm, or the largest absolute value ...
subroutine dpot03(UPLO, N, A, LDA, AINV, LDAINV, WORK, LDWORK, RWORK, RCOND, RESID)
DPOT03
subroutine dlatb4(PATH, IMAT, M, N, TYPE, KL, KU, ANORM, MODE, CNDNUM, DIST)
DLATB4
subroutine dget04(N, NRHS, X, LDX, XACT, LDXACT, RCOND, RESID)
DGET04
subroutine derrsy(PATH, NUNIT)
DERRSY
double precision function dget06(RCOND, RCONDC)
DGET06
subroutine dlatms(M, N, DIST, ISEED, SYM, D, MODE, COND, DMAX, KL, KU, PACK, A, LDA, WORK, INFO)
DLATMS
subroutine dsytrf_rook(UPLO, N, A, LDA, IPIV, WORK, LWORK, INFO)
DSYTRF_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 dpot02(UPLO, N, NRHS, A, LDA, X, LDX, B, LDB, RWORK, RESID)
DPOT02
subroutine alasum(TYPE, NOUT, NFAIL, NRUN, NERRS)
ALASUM