357 SUBROUTINE zchkbb( NSIZES, MVAL, NVAL, NWDTHS, KK, NTYPES, DOTYPE,
358 $ NRHS, ISEED, THRESH, NOUNIT, A, LDA, AB, LDAB,
359 $ BD, BE, Q, LDQ, P, LDP, C, LDC, CC, WORK,
360 $ LWORK, RWORK, RESULT, INFO )
367 INTEGER INFO, LDA, LDAB, LDC, LDP, LDQ, LWORK, NOUNIT,
368 $ NRHS, NSIZES, NTYPES, NWDTHS
369 DOUBLE PRECISION THRESH
373 INTEGER ISEED( 4 ), KK( * ), MVAL( * ), NVAL( * )
374 DOUBLE PRECISION BD( * ), BE( * ), RESULT( * ), RWORK( * )
375 COMPLEX*16 A( LDA, * ), AB( LDAB, * ), C( LDC, * ),
376 $ cc( ldc, * ), p( ldp, * ), q( ldq, * ),
383 COMPLEX*16 CZERO, CONE
384 PARAMETER ( CZERO = ( 0.0d+0, 0.0d+0 ),
385 $ cone = ( 1.0d+0, 0.0d+0 ) )
386 DOUBLE PRECISION ZERO, ONE
387 parameter( zero = 0.0d+0, one = 1.0d+0 )
389 parameter( maxtyp = 15 )
392 LOGICAL BADMM, BADNN, BADNNB
393 INTEGER I, IINFO, IMODE, ITYPE, J, JCOL, JR, JSIZE,
394 $ JTYPE, JWIDTH, K, KL, KMAX, KU, M, MMAX, MNMAX,
395 $ mnmin, mtypes, n, nerrs, nmats, nmax, ntest,
397 DOUBLE PRECISION AMNINV, ANORM, COND, OVFL, RTOVFL, RTUNFL, ULP,
401 INTEGER IDUMMA( 1 ), IOLDSD( 4 ), KMAGN( MAXTYP ),
402 $ KMODE( MAXTYP ), KTYPE( MAXTYP )
405 DOUBLE PRECISION DLAMCH
413 INTRINSIC abs, dble, max, min, sqrt
416 DATA ktype / 1, 2, 5*4, 5*6, 3*9 /
417 DATA kmagn / 2*1, 3*1, 2, 3, 3*1, 2, 3, 1, 2, 3 /
418 DATA kmode / 2*0, 4, 3, 1, 4, 4, 4, 3, 1, 4, 4, 0,
436 mmax = max( mmax, mval( j ) )
439 nmax = max( nmax, nval( j ) )
442 mnmax = max( mnmax, min( mval( j ), nval( j ) ) )
448 kmax = max( kmax, kk( j ) )
455 IF( nsizes.LT.0 )
THEN
457 ELSE IF( badmm )
THEN
459 ELSE IF( badnn )
THEN
461 ELSE IF( nwdths.LT.0 )
THEN
463 ELSE IF( badnnb )
THEN
465 ELSE IF( ntypes.LT.0 )
THEN
467 ELSE IF( nrhs.LT.0 )
THEN
469 ELSE IF( lda.LT.nmax )
THEN
471 ELSE IF( ldab.LT.2*kmax+1 )
THEN
473 ELSE IF( ldq.LT.nmax )
THEN
475 ELSE IF( ldp.LT.nmax )
THEN
477 ELSE IF( ldc.LT.nmax )
THEN
479 ELSE IF( ( max( lda, nmax )+1 )*nmax.GT.lwork )
THEN
484 CALL xerbla(
'ZCHKBB', -info )
490 IF( nsizes.EQ.0 .OR. ntypes.EQ.0 .OR. nwdths.EQ.0 )
495 unfl = dlamch(
'Safe minimum' )
497 ulp = dlamch(
'Epsilon' )*dlamch(
'Base' )
499 rtunfl = sqrt( unfl )
500 rtovfl = sqrt( ovfl )
507 DO 160 jsize = 1, nsizes
511 amninv = one / dble( max( 1, m, n ) )
513 DO 150 jwidth = 1, nwdths
515 IF( k.GE.m .AND. k.GE.n )
517 kl = max( 0, min( m-1, k ) )
518 ku = max( 0, min( n-1, k ) )
520 IF( nsizes.NE.1 )
THEN
521 mtypes = min( maxtyp, ntypes )
523 mtypes = min( maxtyp+1, ntypes )
526 DO 140 jtype = 1, mtypes
527 IF( .NOT.dotype( jtype ) )
533 ioldsd( j ) = iseed( j )
551 IF( mtypes.GT.maxtyp )
554 itype = ktype( jtype )
555 imode = kmode( jtype )
559 GO TO ( 40, 50, 60 )kmagn( jtype )
566 anorm = ( rtovfl*ulp )*amninv
570 anorm = rtunfl*max( m, n )*ulpinv
575 CALL zlaset(
'Full', lda, n, czero, czero, a, lda )
576 CALL zlaset(
'Full', ldab, n, czero, czero, ab, ldab )
584 IF( itype.EQ.1 )
THEN
587 ELSE IF( itype.EQ.2 )
THEN
592 a( jcol, jcol ) = anorm
595 ELSE IF( itype.EQ.4 )
THEN
599 CALL zlatms( m, n,
'S', iseed,
'N', rwork, imode,
600 $ cond, anorm, 0, 0,
'N', a, lda, work,
603 ELSE IF( itype.EQ.6 )
THEN
607 CALL zlatms( m, n,
'S', iseed,
'N', rwork, imode,
608 $ cond, anorm, kl, ku,
'N', a, lda, work,
611 ELSE IF( itype.EQ.9 )
THEN
615 CALL zlatmr( m, n,
'S', iseed,
'N', work, 6, one,
616 $ cone,
'T',
'N', work( n+1 ), 1, one,
617 $ work( 2*n+1 ), 1, one,
'N', idumma, kl,
618 $ ku, zero, anorm,
'N', a, lda, idumma,
628 CALL zlatmr( m, nrhs,
'S', iseed,
'N', work, 6, one,
629 $ cone,
'T',
'N', work( m+1 ), 1, one,
630 $ work( 2*m+1 ), 1, one,
'N', idumma, m, nrhs,
631 $ zero, one,
'NO', c, ldc, idumma, iinfo )
633 IF( iinfo.NE.0 )
THEN
634 WRITE( nounit, fmt = 9999 )
'Generator', iinfo, n,
645 DO 100 i = max( 1, j-ku ), min( m, j+kl )
646 ab( ku+1+i-j, j ) = a( i, j )
652 CALL zlacpy(
'Full', m, nrhs, c, ldc, cc, ldc )
656 CALL zgbbrd(
'B', m, n, nrhs, kl, ku, ab, ldab, bd, be,
657 $ q, ldq, p, ldp, cc, ldc, work, rwork,
660 IF( iinfo.NE.0 )
THEN
661 WRITE( nounit, fmt = 9999 )
'ZGBBRD', iinfo, n, jtype,
664 IF( iinfo.LT.0 )
THEN
677 CALL zbdt01( m, n, -1, a, lda, q, ldq, bd, be, p, ldp,
678 $ work, rwork, result( 1 ) )
679 CALL zunt01(
'Columns', m, m, q, ldq, work, lwork, rwork,
681 CALL zunt01(
'Rows', n, n, p, ldp, work, lwork, rwork,
683 CALL zbdt02( m, nrhs, c, ldc, cc, ldc, q, ldq, work,
684 $ rwork, result( 4 ) )
690 ntestt = ntestt + ntest
695 IF( result( jr ).GE.thresh )
THEN
697 $
CALL dlahd2( nounit,
'ZBB' )
699 WRITE( nounit, fmt = 9998 )m, n, k, ioldsd, jtype,
710 CALL dlasum(
'ZBB', nounit, nerrs, ntestt )
713 9999
FORMAT(
' ZCHKBB: ', a,
' returned INFO=', i5,
'.', / 9x,
'M=',
714 $ i5,
' N=', i5,
' K=', i5,
', JTYPE=', i5,
', ISEED=(',
715 $ 3( i5,
',' ), i5,
')' )
716 9998
FORMAT(
' M =', i4,
' N=', i4,
', K=', i3,
', seed=',
717 $ 4( i4,
',' ),
' type ', i2,
', test(', i2,
')=', g10.3 )
subroutine xerbla(srname, info)
subroutine dlahd2(iounit, path)
DLAHD2
subroutine dlasum(type, iounit, ie, nrun)
DLASUM
subroutine zgbbrd(vect, m, n, ncc, kl, ku, ab, ldab, d, e, q, ldq, pt, ldpt, c, ldc, work, rwork, info)
ZGBBRD
subroutine zlacpy(uplo, m, n, a, lda, b, ldb)
ZLACPY copies all or part of one two-dimensional array to another.
subroutine zlaset(uplo, m, n, alpha, beta, a, lda)
ZLASET initializes the off-diagonal elements and the diagonal elements of a matrix to given values.
subroutine zbdt01(m, n, kd, a, lda, q, ldq, d, e, pt, ldpt, work, rwork, resid)
ZBDT01
subroutine zbdt02(m, n, b, ldb, c, ldc, u, ldu, work, rwork, resid)
ZBDT02
subroutine zchkbb(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, rwork, result, info)
ZCHKBB
subroutine zlatmr(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)
ZLATMR
subroutine zlatms(m, n, dist, iseed, sym, d, mode, cond, dmax, kl, ku, pack, a, lda, work, info)
ZLATMS
subroutine zunt01(rowcol, m, n, u, ldu, work, lwork, rwork, resid)
ZUNT01