154 SUBROUTINE schktp( DOTYPE, NN, NVAL, NNS, NSVAL, THRESH, TSTERR,
155 $ NMAX, AP, AINVP, B, X, XACT, WORK, RWORK,
164 INTEGER NMAX, NN, NNS, NOUT
169 INTEGER IWORK( * ), NSVAL( * ), NVAL( * )
170 REAL AINVP( * ), AP( * ), B( * ), RWORK( * ),
171 $ work( * ), x( * ), xact( * )
177 INTEGER NTYPE1, NTYPES
178 PARAMETER ( NTYPE1 = 10, ntypes = 18 )
180 parameter( ntests = 9 )
182 parameter( ntran = 3 )
184 parameter( one = 1.0e+0, zero = 0.0e+0 )
187 CHARACTER DIAG, NORM, TRANS, UPLO, XTYPE
189 INTEGER I, IDIAG, IMAT, IN, INFO, IRHS, ITRAN, IUPLO,
190 $ k, lap, lda, n, nerrs, nfail, nrhs, nrun
191 REAL AINVNM, ANORM, RCOND, RCONDC, RCONDI, RCONDO,
195 CHARACTER TRANSS( NTRAN ), UPLOS( 2 )
196 INTEGER ISEED( 4 ), ISEEDY( 4 )
197 REAL RESULT( NTESTS )
202 EXTERNAL lsame, slantp
213 INTEGER INFOT, IOUNIT
216 COMMON / infoc / infot, iounit, ok, lerr
217 COMMON / srnamc / srnamt
223 DATA iseedy / 1988, 1989, 1990, 1991 /
224 DATA uplos /
'U',
'L' / , transs /
'N',
'T',
'C' /
230 path( 1: 1 ) =
'Single precision'
236 iseed( i ) = iseedy( i )
242 $
CALL serrtr( path, nout )
251 lap = lda*( lda+1 ) / 2
254 DO 70 imat = 1, ntype1
258 IF( .NOT.dotype( imat ) )
265 uplo = uplos( iuplo )
270 CALL slattp( imat, uplo,
'No transpose', diag, iseed, n,
271 $ ap, x, work, info )
275 IF( lsame( diag,
'N' ) )
THEN
285 $
CALL scopy( lap, ap, 1, ainvp, 1 )
287 CALL stptri( uplo, diag, n, ainvp, info )
292 $
CALL alaerh( path,
'STPTRI', info, 0, uplo // diag, n,
293 $ n, -1, -1, -1, imat, nfail, nerrs, nout )
297 anorm = slantp(
'I', uplo, diag, n, ap, rwork )
298 ainvnm = slantp(
'I', uplo, diag, n, ainvp, rwork )
299 IF( anorm.LE.zero .OR. ainvnm.LE.zero )
THEN
302 rcondi = ( one / anorm ) / ainvnm
308 CALL stpt01( uplo, diag, n, ap, ainvp, rcondo, rwork,
313 IF( result( 1 ).GE.thresh )
THEN
314 IF( nfail.EQ.0 .AND. nerrs.EQ.0 )
315 $
CALL alahd( nout, path )
316 WRITE( nout, fmt = 9999 )uplo, diag, n, imat, 1,
326 DO 30 itran = 1, ntran
330 trans = transs( itran )
331 IF( itran.EQ.1 )
THEN
343 CALL slarhs( path, xtype, uplo, trans, n, n, 0,
344 $ idiag, nrhs, ap, lap, xact, lda, b,
347 CALL slacpy(
'Full', n, nrhs, b, lda, x, lda )
350 CALL stptrs( uplo, trans, diag, n, nrhs, ap, x,
356 $
CALL alaerh( path,
'STPTRS', info, 0,
357 $ uplo // trans // diag, n, n, -1,
358 $ -1, -1, imat, nfail, nerrs, nout )
360 CALL stpt02( uplo, trans, diag, n, nrhs, ap, x,
361 $ lda, b, lda, work, result( 2 ) )
366 CALL sget04( n, nrhs, x, lda, xact, lda, rcondc,
374 CALL stprfs( uplo, trans, diag, n, nrhs, ap, b,
375 $ lda, x, lda, rwork, rwork( nrhs+1 ),
376 $ work, iwork, info )
381 $
CALL alaerh( path,
'STPRFS', info, 0,
382 $ uplo // trans // diag, n, n, -1,
383 $ -1, nrhs, imat, nfail, nerrs,
386 CALL sget04( n, nrhs, x, lda, xact, lda, rcondc,
388 CALL stpt05( uplo, trans, diag, n, nrhs, ap, b,
389 $ lda, x, lda, xact, lda, rwork,
390 $ rwork( nrhs+1 ), result( 5 ) )
396 IF( result( k ).GE.thresh )
THEN
397 IF( nfail.EQ.0 .AND. nerrs.EQ.0 )
398 $
CALL alahd( nout, path )
399 WRITE( nout, fmt = 9998 )uplo, trans, diag,
400 $ n, nrhs, imat, k, result( k )
412 IF( itran.EQ.1 )
THEN
421 CALL stpcon( norm, uplo, diag, n, ap, rcond, work,
427 $
CALL alaerh( path,
'STPCON', info, 0,
428 $ norm // uplo // diag, n, n, -1, -1,
429 $ -1, imat, nfail, nerrs, nout )
431 CALL stpt06( rcond, rcondc, uplo, diag, n, ap, rwork,
436 IF( result( 7 ).GE.thresh )
THEN
437 IF( nfail.EQ.0 .AND. nerrs.EQ.0 )
438 $
CALL alahd( nout, path )
439 WRITE( nout, fmt = 9997 )
'STPCON', norm, uplo,
440 $ diag, n, imat, 7, result( 7 )
450 DO 100 imat = ntype1 + 1, ntypes
454 IF( .NOT.dotype( imat ) )
461 uplo = uplos( iuplo )
462 DO 80 itran = 1, ntran
466 trans = transs( itran )
471 CALL slattp( imat, uplo, trans, diag, iseed, n, ap, x,
478 CALL scopy( n, x, 1, b, 1 )
479 CALL slatps( uplo, trans, diag,
'N', n, ap, b, scale,
485 $
CALL alaerh( path,
'SLATPS', info, 0,
486 $ uplo // trans // diag //
'N', n, n,
487 $ -1, -1, -1, imat, nfail, nerrs, nout )
489 CALL stpt03( uplo, trans, diag, n, 1, ap, scale,
490 $ rwork, one, b, lda, x, lda, work,
496 CALL scopy( n, x, 1, b( n+1 ), 1 )
497 CALL slatps( uplo, trans, diag,
'Y', n, ap, b( n+1 ),
498 $ scale, rwork, info )
503 $
CALL alaerh( path,
'SLATPS', info, 0,
504 $ uplo // trans // diag //
'Y', n, n,
505 $ -1, -1, -1, imat, nfail, nerrs, nout )
507 CALL stpt03( uplo, trans, diag, n, 1, ap, scale,
508 $ rwork, one, b( n+1 ), lda, x, lda, work,
514 IF( result( 8 ).GE.thresh )
THEN
515 IF( nfail.EQ.0 .AND. nerrs.EQ.0 )
516 $
CALL alahd( nout, path )
517 WRITE( nout, fmt = 9996 )
'SLATPS', uplo, trans,
518 $ diag,
'N', n, imat, 8, result( 8 )
521 IF( result( 9 ).GE.thresh )
THEN
522 IF( nfail.EQ.0 .AND. nerrs.EQ.0 )
523 $
CALL alahd( nout, path )
524 WRITE( nout, fmt = 9996 )
'SLATPS', uplo, trans,
525 $ diag,
'Y', n, imat, 9, result( 9 )
536 CALL alasum( path, nout, nfail, nrun, nerrs )
538 9999
FORMAT(
' UPLO=''', a1,
''', DIAG=''', a1,
''', N=', i5,
539 $
', type ', i2,
', test(', i2,
')= ', g12.5 )
540 9998
FORMAT(
' UPLO=''', a1,
''', TRANS=''', a1,
''', DIAG=''', a1,
541 $
''', N=', i5,
''', NRHS=', i5,
', type ', i2,
', test(',
543 9997
FORMAT( 1x, a,
'( ''', a1,
''', ''', a1,
''', ''', a1,
''',',
544 $ i5,
', ... ), type ', i2,
', test(', i2,
')=', g12.5 )
545 9996
FORMAT( 1x, a,
'( ''', a1,
''', ''', a1,
''', ''', a1,
''', ''',
546 $ a1,
''',', i5,
', ... ), type ', i2,
', test(', i2,
')=',
subroutine alasum(type, nout, nfail, nrun, nerrs)
ALASUM
subroutine slarhs(path, xtype, uplo, trans, m, n, kl, ku, nrhs, a, lda, x, ldx, b, ldb, iseed, info)
SLARHS
subroutine alaerh(path, subnam, info, infoe, opts, m, n, kl, ku, n5, imat, nfail, nerrs, nout)
ALAERH
subroutine alahd(iounit, path)
ALAHD
subroutine scopy(n, sx, incx, sy, incy)
SCOPY
subroutine slacpy(uplo, m, n, a, lda, b, ldb)
SLACPY copies all or part of one two-dimensional array to another.
subroutine slatps(uplo, trans, diag, normin, n, ap, x, scale, cnorm, info)
SLATPS solves a triangular system of equations with the matrix held in packed storage.
subroutine stpcon(norm, uplo, diag, n, ap, rcond, work, iwork, info)
STPCON
subroutine stprfs(uplo, trans, diag, n, nrhs, ap, b, ldb, x, ldx, ferr, berr, work, iwork, info)
STPRFS
subroutine stptri(uplo, diag, n, ap, info)
STPTRI
subroutine stptrs(uplo, trans, diag, n, nrhs, ap, b, ldb, info)
STPTRS
subroutine schktp(dotype, nn, nval, nns, nsval, thresh, tsterr, nmax, ap, ainvp, b, x, xact, work, rwork, iwork, nout)
SCHKTP
subroutine serrtr(path, nunit)
SERRTR
subroutine sget04(n, nrhs, x, ldx, xact, ldxact, rcond, resid)
SGET04
subroutine slattp(imat, uplo, trans, diag, iseed, n, a, b, work, info)
SLATTP
subroutine stpt01(uplo, diag, n, ap, ainvp, rcond, work, resid)
STPT01
subroutine stpt02(uplo, trans, diag, n, nrhs, ap, x, ldx, b, ldb, work, resid)
STPT02
subroutine stpt03(uplo, trans, diag, n, nrhs, ap, scale, cnorm, tscal, x, ldx, b, ldb, work, resid)
STPT03
subroutine stpt05(uplo, trans, diag, n, nrhs, ap, b, ldb, x, ldx, xact, ldxact, ferr, berr, reslts)
STPT05
subroutine stpt06(rcond, rcondc, uplo, diag, n, ap, work, rat)
STPT06