334 SUBROUTINE cdrvst( 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,
350 INTEGER ISEED( 4 ), IWORK( * ), NN( * )
351 REAL D1( * ), D2( * ), D3( * ), RESULT( * ),
352 $ rwork( * ), wa1( * ), wa2( * ), wa3( * )
353 COMPLEX A( LDA, * ), TAU( * ), U( LDU, * ),
354 $ v( ldu, * ), work( * ), z( ldu, * )
361 REAL ZERO, ONE, TWO, TEN
362 PARAMETER ( ZERO = 0.0e+0, one = 1.0e+0, two = 2.0e+0,
365 parameter( half = one / two )
367 parameter( czero = ( 0.0e+0, 0.0e+0 ),
368 $ cone = ( 1.0e+0, 0.0e+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 REAL 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 REAL SLAMCH, SLARND, SSXT1
391 EXTERNAL SLAMCH, SLARND, SSXT1
400 INTRINSIC abs, int, log, max, min, real, 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(
'CDRVST', -info )
447 IF( nsizes.EQ.0 .OR. ntypes.EQ.0 )
452 unfl = slamch(
'Safe minimum' )
453 ovfl = slamch(
'Overflow' )
454 ulp = slamch(
'Epsilon' )*slamch(
'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( real( 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 / real( 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 claset(
'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 clatms( 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 clatms( 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 clatmr( 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 clatmr( 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 )*slarnd( 1, iseed3 ) )
598 CALL clatms( n, n,
'S', iseed,
'H', rwork, imode, cond,
599 $ anorm, ihbw, ihbw,
'Z', u, ldu, work,
604 CALL claset(
'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 )*slarnd( 1, iseed2 ) )
633 iu = 1 + int( ( n-1 )*slarnd( 1, iseed2 ) )
645 IF( iuplo.EQ.0 )
THEN
653 CALL clacpy(
' ', n, n, a, lda, v, ldu )
656 CALL cheevd(
'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 )
'CHEEVD(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 chet21( 1, uplo, n, 0, v, ldu, d1, d2, a, ldu, z,
675 $ ldu, tau, work, rwork, result( ntest ) )
677 CALL clacpy(
' ', n, n, v, ldu, a, lda )
680 CALL cheevd(
'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 )
'CHEEVD(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 clacpy(
' ', 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 cheevx(
'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 )
'CHEEVX(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 clacpy(
' ', n, n, v, ldu, a, lda )
753 CALL chet21( 1, uplo, n, 0, a, ldu, wa1, d2, z, ldu, v,
754 $ ldu, tau, work, rwork, result( ntest ) )
757 CALL cheevx(
'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 )
'CHEEVX(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 clacpy(
' ', n, n, v, ldu, a, lda )
788 CALL cheevx(
'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 )
'CHEEVX(V,I,' // uplo //
793 $
')', iinfo, n, jtype, ioldsd
795 IF( iinfo.LT.0 )
THEN
798 result( ntest ) = ulpinv
805 CALL clacpy(
' ', n, n, v, ldu, a, lda )
807 CALL chet22( 1, uplo, n, m2, 0, a, ldu, wa2, d2, z, ldu,
808 $ v, ldu, tau, work, rwork, result( ntest ) )
812 CALL cheevx(
'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 )
'CHEEVX(N,I,' // uplo //
817 $
')', iinfo, n, jtype, ioldsd
819 IF( iinfo.LT.0 )
THEN
822 result( ntest ) = ulpinv
829 temp1 = ssxt1( 1, wa2, m2, wa3, m3, abstol, ulp, unfl )
830 temp2 = ssxt1( 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 clacpy(
' ', n, n, v, ldu, a, lda )
844 CALL cheevx(
'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 )
'CHEEVX(V,V,' // uplo //
849 $
')', iinfo, n, jtype, ioldsd
851 IF( iinfo.LT.0 )
THEN
854 result( ntest ) = ulpinv
861 CALL clacpy(
' ', n, n, v, ldu, a, lda )
863 CALL chet22( 1, uplo, n, m2, 0, a, ldu, wa2, d2, z, ldu,
864 $ v, ldu, tau, work, rwork, result( ntest ) )
868 CALL cheevx(
'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 )
'CHEEVX(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 = ssxt1( 1, wa2, m2, wa3, m3, abstol, ulp, unfl )
891 temp2 = ssxt1( 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 clacpy(
' ', 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 chpevd(
'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 )
'CHPEVD(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 chet21( 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 chpevd(
'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 )
'CHPEVD(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 chpevx(
'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 )
'CHPEVX(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 chet21( 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 chpevx(
'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 )
'CHPEVX(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 chpevx(
'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 )
'CHPEVX(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 chet22( 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 chpevx(
'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 )
'CHPEVX(N,I,' // uplo //
1178 $
')', iinfo, n, jtype, ioldsd
1180 IF( iinfo.LT.0 )
THEN
1183 result( ntest ) = ulpinv
1190 temp1 = ssxt1( 1, wa2, m2, wa3, m3, abstol, ulp, unfl )
1191 temp2 = ssxt1( 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 chpevx(
'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 )
'CHPEVX(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 chet22( 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 chpevx(
'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 )
'CHPEVX(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 = ssxt1( 1, wa2, m2, wa3, m3, abstol, ulp, unfl )
1285 temp2 = ssxt1( 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 chbevd(
'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 )
'CHBEVD(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 chet21( 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 chbevd(
'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 )
'CHBEVD(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 chbevx(
'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 )
'CHBEVX(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 chet21( 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 chbevx(
'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 )
'CHBEVX(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 chbevx(
'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 )
'CHBEVX(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 chet22( 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 chbevx(
'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 )
'CHBEVX(N,I,' // uplo //
1529 $
')', iinfo, n, kd, jtype, ioldsd
1531 IF( iinfo.LT.0 )
THEN
1534 result( ntest ) = ulpinv
1541 temp1 = ssxt1( 1, wa2, m2, wa3, m3, abstol, ulp, unfl )
1542 temp2 = ssxt1( 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 chbevx(
'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 )
'CHBEVX(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 chet22( 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 chbevx(
'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 )
'CHBEVX(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 = ssxt1( 1, wa2, m2, wa3, m3, abstol, ulp, unfl )
1629 temp2 = ssxt1( 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 clacpy(
' ', n, n, a, lda, v, ldu )
1645 CALL cheev(
'V', uplo, n, a, ldu, d1, work, lwork, rwork,
1647 IF( iinfo.NE.0 )
THEN
1648 WRITE( nounit, fmt = 9999 )
'CHEEV(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 chet21( 1, uplo, n, 0, v, ldu, d1, d2, a, ldu, z,
1664 $ ldu, tau, work, rwork, result( ntest ) )
1666 CALL clacpy(
' ', n, n, v, ldu, a, lda )
1669 CALL cheev(
'N', uplo, n, a, ldu, d3, work, lwork, rwork,
1671 IF( iinfo.NE.0 )
THEN
1672 WRITE( nounit, fmt = 9999 )
'CHEEV(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 clacpy(
' ', 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 chpev(
'V', uplo, n, work, d1, z, ldu,
1724 $ work( indwrk ), rwork, iinfo )
1725 IF( iinfo.NE.0 )
THEN
1726 WRITE( nounit, fmt = 9999 )
'CHPEV(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 chet21( 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 chpev(
'N', uplo, n, work, d3, z, ldu,
1765 $ work( indwrk ), rwork, iinfo )
1766 IF( iinfo.NE.0 )
THEN
1767 WRITE( nounit, fmt = 9999 )
'CHPEV(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 chbev(
'V', uplo, n, kd, v, ldu, d1, z, ldu, work,
1821 IF( iinfo.NE.0 )
THEN
1822 WRITE( nounit, fmt = 9998 )
'CHBEV(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 chet21( 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 chbev(
'N', uplo, n, kd, v, ldu, d3, z, ldu, work,
1857 IF( iinfo.NE.0 )
THEN
1858 WRITE( nounit, fmt = 9998 )
'CHBEV(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 clacpy(
' ', n, n, a, lda, v, ldu )
1884 CALL cheevr(
'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 )
'CHEEVR(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 clacpy(
' ', n, n, v, ldu, a, lda )
1906 CALL chet21( 1, uplo, n, 0, a, ldu, wa1, d2, z, ldu, v,
1907 $ ldu, tau, work, rwork, result( ntest ) )
1910 CALL cheevr(
'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 )
'CHEEVR(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 clacpy(
' ', n, n, v, ldu, a, lda )
1941 CALL cheevr(
'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 )
'CHEEVR(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 clacpy(
' ', n, n, v, ldu, a, lda )
1963 CALL chet22( 1, uplo, n, m2, 0, a, ldu, wa2, d2, z, ldu,
1964 $ v, ldu, tau, work, rwork, result( ntest ) )
1967 CALL clacpy(
' ', n, n, v, ldu, a, lda )
1968 CALL cheevr(
'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 )
'CHEEVR(N,I,' // uplo //
1974 $
')', iinfo, n, jtype, ioldsd
1976 IF( iinfo.LT.0 )
THEN
1979 result( ntest ) = ulpinv
1986 temp1 = ssxt1( 1, wa2, m2, wa3, m3, abstol, ulp, unfl )
1987 temp2 = ssxt1( 1, wa3, m3, wa2, m2, abstol, ulp, unfl )
1988 result( ntest ) = ( temp1+temp2 ) /
1989 $ max( unfl, ulp*temp3 )
1993 CALL clacpy(
' ', n, n, v, ldu, a, lda )
1994 CALL cheevr(
'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 )
'CHEEVR(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 clacpy(
' ', n, n, v, ldu, a, lda )
2016 CALL chet22( 1, uplo, n, m2, 0, a, ldu, wa2, d2, z, ldu,
2017 $ v, ldu, tau, work, rwork, result( ntest ) )
2020 CALL clacpy(
' ', n, n, v, ldu, a, lda )
2021 CALL cheevr(
'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 )
'CHEEVR(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 = ssxt1( 1, wa2, m2, wa3, m3, abstol, ulp, unfl )
2045 temp2 = ssxt1( 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 clacpy(
' ', n, n, v, ldu, a, lda )
2068 ntestt = ntestt + ntest
2069 CALL slafts(
'CST', n, n, jtype, ntest, result, ioldsd,
2070 $ thresh, nounit, nerrs )
2077 CALL alasvm(
'CST', nounit, nerrs, ntestt, 0 )
2079 9999
FORMAT(
' CDRVST: ', a,
' returned INFO=', i6, / 9x,
'N=', i6,
2080 $
', JTYPE=', i6,
', ISEED=(', 3( i5,
',' ), i5,
')' )
2081 9998
FORMAT(
' CDRVST: ', 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 cdrvst(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)
CDRVST
subroutine chet21(itype, uplo, n, kband, a, lda, d, e, u, ldu, v, ldv, tau, work, rwork, result)
CHET21
subroutine chet22(itype, uplo, n, m, kband, a, lda, d, e, u, ldu, v, ldv, tau, work, rwork, result)
CHET22
subroutine clatmr(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)
CLATMR
subroutine clatms(m, n, dist, iseed, sym, d, mode, cond, dmax, kl, ku, pack, a, lda, work, info)
CLATMS
subroutine chbev(jobz, uplo, n, kd, ab, ldab, w, z, ldz, work, rwork, info)
CHBEV computes the eigenvalues and, optionally, the left and/or right eigenvectors for OTHER matrices
subroutine chbevd(jobz, uplo, n, kd, ab, ldab, w, z, ldz, work, lwork, rwork, lrwork, iwork, liwork, info)
CHBEVD computes the eigenvalues and, optionally, the left and/or right eigenvectors for OTHER matrice...
subroutine chbevx(jobz, range, uplo, n, kd, ab, ldab, q, ldq, vl, vu, il, iu, abstol, m, w, z, ldz, work, rwork, iwork, ifail, info)
CHBEVX computes the eigenvalues and, optionally, the left and/or right eigenvectors for OTHER matrice...
subroutine cheev(jobz, uplo, n, a, lda, w, work, lwork, rwork, info)
CHEEV computes the eigenvalues and, optionally, the left and/or right eigenvectors for HE matrices
subroutine cheevd(jobz, uplo, n, a, lda, w, work, lwork, rwork, lrwork, iwork, liwork, info)
CHEEVD computes the eigenvalues and, optionally, the left and/or right eigenvectors for HE matrices
subroutine cheevr(jobz, range, uplo, n, a, lda, vl, vu, il, iu, abstol, m, w, z, ldz, isuppz, work, lwork, rwork, lrwork, iwork, liwork, info)
CHEEVR computes the eigenvalues and, optionally, the left and/or right eigenvectors for HE matrices
subroutine cheevx(jobz, range, uplo, n, a, lda, vl, vu, il, iu, abstol, m, w, z, ldz, work, lwork, rwork, iwork, ifail, info)
CHEEVX computes the eigenvalues and, optionally, the left and/or right eigenvectors for HE matrices
subroutine chpev(jobz, uplo, n, ap, w, z, ldz, work, rwork, info)
CHPEV computes the eigenvalues and, optionally, the left and/or right eigenvectors for OTHER matrices
subroutine chpevd(jobz, uplo, n, ap, w, z, ldz, work, lwork, rwork, lrwork, iwork, liwork, info)
CHPEVD computes the eigenvalues and, optionally, the left and/or right eigenvectors for OTHER matrice...
subroutine chpevx(jobz, range, uplo, n, ap, vl, vu, il, iu, abstol, m, w, z, ldz, work, rwork, iwork, ifail, info)
CHPEVX computes the eigenvalues and, optionally, the left and/or right eigenvectors for OTHER matrice...
subroutine clacpy(uplo, m, n, a, lda, b, ldb)
CLACPY copies all or part of one two-dimensional array to another.
subroutine claset(uplo, m, n, alpha, beta, a, lda)
CLASET initializes the off-diagonal elements and the diagonal elements of a matrix to given values.
subroutine slafts(type, m, n, imat, ntests, result, iseed, thresh, iounit, ie)
SLAFTS