449 SUBROUTINE ddrvst2stg( NSIZES, NN, NTYPES, DOTYPE, ISEED, THRESH,
450 $ NOUNIT, A, LDA, D1, D2, D3, D4, EVEIGS, WA1,
451 $ WA2, WA3, U, LDU, V, TAU, Z, WORK, LWORK,
452 $ IWORK, LIWORK, RESULT, INFO )
459 INTEGER INFO, LDA, LDU, LIWORK, LWORK, NOUNIT, NSIZES,
461 DOUBLE PRECISION THRESH
465 INTEGER ISEED( 4 ), IWORK( * ), NN( * )
466 DOUBLE PRECISION A( LDA, * ), D1( * ), D2( * ), D3( * ),
467 $ d4( * ), eveigs( * ), result( * ), tau( * ),
468 $ u( ldu, * ), v( ldu, * ), wa1( * ), wa2( * ),
469 $ wa3( * ), work( * ), z( ldu, * )
475 DOUBLE PRECISION ZERO, ONE, TWO, TEN
476 PARAMETER ( ZERO = 0.0d0, one = 1.0d0, two = 2.0d0,
478 DOUBLE PRECISION HALF
479 parameter( half = 0.5d0 )
481 parameter( maxtyp = 18 )
486 INTEGER I, IDIAG, IHBW, IINFO, IL, IMODE, INDX, IROW,
487 $ itemp, itype, iu, iuplo, j, j1, j2, jcol,
488 $ jsize, jtype, kd, lgn, liwedc, lwedc, m, m2,
489 $ m3, mtypes, n, nerrs, nmats, nmax, ntest,
491 DOUBLE PRECISION ABSTOL, ANINV, ANORM, COND, OVFL, RTOVFL,
492 $ RTUNFL, TEMP1, TEMP2, TEMP3, ULP, ULPINV, UNFL,
496 INTEGER IDUMMA( 1 ), IOLDSD( 4 ), ISEED2( 4 ),
497 $ ISEED3( 4 ), KMAGN( MAXTYP ), KMODE( MAXTYP ),
501 DOUBLE PRECISION DLAMCH, DLARND, DSXT1
502 EXTERNAL DLAMCH, DLARND, DSXT1
518 COMMON / srnamc / srnamt
521 INTRINSIC abs, dble, int, log, max, min, sqrt
524 DATA ktype / 1, 2, 5*4, 5*5, 3*8, 3*9 /
525 DATA kmagn / 2*1, 1, 1, 1, 2, 3, 1, 1, 1, 2, 3, 1,
527 DATA kmode / 2*0, 4, 3, 1, 4, 4, 4, 3, 1, 4, 4, 0,
545 nmax = max( nmax, nn( j ) )
552 IF( nsizes.LT.0 )
THEN
554 ELSE IF( badnn )
THEN
556 ELSE IF( ntypes.LT.0 )
THEN
558 ELSE IF( lda.LT.nmax )
THEN
560 ELSE IF( ldu.LT.nmax )
THEN
562 ELSE IF( 2*max( 2, nmax )**2.GT.lwork )
THEN
567 CALL xerbla(
'DDRVST2STG', -info )
573 IF( nsizes.EQ.0 .OR. ntypes.EQ.0 )
578 unfl = dlamch(
'Safe minimum' )
579 ovfl = dlamch(
'Overflow' )
581 ulp = dlamch(
'Epsilon' )*dlamch(
'Base' )
583 rtunfl = sqrt( unfl )
584 rtovfl = sqrt( ovfl )
589 iseed2( i ) = iseed( i )
590 iseed3( i ) = iseed( i )
597 DO 1740 jsize = 1, nsizes
600 lgn = int( log( dble( n ) ) / log( two ) )
605 lwedc = 1 + 4*n + 2*n*lgn + 4*n**2
613 aninv = one / dble( max( 1, n ) )
615 IF( nsizes.NE.1 )
THEN
616 mtypes = min( maxtyp, ntypes )
618 mtypes = min( maxtyp+1, ntypes )
621 DO 1730 jtype = 1, mtypes
623 IF( .NOT.dotype( jtype ) )
629 ioldsd( j ) = iseed( j )
647 IF( mtypes.GT.maxtyp )
650 itype = ktype( jtype )
651 imode = kmode( jtype )
655 GO TO ( 40, 50, 60 )kmagn( jtype )
662 anorm = ( rtovfl*ulp )*aninv
666 anorm = rtunfl*n*ulpinv
671 CALL dlaset(
'Full', lda, n, zero, zero, a, lda )
679 IF( itype.EQ.1 )
THEN
682 ELSE IF( itype.EQ.2 )
THEN
687 a( jcol, jcol ) = anorm
690 ELSE IF( itype.EQ.4 )
THEN
694 CALL dlatms( n, n,
'S', iseed,
'S', work, imode, cond,
695 $ anorm, 0, 0,
'N', a, lda, work( n+1 ),
698 ELSE IF( itype.EQ.5 )
THEN
702 CALL dlatms( n, n,
'S', iseed,
'S', work, imode, cond,
703 $ anorm, n, n,
'N', a, lda, work( n+1 ),
706 ELSE IF( itype.EQ.7 )
THEN
711 CALL dlatmr( n, n,
'S', iseed,
'S', work, 6, one, one,
712 $
'T',
'N', work( n+1 ), 1, one,
713 $ work( 2*n+1 ), 1, one,
'N', idumma, 0, 0,
714 $ zero, anorm,
'NO', a, lda, iwork, iinfo )
716 ELSE IF( itype.EQ.8 )
THEN
721 CALL dlatmr( n, n,
'S', iseed,
'S', work, 6, one, one,
722 $
'T',
'N', work( n+1 ), 1, one,
723 $ work( 2*n+1 ), 1, one,
'N', idumma, n, n,
724 $ zero, anorm,
'NO', a, lda, iwork, iinfo )
726 ELSE IF( itype.EQ.9 )
THEN
730 ihbw = int( ( n-1 )*dlarnd( 1, iseed3 ) )
731 CALL dlatms( n, n,
'S', iseed,
'S', work, imode, cond,
732 $ anorm, ihbw, ihbw,
'Z', u, ldu, work( n+1 ),
737 CALL dlaset(
'Full', lda, n, zero, zero, a, lda )
738 DO 100 idiag = -ihbw, ihbw
739 irow = ihbw - idiag + 1
740 j1 = max( 1, idiag+1 )
741 j2 = min( n, n+idiag )
744 a( i, j ) = u( irow, j )
751 IF( iinfo.NE.0 )
THEN
752 WRITE( nounit, fmt = 9999 )
'Generator', iinfo, n, jtype,
765 il = 1 + int( ( n-1 )*dlarnd( 1, iseed2 ) )
766 iu = 1 + int( ( n-1 )*dlarnd( 1, iseed2 ) )
776 IF( jtype.LE.7 )
THEN
779 d1( i ) = dble( a( i, i ) )
782 d2( i ) = dble( a( i+1, i ) )
785 CALL dstev(
'V', n, d1, d2, z, ldu, work, iinfo )
786 IF( iinfo.NE.0 )
THEN
787 WRITE( nounit, fmt = 9999 )
'DSTEV(V)', iinfo, n,
790 IF( iinfo.LT.0 )
THEN
803 d3( i ) = dble( a( i, i ) )
806 d4( i ) = dble( a( i+1, i ) )
808 CALL dstt21( n, 0, d3, d4, d1, d2, z, ldu, work,
813 d4( i ) = dble( a( i+1, i ) )
816 CALL dstev(
'N', n, d3, d4, z, ldu, work, iinfo )
817 IF( iinfo.NE.0 )
THEN
818 WRITE( nounit, fmt = 9999 )
'DSTEV(N)', iinfo, n,
821 IF( iinfo.LT.0 )
THEN
834 temp1 = max( temp1, abs( d1( j ) ), abs( d3( j ) ) )
835 temp2 = max( temp2, abs( d1( j )-d3( j ) ) )
837 result( 3 ) = temp2 / max( unfl,
838 $ ulp*max( temp1, temp2 ) )
844 eveigs( i ) = d3( i )
845 d1( i ) = dble( a( i, i ) )
848 d2( i ) = dble( a( i+1, i ) )
851 CALL dstevx(
'V',
'A', n, d1, d2, vl, vu, il, iu, abstol,
852 $ m, wa1, z, ldu, work, iwork, iwork( 5*n+1 ),
854 IF( iinfo.NE.0 )
THEN
855 WRITE( nounit, fmt = 9999 )
'DSTEVX(V,A)', iinfo, n,
858 IF( iinfo.LT.0 )
THEN
868 temp3 = max( abs( wa1( 1 ) ), abs( wa1( n ) ) )
876 d3( i ) = dble( a( i, i ) )
879 d4( i ) = dble( a( i+1, i ) )
881 CALL dstt21( n, 0, d3, d4, wa1, d2, z, ldu, work,
886 d4( i ) = dble( a( i+1, i ) )
889 CALL dstevx(
'N',
'A', n, d3, d4, vl, vu, il, iu, abstol,
890 $ m2, wa2, z, ldu, work, iwork,
891 $ iwork( 5*n+1 ), iinfo )
892 IF( iinfo.NE.0 )
THEN
893 WRITE( nounit, fmt = 9999 )
'DSTEVX(N,A)', iinfo, n,
896 IF( iinfo.LT.0 )
THEN
909 temp1 = max( temp1, abs( wa2( j ) ),
910 $ abs( eveigs( j ) ) )
911 temp2 = max( temp2, abs( wa2( j )-eveigs( j ) ) )
913 result( 6 ) = temp2 / max( unfl,
914 $ ulp*max( temp1, temp2 ) )
920 d1( i ) = dble( a( i, i ) )
923 d2( i ) = dble( a( i+1, i ) )
926 CALL dstevr(
'V',
'A', n, d1, d2, vl, vu, il, iu, abstol,
927 $ m, wa1, z, ldu, iwork, work, lwork,
928 $ iwork(2*n+1), liwork-2*n, iinfo )
929 IF( iinfo.NE.0 )
THEN
930 WRITE( nounit, fmt = 9999 )
'DSTEVR(V,A)', iinfo, n,
933 IF( iinfo.LT.0 )
THEN
942 temp3 = max( abs( wa1( 1 ) ), abs( wa1( n ) ) )
950 d3( i ) = dble( a( i, i ) )
953 d4( i ) = dble( a( i+1, i ) )
955 CALL dstt21( n, 0, d3, d4, wa1, d2, z, ldu, work,
960 d4( i ) = dble( a( i+1, i ) )
963 CALL dstevr(
'N',
'A', n, d3, d4, vl, vu, il, iu, abstol,
964 $ m2, wa2, z, ldu, iwork, work, lwork,
965 $ iwork(2*n+1), liwork-2*n, iinfo )
966 IF( iinfo.NE.0 )
THEN
967 WRITE( nounit, fmt = 9999 )
'DSTEVR(N,A)', iinfo, n,
970 IF( iinfo.LT.0 )
THEN
983 temp1 = max( temp1, abs( wa2( j ) ),
984 $ abs( eveigs( j ) ) )
985 temp2 = max( temp2, abs( wa2( j )-eveigs( j ) ) )
987 result( 9 ) = temp2 / max( unfl,
988 $ ulp*max( temp1, temp2 ) )
995 d1( i ) = dble( a( i, i ) )
998 d2( i ) = dble( a( i+1, i ) )
1001 CALL dstevx(
'V',
'I', n, d1, d2, vl, vu, il, iu, abstol,
1002 $ m2, wa2, z, ldu, work, iwork,
1003 $ iwork( 5*n+1 ), iinfo )
1004 IF( iinfo.NE.0 )
THEN
1005 WRITE( nounit, fmt = 9999 )
'DSTEVX(V,I)', iinfo, n,
1008 IF( iinfo.LT.0 )
THEN
1011 result( 10 ) = ulpinv
1012 result( 11 ) = ulpinv
1013 result( 12 ) = ulpinv
1021 d3( i ) = dble( a( i, i ) )
1024 d4( i ) = dble( a( i+1, i ) )
1026 CALL dstt22( n, m2, 0, d3, d4, wa2, d2, z, ldu, work,
1027 $ max( 1, m2 ), result( 10 ) )
1032 d4( i ) = dble( a( i+1, i ) )
1035 CALL dstevx(
'N',
'I', n, d3, d4, vl, vu, il, iu, abstol,
1036 $ m3, wa3, z, ldu, work, iwork,
1037 $ iwork( 5*n+1 ), iinfo )
1038 IF( iinfo.NE.0 )
THEN
1039 WRITE( nounit, fmt = 9999 )
'DSTEVX(N,I)', iinfo, n,
1042 IF( iinfo.LT.0 )
THEN
1045 result( 12 ) = ulpinv
1052 temp1 = dsxt1( 1, wa2, m2, wa3, m3, abstol, ulp, unfl )
1053 temp2 = dsxt1( 1, wa3, m3, wa2, m2, abstol, ulp, unfl )
1054 result( 12 ) = ( temp1+temp2 ) / max( unfl, ulp*temp3 )
1061 vl = wa1( il ) - max( half*
1062 $ ( wa1( il )-wa1( il-1 ) ), ten*ulp*temp3,
1065 vl = wa1( 1 ) - max( half*( wa1( n )-wa1( 1 ) ),
1066 $ ten*ulp*temp3, ten*rtunfl )
1069 vu = wa1( iu ) + max( half*
1070 $ ( wa1( iu+1 )-wa1( iu ) ), ten*ulp*temp3,
1073 vu = wa1( n ) + max( half*( wa1( n )-wa1( 1 ) ),
1074 $ ten*ulp*temp3, ten*rtunfl )
1082 d1( i ) = dble( a( i, i ) )
1085 d2( i ) = dble( a( i+1, i ) )
1088 CALL dstevx(
'V',
'V', n, d1, d2, vl, vu, il, iu, abstol,
1089 $ m2, wa2, z, ldu, work, iwork,
1090 $ iwork( 5*n+1 ), iinfo )
1091 IF( iinfo.NE.0 )
THEN
1092 WRITE( nounit, fmt = 9999 )
'DSTEVX(V,V)', iinfo, n,
1095 IF( iinfo.LT.0 )
THEN
1098 result( 13 ) = ulpinv
1099 result( 14 ) = ulpinv
1100 result( 15 ) = ulpinv
1105 IF( m2.EQ.0 .AND. n.GT.0 )
THEN
1106 result( 13 ) = ulpinv
1107 result( 14 ) = ulpinv
1108 result( 15 ) = ulpinv
1115 d3( i ) = dble( a( i, i ) )
1118 d4( i ) = dble( a( i+1, i ) )
1120 CALL dstt22( n, m2, 0, d3, d4, wa2, d2, z, ldu, work,
1121 $ max( 1, m2 ), result( 13 ) )
1125 d4( i ) = dble( a( i+1, i ) )
1128 CALL dstevx(
'N',
'V', n, d3, d4, vl, vu, il, iu, abstol,
1129 $ m3, wa3, z, ldu, work, iwork,
1130 $ iwork( 5*n+1 ), iinfo )
1131 IF( iinfo.NE.0 )
THEN
1132 WRITE( nounit, fmt = 9999 )
'DSTEVX(N,V)', iinfo, n,
1135 IF( iinfo.LT.0 )
THEN
1138 result( 15 ) = ulpinv
1145 temp1 = dsxt1( 1, wa2, m2, wa3, m3, abstol, ulp, unfl )
1146 temp2 = dsxt1( 1, wa3, m3, wa2, m2, abstol, ulp, unfl )
1147 result( 15 ) = ( temp1+temp2 ) / max( unfl, temp3*ulp )
1153 d1( i ) = dble( a( i, i ) )
1156 d2( i ) = dble( a( i+1, i ) )
1159 CALL dstevd(
'V', n, d1, d2, z, ldu, work, lwedc, iwork,
1161 IF( iinfo.NE.0 )
THEN
1162 WRITE( nounit, fmt = 9999 )
'DSTEVD(V)', iinfo, n,
1165 IF( iinfo.LT.0 )
THEN
1168 result( 16 ) = ulpinv
1169 result( 17 ) = ulpinv
1170 result( 18 ) = ulpinv
1178 d3( i ) = dble( a( i, i ) )
1181 d4( i ) = dble( a( i+1, i ) )
1183 CALL dstt21( n, 0, d3, d4, d1, d2, z, ldu, work,
1188 d4( i ) = dble( a( i+1, i ) )
1191 CALL dstevd(
'N', n, d3, d4, z, ldu, work, lwedc, iwork,
1193 IF( iinfo.NE.0 )
THEN
1194 WRITE( nounit, fmt = 9999 )
'DSTEVD(N)', iinfo, n,
1197 IF( iinfo.LT.0 )
THEN
1200 result( 18 ) = ulpinv
1210 temp1 = max( temp1, abs( eveigs( j ) ),
1212 temp2 = max( temp2, abs( eveigs( j )-d3( j ) ) )
1214 result( 18 ) = temp2 / max( unfl,
1215 $ ulp*max( temp1, temp2 ) )
1221 d1( i ) = dble( a( i, i ) )
1224 d2( i ) = dble( a( i+1, i ) )
1227 CALL dstevr(
'V',
'I', n, d1, d2, vl, vu, il, iu, abstol,
1228 $ m2, wa2, z, ldu, iwork, work, lwork,
1229 $ iwork(2*n+1), liwork-2*n, iinfo )
1230 IF( iinfo.NE.0 )
THEN
1231 WRITE( nounit, fmt = 9999 )
'DSTEVR(V,I)', iinfo, n,
1234 IF( iinfo.LT.0 )
THEN
1237 result( 19 ) = ulpinv
1238 result( 20 ) = ulpinv
1239 result( 21 ) = ulpinv
1247 d3( i ) = dble( a( i, i ) )
1250 d4( i ) = dble( a( i+1, i ) )
1252 CALL dstt22( n, m2, 0, d3, d4, wa2, d2, z, ldu, work,
1253 $ max( 1, m2 ), result( 19 ) )
1258 d4( i ) = dble( a( i+1, i ) )
1261 CALL dstevr(
'N',
'I', n, d3, d4, vl, vu, il, iu, abstol,
1262 $ m3, wa3, z, ldu, iwork, work, lwork,
1263 $ iwork(2*n+1), liwork-2*n, iinfo )
1264 IF( iinfo.NE.0 )
THEN
1265 WRITE( nounit, fmt = 9999 )
'DSTEVR(N,I)', iinfo, n,
1268 IF( iinfo.LT.0 )
THEN
1271 result( 21 ) = ulpinv
1278 temp1 = dsxt1( 1, wa2, m2, wa3, m3, abstol, ulp, unfl )
1279 temp2 = dsxt1( 1, wa3, m3, wa2, m2, abstol, ulp, unfl )
1280 result( 21 ) = ( temp1+temp2 ) / max( unfl, ulp*temp3 )
1287 vl = wa1( il ) - max( half*
1288 $ ( wa1( il )-wa1( il-1 ) ), ten*ulp*temp3,
1291 vl = wa1( 1 ) - max( half*( wa1( n )-wa1( 1 ) ),
1292 $ ten*ulp*temp3, ten*rtunfl )
1295 vu = wa1( iu ) + max( half*
1296 $ ( wa1( iu+1 )-wa1( iu ) ), ten*ulp*temp3,
1299 vu = wa1( n ) + max( half*( wa1( n )-wa1( 1 ) ),
1300 $ ten*ulp*temp3, ten*rtunfl )
1308 d1( i ) = dble( a( i, i ) )
1311 d2( i ) = dble( a( i+1, i ) )
1314 CALL dstevr(
'V',
'V', n, d1, d2, vl, vu, il, iu, abstol,
1315 $ m2, wa2, z, ldu, iwork, work, lwork,
1316 $ iwork(2*n+1), liwork-2*n, iinfo )
1317 IF( iinfo.NE.0 )
THEN
1318 WRITE( nounit, fmt = 9999 )
'DSTEVR(V,V)', iinfo, n,
1321 IF( iinfo.LT.0 )
THEN
1324 result( 22 ) = ulpinv
1325 result( 23 ) = ulpinv
1326 result( 24 ) = ulpinv
1331 IF( m2.EQ.0 .AND. n.GT.0 )
THEN
1332 result( 22 ) = ulpinv
1333 result( 23 ) = ulpinv
1334 result( 24 ) = ulpinv
1341 d3( i ) = dble( a( i, i ) )
1344 d4( i ) = dble( a( i+1, i ) )
1346 CALL dstt22( n, m2, 0, d3, d4, wa2, d2, z, ldu, work,
1347 $ max( 1, m2 ), result( 22 ) )
1351 d4( i ) = dble( a( i+1, i ) )
1354 CALL dstevr(
'N',
'V', n, d3, d4, vl, vu, il, iu, abstol,
1355 $ m3, wa3, z, ldu, iwork, work, lwork,
1356 $ iwork(2*n+1), liwork-2*n, iinfo )
1357 IF( iinfo.NE.0 )
THEN
1358 WRITE( nounit, fmt = 9999 )
'DSTEVR(N,V)', iinfo, n,
1361 IF( iinfo.LT.0 )
THEN
1364 result( 24 ) = ulpinv
1371 temp1 = dsxt1( 1, wa2, m2, wa3, m3, abstol, ulp, unfl )
1372 temp2 = dsxt1( 1, wa3, m3, wa2, m2, abstol, ulp, unfl )
1373 result( 24 ) = ( temp1+temp2 ) / max( unfl, temp3*ulp )
1390 DO 1720 iuplo = 0, 1
1391 IF( iuplo.EQ.0 )
THEN
1399 CALL dlacpy(
' ', n, n, a, lda, v, ldu )
1403 CALL dsyev(
'V', uplo, n, a, ldu, d1, work, lwork,
1405 IF( iinfo.NE.0 )
THEN
1406 WRITE( nounit, fmt = 9999 )
'DSYEV(V,' // uplo //
')',
1407 $ iinfo, n, jtype, ioldsd
1409 IF( iinfo.LT.0 )
THEN
1412 result( ntest ) = ulpinv
1413 result( ntest+1 ) = ulpinv
1414 result( ntest+2 ) = ulpinv
1421 CALL dsyt21( 1, uplo, n, 0, v, ldu, d1, d2, a, ldu, z,
1422 $ ldu, tau, work, result( ntest ) )
1424 CALL dlacpy(
' ', n, n, v, ldu, a, lda )
1427 srnamt =
'DSYEV_2STAGE'
1428 CALL dsyev_2stage(
'N', uplo, n, a, ldu, d3, work, lwork,
1430 IF( iinfo.NE.0 )
THEN
1431 WRITE( nounit, fmt = 9999 )
1432 $
'DSYEV_2STAGE(N,' // uplo //
')',
1433 $ iinfo, n, jtype, ioldsd
1435 IF( iinfo.LT.0 )
THEN
1438 result( ntest ) = ulpinv
1448 temp1 = max( temp1, abs( d1( j ) ), abs( d3( j ) ) )
1449 temp2 = max( temp2, abs( d1( j )-d3( j ) ) )
1451 result( ntest ) = temp2 / max( unfl,
1452 $ ulp*max( temp1, temp2 ) )
1455 CALL dlacpy(
' ', n, n, v, ldu, a, lda )
1460 temp3 = max( abs( d1( 1 ) ), abs( d1( n ) ) )
1462 vl = d1( il ) - max( half*( d1( il )-d1( il-1 ) ),
1463 $ ten*ulp*temp3, ten*rtunfl )
1464 ELSE IF( n.GT.0 )
THEN
1465 vl = d1( 1 ) - max( half*( d1( n )-d1( 1 ) ),
1466 $ ten*ulp*temp3, ten*rtunfl )
1469 vu = d1( iu ) + max( half*( d1( iu+1 )-d1( iu ) ),
1470 $ ten*ulp*temp3, ten*rtunfl )
1471 ELSE IF( n.GT.0 )
THEN
1472 vu = d1( n ) + max( half*( d1( n )-d1( 1 ) ),
1473 $ ten*ulp*temp3, ten*rtunfl )
1482 CALL dsyevx(
'V',
'A', uplo, n, a, ldu, vl, vu, il, iu,
1483 $ abstol, m, wa1, z, ldu, work, lwork, iwork,
1484 $ iwork( 5*n+1 ), iinfo )
1485 IF( iinfo.NE.0 )
THEN
1486 WRITE( nounit, fmt = 9999 )
'DSYEVX(V,A,' // uplo //
1487 $
')', iinfo, n, jtype, ioldsd
1489 IF( iinfo.LT.0 )
THEN
1492 result( ntest ) = ulpinv
1493 result( ntest+1 ) = ulpinv
1494 result( ntest+2 ) = ulpinv
1501 CALL dlacpy(
' ', n, n, v, ldu, a, lda )
1503 CALL dsyt21( 1, uplo, n, 0, a, ldu, d1, d2, z, ldu, v,
1504 $ ldu, tau, work, result( ntest ) )
1507 srnamt =
'DSYEVX_2STAGE'
1509 $ il, iu, abstol, m2, wa2, z, ldu, work,
1510 $ lwork, iwork, iwork( 5*n+1 ), iinfo )
1511 IF( iinfo.NE.0 )
THEN
1512 WRITE( nounit, fmt = 9999 )
1513 $
'DSYEVX_2STAGE(N,A,' // uplo //
1514 $
')', iinfo, n, jtype, ioldsd
1516 IF( iinfo.LT.0 )
THEN
1519 result( ntest ) = ulpinv
1529 temp1 = max( temp1, abs( wa1( j ) ), abs( wa2( j ) ) )
1530 temp2 = max( temp2, abs( wa1( j )-wa2( j ) ) )
1532 result( ntest ) = temp2 / max( unfl,
1533 $ ulp*max( temp1, temp2 ) )
1538 CALL dlacpy(
' ', n, n, v, ldu, a, lda )
1540 CALL dsyevx(
'V',
'I', uplo, n, a, ldu, vl, vu, il, iu,
1541 $ abstol, m2, wa2, z, ldu, work, lwork, iwork,
1542 $ iwork( 5*n+1 ), iinfo )
1543 IF( iinfo.NE.0 )
THEN
1544 WRITE( nounit, fmt = 9999 )
'DSYEVX(V,I,' // uplo //
1545 $
')', iinfo, n, jtype, ioldsd
1547 IF( iinfo.LT.0 )
THEN
1550 result( ntest ) = ulpinv
1551 result( ntest+1 ) = ulpinv
1552 result( ntest+2 ) = ulpinv
1559 CALL dlacpy(
' ', n, n, v, ldu, a, lda )
1561 CALL dsyt22( 1, uplo, n, m2, 0, a, ldu, wa2, d2, z, ldu,
1562 $ v, ldu, tau, work, result( ntest ) )
1565 CALL dlacpy(
' ', n, n, v, ldu, a, lda )
1566 srnamt =
'DSYEVX_2STAGE'
1568 $ il, iu, abstol, m3, wa3, z, ldu, work,
1569 $ lwork, iwork, iwork( 5*n+1 ), iinfo )
1570 IF( iinfo.NE.0 )
THEN
1571 WRITE( nounit, fmt = 9999 )
1572 $
'DSYEVX_2STAGE(N,I,' // uplo //
1573 $
')', iinfo, n, jtype, ioldsd
1575 IF( iinfo.LT.0 )
THEN
1578 result( ntest ) = ulpinv
1585 temp1 = dsxt1( 1, wa2, m2, wa3, m3, abstol, ulp, unfl )
1586 temp2 = dsxt1( 1, wa3, m3, wa2, m2, abstol, ulp, unfl )
1587 result( ntest ) = ( temp1+temp2 ) /
1588 $ max( unfl, ulp*temp3 )
1592 CALL dlacpy(
' ', n, n, v, ldu, a, lda )
1594 CALL dsyevx(
'V',
'V', uplo, n, a, ldu, vl, vu, il, iu,
1595 $ abstol, m2, wa2, z, ldu, work, lwork, iwork,
1596 $ iwork( 5*n+1 ), iinfo )
1597 IF( iinfo.NE.0 )
THEN
1598 WRITE( nounit, fmt = 9999 )
'DSYEVX(V,V,' // uplo //
1599 $
')', iinfo, n, jtype, ioldsd
1601 IF( iinfo.LT.0 )
THEN
1604 result( ntest ) = ulpinv
1605 result( ntest+1 ) = ulpinv
1606 result( ntest+2 ) = ulpinv
1613 CALL dlacpy(
' ', n, n, v, ldu, a, lda )
1615 CALL dsyt22( 1, uplo, n, m2, 0, a, ldu, wa2, d2, z, ldu,
1616 $ v, ldu, tau, work, result( ntest ) )
1619 CALL dlacpy(
' ', n, n, v, ldu, a, lda )
1620 srnamt =
'DSYEVX_2STAGE'
1622 $ il, iu, abstol, m3, wa3, z, ldu, work,
1623 $ lwork, iwork, iwork( 5*n+1 ), iinfo )
1624 IF( iinfo.NE.0 )
THEN
1625 WRITE( nounit, fmt = 9999 )
1626 $
'DSYEVX_2STAGE(N,V,' // uplo //
1627 $
')', iinfo, n, jtype, ioldsd
1629 IF( iinfo.LT.0 )
THEN
1632 result( ntest ) = ulpinv
1637 IF( m3.EQ.0 .AND. n.GT.0 )
THEN
1638 result( ntest ) = ulpinv
1644 temp1 = dsxt1( 1, wa2, m2, wa3, m3, abstol, ulp, unfl )
1645 temp2 = dsxt1( 1, wa3, m3, wa2, m2, abstol, ulp, unfl )
1647 temp3 = max( abs( wa1( 1 ) ), abs( wa1( n ) ) )
1651 result( ntest ) = ( temp1+temp2 ) /
1652 $ max( unfl, temp3*ulp )
1658 CALL dlacpy(
' ', n, n, v, ldu, a, lda )
1663 IF( iuplo.EQ.1 )
THEN
1667 work( indx ) = a( i, j )
1675 work( indx ) = a( i, j )
1683 CALL dspev(
'V', uplo, n, work, d1, z, ldu, v, iinfo )
1684 IF( iinfo.NE.0 )
THEN
1685 WRITE( nounit, fmt = 9999 )
'DSPEV(V,' // uplo //
')',
1686 $ iinfo, n, jtype, ioldsd
1688 IF( iinfo.LT.0 )
THEN
1691 result( ntest ) = ulpinv
1692 result( ntest+1 ) = ulpinv
1693 result( ntest+2 ) = ulpinv
1700 CALL dsyt21( 1, uplo, n, 0, a, lda, d1, d2, z, ldu, v,
1701 $ ldu, tau, work, result( ntest ) )
1703 IF( iuplo.EQ.1 )
THEN
1707 work( indx ) = a( i, j )
1715 work( indx ) = a( i, j )
1723 CALL dspev(
'N', uplo, n, work, d3, z, ldu, v, iinfo )
1724 IF( iinfo.NE.0 )
THEN
1725 WRITE( nounit, fmt = 9999 )
'DSPEV(N,' // uplo //
')',
1726 $ iinfo, n, jtype, ioldsd
1728 IF( iinfo.LT.0 )
THEN
1731 result( ntest ) = ulpinv
1741 temp1 = max( temp1, abs( d1( j ) ), abs( d3( j ) ) )
1742 temp2 = max( temp2, abs( d1( j )-d3( j ) ) )
1744 result( ntest ) = temp2 / max( unfl,
1745 $ ulp*max( temp1, temp2 ) )
1751 IF( iuplo.EQ.1 )
THEN
1755 work( indx ) = a( i, j )
1763 work( indx ) = a( i, j )
1772 temp3 = max( abs( d1( 1 ) ), abs( d1( n ) ) )
1774 vl = d1( il ) - max( half*( d1( il )-d1( il-1 ) ),
1775 $ ten*ulp*temp3, ten*rtunfl )
1776 ELSE IF( n.GT.0 )
THEN
1777 vl = d1( 1 ) - max( half*( d1( n )-d1( 1 ) ),
1778 $ ten*ulp*temp3, ten*rtunfl )
1781 vu = d1( iu ) + max( half*( d1( iu+1 )-d1( iu ) ),
1782 $ ten*ulp*temp3, ten*rtunfl )
1783 ELSE IF( n.GT.0 )
THEN
1784 vu = d1( n ) + max( half*( d1( n )-d1( 1 ) ),
1785 $ ten*ulp*temp3, ten*rtunfl )
1794 CALL dspevx(
'V',
'A', uplo, n, work, vl, vu, il, iu,
1795 $ abstol, m, wa1, z, ldu, v, iwork,
1796 $ iwork( 5*n+1 ), iinfo )
1797 IF( iinfo.NE.0 )
THEN
1798 WRITE( nounit, fmt = 9999 )
'DSPEVX(V,A,' // uplo //
1799 $
')', iinfo, n, jtype, ioldsd
1801 IF( iinfo.LT.0 )
THEN
1804 result( ntest ) = ulpinv
1805 result( ntest+1 ) = ulpinv
1806 result( ntest+2 ) = ulpinv
1813 CALL dsyt21( 1, uplo, n, 0, a, ldu, wa1, d2, z, ldu, v,
1814 $ ldu, tau, work, result( ntest ) )
1818 IF( iuplo.EQ.1 )
THEN
1822 work( indx ) = a( i, j )
1830 work( indx ) = a( i, j )
1837 CALL dspevx(
'N',
'A', uplo, n, work, vl, vu, il, iu,
1838 $ abstol, m2, wa2, z, ldu, v, iwork,
1839 $ iwork( 5*n+1 ), iinfo )
1840 IF( iinfo.NE.0 )
THEN
1841 WRITE( nounit, fmt = 9999 )
'DSPEVX(N,A,' // uplo //
1842 $
')', iinfo, n, jtype, ioldsd
1844 IF( iinfo.LT.0 )
THEN
1847 result( ntest ) = ulpinv
1857 temp1 = max( temp1, abs( wa1( j ) ), abs( wa2( j ) ) )
1858 temp2 = max( temp2, abs( wa1( j )-wa2( j ) ) )
1860 result( ntest ) = temp2 / max( unfl,
1861 $ ulp*max( temp1, temp2 ) )
1864 IF( iuplo.EQ.1 )
THEN
1868 work( indx ) = a( i, j )
1876 work( indx ) = a( i, j )
1885 CALL dspevx(
'V',
'I', uplo, n, work, vl, vu, il, iu,
1886 $ abstol, m2, wa2, z, ldu, v, iwork,
1887 $ iwork( 5*n+1 ), iinfo )
1888 IF( iinfo.NE.0 )
THEN
1889 WRITE( nounit, fmt = 9999 )
'DSPEVX(V,I,' // 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 dsyt22( 1, uplo, n, m2, 0, a, ldu, wa2, d2, z, ldu,
1905 $ v, ldu, tau, work, result( ntest ) )
1909 IF( iuplo.EQ.1 )
THEN
1913 work( indx ) = a( i, j )
1921 work( indx ) = a( i, j )
1928 CALL dspevx(
'N',
'I', uplo, n, work, vl, vu, il, iu,
1929 $ abstol, m3, wa3, z, ldu, v, iwork,
1930 $ iwork( 5*n+1 ), iinfo )
1931 IF( iinfo.NE.0 )
THEN
1932 WRITE( nounit, fmt = 9999 )
'DSPEVX(N,I,' // uplo //
1933 $
')', iinfo, n, jtype, ioldsd
1935 IF( iinfo.LT.0 )
THEN
1938 result( ntest ) = ulpinv
1943 IF( m3.EQ.0 .AND. n.GT.0 )
THEN
1944 result( ntest ) = ulpinv
1950 temp1 = dsxt1( 1, wa2, m2, wa3, m3, abstol, ulp, unfl )
1951 temp2 = dsxt1( 1, wa3, m3, wa2, m2, abstol, ulp, unfl )
1953 temp3 = max( abs( wa1( 1 ) ), abs( wa1( n ) ) )
1957 result( ntest ) = ( temp1+temp2 ) /
1958 $ max( unfl, temp3*ulp )
1961 IF( iuplo.EQ.1 )
THEN
1965 work( indx ) = a( i, j )
1973 work( indx ) = a( i, j )
1982 CALL dspevx(
'V',
'V', uplo, n, work, vl, vu, il, iu,
1983 $ abstol, m2, wa2, z, ldu, v, iwork,
1984 $ iwork( 5*n+1 ), iinfo )
1985 IF( iinfo.NE.0 )
THEN
1986 WRITE( nounit, fmt = 9999 )
'DSPEVX(V,V,' // uplo //
1987 $
')', iinfo, n, jtype, ioldsd
1989 IF( iinfo.LT.0 )
THEN
1992 result( ntest ) = ulpinv
1993 result( ntest+1 ) = ulpinv
1994 result( ntest+2 ) = ulpinv
2001 CALL dsyt22( 1, uplo, n, m2, 0, a, ldu, wa2, d2, z, ldu,
2002 $ v, ldu, tau, work, result( ntest ) )
2006 IF( iuplo.EQ.1 )
THEN
2010 work( indx ) = a( i, j )
2018 work( indx ) = a( i, j )
2025 CALL dspevx(
'N',
'V', uplo, n, work, vl, vu, il, iu,
2026 $ abstol, m3, wa3, z, ldu, v, iwork,
2027 $ iwork( 5*n+1 ), iinfo )
2028 IF( iinfo.NE.0 )
THEN
2029 WRITE( nounit, fmt = 9999 )
'DSPEVX(N,V,' // uplo //
2030 $
')', iinfo, n, jtype, ioldsd
2032 IF( iinfo.LT.0 )
THEN
2035 result( ntest ) = ulpinv
2040 IF( m3.EQ.0 .AND. n.GT.0 )
THEN
2041 result( ntest ) = ulpinv
2047 temp1 = dsxt1( 1, wa2, m2, wa3, m3, abstol, ulp, unfl )
2048 temp2 = dsxt1( 1, wa3, m3, wa2, m2, abstol, ulp, unfl )
2050 temp3 = max( abs( wa1( 1 ) ), abs( wa1( n ) ) )
2054 result( ntest ) = ( temp1+temp2 ) /
2055 $ max( unfl, temp3*ulp )
2061 IF( jtype.LE.7 )
THEN
2063 ELSE IF( jtype.GE.8 .AND. jtype.LE.15 )
THEN
2072 IF( iuplo.EQ.1 )
THEN
2074 DO 1090 i = max( 1, j-kd ), j
2075 v( kd+1+i-j, j ) = a( i, j )
2080 DO 1110 i = j, min( n, j+kd )
2081 v( 1+i-j, j ) = a( i, j )
2088 CALL dsbev(
'V', uplo, n, kd, v, ldu, d1, z, ldu, work,
2090 IF( iinfo.NE.0 )
THEN
2091 WRITE( nounit, fmt = 9999 )
'DSBEV(V,' // uplo //
')',
2092 $ iinfo, n, jtype, ioldsd
2094 IF( iinfo.LT.0 )
THEN
2097 result( ntest ) = ulpinv
2098 result( ntest+1 ) = ulpinv
2099 result( ntest+2 ) = ulpinv
2106 CALL dsyt21( 1, uplo, n, 0, a, lda, d1, d2, z, ldu, v,
2107 $ ldu, tau, work, result( ntest ) )
2109 IF( iuplo.EQ.1 )
THEN
2111 DO 1130 i = max( 1, j-kd ), j
2112 v( kd+1+i-j, j ) = a( i, j )
2117 DO 1150 i = j, min( n, j+kd )
2118 v( 1+i-j, j ) = a( i, j )
2124 srnamt =
'DSBEV_2STAGE'
2125 CALL dsbev_2stage(
'N', uplo, n, kd, v, ldu, d3, z, ldu,
2126 $ work, lwork, iinfo )
2127 IF( iinfo.NE.0 )
THEN
2128 WRITE( nounit, fmt = 9999 )
2129 $
'DSBEV_2STAGE(N,' // uplo //
')',
2130 $ iinfo, n, jtype, ioldsd
2132 IF( iinfo.LT.0 )
THEN
2135 result( ntest ) = ulpinv
2145 temp1 = max( temp1, abs( d1( j ) ), abs( d3( j ) ) )
2146 temp2 = max( temp2, abs( d1( j )-d3( j ) ) )
2148 result( ntest ) = temp2 / max( unfl,
2149 $ ulp*max( temp1, temp2 ) )
2155 IF( iuplo.EQ.1 )
THEN
2157 DO 1190 i = max( 1, j-kd ), j
2158 v( kd+1+i-j, j ) = a( i, j )
2163 DO 1210 i = j, min( n, j+kd )
2164 v( 1+i-j, j ) = a( i, j )
2171 CALL dsbevx(
'V',
'A', uplo, n, kd, v, ldu, u, ldu, vl,
2172 $ vu, il, iu, abstol, m, wa2, z, ldu, work,
2173 $ iwork, iwork( 5*n+1 ), iinfo )
2174 IF( iinfo.NE.0 )
THEN
2175 WRITE( nounit, fmt = 9999 )
'DSBEVX(V,A,' // uplo //
2176 $
')', iinfo, n, jtype, ioldsd
2178 IF( iinfo.LT.0 )
THEN
2181 result( ntest ) = ulpinv
2182 result( ntest+1 ) = ulpinv
2183 result( ntest+2 ) = ulpinv
2190 CALL dsyt21( 1, uplo, n, 0, a, ldu, wa2, d2, z, ldu, v,
2191 $ ldu, tau, work, result( ntest ) )
2195 IF( iuplo.EQ.1 )
THEN
2197 DO 1230 i = max( 1, j-kd ), j
2198 v( kd+1+i-j, j ) = a( i, j )
2203 DO 1250 i = j, min( n, j+kd )
2204 v( 1+i-j, j ) = a( i, j )
2209 srnamt =
'DSBEVX_2STAGE'
2211 $ u, ldu, vl, vu, il, iu, abstol, m3, wa3,
2212 $ z, ldu, work, lwork, iwork, iwork( 5*n+1 ),
2214 IF( iinfo.NE.0 )
THEN
2215 WRITE( nounit, fmt = 9999 )
2216 $
'DSBEVX_2STAGE(N,A,' // uplo //
2217 $
')', iinfo, n, jtype, ioldsd
2219 IF( iinfo.LT.0 )
THEN
2222 result( ntest ) = ulpinv
2232 temp1 = max( temp1, abs( wa2( j ) ), abs( wa3( j ) ) )
2233 temp2 = max( temp2, abs( wa2( j )-wa3( j ) ) )
2235 result( ntest ) = temp2 / max( unfl,
2236 $ ulp*max( temp1, temp2 ) )
2240 IF( iuplo.EQ.1 )
THEN
2242 DO 1290 i = max( 1, j-kd ), j
2243 v( kd+1+i-j, j ) = a( i, j )
2248 DO 1310 i = j, min( n, j+kd )
2249 v( 1+i-j, j ) = a( i, j )
2255 CALL dsbevx(
'V',
'I', uplo, n, kd, v, ldu, u, ldu, vl,
2256 $ vu, il, iu, abstol, m2, wa2, z, ldu, work,
2257 $ iwork, iwork( 5*n+1 ), iinfo )
2258 IF( iinfo.NE.0 )
THEN
2259 WRITE( nounit, fmt = 9999 )
'DSBEVX(V,I,' // uplo //
2260 $
')', iinfo, n, jtype, ioldsd
2262 IF( iinfo.LT.0 )
THEN
2265 result( ntest ) = ulpinv
2266 result( ntest+1 ) = ulpinv
2267 result( ntest+2 ) = ulpinv
2274 CALL dsyt22( 1, uplo, n, m2, 0, a, ldu, wa2, d2, z, ldu,
2275 $ v, ldu, tau, work, result( ntest ) )
2279 IF( iuplo.EQ.1 )
THEN
2281 DO 1330 i = max( 1, j-kd ), j
2282 v( kd+1+i-j, j ) = a( i, j )
2287 DO 1350 i = j, min( n, j+kd )
2288 v( 1+i-j, j ) = a( i, j )
2293 srnamt =
'DSBEVX_2STAGE'
2295 $ u, ldu, vl, vu, il, iu, abstol, m3, wa3,
2296 $ z, ldu, work, lwork, iwork, iwork( 5*n+1 ),
2298 IF( iinfo.NE.0 )
THEN
2299 WRITE( nounit, fmt = 9999 )
2300 $
'DSBEVX_2STAGE(N,I,' // uplo //
2301 $
')', iinfo, n, jtype, ioldsd
2303 IF( iinfo.LT.0 )
THEN
2306 result( ntest ) = ulpinv
2313 temp1 = dsxt1( 1, wa2, m2, wa3, m3, abstol, ulp, unfl )
2314 temp2 = dsxt1( 1, wa3, m3, wa2, m2, abstol, ulp, unfl )
2316 temp3 = max( abs( wa1( 1 ) ), abs( wa1( n ) ) )
2320 result( ntest ) = ( temp1+temp2 ) /
2321 $ max( unfl, temp3*ulp )
2325 IF( iuplo.EQ.1 )
THEN
2327 DO 1380 i = max( 1, j-kd ), j
2328 v( kd+1+i-j, j ) = a( i, j )
2333 DO 1400 i = j, min( n, j+kd )
2334 v( 1+i-j, j ) = a( i, j )
2340 CALL dsbevx(
'V',
'V', uplo, n, kd, v, ldu, u, ldu, vl,
2341 $ vu, il, iu, abstol, m2, wa2, z, ldu, work,
2342 $ iwork, iwork( 5*n+1 ), iinfo )
2343 IF( iinfo.NE.0 )
THEN
2344 WRITE( nounit, fmt = 9999 )
'DSBEVX(V,V,' // uplo //
2345 $
')', iinfo, n, jtype, ioldsd
2347 IF( iinfo.LT.0 )
THEN
2350 result( ntest ) = ulpinv
2351 result( ntest+1 ) = ulpinv
2352 result( ntest+2 ) = ulpinv
2359 CALL dsyt22( 1, uplo, n, m2, 0, a, ldu, wa2, d2, z, ldu,
2360 $ v, ldu, tau, work, result( ntest ) )
2364 IF( iuplo.EQ.1 )
THEN
2366 DO 1420 i = max( 1, j-kd ), j
2367 v( kd+1+i-j, j ) = a( i, j )
2372 DO 1440 i = j, min( n, j+kd )
2373 v( 1+i-j, j ) = a( i, j )
2378 srnamt =
'DSBEVX_2STAGE'
2380 $ u, ldu, vl, vu, il, iu, abstol, m3, wa3,
2381 $ z, ldu, work, lwork, iwork, iwork( 5*n+1 ),
2383 IF( iinfo.NE.0 )
THEN
2384 WRITE( nounit, fmt = 9999 )
2385 $
'DSBEVX_2STAGE(N,V,' // uplo //
2386 $
')', iinfo, n, jtype, ioldsd
2388 IF( iinfo.LT.0 )
THEN
2391 result( ntest ) = ulpinv
2396 IF( m3.EQ.0 .AND. n.GT.0 )
THEN
2397 result( ntest ) = ulpinv
2403 temp1 = dsxt1( 1, wa2, m2, wa3, m3, abstol, ulp, unfl )
2404 temp2 = dsxt1( 1, wa3, m3, wa2, m2, abstol, ulp, unfl )
2406 temp3 = max( abs( wa1( 1 ) ), abs( wa1( n ) ) )
2410 result( ntest ) = ( temp1+temp2 ) /
2411 $ max( unfl, temp3*ulp )
2417 CALL dlacpy(
' ', n, n, a, lda, v, ldu )
2421 CALL dsyevd(
'V', uplo, n, a, ldu, d1, work, lwedc,
2422 $ iwork, liwedc, iinfo )
2423 IF( iinfo.NE.0 )
THEN
2424 WRITE( nounit, fmt = 9999 )
'DSYEVD(V,' // uplo //
2425 $
')', iinfo, n, jtype, ioldsd
2427 IF( iinfo.LT.0 )
THEN
2430 result( ntest ) = ulpinv
2431 result( ntest+1 ) = ulpinv
2432 result( ntest+2 ) = ulpinv
2439 CALL dsyt21( 1, uplo, n, 0, v, ldu, d1, d2, a, ldu, z,
2440 $ ldu, tau, work, result( ntest ) )
2442 CALL dlacpy(
' ', n, n, v, ldu, a, lda )
2445 srnamt =
'DSYEVD_2STAGE'
2447 $ lwork, iwork, liwedc, iinfo )
2448 IF( iinfo.NE.0 )
THEN
2449 WRITE( nounit, fmt = 9999 )
2450 $
'DSYEVD_2STAGE(N,' // uplo //
2451 $
')', iinfo, n, jtype, ioldsd
2453 IF( iinfo.LT.0 )
THEN
2456 result( ntest ) = ulpinv
2466 temp1 = max( temp1, abs( d1( j ) ), abs( d3( j ) ) )
2467 temp2 = max( temp2, abs( d1( j )-d3( j ) ) )
2469 result( ntest ) = temp2 / max( unfl,
2470 $ ulp*max( temp1, temp2 ) )
2476 CALL dlacpy(
' ', n, n, v, ldu, a, lda )
2481 IF( iuplo.EQ.1 )
THEN
2485 work( indx ) = a( i, j )
2493 work( indx ) = a( i, j )
2501 CALL dspevd(
'V', uplo, n, work, d1, z, ldu,
2502 $ work( indx ), lwedc-indx+1, iwork, liwedc,
2504 IF( iinfo.NE.0 )
THEN
2505 WRITE( nounit, fmt = 9999 )
'DSPEVD(V,' // uplo //
2506 $
')', iinfo, n, jtype, ioldsd
2508 IF( iinfo.LT.0 )
THEN
2511 result( ntest ) = ulpinv
2512 result( ntest+1 ) = ulpinv
2513 result( ntest+2 ) = ulpinv
2520 CALL dsyt21( 1, uplo, n, 0, a, lda, d1, d2, z, ldu, v,
2521 $ ldu, tau, work, result( ntest ) )
2523 IF( iuplo.EQ.1 )
THEN
2528 work( indx ) = a( i, j )
2536 work( indx ) = a( i, j )
2544 CALL dspevd(
'N', uplo, n, work, d3, z, ldu,
2545 $ work( indx ), lwedc-indx+1, iwork, liwedc,
2547 IF( iinfo.NE.0 )
THEN
2548 WRITE( nounit, fmt = 9999 )
'DSPEVD(N,' // uplo //
2549 $
')', iinfo, n, jtype, ioldsd
2551 IF( iinfo.LT.0 )
THEN
2554 result( ntest ) = ulpinv
2564 temp1 = max( temp1, abs( d1( j ) ), abs( d3( j ) ) )
2565 temp2 = max( temp2, abs( d1( j )-d3( j ) ) )
2567 result( ntest ) = temp2 / max( unfl,
2568 $ ulp*max( temp1, temp2 ) )
2573 IF( jtype.LE.7 )
THEN
2575 ELSE IF( jtype.GE.8 .AND. jtype.LE.15 )
THEN
2584 IF( iuplo.EQ.1 )
THEN
2586 DO 1590 i = max( 1, j-kd ), j
2587 v( kd+1+i-j, j ) = a( i, j )
2592 DO 1610 i = j, min( n, j+kd )
2593 v( 1+i-j, j ) = a( i, j )
2600 CALL dsbevd(
'V', uplo, n, kd, v, ldu, d1, z, ldu, work,
2601 $ lwedc, iwork, liwedc, iinfo )
2602 IF( iinfo.NE.0 )
THEN
2603 WRITE( nounit, fmt = 9999 )
'DSBEVD(V,' // uplo //
2604 $
')', iinfo, n, jtype, ioldsd
2606 IF( iinfo.LT.0 )
THEN
2609 result( ntest ) = ulpinv
2610 result( ntest+1 ) = ulpinv
2611 result( ntest+2 ) = ulpinv
2618 CALL dsyt21( 1, uplo, n, 0, a, lda, d1, d2, z, ldu, v,
2619 $ ldu, tau, work, result( ntest ) )
2621 IF( iuplo.EQ.1 )
THEN
2623 DO 1630 i = max( 1, j-kd ), j
2624 v( kd+1+i-j, j ) = a( i, j )
2629 DO 1650 i = j, min( n, j+kd )
2630 v( 1+i-j, j ) = a( i, j )
2636 srnamt =
'DSBEVD_2STAGE'
2638 $ work, lwork, iwork, liwedc, iinfo )
2639 IF( iinfo.NE.0 )
THEN
2640 WRITE( nounit, fmt = 9999 )
2641 $
'DSBEVD_2STAGE(N,' // uplo //
2642 $
')', iinfo, n, jtype, ioldsd
2644 IF( iinfo.LT.0 )
THEN
2647 result( ntest ) = ulpinv
2657 temp1 = max( temp1, abs( d1( j ) ), abs( d3( j ) ) )
2658 temp2 = max( temp2, abs( d1( j )-d3( j ) ) )
2660 result( ntest ) = temp2 / max( unfl,
2661 $ ulp*max( temp1, temp2 ) )
2666 CALL dlacpy(
' ', n, n, a, lda, v, ldu )
2669 CALL dsyevr(
'V',
'A', uplo, n, a, ldu, vl, vu, il, iu,
2670 $ abstol, m, wa1, z, ldu, iwork, work, lwork,
2671 $ iwork(2*n+1), liwork-2*n, iinfo )
2672 IF( iinfo.NE.0 )
THEN
2673 WRITE( nounit, fmt = 9999 )
'DSYEVR(V,A,' // uplo //
2674 $
')', iinfo, n, jtype, ioldsd
2676 IF( iinfo.LT.0 )
THEN
2679 result( ntest ) = ulpinv
2680 result( ntest+1 ) = ulpinv
2681 result( ntest+2 ) = ulpinv
2688 CALL dlacpy(
' ', n, n, v, ldu, a, lda )
2690 CALL dsyt21( 1, uplo, n, 0, a, ldu, wa1, d2, z, ldu, v,
2691 $ ldu, tau, work, result( ntest ) )
2694 srnamt =
'DSYEVR_2STAGE'
2696 $ il, iu, abstol, m2, wa2, z, ldu, iwork,
2697 $ work, lwork, iwork(2*n+1), liwork-2*n,
2699 IF( iinfo.NE.0 )
THEN
2700 WRITE( nounit, fmt = 9999 )
2701 $
'DSYEVR_2STAGE(N,A,' // uplo //
2702 $
')', iinfo, n, jtype, ioldsd
2704 IF( iinfo.LT.0 )
THEN
2707 result( ntest ) = ulpinv
2717 temp1 = max( temp1, abs( wa1( j ) ), abs( wa2( j ) ) )
2718 temp2 = max( temp2, abs( wa1( j )-wa2( j ) ) )
2720 result( ntest ) = temp2 / max( unfl,
2721 $ ulp*max( temp1, temp2 ) )
2726 CALL dlacpy(
' ', n, n, v, ldu, a, lda )
2728 CALL dsyevr(
'V',
'I', uplo, n, a, ldu, vl, vu, il, iu,
2729 $ abstol, m2, wa2, z, ldu, iwork, work, lwork,
2730 $ iwork(2*n+1), liwork-2*n, iinfo )
2731 IF( iinfo.NE.0 )
THEN
2732 WRITE( nounit, fmt = 9999 )
'DSYEVR(V,I,' // uplo //
2733 $
')', iinfo, n, jtype, ioldsd
2735 IF( iinfo.LT.0 )
THEN
2738 result( ntest ) = ulpinv
2739 result( ntest+1 ) = ulpinv
2740 result( ntest+2 ) = ulpinv
2747 CALL dlacpy(
' ', n, n, v, ldu, a, lda )
2749 CALL dsyt22( 1, uplo, n, m2, 0, a, ldu, wa2, d2, z, ldu,
2750 $ v, ldu, tau, work, result( ntest ) )
2753 CALL dlacpy(
' ', n, n, v, ldu, a, lda )
2754 srnamt =
'DSYEVR_2STAGE'
2756 $ il, iu, abstol, m3, wa3, z, ldu, iwork,
2757 $ work, lwork, iwork(2*n+1), liwork-2*n,
2759 IF( iinfo.NE.0 )
THEN
2760 WRITE( nounit, fmt = 9999 )
2761 $
'DSYEVR_2STAGE(N,I,' // uplo //
2762 $
')', iinfo, n, jtype, ioldsd
2764 IF( iinfo.LT.0 )
THEN
2767 result( ntest ) = ulpinv
2774 temp1 = dsxt1( 1, wa2, m2, wa3, m3, abstol, ulp, unfl )
2775 temp2 = dsxt1( 1, wa3, m3, wa2, m2, abstol, ulp, unfl )
2776 result( ntest ) = ( temp1+temp2 ) /
2777 $ max( unfl, ulp*temp3 )
2781 CALL dlacpy(
' ', n, n, v, ldu, a, lda )
2783 CALL dsyevr(
'V',
'V', uplo, n, a, ldu, vl, vu, il, iu,
2784 $ abstol, m2, wa2, z, ldu, iwork, work, lwork,
2785 $ iwork(2*n+1), liwork-2*n, iinfo )
2786 IF( iinfo.NE.0 )
THEN
2787 WRITE( nounit, fmt = 9999 )
'DSYEVR(V,V,' // uplo //
2788 $
')', iinfo, n, jtype, ioldsd
2790 IF( iinfo.LT.0 )
THEN
2793 result( ntest ) = ulpinv
2794 result( ntest+1 ) = ulpinv
2795 result( ntest+2 ) = ulpinv
2802 CALL dlacpy(
' ', n, n, v, ldu, a, lda )
2804 CALL dsyt22( 1, uplo, n, m2, 0, a, ldu, wa2, d2, z, ldu,
2805 $ v, ldu, tau, work, result( ntest ) )
2808 CALL dlacpy(
' ', n, n, v, ldu, a, lda )
2809 srnamt =
'DSYEVR_2STAGE'
2811 $ il, iu, abstol, m3, wa3, z, ldu, iwork,
2812 $ work, lwork, iwork(2*n+1), liwork-2*n,
2814 IF( iinfo.NE.0 )
THEN
2815 WRITE( nounit, fmt = 9999 )
2816 $
'DSYEVR_2STAGE(N,V,' // uplo //
2817 $
')', iinfo, n, jtype, ioldsd
2819 IF( iinfo.LT.0 )
THEN
2822 result( ntest ) = ulpinv
2827 IF( m3.EQ.0 .AND. n.GT.0 )
THEN
2828 result( ntest ) = ulpinv
2834 temp1 = dsxt1( 1, wa2, m2, wa3, m3, abstol, ulp, unfl )
2835 temp2 = dsxt1( 1, wa3, m3, wa2, m2, abstol, ulp, unfl )
2837 temp3 = max( abs( wa1( 1 ) ), abs( wa1( n ) ) )
2841 result( ntest ) = ( temp1+temp2 ) /
2842 $ max( unfl, temp3*ulp )
2844 CALL dlacpy(
' ', n, n, v, ldu, a, lda )
2850 ntestt = ntestt + ntest
2852 CALL dlafts(
'DST', n, n, jtype, ntest, result, ioldsd,
2853 $ thresh, nounit, nerrs )
2860 CALL alasvm(
'DST', nounit, nerrs, ntestt, 0 )
2862 9999
FORMAT(
' DDRVST2STG: ', a,
' returned INFO=', i6,
'.', / 9x,
2863 $
'N=', i6,
', JTYPE=', i6,
', ISEED=(', 3( i5,
',' ), i5,
')' )
subroutine dsytrd_sb2st(STAGE1, VECT, UPLO, N, KD, AB, LDAB, D, E, HOUS, LHOUS, WORK, LWORK, INFO)
DSYTRD_SB2ST reduces a real symmetric band matrix A to real symmetric tridiagonal form T
subroutine dlabad(SMALL, LARGE)
DLABAD
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.
subroutine xerbla(SRNAME, INFO)
XERBLA
subroutine alasvm(TYPE, NOUT, NFAIL, NRUN, NERRS)
ALASVM
subroutine dlafts(TYPE, M, N, IMAT, NTESTS, RESULT, ISEED, THRESH, IOUNIT, IE)
DLAFTS
subroutine ddrvst2stg(NSIZES, NN, NTYPES, DOTYPE, ISEED, THRESH, NOUNIT, A, LDA, D1, D2, D3, D4, EVEIGS, WA1, WA2, WA3, U, LDU, V, TAU, Z, WORK, LWORK, IWORK, LIWORK, RESULT, INFO)
DDRVST2STG
subroutine dsyt22(ITYPE, UPLO, N, M, KBAND, A, LDA, D, E, U, LDU, V, LDV, TAU, WORK, RESULT)
DSYT22
subroutine dstt22(N, M, KBAND, AD, AE, SD, SE, U, LDU, WORK, LDWORK, RESULT)
DSTT22
subroutine dsyt21(ITYPE, UPLO, N, KBAND, A, LDA, D, E, U, LDU, V, LDV, TAU, WORK, RESULT)
DSYT21
subroutine dstt21(N, KBAND, AD, AE, SD, SE, U, LDU, WORK, RESULT)
DSTT21
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 dspevx(JOBZ, RANGE, UPLO, N, AP, VL, VU, IL, IU, ABSTOL, M, W, Z, LDZ, WORK, IWORK, IFAIL, INFO)
DSPEVX computes the eigenvalues and, optionally, the left and/or right eigenvectors for OTHER matrice...
subroutine dstevd(JOBZ, N, D, E, Z, LDZ, WORK, LWORK, IWORK, LIWORK, INFO)
DSTEVD computes the eigenvalues and, optionally, the left and/or right eigenvectors for OTHER matrice...
subroutine dstevr(JOBZ, RANGE, N, D, E, VL, VU, IL, IU, ABSTOL, M, W, Z, LDZ, ISUPPZ, WORK, LWORK, IWORK, LIWORK, INFO)
DSTEVR computes the eigenvalues and, optionally, the left and/or right eigenvectors for OTHER matrice...
subroutine dsbevx(JOBZ, RANGE, UPLO, N, KD, AB, LDAB, Q, LDQ, VL, VU, IL, IU, ABSTOL, M, W, Z, LDZ, WORK, IWORK, IFAIL, INFO)
DSBEVX computes the eigenvalues and, optionally, the left and/or right eigenvectors for OTHER matrice...
subroutine dspevd(JOBZ, UPLO, N, AP, W, Z, LDZ, WORK, LWORK, IWORK, LIWORK, INFO)
DSPEVD computes the eigenvalues and, optionally, the left and/or right eigenvectors for OTHER matrice...
subroutine dstevx(JOBZ, RANGE, N, D, E, VL, VU, IL, IU, ABSTOL, M, W, Z, LDZ, WORK, IWORK, IFAIL, INFO)
DSTEVX computes the eigenvalues and, optionally, the left and/or right eigenvectors for OTHER matrice...
subroutine dsbevd_2stage(JOBZ, UPLO, N, KD, AB, LDAB, W, Z, LDZ, WORK, LWORK, IWORK, LIWORK, INFO)
DSBEVD_2STAGE computes the eigenvalues and, optionally, the left and/or right eigenvectors for OTHER ...
subroutine dspev(JOBZ, UPLO, N, AP, W, Z, LDZ, WORK, INFO)
DSPEV computes the eigenvalues and, optionally, the left and/or right eigenvectors for OTHER matrices
subroutine dsbev_2stage(JOBZ, UPLO, N, KD, AB, LDAB, W, Z, LDZ, WORK, LWORK, INFO)
DSBEV_2STAGE computes the eigenvalues and, optionally, the left and/or right eigenvectors for OTHER m...
subroutine dstev(JOBZ, N, D, E, Z, LDZ, WORK, INFO)
DSTEV computes the eigenvalues and, optionally, the left and/or right eigenvectors for OTHER matrices
subroutine dsbevx_2stage(JOBZ, RANGE, UPLO, N, KD, AB, LDAB, Q, LDQ, VL, VU, IL, IU, ABSTOL, M, W, Z, LDZ, WORK, LWORK, IWORK, IFAIL, INFO)
DSBEVX_2STAGE computes the eigenvalues and, optionally, the left and/or right eigenvectors for OTHER ...
subroutine dsbev(JOBZ, UPLO, N, KD, AB, LDAB, W, Z, LDZ, WORK, INFO)
DSBEV computes the eigenvalues and, optionally, the left and/or right eigenvectors for OTHER matrices
subroutine dsbevd(JOBZ, UPLO, N, KD, AB, LDAB, W, Z, LDZ, WORK, LWORK, IWORK, LIWORK, INFO)
DSBEVD computes the eigenvalues and, optionally, the left and/or right eigenvectors for OTHER matrice...
subroutine dsytrd_sy2sb(UPLO, N, KD, A, LDA, AB, LDAB, TAU, WORK, LWORK, INFO)
DSYTRD_SY2SB
subroutine dsytrd_2stage(VECT, UPLO, N, A, LDA, D, E, TAU, HOUS2, LHOUS2, WORK, LWORK, INFO)
DSYTRD_2STAGE
subroutine dsyev(JOBZ, UPLO, N, A, LDA, W, WORK, LWORK, INFO)
DSYEV computes the eigenvalues and, optionally, the left and/or right eigenvectors for SY matrices
subroutine dsyevx(JOBZ, RANGE, UPLO, N, A, LDA, VL, VU, IL, IU, ABSTOL, M, W, Z, LDZ, WORK, LWORK, IWORK, IFAIL, INFO)
DSYEVX computes the eigenvalues and, optionally, the left and/or right eigenvectors for SY matrices
subroutine dsyevd(JOBZ, UPLO, N, A, LDA, W, WORK, LWORK, IWORK, LIWORK, INFO)
DSYEVD computes the eigenvalues and, optionally, the left and/or right eigenvectors for SY matrices
subroutine dsyevr_2stage(JOBZ, RANGE, UPLO, N, A, LDA, VL, VU, IL, IU, ABSTOL, M, W, Z, LDZ, ISUPPZ, WORK, LWORK, IWORK, LIWORK, INFO)
DSYEVR_2STAGE computes the eigenvalues and, optionally, the left and/or right eigenvectors for SY mat...
subroutine dsyevx_2stage(JOBZ, RANGE, UPLO, N, A, LDA, VL, VU, IL, IU, ABSTOL, M, W, Z, LDZ, WORK, LWORK, IWORK, IFAIL, INFO)
DSYEVX_2STAGE computes the eigenvalues and, optionally, the left and/or right eigenvectors for SY mat...
subroutine dsyev_2stage(JOBZ, UPLO, N, A, LDA, W, WORK, LWORK, INFO)
DSYEV_2STAGE computes the eigenvalues and, optionally, the left and/or right eigenvectors for SY matr...
subroutine dsyevr(JOBZ, RANGE, UPLO, N, A, LDA, VL, VU, IL, IU, ABSTOL, M, W, Z, LDZ, ISUPPZ, WORK, LWORK, IWORK, LIWORK, INFO)
DSYEVR computes the eigenvalues and, optionally, the left and/or right eigenvectors for SY matrices
subroutine dsyevd_2stage(JOBZ, UPLO, N, A, LDA, W, WORK, LWORK, IWORK, LIWORK, INFO)
DSYEVD_2STAGE computes the eigenvalues and, optionally, the left and/or right eigenvectors for SY mat...