162 SUBROUTINE dchksp( DOTYPE, NN, NVAL, NNS, NSVAL, THRESH, TSTERR,
163 $ nmax, a, afac, ainv, b, x, xact, work, rwork,
173 INTEGER nmax, nn, nns, nout
174 DOUBLE PRECISION thresh
178 INTEGER iwork( * ), nsval( * ), nval( * )
179 DOUBLE PRECISION a( * ), afac( * ), ainv( * ), b( * ),
180 $ rwork( * ), work( * ), x( * ), xact( * )
186 DOUBLE PRECISION zero
187 parameter( zero = 0.0d+0 )
189 parameter( ntypes = 10 )
191 parameter( ntests = 8 )
194 LOGICAL trfcon, zerot
195 CHARACTER dist, packit, type, uplo, xtype
197 INTEGER i, i1, i2, imat, in, info, ioff, irhs, iuplo,
198 $ izero, j, k, kl, ku, lda, mode, n, nerrs,
199 $ nfail, nimat, npp, nrhs, nrun, nt
200 DOUBLE PRECISION anorm, cndnum, rcond, rcondc
204 INTEGER iseed( 4 ), iseedy( 4 )
205 DOUBLE PRECISION result( ntests )
227 common / infoc / infot, nunit, ok, lerr
228 common / srnamc / srnamt
231 DATA iseedy / 1988, 1989, 1990, 1991 /
232 DATA uplos /
'U',
'L' /
238 path( 1: 1 ) =
'Double precision'
244 iseed( i ) = iseedy( i )
250 $ CALL
derrsy( path, nout )
264 DO 160 imat = 1, nimat
268 IF( .NOT.dotype( imat ) )
273 zerot = imat.GE.3 .AND. imat.LE.6
274 IF( zerot .AND. n.LT.imat-2 )
280 uplo = uplos( iuplo )
281 IF(
lsame( uplo,
'U' ) )
THEN
290 CALL
dlatb4( path, imat, n, n, type, kl, ku, anorm, mode,
294 CALL
dlatms( n, n, dist, iseed, type, rwork, mode,
295 $ cndnum, anorm, kl, ku, packit, a, lda, work,
301 CALL
alaerh( path,
'DLATMS', info, 0, uplo, n, n, -1,
302 $ -1, -1, imat, nfail, nerrs, nout )
312 ELSE IF( imat.EQ.4 )
THEN
322 IF( iuplo.EQ.1 )
THEN
323 ioff = ( izero-1 )*izero / 2
324 DO 20 i = 1, izero - 1
334 DO 40 i = 1, izero - 1
345 IF( iuplo.EQ.1 )
THEN
376 CALL
dcopy( npp, a, 1, afac, 1 )
378 CALL
dsptrf( uplo, n, afac, iwork, info )
386 IF( iwork( k ).LT.0 )
THEN
387 IF( iwork( k ).NE.-k )
THEN
391 ELSE IF( iwork( k ).NE.k )
THEN
400 $ CALL
alaerh( path,
'DSPTRF', info, k, uplo, n, n, -1,
401 $ -1, -1, imat, nfail, nerrs, nout )
411 CALL
dspt01( uplo, n, a, afac, iwork, ainv, lda, rwork,
418 IF( .NOT.trfcon )
THEN
419 CALL
dcopy( npp, afac, 1, ainv, 1 )
421 CALL
dsptri( uplo, n, ainv, iwork, work, info )
426 $ CALL
alaerh( path,
'DSPTRI', info, 0, uplo, n, n,
427 $ -1, -1, -1, imat, nfail, nerrs, nout )
429 CALL
dppt03( uplo, n, a, ainv, work, lda, rwork,
430 $ rcondc, result( 2 ) )
438 IF( result( k ).GE.thresh )
THEN
439 IF( nfail.EQ.0 .AND. nerrs.EQ.0 )
440 $ CALL
alahd( nout, path )
441 WRITE( nout, fmt = 9999 )uplo, n, imat, k,
462 CALL
dlarhs( path, xtype, uplo,
' ', n, n, kl, ku,
463 $ nrhs, a, lda, xact, lda, b, lda, iseed,
465 CALL
dlacpy(
'Full', n, nrhs, b, lda, x, lda )
468 CALL
dsptrs( uplo, n, nrhs, afac, iwork, x, lda,
474 $ CALL
alaerh( path,
'DSPTRS', info, 0, uplo, n, n,
475 $ -1, -1, nrhs, imat, nfail, nerrs,
478 CALL
dlacpy(
'Full', n, nrhs, b, lda, work, lda )
479 CALL
dppt02( uplo, n, nrhs, a, x, lda, work, lda,
480 $ rwork, result( 3 ) )
485 CALL
dget04( n, nrhs, x, lda, xact, lda, rcondc,
492 CALL
dsprfs( uplo, n, nrhs, a, afac, iwork, b, lda, x,
493 $ lda, rwork, rwork( nrhs+1 ), work,
494 $ iwork( n+1 ), info )
499 $ CALL
alaerh( path,
'DSPRFS', info, 0, uplo, n, n,
500 $ -1, -1, nrhs, imat, nfail, nerrs,
503 CALL
dget04( n, nrhs, x, lda, xact, lda, rcondc,
505 CALL
dppt05( uplo, n, nrhs, a, b, lda, x, lda, xact,
506 $ lda, rwork, rwork( nrhs+1 ),
513 IF( result( k ).GE.thresh )
THEN
514 IF( nfail.EQ.0 .AND. nerrs.EQ.0 )
515 $ CALL
alahd( nout, path )
516 WRITE( nout, fmt = 9998 )uplo, n, nrhs, imat,
528 anorm =
dlansp(
'1', uplo, n, a, rwork )
530 CALL
dspcon( uplo, n, afac, iwork, anorm, rcond, work,
531 $ iwork( n+1 ), info )
536 $ CALL
alaerh( path,
'DSPCON', info, 0, uplo, n, n, -1,
537 $ -1, -1, imat, nfail, nerrs, nout )
539 result( 8 ) =
dget06( rcond, rcondc )
543 IF( result( 8 ).GE.thresh )
THEN
544 IF( nfail.EQ.0 .AND. nerrs.EQ.0 )
545 $ CALL
alahd( nout, path )
546 WRITE( nout, fmt = 9999 )uplo, n, imat, 8,
557 CALL
alasum( path, nout, nfail, nrun, nerrs )
559 9999 format(
' UPLO = ''', a1,
''', N =', i5,
', type ', i2,
', test ',
560 $ i2,
', ratio =', g12.5 )
561 9998 format(
' UPLO = ''', a1,
''', N =', i5,
', NRHS=', i3,
', type ',
562 $ i2,
', test(', i2,
') =', g12.5 )