351 SUBROUTINE dchkbb( NSIZES, MVAL, NVAL, NWDTHS, KK, NTYPES, DOTYPE,
352 $ NRHS, ISEED, THRESH, NOUNIT, A, LDA, AB, LDAB,
353 $ BD, BE, Q, LDQ, P, LDP, C, LDC, CC, WORK,
354 $ LWORK, RESULT, INFO )
361 INTEGER INFO, LDA, LDAB, LDC, LDP, LDQ, LWORK, NOUNIT,
362 $ NRHS, NSIZES, NTYPES, NWDTHS
363 DOUBLE PRECISION THRESH
367 INTEGER ISEED( 4 ), KK( * ), MVAL( * ), NVAL( * )
368 DOUBLE PRECISION A( LDA, * ), AB( LDAB, * ), BD( * ), BE( * ),
369 $ c( ldc, * ), cc( ldc, * ), p( ldp, * ),
370 $ q( ldq, * ), result( * ), work( * )
376 DOUBLE PRECISION ZERO, ONE
377 PARAMETER ( ZERO = 0.0d0, one = 1.0d0 )
379 parameter( maxtyp = 15 )
382 LOGICAL BADMM, BADNN, BADNNB
383 INTEGER I, IINFO, IMODE, ITYPE, J, JCOL, JR, JSIZE,
384 $ JTYPE, JWIDTH, K, KL, KMAX, KU, M, MMAX, MNMAX,
385 $ mnmin, mtypes, n, nerrs, nmats, nmax, ntest,
387 DOUBLE PRECISION AMNINV, ANORM, COND, OVFL, RTOVFL, RTUNFL, ULP,
391 INTEGER IDUMMA( 1 ), IOLDSD( 4 ), KMAGN( MAXTYP ),
392 $ KMODE( MAXTYP ), KTYPE( MAXTYP )
395 DOUBLE PRECISION DLAMCH
403 INTRINSIC abs, dble, max, min, sqrt
406 DATA ktype / 1, 2, 5*4, 5*6, 3*9 /
407 DATA kmagn / 2*1, 3*1, 2, 3, 3*1, 2, 3, 1, 2, 3 /
408 DATA kmode / 2*0, 4, 3, 1, 4, 4, 4, 3, 1, 4, 4, 0,
426 mmax = max( mmax, mval( j ) )
429 nmax = max( nmax, nval( j ) )
432 mnmax = max( mnmax, min( mval( j ), nval( j ) ) )
438 kmax = max( kmax, kk( j ) )
445 IF( nsizes.LT.0 )
THEN
447 ELSE IF( badmm )
THEN
449 ELSE IF( badnn )
THEN
451 ELSE IF( nwdths.LT.0 )
THEN
453 ELSE IF( badnnb )
THEN
455 ELSE IF( ntypes.LT.0 )
THEN
457 ELSE IF( nrhs.LT.0 )
THEN
459 ELSE IF( lda.LT.nmax )
THEN
461 ELSE IF( ldab.LT.2*kmax+1 )
THEN
463 ELSE IF( ldq.LT.nmax )
THEN
465 ELSE IF( ldp.LT.nmax )
THEN
467 ELSE IF( ldc.LT.nmax )
THEN
469 ELSE IF( ( max( lda, nmax )+1 )*nmax.GT.lwork )
THEN
474 CALL xerbla(
'DCHKBB', -info )
480 IF( nsizes.EQ.0 .OR. ntypes.EQ.0 .OR. nwdths.EQ.0 )
485 unfl = dlamch(
'Safe minimum' )
487 ulp = dlamch(
'Epsilon' )*dlamch(
'Base' )
489 rtunfl = sqrt( unfl )
490 rtovfl = sqrt( ovfl )
497 DO 160 jsize = 1, nsizes
501 amninv = one / dble( max( 1, m, n ) )
503 DO 150 jwidth = 1, nwdths
505 IF( k.GE.m .AND. k.GE.n )
507 kl = max( 0, min( m-1, k ) )
508 ku = max( 0, min( n-1, k ) )
510 IF( nsizes.NE.1 )
THEN
511 mtypes = min( maxtyp, ntypes )
513 mtypes = min( maxtyp+1, ntypes )
516 DO 140 jtype = 1, mtypes
517 IF( .NOT.dotype( jtype ) )
523 ioldsd( j ) = iseed( j )
541 IF( mtypes.GT.maxtyp )
544 itype = ktype( jtype )
545 imode = kmode( jtype )
549 GO TO ( 40, 50, 60 )kmagn( jtype )
556 anorm = ( rtovfl*ulp )*amninv
560 anorm = rtunfl*max( m, n )*ulpinv
565 CALL dlaset(
'Full', lda, n, zero, zero, a, lda )
566 CALL dlaset(
'Full', ldab, n, zero, zero, ab, ldab )
574 IF( itype.EQ.1 )
THEN
577 ELSE IF( itype.EQ.2 )
THEN
582 a( jcol, jcol ) = anorm
585 ELSE IF( itype.EQ.4 )
THEN
589 CALL dlatms( m, n,
'S', iseed,
'N', work, imode, cond,
590 $ anorm, 0, 0,
'N', a, lda, work( m+1 ),
593 ELSE IF( itype.EQ.6 )
THEN
597 CALL dlatms( m, n,
'S', iseed,
'N', work, imode, cond,
598 $ anorm, kl, ku,
'N', a, lda, work( m+1 ),
601 ELSE IF( itype.EQ.9 )
THEN
605 CALL dlatmr( m, n,
'S', iseed,
'N', work, 6, one, one,
606 $
'T',
'N', work( n+1 ), 1, one,
607 $ work( 2*n+1 ), 1, one,
'N', idumma, kl,
608 $ ku, zero, anorm,
'N', a, lda, idumma,
618 CALL dlatmr( m, nrhs,
'S', iseed,
'N', work, 6, one, one,
619 $
'T',
'N', work( m+1 ), 1, one,
620 $ work( 2*m+1 ), 1, one,
'N', idumma, m, nrhs,
621 $ zero, one,
'NO', c, ldc, idumma, iinfo )
623 IF( iinfo.NE.0 )
THEN
624 WRITE( nounit, fmt = 9999 )
'Generator', iinfo, n,
635 DO 100 i = max( 1, j-ku ), min( m, j+kl )
636 ab( ku+1+i-j, j ) = a( i, j )
642 CALL dlacpy(
'Full', m, nrhs, c, ldc, cc, ldc )
646 CALL dgbbrd(
'B', m, n, nrhs, kl, ku, ab, ldab, bd, be,
647 $ q, ldq, p, ldp, cc, ldc, work, iinfo )
649 IF( iinfo.NE.0 )
THEN
650 WRITE( nounit, fmt = 9999 )
'DGBBRD', iinfo, n, jtype,
653 IF( iinfo.LT.0 )
THEN
666 CALL dbdt01( m, n, -1, a, lda, q, ldq, bd, be, p, ldp,
667 $ work, result( 1 ) )
668 CALL dort01(
'Columns', m, m, q, ldq, work, lwork,
670 CALL dort01(
'Rows', n, n, p, ldp, work, lwork,
672 CALL dbdt02( m, nrhs, c, ldc, cc, ldc, q, ldq, work,
679 ntestt = ntestt + ntest
684 IF( result( jr ).GE.thresh )
THEN
686 $
CALL dlahd2( nounit,
'DBB' )
688 WRITE( nounit, fmt = 9998 )m, n, k, ioldsd, jtype,
699 CALL dlasum(
'DBB', nounit, nerrs, ntestt )
702 9999
FORMAT(
' DCHKBB: ', a,
' returned INFO=', i5,
'.', / 9x,
'M=',
703 $ i5,
' N=', i5,
' K=', i5,
', JTYPE=', i5,
', ISEED=(',
704 $ 3( i5,
',' ), i5,
')' )
705 9998
FORMAT(
' M =', i4,
' N=', i4,
', K=', i3,
', seed=',
706 $ 4( i4,
',' ),
' type ', i2,
', test(', i2,
')=', g10.3 )
subroutine xerbla(srname, info)
subroutine dbdt01(m, n, kd, a, lda, q, ldq, d, e, pt, ldpt, work, resid)
DBDT01
subroutine dbdt02(m, n, b, ldb, c, ldc, u, ldu, work, resid)
DBDT02
subroutine dchkbb(nsizes, mval, nval, nwdths, kk, ntypes, dotype, nrhs, iseed, thresh, nounit, a, lda, ab, ldab, bd, be, q, ldq, p, ldp, c, ldc, cc, work, lwork, result, info)
DCHKBB
subroutine dlahd2(iounit, path)
DLAHD2
subroutine dlasum(type, iounit, ie, nrun)
DLASUM
subroutine dlatmr(m, n, dist, iseed, sym, d, mode, cond, dmax, rsign, grade, dl, model, condl, dr, moder, condr, pivtng, ipivot, kl, ku, sparse, anorm, pack, a, lda, iwork, info)
DLATMR
subroutine dlatms(m, n, dist, iseed, sym, d, mode, cond, dmax, kl, ku, pack, a, lda, work, info)
DLATMS
subroutine dort01(rowcol, m, n, u, ldu, work, lwork, resid)
DORT01
subroutine dgbbrd(vect, m, n, ncc, kl, ku, ab, ldab, d, e, q, ldq, pt, ldpt, c, ldc, work, info)
DGBBRD
subroutine dlacpy(uplo, m, n, a, lda, b, ldb)
DLACPY copies all or part of one two-dimensional array to another.
subroutine dlaset(uplo, m, n, alpha, beta, a, lda)
DLASET initializes the off-diagonal elements and the diagonal elements of a matrix to given values.