150 $ NMAX, A, AFAC, AINV, B, X, XACT, WORK,
151 $ RWORK, IWORK, NOUT )
159 INTEGER NMAX, NN, NOUT, NRHS
160 DOUBLE PRECISION THRESH
164 INTEGER IWORK( * ), NVAL( * )
165 DOUBLE PRECISION A( * ), AFAC( * ), AINV( * ), B( * ),
166 $ rwork( * ), work( * ), x( * ), xact( * )
172 DOUBLE PRECISION ONE, ZERO
173 PARAMETER ( ONE = 1.0d+0, zero = 0.0d+0 )
174 INTEGER NTYPES, NTESTS
175 parameter( ntypes = 10, ntests = 3 )
177 parameter( nfact = 2 )
181 CHARACTER DIST, FACT,
TYPE, UPLO, XTYPE
182 CHARACTER*3 PATH, MATPATH
183 INTEGER I, I1, I2, IFACT, IMAT, IN, INFO, IOFF, IUPLO,
184 $ izero, j, k, kl, ku, lda, lwork, mode, n,
185 $ nb, nbmin, nerrs, nfail, nimat, nrun, nt
186 DOUBLE PRECISION AINVNM, ANORM, CNDNUM, RCONDC
189 CHARACTER FACTS( NFACT ), UPLOS( 2 )
190 INTEGER ISEED( 4 ), ISEEDY( 4 )
191 DOUBLE PRECISION RESULT( NTESTS )
194 DOUBLE PRECISION DLANSY
210 COMMON / infoc / infot, nunit, ok, lerr
211 COMMON / srnamc / srnamt
217 DATA iseedy / 1988, 1989, 1990, 1991 /
218 DATA uplos /
'U',
'L' / , facts /
'F',
'N' /
226 path( 1: 1 ) =
'Double precision'
231 matpath( 1: 1 ) =
'Double precision'
232 matpath( 2: 3 ) =
'SY'
238 iseed( i ) = iseedy( i )
240 lwork = max( 2*nmax, nmax*nrhs )
245 $
CALL derrvx( path, nout )
266 DO 170 imat = 1, nimat
270 IF( .NOT.dotype( imat ) )
275 zerot = imat.GE.3 .AND. imat.LE.6
276 IF( zerot .AND. n.LT.imat-2 )
282 uplo = uplos( iuplo )
289 CALL dlatb4( matpath, imat, n, n,
TYPE, kl, ku, anorm,
290 $ mode, cndnum, dist )
295 CALL dlatms( n, n, dist, iseed,
TYPE, rwork, mode,
296 $ cndnum, anorm, kl, ku, uplo, a, lda, work,
302 CALL alaerh( path,
'DLATMS', info, 0, uplo, n, n, -1,
303 $ -1, -1, imat, nfail, nerrs, nout )
316 ELSE IF( imat.EQ.4 )
THEN
326 IF( iuplo.EQ.1 )
THEN
327 ioff = ( izero-1 )*lda
328 DO 20 i = 1, izero - 1
338 DO 40 i = 1, izero - 1
349 IF( iuplo.EQ.1 )
THEN
379 DO 150 ifact = 1, nfact
383 fact = facts( ifact )
393 ELSE IF( ifact.EQ.1 )
THEN
397 anorm = dlansy(
'1', uplo, n, a, lda, rwork )
401 CALL dlacpy( uplo, n, n, a, lda, afac, lda )
407 CALL dlacpy( uplo, n, n, afac, lda, ainv, lda )
408 lwork = (n+nb+1)*(nb+3)
411 ainvnm = dlansy(
'1', uplo, n, ainv, lda, rwork )
415 IF( anorm.LE.zero .OR. ainvnm.LE.zero )
THEN
418 rcondc = ( one / anorm ) / ainvnm
425 CALL dlarhs( matpath, xtype, uplo,
' ', n, n, kl, ku,
426 $ nrhs, a, lda, xact, lda, b, lda, iseed,
432 IF( ifact.EQ.2 )
THEN
433 CALL dlacpy( uplo, n, n, a, lda, afac, lda )
434 CALL dlacpy(
'Full', n, nrhs, b, lda, x, lda )
439 srnamt =
'DSYSV_ROOK'
440 CALL dsysv_rook( uplo, n, nrhs, afac, lda, iwork,
441 $ x, lda, work, lwork, info )
449 IF( iwork( k ).LT.0 )
THEN
450 IF( iwork( k ).NE.-k )
THEN
454 ELSE IF( iwork( k ).NE.k )
THEN
463 CALL alaerh( path,
'DSYSV_ROOK', info, k, uplo,
464 $ n, n, -1, -1, nrhs, imat, nfail,
467 ELSE IF( info.NE.0 )
THEN
475 $ iwork, ainv, lda, rwork,
480 CALL dlacpy(
'Full', n, nrhs, b, lda, work, lda )
481 CALL dpot02( uplo, n, nrhs, a, lda, x, lda, work,
482 $ lda, rwork, result( 2 ) )
487 CALL dget04( n, nrhs, x, lda, xact, lda, rcondc,
495 IF( result( k ).GE.thresh )
THEN
496 IF( nfail.EQ.0 .AND. nerrs.EQ.0 )
497 $
CALL aladhd( nout, path )
498 WRITE( nout, fmt = 9999 )
'DSYSV_ROOK', uplo,
499 $ n, imat, k, result( k )
515 CALL alasvm( path, nout, nfail, nrun, nerrs )
517 9999
FORMAT( 1x, a,
', UPLO=''', a1,
''', N =', i5,
', type ', i2,
518 $
', test ', i2,
', ratio =', g12.5 )