334 SUBROUTINE zdrvst( NSIZES, NN, NTYPES, DOTYPE, ISEED, THRESH,
335 $ NOUNIT, A, LDA, D1, D2, D3, WA1, WA2, WA3, U,
336 $ LDU, V, TAU, Z, WORK, LWORK, RWORK, LRWORK,
337 $ IWORK, LIWORK, RESULT, INFO )
344 INTEGER INFO, LDA, LDU, LIWORK, LRWORK, LWORK, NOUNIT,
346 DOUBLE PRECISION THRESH
350 INTEGER ISEED( 4 ), IWORK( * ), NN( * )
351 DOUBLE PRECISION D1( * ), D2( * ), D3( * ), RESULT( * ),
352 $ rwork( * ), wa1( * ), wa2( * ), wa3( * )
353 COMPLEX*16 A( LDA, * ), TAU( * ), U( LDU, * ),
354 $ v( ldu, * ), work( * ), z( ldu, * )
361 DOUBLE PRECISION ZERO, ONE, TWO, TEN
362 PARAMETER ( ZERO = 0.0d+0, one = 1.0d+0, two = 2.0d+0,
364 DOUBLE PRECISION HALF
365 parameter( half = one / two )
366 COMPLEX*16 CZERO, CONE
367 parameter( czero = ( 0.0d+0, 0.0d+0 ),
368 $ cone = ( 1.0d+0, 0.0d+0 ) )
370 parameter( maxtyp = 18 )
375 INTEGER I, IDIAG, IHBW, IINFO, IL, IMODE, INDWRK, INDX,
376 $ irow, itemp, itype, iu, iuplo, j, j1, j2, jcol,
377 $ jsize, jtype, kd, lgn, liwedc, lrwedc, lwedc,
378 $ m, m2, m3, mtypes, n, nerrs, nmats, nmax,
380 DOUBLE PRECISION ABSTOL, ANINV, ANORM, COND, OVFL, RTOVFL,
381 $ RTUNFL, TEMP1, TEMP2, TEMP3, ULP, ULPINV, UNFL,
385 INTEGER IDUMMA( 1 ), IOLDSD( 4 ), ISEED2( 4 ),
386 $ ISEED3( 4 ), KMAGN( MAXTYP ), KMODE( MAXTYP ),
390 DOUBLE PRECISION DLAMCH, DLARND, DSXT1
391 EXTERNAL DLAMCH, DLARND, DSXT1
400 INTRINSIC abs, dble, int, log, max, min, sqrt
403 DATA ktype / 1, 2, 5*4, 5*5, 3*8, 3*9 /
404 DATA kmagn / 2*1, 1, 1, 1, 2, 3, 1, 1, 1, 2, 3, 1,
406 DATA kmode / 2*0, 4, 3, 1, 4, 4, 4, 3, 1, 4, 4, 0,
419 nmax = max( nmax, nn( j ) )
426 IF( nsizes.LT.0 )
THEN
428 ELSE IF( badnn )
THEN
430 ELSE IF( ntypes.LT.0 )
THEN
432 ELSE IF( lda.LT.nmax )
THEN
434 ELSE IF( ldu.LT.nmax )
THEN
436 ELSE IF( 2*max( 2, nmax )**2.GT.lwork )
THEN
441 CALL xerbla(
'ZDRVST', -info )
447 IF( nsizes.EQ.0 .OR. ntypes.EQ.0 )
452 unfl = dlamch(
'Safe minimum' )
453 ovfl = dlamch(
'Overflow' )
454 ulp = dlamch(
'Epsilon' )*dlamch(
'Base' )
456 rtunfl = sqrt( unfl )
457 rtovfl = sqrt( ovfl )
462 iseed2( i ) = iseed( i )
463 iseed3( i ) = iseed( i )
469 DO 1220 jsize = 1, nsizes
472 lgn = int( log( dble( n ) ) / log( two ) )
477 lwedc = max( 2*n+n*n, 2*n*n )
478 lrwedc = 1 + 4*n + 2*n*lgn + 3*n**2
485 aninv = one / dble( max( 1, n ) )
487 IF( nsizes.NE.1 )
THEN
488 mtypes = min( maxtyp, ntypes )
490 mtypes = min( maxtyp+1, ntypes )
493 DO 1210 jtype = 1, mtypes
494 IF( .NOT.dotype( jtype ) )
500 ioldsd( j ) = iseed( j )
518 IF( mtypes.GT.maxtyp )
521 itype = ktype( jtype )
522 imode = kmode( jtype )
526 GO TO ( 40, 50, 60 )kmagn( jtype )
533 anorm = ( rtovfl*ulp )*aninv
537 anorm = rtunfl*n*ulpinv
542 CALL zlaset(
'Full', lda, n, czero, czero, a, lda )
550 IF( itype.EQ.1 )
THEN
553 ELSE IF( itype.EQ.2 )
THEN
558 a( jcol, jcol ) = anorm
561 ELSE IF( itype.EQ.4 )
THEN
565 CALL zlatms( n, n,
'S', iseed,
'H', rwork, imode, cond,
566 $ anorm, 0, 0,
'N', a, lda, work, iinfo )
568 ELSE IF( itype.EQ.5 )
THEN
572 CALL zlatms( n, n,
'S', iseed,
'H', rwork, imode, cond,
573 $ anorm, n, n,
'N', a, lda, work, iinfo )
575 ELSE IF( itype.EQ.7 )
THEN
579 CALL zlatmr( n, n,
'S', iseed,
'H', work, 6, one, cone,
580 $
'T',
'N', work( n+1 ), 1, one,
581 $ work( 2*n+1 ), 1, one,
'N', idumma, 0, 0,
582 $ zero, anorm,
'NO', a, lda, iwork, iinfo )
584 ELSE IF( itype.EQ.8 )
THEN
588 CALL zlatmr( n, n,
'S', iseed,
'H', work, 6, one, cone,
589 $
'T',
'N', work( n+1 ), 1, one,
590 $ work( 2*n+1 ), 1, one,
'N', idumma, n, n,
591 $ zero, anorm,
'NO', a, lda, iwork, iinfo )
593 ELSE IF( itype.EQ.9 )
THEN
597 ihbw = int( ( n-1 )*dlarnd( 1, iseed3 ) )
598 CALL zlatms( n, n,
'S', iseed,
'H', rwork, imode, cond,
599 $ anorm, ihbw, ihbw,
'Z', u, ldu, work,
604 CALL zlaset(
'Full', lda, n, czero, czero, a, lda )
605 DO 100 idiag = -ihbw, ihbw
606 irow = ihbw - idiag + 1
607 j1 = max( 1, idiag+1 )
608 j2 = min( n, n+idiag )
611 a( i, j ) = u( irow, j )
618 IF( iinfo.NE.0 )
THEN
619 WRITE( nounit, fmt = 9999 )
'Generator', iinfo, n, jtype,
632 il = 1 + int( ( n-1 )*dlarnd( 1, iseed2 ) )
633 iu = 1 + int( ( n-1 )*dlarnd( 1, iseed2 ) )
645 IF( iuplo.EQ.0 )
THEN
653 CALL zlacpy(
' ', n, n, a, lda, v, ldu )
656 CALL zheevd(
'V', uplo, n, a, ldu, d1, work, lwedc,
657 $ rwork, lrwedc, iwork, liwedc, iinfo )
658 IF( iinfo.NE.0 )
THEN
659 WRITE( nounit, fmt = 9999 )
'ZHEEVD(V,' // uplo //
660 $
')', iinfo, n, jtype, ioldsd
662 IF( iinfo.LT.0 )
THEN
665 result( ntest ) = ulpinv
666 result( ntest+1 ) = ulpinv
667 result( ntest+2 ) = ulpinv
674 CALL zhet21( 1, uplo, n, 0, v, ldu, d1, d2, a, ldu, z,
675 $ ldu, tau, work, rwork, result( ntest ) )
677 CALL zlacpy(
' ', n, n, v, ldu, a, lda )
680 CALL zheevd(
'N', uplo, n, a, ldu, d3, work, lwedc,
681 $ rwork, lrwedc, iwork, liwedc, iinfo )
682 IF( iinfo.NE.0 )
THEN
683 WRITE( nounit, fmt = 9999 )
'ZHEEVD(N,' // uplo //
684 $
')', iinfo, n, jtype, ioldsd
686 IF( iinfo.LT.0 )
THEN
689 result( ntest ) = ulpinv
699 temp1 = max( temp1, abs( d1( j ) ), abs( d3( j ) ) )
700 temp2 = max( temp2, abs( d1( j )-d3( j ) ) )
702 result( ntest ) = temp2 / max( unfl,
703 $ ulp*max( temp1, temp2 ) )
706 CALL zlacpy(
' ', n, n, v, ldu, a, lda )
711 temp3 = max( abs( d1( 1 ) ), abs( d1( n ) ) )
713 vl = d1( il ) - max( half*( d1( il )-d1( il-1 ) ),
714 $ ten*ulp*temp3, ten*rtunfl )
715 ELSE IF( n.GT.0 )
THEN
716 vl = d1( 1 ) - max( half*( d1( n )-d1( 1 ) ),
717 $ ten*ulp*temp3, ten*rtunfl )
720 vu = d1( iu ) + max( half*( d1( iu+1 )-d1( iu ) ),
721 $ ten*ulp*temp3, ten*rtunfl )
722 ELSE IF( n.GT.0 )
THEN
723 vu = d1( n ) + max( half*( d1( n )-d1( 1 ) ),
724 $ ten*ulp*temp3, ten*rtunfl )
732 CALL zheevx(
'V',
'A', uplo, n, a, ldu, vl, vu, il, iu,
733 $ abstol, m, wa1, z, ldu, work, lwork, rwork,
734 $ iwork, iwork( 5*n+1 ), iinfo )
735 IF( iinfo.NE.0 )
THEN
736 WRITE( nounit, fmt = 9999 )
'ZHEEVX(V,A,' // uplo //
737 $
')', iinfo, n, jtype, ioldsd
739 IF( iinfo.LT.0 )
THEN
742 result( ntest ) = ulpinv
743 result( ntest+1 ) = ulpinv
744 result( ntest+2 ) = ulpinv
751 CALL zlacpy(
' ', n, n, v, ldu, a, lda )
753 CALL zhet21( 1, uplo, n, 0, a, ldu, wa1, d2, z, ldu, v,
754 $ ldu, tau, work, rwork, result( ntest ) )
757 CALL zheevx(
'N',
'A', uplo, n, a, ldu, vl, vu, il, iu,
758 $ abstol, m2, wa2, z, ldu, work, lwork, rwork,
759 $ iwork, iwork( 5*n+1 ), iinfo )
760 IF( iinfo.NE.0 )
THEN
761 WRITE( nounit, fmt = 9999 )
'ZHEEVX(N,A,' // uplo //
762 $
')', iinfo, n, jtype, ioldsd
764 IF( iinfo.LT.0 )
THEN
767 result( ntest ) = ulpinv
777 temp1 = max( temp1, abs( wa1( j ) ), abs( wa2( j ) ) )
778 temp2 = max( temp2, abs( wa1( j )-wa2( j ) ) )
780 result( ntest ) = temp2 / max( unfl,
781 $ ulp*max( temp1, temp2 ) )
784 CALL zlacpy(
' ', n, n, v, ldu, a, lda )
788 CALL zheevx(
'V',
'I', uplo, n, a, ldu, vl, vu, il, iu,
789 $ abstol, m2, wa2, z, ldu, work, lwork, rwork,
790 $ iwork, iwork( 5*n+1 ), iinfo )
791 IF( iinfo.NE.0 )
THEN
792 WRITE( nounit, fmt = 9999 )
'ZHEEVX(V,I,' // uplo //
793 $
')', iinfo, n, jtype, ioldsd
795 IF( iinfo.LT.0 )
THEN
798 result( ntest ) = ulpinv
805 CALL zlacpy(
' ', n, n, v, ldu, a, lda )
807 CALL zhet22( 1, uplo, n, m2, 0, a, ldu, wa2, d2, z, ldu,
808 $ v, ldu, tau, work, rwork, result( ntest ) )
812 CALL zheevx(
'N',
'I', uplo, n, a, ldu, vl, vu, il, iu,
813 $ abstol, m3, wa3, z, ldu, work, lwork, rwork,
814 $ iwork, iwork( 5*n+1 ), iinfo )
815 IF( iinfo.NE.0 )
THEN
816 WRITE( nounit, fmt = 9999 )
'ZHEEVX(N,I,' // uplo //
817 $
')', iinfo, n, jtype, ioldsd
819 IF( iinfo.LT.0 )
THEN
822 result( ntest ) = ulpinv
829 temp1 = dsxt1( 1, wa2, m2, wa3, m3, abstol, ulp, unfl )
830 temp2 = dsxt1( 1, wa3, m3, wa2, m2, abstol, ulp, unfl )
832 temp3 = max( abs( wa1( 1 ) ), abs( wa1( n ) ) )
836 result( ntest ) = ( temp1+temp2 ) /
837 $ max( unfl, temp3*ulp )
840 CALL zlacpy(
' ', n, n, v, ldu, a, lda )
844 CALL zheevx(
'V',
'V', uplo, n, a, ldu, vl, vu, il, iu,
845 $ abstol, m2, wa2, z, ldu, work, lwork, rwork,
846 $ iwork, iwork( 5*n+1 ), iinfo )
847 IF( iinfo.NE.0 )
THEN
848 WRITE( nounit, fmt = 9999 )
'ZHEEVX(V,V,' // uplo //
849 $
')', iinfo, n, jtype, ioldsd
851 IF( iinfo.LT.0 )
THEN
854 result( ntest ) = ulpinv
861 CALL zlacpy(
' ', n, n, v, ldu, a, lda )
863 CALL zhet22( 1, uplo, n, m2, 0, a, ldu, wa2, d2, z, ldu,
864 $ v, ldu, tau, work, rwork, result( ntest ) )
868 CALL zheevx(
'N',
'V', uplo, n, a, ldu, vl, vu, il, iu,
869 $ abstol, m3, wa3, z, ldu, work, lwork, rwork,
870 $ iwork, iwork( 5*n+1 ), iinfo )
871 IF( iinfo.NE.0 )
THEN
872 WRITE( nounit, fmt = 9999 )
'ZHEEVX(N,V,' // uplo //
873 $
')', iinfo, n, jtype, ioldsd
875 IF( iinfo.LT.0 )
THEN
878 result( ntest ) = ulpinv
883 IF( m3.EQ.0 .AND. n.GT.0 )
THEN
884 result( ntest ) = ulpinv
890 temp1 = dsxt1( 1, wa2, m2, wa3, m3, abstol, ulp, unfl )
891 temp2 = dsxt1( 1, wa3, m3, wa2, m2, abstol, ulp, unfl )
893 temp3 = max( abs( wa1( 1 ) ), abs( wa1( n ) ) )
897 result( ntest ) = ( temp1+temp2 ) /
898 $ max( unfl, temp3*ulp )
904 CALL zlacpy(
' ', n, n, v, ldu, a, lda )
909 IF( iuplo.EQ.1 )
THEN
913 work( indx ) = a( i, j )
921 work( indx ) = a( i, j )
928 indwrk = n*( n+1 ) / 2 + 1
929 CALL zhpevd(
'V', uplo, n, work, d1, z, ldu,
930 $ work( indwrk ), lwedc, rwork, lrwedc, iwork,
932 IF( iinfo.NE.0 )
THEN
933 WRITE( nounit, fmt = 9999 )
'ZHPEVD(V,' // uplo //
934 $
')', iinfo, n, jtype, ioldsd
936 IF( iinfo.LT.0 )
THEN
939 result( ntest ) = ulpinv
940 result( ntest+1 ) = ulpinv
941 result( ntest+2 ) = ulpinv
948 CALL zhet21( 1, uplo, n, 0, a, lda, d1, d2, z, ldu, v,
949 $ ldu, tau, work, rwork, result( ntest ) )
951 IF( iuplo.EQ.1 )
THEN
955 work( indx ) = a( i, j )
963 work( indx ) = a( i, j )
970 indwrk = n*( n+1 ) / 2 + 1
971 CALL zhpevd(
'N', uplo, n, work, d3, z, ldu,
972 $ work( indwrk ), lwedc, rwork, lrwedc, iwork,
974 IF( iinfo.NE.0 )
THEN
975 WRITE( nounit, fmt = 9999 )
'ZHPEVD(N,' // uplo //
976 $
')', iinfo, n, jtype, ioldsd
978 IF( iinfo.LT.0 )
THEN
981 result( ntest ) = ulpinv
991 temp1 = max( temp1, abs( d1( j ) ), abs( d3( j ) ) )
992 temp2 = max( temp2, abs( d1( j )-d3( j ) ) )
994 result( ntest ) = temp2 / max( unfl,
995 $ ulp*max( temp1, temp2 ) )
1001 IF( iuplo.EQ.1 )
THEN
1005 work( indx ) = a( i, j )
1013 work( indx ) = a( i, j )
1022 temp3 = max( abs( d1( 1 ) ), abs( d1( n ) ) )
1024 vl = d1( il ) - max( half*( d1( il )-d1( il-1 ) ),
1025 $ ten*ulp*temp3, ten*rtunfl )
1026 ELSE IF( n.GT.0 )
THEN
1027 vl = d1( 1 ) - max( half*( d1( n )-d1( 1 ) ),
1028 $ ten*ulp*temp3, ten*rtunfl )
1031 vu = d1( iu ) + max( half*( d1( iu+1 )-d1( iu ) ),
1032 $ ten*ulp*temp3, ten*rtunfl )
1033 ELSE IF( n.GT.0 )
THEN
1034 vu = d1( n ) + max( half*( d1( n )-d1( 1 ) ),
1035 $ ten*ulp*temp3, ten*rtunfl )
1043 CALL zhpevx(
'V',
'A', uplo, n, work, vl, vu, il, iu,
1044 $ abstol, m, wa1, z, ldu, v, rwork, iwork,
1045 $ iwork( 5*n+1 ), iinfo )
1046 IF( iinfo.NE.0 )
THEN
1047 WRITE( nounit, fmt = 9999 )
'ZHPEVX(V,A,' // uplo //
1048 $
')', iinfo, n, jtype, ioldsd
1050 IF( iinfo.LT.0 )
THEN
1053 result( ntest ) = ulpinv
1054 result( ntest+1 ) = ulpinv
1055 result( ntest+2 ) = ulpinv
1062 CALL zhet21( 1, uplo, n, 0, a, ldu, wa1, d2, z, ldu, v,
1063 $ ldu, tau, work, rwork, result( ntest ) )
1067 IF( iuplo.EQ.1 )
THEN
1071 work( indx ) = a( i, j )
1079 work( indx ) = a( i, j )
1085 CALL zhpevx(
'N',
'A', uplo, n, work, vl, vu, il, iu,
1086 $ abstol, m2, wa2, z, ldu, v, rwork, iwork,
1087 $ iwork( 5*n+1 ), iinfo )
1088 IF( iinfo.NE.0 )
THEN
1089 WRITE( nounit, fmt = 9999 )
'ZHPEVX(N,A,' // uplo //
1090 $
')', iinfo, n, jtype, ioldsd
1092 IF( iinfo.LT.0 )
THEN
1095 result( ntest ) = ulpinv
1105 temp1 = max( temp1, abs( wa1( j ) ), abs( wa2( j ) ) )
1106 temp2 = max( temp2, abs( wa1( j )-wa2( j ) ) )
1108 result( ntest ) = temp2 / max( unfl,
1109 $ ulp*max( temp1, temp2 ) )
1113 IF( iuplo.EQ.1 )
THEN
1117 work( indx ) = a( i, j )
1125 work( indx ) = a( i, j )
1131 CALL zhpevx(
'V',
'I', uplo, n, work, vl, vu, il, iu,
1132 $ abstol, m2, wa2, z, ldu, v, rwork, iwork,
1133 $ iwork( 5*n+1 ), iinfo )
1134 IF( iinfo.NE.0 )
THEN
1135 WRITE( nounit, fmt = 9999 )
'ZHPEVX(V,I,' // uplo //
1136 $
')', iinfo, n, jtype, ioldsd
1138 IF( iinfo.LT.0 )
THEN
1141 result( ntest ) = ulpinv
1142 result( ntest+1 ) = ulpinv
1143 result( ntest+2 ) = ulpinv
1150 CALL zhet22( 1, uplo, n, m2, 0, a, ldu, wa2, d2, z, ldu,
1151 $ v, ldu, tau, work, rwork, result( ntest ) )
1155 IF( iuplo.EQ.1 )
THEN
1159 work( indx ) = a( i, j )
1167 work( indx ) = a( i, j )
1173 CALL zhpevx(
'N',
'I', uplo, n, work, vl, vu, il, iu,
1174 $ abstol, m3, wa3, z, ldu, v, rwork, iwork,
1175 $ iwork( 5*n+1 ), iinfo )
1176 IF( iinfo.NE.0 )
THEN
1177 WRITE( nounit, fmt = 9999 )
'ZHPEVX(N,I,' // uplo //
1178 $
')', iinfo, n, jtype, ioldsd
1180 IF( iinfo.LT.0 )
THEN
1183 result( ntest ) = ulpinv
1190 temp1 = dsxt1( 1, wa2, m2, wa3, m3, abstol, ulp, unfl )
1191 temp2 = dsxt1( 1, wa3, m3, wa2, m2, abstol, ulp, unfl )
1193 temp3 = max( abs( wa1( 1 ) ), abs( wa1( n ) ) )
1197 result( ntest ) = ( temp1+temp2 ) /
1198 $ max( unfl, temp3*ulp )
1202 IF( iuplo.EQ.1 )
THEN
1206 work( indx ) = a( i, j )
1214 work( indx ) = a( i, j )
1220 CALL zhpevx(
'V',
'V', uplo, n, work, vl, vu, il, iu,
1221 $ abstol, m2, wa2, z, ldu, v, rwork, iwork,
1222 $ iwork( 5*n+1 ), iinfo )
1223 IF( iinfo.NE.0 )
THEN
1224 WRITE( nounit, fmt = 9999 )
'ZHPEVX(V,V,' // uplo //
1225 $
')', iinfo, n, jtype, ioldsd
1227 IF( iinfo.LT.0 )
THEN
1230 result( ntest ) = ulpinv
1231 result( ntest+1 ) = ulpinv
1232 result( ntest+2 ) = ulpinv
1239 CALL zhet22( 1, uplo, n, m2, 0, a, ldu, wa2, d2, z, ldu,
1240 $ v, ldu, tau, work, rwork, result( ntest ) )
1244 IF( iuplo.EQ.1 )
THEN
1248 work( indx ) = a( i, j )
1256 work( indx ) = a( i, j )
1262 CALL zhpevx(
'N',
'V', uplo, n, work, vl, vu, il, iu,
1263 $ abstol, m3, wa3, z, ldu, v, rwork, iwork,
1264 $ iwork( 5*n+1 ), iinfo )
1265 IF( iinfo.NE.0 )
THEN
1266 WRITE( nounit, fmt = 9999 )
'ZHPEVX(N,V,' // uplo //
1267 $
')', iinfo, n, jtype, ioldsd
1269 IF( iinfo.LT.0 )
THEN
1272 result( ntest ) = ulpinv
1277 IF( m3.EQ.0 .AND. n.GT.0 )
THEN
1278 result( ntest ) = ulpinv
1284 temp1 = dsxt1( 1, wa2, m2, wa3, m3, abstol, ulp, unfl )
1285 temp2 = dsxt1( 1, wa3, m3, wa2, m2, abstol, ulp, unfl )
1287 temp3 = max( abs( wa1( 1 ) ), abs( wa1( n ) ) )
1291 result( ntest ) = ( temp1+temp2 ) /
1292 $ max( unfl, temp3*ulp )
1298 IF( jtype.LE.7 )
THEN
1300 ELSE IF( jtype.GE.8 .AND. jtype.LE.15 )
THEN
1309 IF( iuplo.EQ.1 )
THEN
1311 DO 560 i = max( 1, j-kd ), j
1312 v( kd+1+i-j, j ) = a( i, j )
1317 DO 580 i = j, min( n, j+kd )
1318 v( 1+i-j, j ) = a( i, j )
1324 CALL zhbevd(
'V', uplo, n, kd, v, ldu, d1, z, ldu, work,
1325 $ lwedc, rwork, lrwedc, iwork, liwedc, iinfo )
1326 IF( iinfo.NE.0 )
THEN
1327 WRITE( nounit, fmt = 9998 )
'ZHBEVD(V,' // uplo //
1328 $
')', iinfo, n, kd, jtype, ioldsd
1330 IF( iinfo.LT.0 )
THEN
1333 result( ntest ) = ulpinv
1334 result( ntest+1 ) = ulpinv
1335 result( ntest+2 ) = ulpinv
1342 CALL zhet21( 1, uplo, n, 0, a, lda, d1, d2, z, ldu, v,
1343 $ ldu, tau, work, rwork, result( ntest ) )
1345 IF( iuplo.EQ.1 )
THEN
1347 DO 600 i = max( 1, j-kd ), j
1348 v( kd+1+i-j, j ) = a( i, j )
1353 DO 620 i = j, min( n, j+kd )
1354 v( 1+i-j, j ) = a( i, j )
1360 CALL zhbevd(
'N', uplo, n, kd, v, ldu, d3, z, ldu, work,
1361 $ lwedc, rwork, lrwedc, iwork, liwedc, iinfo )
1362 IF( iinfo.NE.0 )
THEN
1363 WRITE( nounit, fmt = 9998 )
'ZHBEVD(N,' // uplo //
1364 $
')', iinfo, n, kd, jtype, ioldsd
1366 IF( iinfo.LT.0 )
THEN
1369 result( ntest ) = ulpinv
1379 temp1 = max( temp1, abs( d1( j ) ), abs( d3( j ) ) )
1380 temp2 = max( temp2, abs( d1( j )-d3( j ) ) )
1382 result( ntest ) = temp2 / max( unfl,
1383 $ ulp*max( temp1, temp2 ) )
1389 IF( iuplo.EQ.1 )
THEN
1391 DO 660 i = max( 1, j-kd ), j
1392 v( kd+1+i-j, j ) = a( i, j )
1397 DO 680 i = j, min( n, j+kd )
1398 v( 1+i-j, j ) = a( i, j )
1404 CALL zhbevx(
'V',
'A', uplo, n, kd, v, ldu, u, ldu, vl,
1405 $ vu, il, iu, abstol, m, wa1, z, ldu, work,
1406 $ rwork, iwork, iwork( 5*n+1 ), iinfo )
1407 IF( iinfo.NE.0 )
THEN
1408 WRITE( nounit, fmt = 9999 )
'ZHBEVX(V,A,' // uplo //
1409 $
')', iinfo, n, kd, jtype, ioldsd
1411 IF( iinfo.LT.0 )
THEN
1414 result( ntest ) = ulpinv
1415 result( ntest+1 ) = ulpinv
1416 result( ntest+2 ) = ulpinv
1423 CALL zhet21( 1, uplo, n, 0, a, ldu, wa1, d2, z, ldu, v,
1424 $ ldu, tau, work, rwork, result( ntest ) )
1428 IF( iuplo.EQ.1 )
THEN
1430 DO 700 i = max( 1, j-kd ), j
1431 v( kd+1+i-j, j ) = a( i, j )
1436 DO 720 i = j, min( n, j+kd )
1437 v( 1+i-j, j ) = a( i, j )
1442 CALL zhbevx(
'N',
'A', uplo, n, kd, v, ldu, u, ldu, vl,
1443 $ vu, il, iu, abstol, m2, wa2, z, ldu, work,
1444 $ rwork, iwork, iwork( 5*n+1 ), iinfo )
1445 IF( iinfo.NE.0 )
THEN
1446 WRITE( nounit, fmt = 9998 )
'ZHBEVX(N,A,' // uplo //
1447 $
')', iinfo, n, kd, jtype, ioldsd
1449 IF( iinfo.LT.0 )
THEN
1452 result( ntest ) = ulpinv
1462 temp1 = max( temp1, abs( wa1( j ) ), abs( wa2( j ) ) )
1463 temp2 = max( temp2, abs( wa1( j )-wa2( j ) ) )
1465 result( ntest ) = temp2 / max( unfl,
1466 $ ulp*max( temp1, temp2 ) )
1473 IF( iuplo.EQ.1 )
THEN
1475 DO 760 i = max( 1, j-kd ), j
1476 v( kd+1+i-j, j ) = a( i, j )
1481 DO 780 i = j, min( n, j+kd )
1482 v( 1+i-j, j ) = a( i, j )
1487 CALL zhbevx(
'V',
'I', uplo, n, kd, v, ldu, u, ldu, vl,
1488 $ vu, il, iu, abstol, m2, wa2, z, ldu, work,
1489 $ rwork, iwork, iwork( 5*n+1 ), iinfo )
1490 IF( iinfo.NE.0 )
THEN
1491 WRITE( nounit, fmt = 9998 )
'ZHBEVX(V,I,' // uplo //
1492 $
')', iinfo, n, kd, jtype, ioldsd
1494 IF( iinfo.LT.0 )
THEN
1497 result( ntest ) = ulpinv
1498 result( ntest+1 ) = ulpinv
1499 result( ntest+2 ) = ulpinv
1506 CALL zhet22( 1, uplo, n, m2, 0, a, ldu, wa2, d2, z, ldu,
1507 $ v, ldu, tau, work, rwork, result( ntest ) )
1511 IF( iuplo.EQ.1 )
THEN
1513 DO 800 i = max( 1, j-kd ), j
1514 v( kd+1+i-j, j ) = a( i, j )
1519 DO 820 i = j, min( n, j+kd )
1520 v( 1+i-j, j ) = a( i, j )
1524 CALL zhbevx(
'N',
'I', uplo, n, kd, v, ldu, u, ldu, vl,
1525 $ vu, il, iu, abstol, m3, wa3, z, ldu, work,
1526 $ rwork, iwork, iwork( 5*n+1 ), iinfo )
1527 IF( iinfo.NE.0 )
THEN
1528 WRITE( nounit, fmt = 9998 )
'ZHBEVX(N,I,' // uplo //
1529 $
')', iinfo, n, kd, jtype, ioldsd
1531 IF( iinfo.LT.0 )
THEN
1534 result( ntest ) = ulpinv
1541 temp1 = dsxt1( 1, wa2, m2, wa3, m3, abstol, ulp, unfl )
1542 temp2 = dsxt1( 1, wa3, m3, wa2, m2, abstol, ulp, unfl )
1544 temp3 = max( abs( wa1( 1 ) ), abs( wa1( n ) ) )
1548 result( ntest ) = ( temp1+temp2 ) /
1549 $ max( unfl, temp3*ulp )
1556 IF( iuplo.EQ.1 )
THEN
1558 DO 850 i = max( 1, j-kd ), j
1559 v( kd+1+i-j, j ) = a( i, j )
1564 DO 870 i = j, min( n, j+kd )
1565 v( 1+i-j, j ) = a( i, j )
1569 CALL zhbevx(
'V',
'V', uplo, n, kd, v, ldu, u, ldu, vl,
1570 $ vu, il, iu, abstol, m2, wa2, z, ldu, work,
1571 $ rwork, iwork, iwork( 5*n+1 ), iinfo )
1572 IF( iinfo.NE.0 )
THEN
1573 WRITE( nounit, fmt = 9998 )
'ZHBEVX(V,V,' // uplo //
1574 $
')', iinfo, n, kd, jtype, ioldsd
1576 IF( iinfo.LT.0 )
THEN
1579 result( ntest ) = ulpinv
1580 result( ntest+1 ) = ulpinv
1581 result( ntest+2 ) = ulpinv
1588 CALL zhet22( 1, uplo, n, m2, 0, a, ldu, wa2, d2, z, ldu,
1589 $ v, ldu, tau, work, rwork, result( ntest ) )
1593 IF( iuplo.EQ.1 )
THEN
1595 DO 890 i = max( 1, j-kd ), j
1596 v( kd+1+i-j, j ) = a( i, j )
1601 DO 910 i = j, min( n, j+kd )
1602 v( 1+i-j, j ) = a( i, j )
1606 CALL zhbevx(
'N',
'V', uplo, n, kd, v, ldu, u, ldu, vl,
1607 $ vu, il, iu, abstol, m3, wa3, z, ldu, work,
1608 $ rwork, iwork, iwork( 5*n+1 ), iinfo )
1609 IF( iinfo.NE.0 )
THEN
1610 WRITE( nounit, fmt = 9998 )
'ZHBEVX(N,V,' // uplo //
1611 $
')', iinfo, n, kd, jtype, ioldsd
1613 IF( iinfo.LT.0 )
THEN
1616 result( ntest ) = ulpinv
1621 IF( m3.EQ.0 .AND. n.GT.0 )
THEN
1622 result( ntest ) = ulpinv
1628 temp1 = dsxt1( 1, wa2, m2, wa3, m3, abstol, ulp, unfl )
1629 temp2 = dsxt1( 1, wa3, m3, wa2, m2, abstol, ulp, unfl )
1631 temp3 = max( abs( wa1( 1 ) ), abs( wa1( n ) ) )
1635 result( ntest ) = ( temp1+temp2 ) /
1636 $ max( unfl, temp3*ulp )
1642 CALL zlacpy(
' ', n, n, a, lda, v, ldu )
1645 CALL zheev(
'V', uplo, n, a, ldu, d1, work, lwork, rwork,
1647 IF( iinfo.NE.0 )
THEN
1648 WRITE( nounit, fmt = 9999 )
'ZHEEV(V,' // uplo //
')',
1649 $ iinfo, n, jtype, ioldsd
1651 IF( iinfo.LT.0 )
THEN
1654 result( ntest ) = ulpinv
1655 result( ntest+1 ) = ulpinv
1656 result( ntest+2 ) = ulpinv
1663 CALL zhet21( 1, uplo, n, 0, v, ldu, d1, d2, a, ldu, z,
1664 $ ldu, tau, work, rwork, result( ntest ) )
1666 CALL zlacpy(
' ', n, n, v, ldu, a, lda )
1669 CALL zheev(
'N', uplo, n, a, ldu, d3, work, lwork, rwork,
1671 IF( iinfo.NE.0 )
THEN
1672 WRITE( nounit, fmt = 9999 )
'ZHEEV(N,' // uplo //
')',
1673 $ iinfo, n, jtype, ioldsd
1675 IF( iinfo.LT.0 )
THEN
1678 result( ntest ) = ulpinv
1688 temp1 = max( temp1, abs( d1( j ) ), abs( d3( j ) ) )
1689 temp2 = max( temp2, abs( d1( j )-d3( j ) ) )
1691 result( ntest ) = temp2 / max( unfl,
1692 $ ulp*max( temp1, temp2 ) )
1696 CALL zlacpy(
' ', n, n, v, ldu, a, lda )
1703 IF( iuplo.EQ.1 )
THEN
1707 work( indx ) = a( i, j )
1715 work( indx ) = a( i, j )
1722 indwrk = n*( n+1 ) / 2 + 1
1723 CALL zhpev(
'V', uplo, n, work, d1, z, ldu,
1724 $ work( indwrk ), rwork, iinfo )
1725 IF( iinfo.NE.0 )
THEN
1726 WRITE( nounit, fmt = 9999 )
'ZHPEV(V,' // uplo //
')',
1727 $ iinfo, n, jtype, ioldsd
1729 IF( iinfo.LT.0 )
THEN
1732 result( ntest ) = ulpinv
1733 result( ntest+1 ) = ulpinv
1734 result( ntest+2 ) = ulpinv
1741 CALL zhet21( 1, uplo, n, 0, a, lda, d1, d2, z, ldu, v,
1742 $ ldu, tau, work, rwork, result( ntest ) )
1744 IF( iuplo.EQ.1 )
THEN
1748 work( indx ) = a( i, j )
1756 work( indx ) = a( i, j )
1763 indwrk = n*( n+1 ) / 2 + 1
1764 CALL zhpev(
'N', uplo, n, work, d3, z, ldu,
1765 $ work( indwrk ), rwork, iinfo )
1766 IF( iinfo.NE.0 )
THEN
1767 WRITE( nounit, fmt = 9999 )
'ZHPEV(N,' // uplo //
')',
1768 $ iinfo, n, jtype, ioldsd
1770 IF( iinfo.LT.0 )
THEN
1773 result( ntest ) = ulpinv
1783 temp1 = max( temp1, abs( d1( j ) ), abs( d3( j ) ) )
1784 temp2 = max( temp2, abs( d1( j )-d3( j ) ) )
1786 result( ntest ) = temp2 / max( unfl,
1787 $ ulp*max( temp1, temp2 ) )
1793 IF( jtype.LE.7 )
THEN
1795 ELSE IF( jtype.GE.8 .AND. jtype.LE.15 )
THEN
1804 IF( iuplo.EQ.1 )
THEN
1806 DO 1060 i = max( 1, j-kd ), j
1807 v( kd+1+i-j, j ) = a( i, j )
1812 DO 1080 i = j, min( n, j+kd )
1813 v( 1+i-j, j ) = a( i, j )
1819 CALL zhbev(
'V', uplo, n, kd, v, ldu, d1, z, ldu, work,
1821 IF( iinfo.NE.0 )
THEN
1822 WRITE( nounit, fmt = 9998 )
'ZHBEV(V,' // uplo //
')',
1823 $ iinfo, n, kd, jtype, ioldsd
1825 IF( iinfo.LT.0 )
THEN
1828 result( ntest ) = ulpinv
1829 result( ntest+1 ) = ulpinv
1830 result( ntest+2 ) = ulpinv
1837 CALL zhet21( 1, uplo, n, 0, a, lda, d1, d2, z, ldu, v,
1838 $ ldu, tau, work, rwork, result( ntest ) )
1840 IF( iuplo.EQ.1 )
THEN
1842 DO 1100 i = max( 1, j-kd ), j
1843 v( kd+1+i-j, j ) = a( i, j )
1848 DO 1120 i = j, min( n, j+kd )
1849 v( 1+i-j, j ) = a( i, j )
1855 CALL zhbev(
'N', uplo, n, kd, v, ldu, d3, z, ldu, work,
1857 IF( iinfo.NE.0 )
THEN
1858 WRITE( nounit, fmt = 9998 )
'ZHBEV(N,' // uplo //
')',
1859 $ iinfo, n, kd, jtype, ioldsd
1861 IF( iinfo.LT.0 )
THEN
1864 result( ntest ) = ulpinv
1876 temp1 = max( temp1, abs( d1( j ) ), abs( d3( j ) ) )
1877 temp2 = max( temp2, abs( d1( j )-d3( j ) ) )
1879 result( ntest ) = temp2 / max( unfl,
1880 $ ulp*max( temp1, temp2 ) )
1882 CALL zlacpy(
' ', n, n, a, lda, v, ldu )
1884 CALL zheevr(
'V',
'A', uplo, n, a, ldu, vl, vu, il, iu,
1885 $ abstol, m, wa1, z, ldu, iwork, work, lwork,
1886 $ rwork, lrwork, iwork( 2*n+1 ), liwork-2*n,
1888 IF( iinfo.NE.0 )
THEN
1889 WRITE( nounit, fmt = 9999 )
'ZHEEVR(V,A,' // uplo //
1890 $
')', iinfo, n, jtype, ioldsd
1892 IF( iinfo.LT.0 )
THEN
1895 result( ntest ) = ulpinv
1896 result( ntest+1 ) = ulpinv
1897 result( ntest+2 ) = ulpinv
1904 CALL zlacpy(
' ', n, n, v, ldu, a, lda )
1906 CALL zhet21( 1, uplo, n, 0, a, ldu, wa1, d2, z, ldu, v,
1907 $ ldu, tau, work, rwork, result( ntest ) )
1910 CALL zheevr(
'N',
'A', uplo, n, a, ldu, vl, vu, il, iu,
1911 $ abstol, m2, wa2, z, ldu, iwork, work, lwork,
1912 $ rwork, lrwork, iwork( 2*n+1 ), liwork-2*n,
1914 IF( iinfo.NE.0 )
THEN
1915 WRITE( nounit, fmt = 9999 )
'ZHEEVR(N,A,' // uplo //
1916 $
')', iinfo, n, jtype, ioldsd
1918 IF( iinfo.LT.0 )
THEN
1921 result( ntest ) = ulpinv
1931 temp1 = max( temp1, abs( wa1( j ) ), abs( wa2( j ) ) )
1932 temp2 = max( temp2, abs( wa1( j )-wa2( j ) ) )
1934 result( ntest ) = temp2 / max( unfl,
1935 $ ulp*max( temp1, temp2 ) )
1940 CALL zlacpy(
' ', n, n, v, ldu, a, lda )
1941 CALL zheevr(
'V',
'I', uplo, n, a, ldu, vl, vu, il, iu,
1942 $ abstol, m2, wa2, z, ldu, iwork, work, lwork,
1943 $ rwork, lrwork, iwork( 2*n+1 ), liwork-2*n,
1945 IF( iinfo.NE.0 )
THEN
1946 WRITE( nounit, fmt = 9999 )
'ZHEEVR(V,I,' // uplo //
1947 $
')', iinfo, n, jtype, ioldsd
1949 IF( iinfo.LT.0 )
THEN
1952 result( ntest ) = ulpinv
1953 result( ntest+1 ) = ulpinv
1954 result( ntest+2 ) = ulpinv
1961 CALL zlacpy(
' ', n, n, v, ldu, a, lda )
1963 CALL zhet22( 1, uplo, n, m2, 0, a, ldu, wa2, d2, z, ldu,
1964 $ v, ldu, tau, work, rwork, result( ntest ) )
1967 CALL zlacpy(
' ', n, n, v, ldu, a, lda )
1968 CALL zheevr(
'N',
'I', uplo, n, a, ldu, vl, vu, il, iu,
1969 $ abstol, m3, wa3, z, ldu, iwork, work, lwork,
1970 $ rwork, lrwork, iwork( 2*n+1 ), liwork-2*n,
1972 IF( iinfo.NE.0 )
THEN
1973 WRITE( nounit, fmt = 9999 )
'ZHEEVR(N,I,' // uplo //
1974 $
')', iinfo, n, jtype, ioldsd
1976 IF( iinfo.LT.0 )
THEN
1979 result( ntest ) = ulpinv
1986 temp1 = dsxt1( 1, wa2, m2, wa3, m3, abstol, ulp, unfl )
1987 temp2 = dsxt1( 1, wa3, m3, wa2, m2, abstol, ulp, unfl )
1988 result( ntest ) = ( temp1+temp2 ) /
1989 $ max( unfl, ulp*temp3 )
1993 CALL zlacpy(
' ', n, n, v, ldu, a, lda )
1994 CALL zheevr(
'V',
'V', uplo, n, a, ldu, vl, vu, il, iu,
1995 $ abstol, m2, wa2, z, ldu, iwork, work, lwork,
1996 $ rwork, lrwork, iwork( 2*n+1 ), liwork-2*n,
1998 IF( iinfo.NE.0 )
THEN
1999 WRITE( nounit, fmt = 9999 )
'ZHEEVR(V,V,' // uplo //
2000 $
')', iinfo, n, jtype, ioldsd
2002 IF( iinfo.LT.0 )
THEN
2005 result( ntest ) = ulpinv
2006 result( ntest+1 ) = ulpinv
2007 result( ntest+2 ) = ulpinv
2014 CALL zlacpy(
' ', n, n, v, ldu, a, lda )
2016 CALL zhet22( 1, uplo, n, m2, 0, a, ldu, wa2, d2, z, ldu,
2017 $ v, ldu, tau, work, rwork, result( ntest ) )
2020 CALL zlacpy(
' ', n, n, v, ldu, a, lda )
2021 CALL zheevr(
'N',
'V', uplo, n, a, ldu, vl, vu, il, iu,
2022 $ abstol, m3, wa3, z, ldu, iwork, work, lwork,
2023 $ rwork, lrwork, iwork( 2*n+1 ), liwork-2*n,
2025 IF( iinfo.NE.0 )
THEN
2026 WRITE( nounit, fmt = 9999 )
'ZHEEVR(N,V,' // uplo //
2027 $
')', iinfo, n, jtype, ioldsd
2029 IF( iinfo.LT.0 )
THEN
2032 result( ntest ) = ulpinv
2037 IF( m3.EQ.0 .AND. n.GT.0 )
THEN
2038 result( ntest ) = ulpinv
2044 temp1 = dsxt1( 1, wa2, m2, wa3, m3, abstol, ulp, unfl )
2045 temp2 = dsxt1( 1, wa3, m3, wa2, m2, abstol, ulp, unfl )
2047 temp3 = max( abs( wa1( 1 ) ), abs( wa1( n ) ) )
2051 result( ntest ) = ( temp1+temp2 ) /
2052 $ max( unfl, temp3*ulp )
2054 CALL zlacpy(
' ', n, n, v, ldu, a, lda )
2068 ntestt = ntestt + ntest
2069 CALL dlafts(
'ZST', n, n, jtype, ntest, result, ioldsd,
2070 $ thresh, nounit, nerrs )
2077 CALL alasvm(
'ZST', nounit, nerrs, ntestt, 0 )
2079 9999
FORMAT(
' ZDRVST: ', a,
' returned INFO=', i6, / 9x,
'N=', i6,
2080 $
', JTYPE=', i6,
', ISEED=(', 3( i5,
',' ), i5,
')' )
2081 9998
FORMAT(
' ZDRVST: ', a,
' returned INFO=', i6, / 9x,
'N=', i6,
2082 $
', KD=', i6,
', JTYPE=', i6,
', ISEED=(', 3( i5,
',' ), i5,
subroutine alasvm(type, nout, nfail, nrun, nerrs)
ALASVM
subroutine xerbla(srname, info)
subroutine dlafts(type, m, n, imat, ntests, result, iseed, thresh, iounit, ie)
DLAFTS
subroutine zhbev(jobz, uplo, n, kd, ab, ldab, w, z, ldz, work, rwork, info)
ZHBEV computes the eigenvalues and, optionally, the left and/or right eigenvectors for OTHER matrices
subroutine zhbevd(jobz, uplo, n, kd, ab, ldab, w, z, ldz, work, lwork, rwork, lrwork, iwork, liwork, info)
ZHBEVD computes the eigenvalues and, optionally, the left and/or right eigenvectors for OTHER matrice...
subroutine zhbevx(jobz, range, uplo, n, kd, ab, ldab, q, ldq, vl, vu, il, iu, abstol, m, w, z, ldz, work, rwork, iwork, ifail, info)
ZHBEVX computes the eigenvalues and, optionally, the left and/or right eigenvectors for OTHER matrice...
subroutine zheev(jobz, uplo, n, a, lda, w, work, lwork, rwork, info)
ZHEEV computes the eigenvalues and, optionally, the left and/or right eigenvectors for HE matrices
subroutine zheevd(jobz, uplo, n, a, lda, w, work, lwork, rwork, lrwork, iwork, liwork, info)
ZHEEVD computes the eigenvalues and, optionally, the left and/or right eigenvectors for HE matrices
subroutine zheevr(jobz, range, uplo, n, a, lda, vl, vu, il, iu, abstol, m, w, z, ldz, isuppz, work, lwork, rwork, lrwork, iwork, liwork, info)
ZHEEVR computes the eigenvalues and, optionally, the left and/or right eigenvectors for HE matrices
subroutine zheevx(jobz, range, uplo, n, a, lda, vl, vu, il, iu, abstol, m, w, z, ldz, work, lwork, rwork, iwork, ifail, info)
ZHEEVX computes the eigenvalues and, optionally, the left and/or right eigenvectors for HE matrices
subroutine zhpev(jobz, uplo, n, ap, w, z, ldz, work, rwork, info)
ZHPEV computes the eigenvalues and, optionally, the left and/or right eigenvectors for OTHER matrices
subroutine zhpevd(jobz, uplo, n, ap, w, z, ldz, work, lwork, rwork, lrwork, iwork, liwork, info)
ZHPEVD computes the eigenvalues and, optionally, the left and/or right eigenvectors for OTHER matrice...
subroutine zhpevx(jobz, range, uplo, n, ap, vl, vu, il, iu, abstol, m, w, z, ldz, work, rwork, iwork, ifail, info)
ZHPEVX computes the eigenvalues and, optionally, the left and/or right eigenvectors for OTHER matrice...
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 zdrvst(nsizes, nn, ntypes, dotype, iseed, thresh, nounit, a, lda, d1, d2, d3, wa1, wa2, wa3, u, ldu, v, tau, z, work, lwork, rwork, lrwork, iwork, liwork, result, info)
ZDRVST
subroutine zhet21(itype, uplo, n, kband, a, lda, d, e, u, ldu, v, ldv, tau, work, rwork, result)
ZHET21
subroutine zhet22(itype, uplo, n, m, kband, a, lda, d, e, u, ldu, v, ldv, tau, work, rwork, result)
ZHET22
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