1 SUBROUTINE dchkpo( DOTYPE, NN, NVAL, NNB, NBVAL, NNS, NSVAL,
2 $ thresh, tsterr, nmax, a, afac, ainv, b, x,
3 $ xact, work, rwork, iwork, nout )
14 INTEGER nmax, nn, nnb, nns, nout
15 DOUBLE PRECISION thresh
19 INTEGER iwork( * ), nbval( * ), nsval( * ), nval( * )
20 DOUBLE PRECISION a( * ), afac( * ), ainv( * ), b( * ),
21 $ rwork( * ), work( * ), x( * ), xact( * )
95 parameter( zero = 0.0d+0 )
97 parameter( ntypes = 9 )
99 parameter( ntests = 8 )
103 CHARACTER dist, type,
uplo, xtype
105 INTEGER i, imat, in, inb, info, ioff, irhs, iuplo,
106 $ izero, k, kl, ku, lda, mode, n, nb, nerrs,
107 $ nfail, nimat, nrhs, nrun
109 DOUBLE PRECISION anorm, cndnum, rcond, rcondc
113 INTEGER plasma_uplos( 2 )
114 INTEGER iseed( 4 ), iseedy( 4 )
115 DOUBLE PRECISION result( ntests )
118 DOUBLE PRECISION dget06, dlansy
133 common / infoc / infot, nunit, ok, lerr
134 common / srnamc / srnamt
140 DATA iseedy / 1988, 1989, 1990, 1991 /
141 DATA uplos /
'U',
'L' /
142 DATA plasma_uplos / plasmaupper, plasmalower /
148 path( 1: 1 ) =
'Double precision'
154 iseed( i ) = iseedy( i )
160 $ CALL
derrpo( path, nout )
175 DO 110 imat = 1, nimat
179 IF( .NOT.dotype( imat ) )
184 zerot = imat.GE.3 .AND. imat.LE.5
185 IF( zerot .AND. n.LT.imat-2 )
191 uplo = uplos( iuplo )
192 plasma_uplo = plasma_uplos( iuplo )
197 CALL
dlatb4( path, imat, n, n, type, kl, ku, anorm, mode,
201 CALL
dlatms( n, n, dist, iseed, type, rwork, mode,
202 $ cndnum, anorm, kl, ku,
uplo, a, lda, work,
208 CALL
alaerh( path,
'DLATMS', info, 0,
uplo, n, n, -1,
209 $ -1, -1, imat, nfail, nerrs, nout )
219 ELSE IF( imat.EQ.4 )
THEN
224 ioff = ( izero-1 )*lda
228 IF( iuplo.EQ.1 )
THEN
229 DO 20 i = 1, izero - 1
239 DO 40 i = 1, izero - 1
257 IF ( (n / 25) .GT. nb )
THEN
264 CALL dlacpy(
uplo, n, n, a, lda, afac, lda )
270 IF( info.NE.izero )
THEN
271 CALL
alaerh( path,
'DPOTRF', info, izero,
uplo, n,
272 $ n, -1, -1, nb, imat, nfail, nerrs,
285 CALL dlacpy(
uplo, n, n, afac, lda, ainv, lda )
286 CALL
dpot01(
uplo, n, a, lda, ainv, lda, rwork,
292 CALL dlacpy(
uplo, n, n, afac, lda, ainv, lda )
300 $ CALL
alaerh( path,
'DPOTRI', info, 0,
uplo, n, n,
301 $ -1, -1, -1, imat, nfail, nerrs, nout )
303 CALL
dpot03(
uplo, n, a, lda, ainv, lda, work, lda,
304 $ rwork, rcondc, result( 2 ) )
310 IF( result( k ).GE.thresh )
THEN
311 IF( nfail.EQ.0 .AND. nerrs.EQ.0 )
312 $ CALL
alahd( nout, path )
313 WRITE( nout, fmt = 9999 )
uplo, n, nb, imat, k,
333 CALL
dlarhs( path, xtype,
uplo,
' ', n, n, kl, ku,
334 $ nrhs, a, lda, xact, lda, b, lda,
336 CALL dlacpy(
'Full', n, nrhs, b, lda, x, lda )
340 $ lda, x, lda, info )
346 $ CALL
alaerh( path,
'DPOTRS', info, 0,
uplo, n,
347 $ n, -1, -1, nrhs, imat, nfail,
350 CALL dlacpy(
'Full', n, nrhs, b, lda, work, lda )
351 CALL
dpot02(
uplo, n, nrhs, a, lda, x, lda, work,
352 $ lda, rwork, result( 3 ) )
356 CALL
dget04( n, nrhs, x, lda, xact, lda, rcondc,
364 $ afac, lda, b, lda, x, lda,
365 $ rwork, rwork( nrhs+1 ), work, iwork,
371 $ CALL
alaerh( path,
'DPORFS', info, 0,
uplo, n,
372 $ n, -1, -1, nrhs, imat, nfail,
375 CALL
dget04( n, nrhs, x, lda, xact, lda, rcondc,
377 CALL
dpot05(
uplo, n, nrhs, a, lda, b, lda, x, lda,
378 $ xact, lda, rwork, rwork( nrhs+1 ),
385 IF( result( k ).GE.thresh )
THEN
386 IF( nfail.EQ.0 .AND. nerrs.EQ.0 )
387 $ CALL
alahd( nout, path )
388 WRITE( nout, fmt = 9998 )
uplo, n, nrhs,
389 $ imat, k, result( k )
399 anorm = dlansy(
'1',
uplo, n, a, lda, rwork )
401 CALL
dpocon(
uplo, n, afac, lda, anorm, rcond, work,
407 $ CALL
alaerh( path,
'DPOCON', info, 0,
uplo, n, n,
408 $ -1, -1, -1, imat, nfail, nerrs, nout )
410 result( 8 ) =
dget06( rcond, rcondc )
414 IF( result( 8 ).GE.thresh )
THEN
415 IF( nfail.EQ.0 .AND. nerrs.EQ.0 )
416 $ CALL
alahd( nout, path )
417 WRITE( nout, fmt = 9997 )
uplo, n, imat, 8,
429 CALL
alasum( path, nout, nfail, nrun, nerrs )
431 9999
format(
' UPLO = ''', a1,
''', N =', i5,
', NB =', i4,
', type ',
432 $ i2,
', test ', i2,
', ratio =', g12.5 )
433 9998
format(
' UPLO = ''', a1,
''', N =', i5,
', NRHS=', i3,
', type ',
434 $ i2,
', test(', i2,
') =', g12.5 )
435 9997
format(
' UPLO = ''', a1,
''', N =', i5,
',', 10x,
' type ', i2,
436 $
', test(', i2,
') =', g12.5 )