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' )
580 ulp = dlamch(
'Epsilon' )*dlamch(
'Base' )
582 rtunfl = sqrt( unfl )
583 rtovfl = sqrt( ovfl )
588 iseed2( i ) = iseed( i )
589 iseed3( i ) = iseed( i )
596 DO 1740 jsize = 1, nsizes
599 lgn = int( log( dble( n ) ) / log( two ) )
604 lwedc = 1 + 4*n + 2*n*lgn + 4*n**2
612 aninv = one / dble( max( 1, n ) )
614 IF( nsizes.NE.1 )
THEN
615 mtypes = min( maxtyp, ntypes )
617 mtypes = min( maxtyp+1, ntypes )
620 DO 1730 jtype = 1, mtypes
622 IF( .NOT.dotype( jtype ) )
628 ioldsd( j ) = iseed( j )
646 IF( mtypes.GT.maxtyp )
649 itype = ktype( jtype )
650 imode = kmode( jtype )
654 GO TO ( 40, 50, 60 )kmagn( jtype )
661 anorm = ( rtovfl*ulp )*aninv
665 anorm = rtunfl*n*ulpinv
670 CALL dlaset(
'Full', lda, n, zero, zero, a, lda )
678 IF( itype.EQ.1 )
THEN
681 ELSE IF( itype.EQ.2 )
THEN
686 a( jcol, jcol ) = anorm
689 ELSE IF( itype.EQ.4 )
THEN
693 CALL dlatms( n, n,
'S', iseed,
'S', work, imode, cond,
694 $ anorm, 0, 0,
'N', a, lda, work( n+1 ),
697 ELSE IF( itype.EQ.5 )
THEN
701 CALL dlatms( n, n,
'S', iseed,
'S', work, imode, cond,
702 $ anorm, n, n,
'N', a, lda, work( n+1 ),
705 ELSE IF( itype.EQ.7 )
THEN
710 CALL dlatmr( n, n,
'S', iseed,
'S', work, 6, one, one,
711 $
'T',
'N', work( n+1 ), 1, one,
712 $ work( 2*n+1 ), 1, one,
'N', idumma, 0, 0,
713 $ zero, anorm,
'NO', a, lda, iwork, iinfo )
715 ELSE IF( itype.EQ.8 )
THEN
720 CALL dlatmr( n, n,
'S', iseed,
'S', work, 6, one, one,
721 $
'T',
'N', work( n+1 ), 1, one,
722 $ work( 2*n+1 ), 1, one,
'N', idumma, n, n,
723 $ zero, anorm,
'NO', a, lda, iwork, iinfo )
725 ELSE IF( itype.EQ.9 )
THEN
729 ihbw = int( ( n-1 )*dlarnd( 1, iseed3 ) )
730 CALL dlatms( n, n,
'S', iseed,
'S', work, imode, cond,
731 $ anorm, ihbw, ihbw,
'Z', u, ldu, work( n+1 ),
736 CALL dlaset(
'Full', lda, n, zero, zero, a, lda )
737 DO 100 idiag = -ihbw, ihbw
738 irow = ihbw - idiag + 1
739 j1 = max( 1, idiag+1 )
740 j2 = min( n, n+idiag )
743 a( i, j ) = u( irow, j )
750 IF( iinfo.NE.0 )
THEN
751 WRITE( nounit, fmt = 9999 )
'Generator', iinfo, n, jtype,
764 il = 1 + int( ( n-1 )*dlarnd( 1, iseed2 ) )
765 iu = 1 + int( ( n-1 )*dlarnd( 1, iseed2 ) )
775 IF( jtype.LE.7 )
THEN
778 d1( i ) = dble( a( i, i ) )
781 d2( i ) = dble( a( i+1, i ) )
784 CALL dstev(
'V', n, d1, d2, z, ldu, work, iinfo )
785 IF( iinfo.NE.0 )
THEN
786 WRITE( nounit, fmt = 9999 )
'DSTEV(V)', iinfo, n,
789 IF( iinfo.LT.0 )
THEN
802 d3( i ) = dble( a( i, i ) )
805 d4( i ) = dble( a( i+1, i ) )
807 CALL dstt21( n, 0, d3, d4, d1, d2, z, ldu, work,
812 d4( i ) = dble( a( i+1, i ) )
815 CALL dstev(
'N', n, d3, d4, z, ldu, work, iinfo )
816 IF( iinfo.NE.0 )
THEN
817 WRITE( nounit, fmt = 9999 )
'DSTEV(N)', iinfo, n,
820 IF( iinfo.LT.0 )
THEN
833 temp1 = max( temp1, abs( d1( j ) ), abs( d3( j ) ) )
834 temp2 = max( temp2, abs( d1( j )-d3( j ) ) )
836 result( 3 ) = temp2 / max( unfl,
837 $ ulp*max( temp1, temp2 ) )
843 eveigs( i ) = d3( i )
844 d1( i ) = dble( a( i, i ) )
847 d2( i ) = dble( a( i+1, i ) )
850 CALL dstevx(
'V',
'A', n, d1, d2, vl, vu, il, iu, abstol,
851 $ m, wa1, z, ldu, work, iwork, iwork( 5*n+1 ),
853 IF( iinfo.NE.0 )
THEN
854 WRITE( nounit, fmt = 9999 )
'DSTEVX(V,A)', iinfo, n,
857 IF( iinfo.LT.0 )
THEN
867 temp3 = max( abs( wa1( 1 ) ), abs( wa1( n ) ) )
875 d3( i ) = dble( a( i, i ) )
878 d4( i ) = dble( a( i+1, i ) )
880 CALL dstt21( n, 0, d3, d4, wa1, d2, z, ldu, work,
885 d4( i ) = dble( a( i+1, i ) )
888 CALL dstevx(
'N',
'A', n, d3, d4, vl, vu, il, iu, abstol,
889 $ m2, wa2, z, ldu, work, iwork,
890 $ iwork( 5*n+1 ), iinfo )
891 IF( iinfo.NE.0 )
THEN
892 WRITE( nounit, fmt = 9999 )
'DSTEVX(N,A)', iinfo, n,
895 IF( iinfo.LT.0 )
THEN
908 temp1 = max( temp1, abs( wa2( j ) ),
909 $ abs( eveigs( j ) ) )
910 temp2 = max( temp2, abs( wa2( j )-eveigs( j ) ) )
912 result( 6 ) = temp2 / max( unfl,
913 $ ulp*max( temp1, temp2 ) )
919 d1( i ) = dble( a( i, i ) )
922 d2( i ) = dble( a( i+1, i ) )
925 CALL dstevr(
'V',
'A', n, d1, d2, vl, vu, il, iu, abstol,
926 $ m, wa1, z, ldu, iwork, work, lwork,
927 $ iwork(2*n+1), liwork-2*n, iinfo )
928 IF( iinfo.NE.0 )
THEN
929 WRITE( nounit, fmt = 9999 )
'DSTEVR(V,A)', iinfo, n,
932 IF( iinfo.LT.0 )
THEN
941 temp3 = max( abs( wa1( 1 ) ), abs( wa1( n ) ) )
949 d3( i ) = dble( a( i, i ) )
952 d4( i ) = dble( a( i+1, i ) )
954 CALL dstt21( n, 0, d3, d4, wa1, d2, z, ldu, work,
959 d4( i ) = dble( a( i+1, i ) )
962 CALL dstevr(
'N',
'A', n, d3, d4, vl, vu, il, iu, abstol,
963 $ m2, wa2, z, ldu, iwork, work, lwork,
964 $ iwork(2*n+1), liwork-2*n, iinfo )
965 IF( iinfo.NE.0 )
THEN
966 WRITE( nounit, fmt = 9999 )
'DSTEVR(N,A)', iinfo, n,
969 IF( iinfo.LT.0 )
THEN
982 temp1 = max( temp1, abs( wa2( j ) ),
983 $ abs( eveigs( j ) ) )
984 temp2 = max( temp2, abs( wa2( j )-eveigs( j ) ) )
986 result( 9 ) = temp2 / max( unfl,
987 $ ulp*max( temp1, temp2 ) )
994 d1( i ) = dble( a( i, i ) )
997 d2( i ) = dble( a( i+1, i ) )
1000 CALL dstevx(
'V',
'I', n, d1, d2, vl, vu, il, iu, abstol,
1001 $ m2, wa2, z, ldu, work, iwork,
1002 $ iwork( 5*n+1 ), iinfo )
1003 IF( iinfo.NE.0 )
THEN
1004 WRITE( nounit, fmt = 9999 )
'DSTEVX(V,I)', iinfo, n,
1007 IF( iinfo.LT.0 )
THEN
1010 result( 10 ) = ulpinv
1011 result( 11 ) = ulpinv
1012 result( 12 ) = ulpinv
1020 d3( i ) = dble( a( i, i ) )
1023 d4( i ) = dble( a( i+1, i ) )
1025 CALL dstt22( n, m2, 0, d3, d4, wa2, d2, z, ldu, work,
1026 $ max( 1, m2 ), result( 10 ) )
1031 d4( i ) = dble( a( i+1, i ) )
1034 CALL dstevx(
'N',
'I', n, d3, d4, vl, vu, il, iu, abstol,
1035 $ m3, wa3, z, ldu, work, iwork,
1036 $ iwork( 5*n+1 ), iinfo )
1037 IF( iinfo.NE.0 )
THEN
1038 WRITE( nounit, fmt = 9999 )
'DSTEVX(N,I)', iinfo, n,
1041 IF( iinfo.LT.0 )
THEN
1044 result( 12 ) = ulpinv
1051 temp1 = dsxt1( 1, wa2, m2, wa3, m3, abstol, ulp, unfl )
1052 temp2 = dsxt1( 1, wa3, m3, wa2, m2, abstol, ulp, unfl )
1053 result( 12 ) = ( temp1+temp2 ) / max( unfl, ulp*temp3 )
1060 vl = wa1( il ) - max( half*
1061 $ ( wa1( il )-wa1( il-1 ) ), ten*ulp*temp3,
1064 vl = wa1( 1 ) - max( half*( wa1( n )-wa1( 1 ) ),
1065 $ ten*ulp*temp3, ten*rtunfl )
1068 vu = wa1( iu ) + max( half*
1069 $ ( wa1( iu+1 )-wa1( iu ) ), ten*ulp*temp3,
1072 vu = wa1( n ) + max( half*( wa1( n )-wa1( 1 ) ),
1073 $ ten*ulp*temp3, ten*rtunfl )
1081 d1( i ) = dble( a( i, i ) )
1084 d2( i ) = dble( a( i+1, i ) )
1087 CALL dstevx(
'V',
'V', n, d1, d2, vl, vu, il, iu, abstol,
1088 $ m2, wa2, z, ldu, work, iwork,
1089 $ iwork( 5*n+1 ), iinfo )
1090 IF( iinfo.NE.0 )
THEN
1091 WRITE( nounit, fmt = 9999 )
'DSTEVX(V,V)', iinfo, n,
1094 IF( iinfo.LT.0 )
THEN
1097 result( 13 ) = ulpinv
1098 result( 14 ) = ulpinv
1099 result( 15 ) = ulpinv
1104 IF( m2.EQ.0 .AND. n.GT.0 )
THEN
1105 result( 13 ) = ulpinv
1106 result( 14 ) = ulpinv
1107 result( 15 ) = ulpinv
1114 d3( i ) = dble( a( i, i ) )
1117 d4( i ) = dble( a( i+1, i ) )
1119 CALL dstt22( n, m2, 0, d3, d4, wa2, d2, z, ldu, work,
1120 $ max( 1, m2 ), result( 13 ) )
1124 d4( i ) = dble( a( i+1, i ) )
1127 CALL dstevx(
'N',
'V', n, d3, d4, vl, vu, il, iu, abstol,
1128 $ m3, wa3, z, ldu, work, iwork,
1129 $ iwork( 5*n+1 ), iinfo )
1130 IF( iinfo.NE.0 )
THEN
1131 WRITE( nounit, fmt = 9999 )
'DSTEVX(N,V)', iinfo, n,
1134 IF( iinfo.LT.0 )
THEN
1137 result( 15 ) = ulpinv
1144 temp1 = dsxt1( 1, wa2, m2, wa3, m3, abstol, ulp, unfl )
1145 temp2 = dsxt1( 1, wa3, m3, wa2, m2, abstol, ulp, unfl )
1146 result( 15 ) = ( temp1+temp2 ) / max( unfl, temp3*ulp )
1152 d1( i ) = dble( a( i, i ) )
1155 d2( i ) = dble( a( i+1, i ) )
1158 CALL dstevd(
'V', n, d1, d2, z, ldu, work, lwedc, iwork,
1160 IF( iinfo.NE.0 )
THEN
1161 WRITE( nounit, fmt = 9999 )
'DSTEVD(V)', iinfo, n,
1164 IF( iinfo.LT.0 )
THEN
1167 result( 16 ) = ulpinv
1168 result( 17 ) = ulpinv
1169 result( 18 ) = ulpinv
1177 d3( i ) = dble( a( i, i ) )
1180 d4( i ) = dble( a( i+1, i ) )
1182 CALL dstt21( n, 0, d3, d4, d1, d2, z, ldu, work,
1187 d4( i ) = dble( a( i+1, i ) )
1190 CALL dstevd(
'N', n, d3, d4, z, ldu, work, lwedc, iwork,
1192 IF( iinfo.NE.0 )
THEN
1193 WRITE( nounit, fmt = 9999 )
'DSTEVD(N)', iinfo, n,
1196 IF( iinfo.LT.0 )
THEN
1199 result( 18 ) = ulpinv
1209 temp1 = max( temp1, abs( eveigs( j ) ),
1211 temp2 = max( temp2, abs( eveigs( j )-d3( j ) ) )
1213 result( 18 ) = temp2 / max( unfl,
1214 $ ulp*max( temp1, temp2 ) )
1220 d1( i ) = dble( a( i, i ) )
1223 d2( i ) = dble( a( i+1, i ) )
1226 CALL dstevr(
'V',
'I', n, d1, d2, vl, vu, il, iu, abstol,
1227 $ m2, wa2, z, ldu, iwork, work, lwork,
1228 $ iwork(2*n+1), liwork-2*n, iinfo )
1229 IF( iinfo.NE.0 )
THEN
1230 WRITE( nounit, fmt = 9999 )
'DSTEVR(V,I)', iinfo, n,
1233 IF( iinfo.LT.0 )
THEN
1236 result( 19 ) = ulpinv
1237 result( 20 ) = ulpinv
1238 result( 21 ) = ulpinv
1246 d3( i ) = dble( a( i, i ) )
1249 d4( i ) = dble( a( i+1, i ) )
1251 CALL dstt22( n, m2, 0, d3, d4, wa2, d2, z, ldu, work,
1252 $ max( 1, m2 ), result( 19 ) )
1257 d4( i ) = dble( a( i+1, i ) )
1260 CALL dstevr(
'N',
'I', n, d3, d4, vl, vu, il, iu, abstol,
1261 $ m3, wa3, z, ldu, iwork, work, lwork,
1262 $ iwork(2*n+1), liwork-2*n, iinfo )
1263 IF( iinfo.NE.0 )
THEN
1264 WRITE( nounit, fmt = 9999 )
'DSTEVR(N,I)', iinfo, n,
1267 IF( iinfo.LT.0 )
THEN
1270 result( 21 ) = ulpinv
1277 temp1 = dsxt1( 1, wa2, m2, wa3, m3, abstol, ulp, unfl )
1278 temp2 = dsxt1( 1, wa3, m3, wa2, m2, abstol, ulp, unfl )
1279 result( 21 ) = ( temp1+temp2 ) / max( unfl, ulp*temp3 )
1286 vl = wa1( il ) - max( half*
1287 $ ( wa1( il )-wa1( il-1 ) ), ten*ulp*temp3,
1290 vl = wa1( 1 ) - max( half*( wa1( n )-wa1( 1 ) ),
1291 $ ten*ulp*temp3, ten*rtunfl )
1294 vu = wa1( iu ) + max( half*
1295 $ ( wa1( iu+1 )-wa1( iu ) ), ten*ulp*temp3,
1298 vu = wa1( n ) + max( half*( wa1( n )-wa1( 1 ) ),
1299 $ ten*ulp*temp3, ten*rtunfl )
1307 d1( i ) = dble( a( i, i ) )
1310 d2( i ) = dble( a( i+1, i ) )
1313 CALL dstevr(
'V',
'V', n, d1, d2, vl, vu, il, iu, abstol,
1314 $ m2, wa2, z, ldu, iwork, work, lwork,
1315 $ iwork(2*n+1), liwork-2*n, iinfo )
1316 IF( iinfo.NE.0 )
THEN
1317 WRITE( nounit, fmt = 9999 )
'DSTEVR(V,V)', iinfo, n,
1320 IF( iinfo.LT.0 )
THEN
1323 result( 22 ) = ulpinv
1324 result( 23 ) = ulpinv
1325 result( 24 ) = ulpinv
1330 IF( m2.EQ.0 .AND. n.GT.0 )
THEN
1331 result( 22 ) = ulpinv
1332 result( 23 ) = ulpinv
1333 result( 24 ) = ulpinv
1340 d3( i ) = dble( a( i, i ) )
1343 d4( i ) = dble( a( i+1, i ) )
1345 CALL dstt22( n, m2, 0, d3, d4, wa2, d2, z, ldu, work,
1346 $ max( 1, m2 ), result( 22 ) )
1350 d4( i ) = dble( a( i+1, i ) )
1353 CALL dstevr(
'N',
'V', n, d3, d4, vl, vu, il, iu, abstol,
1354 $ m3, wa3, z, ldu, iwork, work, lwork,
1355 $ iwork(2*n+1), liwork-2*n, iinfo )
1356 IF( iinfo.NE.0 )
THEN
1357 WRITE( nounit, fmt = 9999 )
'DSTEVR(N,V)', iinfo, n,
1360 IF( iinfo.LT.0 )
THEN
1363 result( 24 ) = ulpinv
1370 temp1 = dsxt1( 1, wa2, m2, wa3, m3, abstol, ulp, unfl )
1371 temp2 = dsxt1( 1, wa3, m3, wa2, m2, abstol, ulp, unfl )
1372 result( 24 ) = ( temp1+temp2 ) / max( unfl, temp3*ulp )
1389 DO 1720 iuplo = 0, 1
1390 IF( iuplo.EQ.0 )
THEN
1398 CALL dlacpy(
' ', n, n, a, lda, v, ldu )
1402 CALL dsyev(
'V', uplo, n, a, ldu, d1, work, lwork,
1404 IF( iinfo.NE.0 )
THEN
1405 WRITE( nounit, fmt = 9999 )
'DSYEV(V,' // uplo //
')',
1406 $ iinfo, n, jtype, ioldsd
1408 IF( iinfo.LT.0 )
THEN
1411 result( ntest ) = ulpinv
1412 result( ntest+1 ) = ulpinv
1413 result( ntest+2 ) = ulpinv
1420 CALL dsyt21( 1, uplo, n, 0, v, ldu, d1, d2, a, ldu, z,
1421 $ ldu, tau, work, result( ntest ) )
1423 CALL dlacpy(
' ', n, n, v, ldu, a, lda )
1426 srnamt =
'DSYEV_2STAGE'
1427 CALL dsyev_2stage(
'N', uplo, n, a, ldu, d3, work, lwork,
1429 IF( iinfo.NE.0 )
THEN
1430 WRITE( nounit, fmt = 9999 )
1431 $
'DSYEV_2STAGE(N,' // uplo //
')',
1432 $ iinfo, n, jtype, ioldsd
1434 IF( iinfo.LT.0 )
THEN
1437 result( ntest ) = ulpinv
1447 temp1 = max( temp1, abs( d1( j ) ), abs( d3( j ) ) )
1448 temp2 = max( temp2, abs( d1( j )-d3( j ) ) )
1450 result( ntest ) = temp2 / max( unfl,
1451 $ ulp*max( temp1, temp2 ) )
1454 CALL dlacpy(
' ', n, n, v, ldu, a, lda )
1459 temp3 = max( abs( d1( 1 ) ), abs( d1( n ) ) )
1461 vl = d1( il ) - max( half*( d1( il )-d1( il-1 ) ),
1462 $ ten*ulp*temp3, ten*rtunfl )
1463 ELSE IF( n.GT.0 )
THEN
1464 vl = d1( 1 ) - max( half*( d1( n )-d1( 1 ) ),
1465 $ ten*ulp*temp3, ten*rtunfl )
1468 vu = d1( iu ) + max( half*( d1( iu+1 )-d1( iu ) ),
1469 $ ten*ulp*temp3, ten*rtunfl )
1470 ELSE IF( n.GT.0 )
THEN
1471 vu = d1( n ) + max( half*( d1( n )-d1( 1 ) ),
1472 $ ten*ulp*temp3, ten*rtunfl )
1481 CALL dsyevx(
'V',
'A', uplo, n, a, ldu, vl, vu, il, iu,
1482 $ abstol, m, wa1, z, ldu, work, lwork, iwork,
1483 $ iwork( 5*n+1 ), iinfo )
1484 IF( iinfo.NE.0 )
THEN
1485 WRITE( nounit, fmt = 9999 )
'DSYEVX(V,A,' // uplo //
1486 $
')', iinfo, n, jtype, ioldsd
1488 IF( iinfo.LT.0 )
THEN
1491 result( ntest ) = ulpinv
1492 result( ntest+1 ) = ulpinv
1493 result( ntest+2 ) = ulpinv
1500 CALL dlacpy(
' ', n, n, v, ldu, a, lda )
1502 CALL dsyt21( 1, uplo, n, 0, a, ldu, d1, d2, z, ldu, v,
1503 $ ldu, tau, work, result( ntest ) )
1506 srnamt =
'DSYEVX_2STAGE'
1508 $ il, iu, abstol, m2, wa2, z, ldu, work,
1509 $ lwork, iwork, iwork( 5*n+1 ), iinfo )
1510 IF( iinfo.NE.0 )
THEN
1511 WRITE( nounit, fmt = 9999 )
1512 $
'DSYEVX_2STAGE(N,A,' // uplo //
1513 $
')', iinfo, n, jtype, ioldsd
1515 IF( iinfo.LT.0 )
THEN
1518 result( ntest ) = ulpinv
1528 temp1 = max( temp1, abs( wa1( j ) ), abs( wa2( j ) ) )
1529 temp2 = max( temp2, abs( wa1( j )-wa2( j ) ) )
1531 result( ntest ) = temp2 / max( unfl,
1532 $ ulp*max( temp1, temp2 ) )
1537 CALL dlacpy(
' ', n, n, v, ldu, a, lda )
1539 CALL dsyevx(
'V',
'I', uplo, n, a, ldu, vl, vu, il, iu,
1540 $ abstol, m2, wa2, z, ldu, work, lwork, iwork,
1541 $ iwork( 5*n+1 ), iinfo )
1542 IF( iinfo.NE.0 )
THEN
1543 WRITE( nounit, fmt = 9999 )
'DSYEVX(V,I,' // uplo //
1544 $
')', iinfo, n, jtype, ioldsd
1546 IF( iinfo.LT.0 )
THEN
1549 result( ntest ) = ulpinv
1550 result( ntest+1 ) = ulpinv
1551 result( ntest+2 ) = ulpinv
1558 CALL dlacpy(
' ', n, n, v, ldu, a, lda )
1560 CALL dsyt22( 1, uplo, n, m2, 0, a, ldu, wa2, d2, z, ldu,
1561 $ v, ldu, tau, work, result( ntest ) )
1564 CALL dlacpy(
' ', n, n, v, ldu, a, lda )
1565 srnamt =
'DSYEVX_2STAGE'
1567 $ il, iu, abstol, m3, wa3, z, ldu, work,
1568 $ lwork, iwork, iwork( 5*n+1 ), iinfo )
1569 IF( iinfo.NE.0 )
THEN
1570 WRITE( nounit, fmt = 9999 )
1571 $
'DSYEVX_2STAGE(N,I,' // uplo //
1572 $
')', iinfo, n, jtype, ioldsd
1574 IF( iinfo.LT.0 )
THEN
1577 result( ntest ) = ulpinv
1584 temp1 = dsxt1( 1, wa2, m2, wa3, m3, abstol, ulp, unfl )
1585 temp2 = dsxt1( 1, wa3, m3, wa2, m2, abstol, ulp, unfl )
1586 result( ntest ) = ( temp1+temp2 ) /
1587 $ max( unfl, ulp*temp3 )
1591 CALL dlacpy(
' ', n, n, v, ldu, a, lda )
1593 CALL dsyevx(
'V',
'V', uplo, n, a, ldu, vl, vu, il, iu,
1594 $ abstol, m2, wa2, z, ldu, work, lwork, iwork,
1595 $ iwork( 5*n+1 ), iinfo )
1596 IF( iinfo.NE.0 )
THEN
1597 WRITE( nounit, fmt = 9999 )
'DSYEVX(V,V,' // uplo //
1598 $
')', iinfo, n, jtype, ioldsd
1600 IF( iinfo.LT.0 )
THEN
1603 result( ntest ) = ulpinv
1604 result( ntest+1 ) = ulpinv
1605 result( ntest+2 ) = ulpinv
1612 CALL dlacpy(
' ', n, n, v, ldu, a, lda )
1614 CALL dsyt22( 1, uplo, n, m2, 0, a, ldu, wa2, d2, z, ldu,
1615 $ v, ldu, tau, work, result( ntest ) )
1618 CALL dlacpy(
' ', n, n, v, ldu, a, lda )
1619 srnamt =
'DSYEVX_2STAGE'
1621 $ il, iu, abstol, m3, wa3, z, ldu, work,
1622 $ lwork, iwork, iwork( 5*n+1 ), iinfo )
1623 IF( iinfo.NE.0 )
THEN
1624 WRITE( nounit, fmt = 9999 )
1625 $
'DSYEVX_2STAGE(N,V,' // uplo //
1626 $
')', iinfo, n, jtype, ioldsd
1628 IF( iinfo.LT.0 )
THEN
1631 result( ntest ) = ulpinv
1636 IF( m3.EQ.0 .AND. n.GT.0 )
THEN
1637 result( ntest ) = ulpinv
1643 temp1 = dsxt1( 1, wa2, m2, wa3, m3, abstol, ulp, unfl )
1644 temp2 = dsxt1( 1, wa3, m3, wa2, m2, abstol, ulp, unfl )
1646 temp3 = max( abs( wa1( 1 ) ), abs( wa1( n ) ) )
1650 result( ntest ) = ( temp1+temp2 ) /
1651 $ max( unfl, temp3*ulp )
1657 CALL dlacpy(
' ', n, n, v, ldu, a, lda )
1662 IF( iuplo.EQ.1 )
THEN
1666 work( indx ) = a( i, j )
1674 work( indx ) = a( i, j )
1682 CALL dspev(
'V', uplo, n, work, d1, z, ldu, v, iinfo )
1683 IF( iinfo.NE.0 )
THEN
1684 WRITE( nounit, fmt = 9999 )
'DSPEV(V,' // uplo //
')',
1685 $ iinfo, n, jtype, ioldsd
1687 IF( iinfo.LT.0 )
THEN
1690 result( ntest ) = ulpinv
1691 result( ntest+1 ) = ulpinv
1692 result( ntest+2 ) = ulpinv
1699 CALL dsyt21( 1, uplo, n, 0, a, lda, d1, d2, z, ldu, v,
1700 $ ldu, tau, work, result( ntest ) )
1702 IF( iuplo.EQ.1 )
THEN
1706 work( indx ) = a( i, j )
1714 work( indx ) = a( i, j )
1722 CALL dspev(
'N', uplo, n, work, d3, z, ldu, v, iinfo )
1723 IF( iinfo.NE.0 )
THEN
1724 WRITE( nounit, fmt = 9999 )
'DSPEV(N,' // uplo //
')',
1725 $ iinfo, n, jtype, ioldsd
1727 IF( iinfo.LT.0 )
THEN
1730 result( ntest ) = ulpinv
1740 temp1 = max( temp1, abs( d1( j ) ), abs( d3( j ) ) )
1741 temp2 = max( temp2, abs( d1( j )-d3( j ) ) )
1743 result( ntest ) = temp2 / max( unfl,
1744 $ ulp*max( temp1, temp2 ) )
1750 IF( iuplo.EQ.1 )
THEN
1754 work( indx ) = a( i, j )
1762 work( indx ) = a( i, j )
1771 temp3 = max( abs( d1( 1 ) ), abs( d1( n ) ) )
1773 vl = d1( il ) - max( half*( d1( il )-d1( il-1 ) ),
1774 $ ten*ulp*temp3, ten*rtunfl )
1775 ELSE IF( n.GT.0 )
THEN
1776 vl = d1( 1 ) - max( half*( d1( n )-d1( 1 ) ),
1777 $ ten*ulp*temp3, ten*rtunfl )
1780 vu = d1( iu ) + max( half*( d1( iu+1 )-d1( iu ) ),
1781 $ ten*ulp*temp3, ten*rtunfl )
1782 ELSE IF( n.GT.0 )
THEN
1783 vu = d1( n ) + max( half*( d1( n )-d1( 1 ) ),
1784 $ ten*ulp*temp3, ten*rtunfl )
1793 CALL dspevx(
'V',
'A', uplo, n, work, vl, vu, il, iu,
1794 $ abstol, m, wa1, z, ldu, v, iwork,
1795 $ iwork( 5*n+1 ), iinfo )
1796 IF( iinfo.NE.0 )
THEN
1797 WRITE( nounit, fmt = 9999 )
'DSPEVX(V,A,' // uplo //
1798 $
')', iinfo, n, jtype, ioldsd
1800 IF( iinfo.LT.0 )
THEN
1803 result( ntest ) = ulpinv
1804 result( ntest+1 ) = ulpinv
1805 result( ntest+2 ) = ulpinv
1812 CALL dsyt21( 1, uplo, n, 0, a, ldu, wa1, d2, z, ldu, v,
1813 $ ldu, tau, work, result( ntest ) )
1817 IF( iuplo.EQ.1 )
THEN
1821 work( indx ) = a( i, j )
1829 work( indx ) = a( i, j )
1836 CALL dspevx(
'N',
'A', uplo, n, work, vl, vu, il, iu,
1837 $ abstol, m2, wa2, z, ldu, v, iwork,
1838 $ iwork( 5*n+1 ), iinfo )
1839 IF( iinfo.NE.0 )
THEN
1840 WRITE( nounit, fmt = 9999 )
'DSPEVX(N,A,' // uplo //
1841 $
')', iinfo, n, jtype, ioldsd
1843 IF( iinfo.LT.0 )
THEN
1846 result( ntest ) = ulpinv
1856 temp1 = max( temp1, abs( wa1( j ) ), abs( wa2( j ) ) )
1857 temp2 = max( temp2, abs( wa1( j )-wa2( j ) ) )
1859 result( ntest ) = temp2 / max( unfl,
1860 $ ulp*max( temp1, temp2 ) )
1863 IF( iuplo.EQ.1 )
THEN
1867 work( indx ) = a( i, j )
1875 work( indx ) = a( i, j )
1884 CALL dspevx(
'V',
'I', uplo, n, work, vl, vu, il, iu,
1885 $ abstol, m2, wa2, z, ldu, v, iwork,
1886 $ iwork( 5*n+1 ), iinfo )
1887 IF( iinfo.NE.0 )
THEN
1888 WRITE( nounit, fmt = 9999 )
'DSPEVX(V,I,' // uplo //
1889 $
')', iinfo, n, jtype, ioldsd
1891 IF( iinfo.LT.0 )
THEN
1894 result( ntest ) = ulpinv
1895 result( ntest+1 ) = ulpinv
1896 result( ntest+2 ) = ulpinv
1903 CALL dsyt22( 1, uplo, n, m2, 0, a, ldu, wa2, d2, z, ldu,
1904 $ v, ldu, tau, work, result( ntest ) )
1908 IF( iuplo.EQ.1 )
THEN
1912 work( indx ) = a( i, j )
1920 work( indx ) = a( i, j )
1927 CALL dspevx(
'N',
'I', uplo, n, work, vl, vu, il, iu,
1928 $ abstol, m3, wa3, z, ldu, v, iwork,
1929 $ iwork( 5*n+1 ), iinfo )
1930 IF( iinfo.NE.0 )
THEN
1931 WRITE( nounit, fmt = 9999 )
'DSPEVX(N,I,' // uplo //
1932 $
')', iinfo, n, jtype, ioldsd
1934 IF( iinfo.LT.0 )
THEN
1937 result( ntest ) = ulpinv
1942 IF( m3.EQ.0 .AND. n.GT.0 )
THEN
1943 result( ntest ) = ulpinv
1949 temp1 = dsxt1( 1, wa2, m2, wa3, m3, abstol, ulp, unfl )
1950 temp2 = dsxt1( 1, wa3, m3, wa2, m2, abstol, ulp, unfl )
1952 temp3 = max( abs( wa1( 1 ) ), abs( wa1( n ) ) )
1956 result( ntest ) = ( temp1+temp2 ) /
1957 $ max( unfl, temp3*ulp )
1960 IF( iuplo.EQ.1 )
THEN
1964 work( indx ) = a( i, j )
1972 work( indx ) = a( i, j )
1981 CALL dspevx(
'V',
'V', uplo, n, work, vl, vu, il, iu,
1982 $ abstol, m2, wa2, z, ldu, v, iwork,
1983 $ iwork( 5*n+1 ), iinfo )
1984 IF( iinfo.NE.0 )
THEN
1985 WRITE( nounit, fmt = 9999 )
'DSPEVX(V,V,' // uplo //
1986 $
')', iinfo, n, jtype, ioldsd
1988 IF( iinfo.LT.0 )
THEN
1991 result( ntest ) = ulpinv
1992 result( ntest+1 ) = ulpinv
1993 result( ntest+2 ) = ulpinv
2000 CALL dsyt22( 1, uplo, n, m2, 0, a, ldu, wa2, d2, z, ldu,
2001 $ v, ldu, tau, work, result( ntest ) )
2005 IF( iuplo.EQ.1 )
THEN
2009 work( indx ) = a( i, j )
2017 work( indx ) = a( i, j )
2024 CALL dspevx(
'N',
'V', uplo, n, work, vl, vu, il, iu,
2025 $ abstol, m3, wa3, z, ldu, v, iwork,
2026 $ iwork( 5*n+1 ), iinfo )
2027 IF( iinfo.NE.0 )
THEN
2028 WRITE( nounit, fmt = 9999 )
'DSPEVX(N,V,' // uplo //
2029 $
')', iinfo, n, jtype, ioldsd
2031 IF( iinfo.LT.0 )
THEN
2034 result( ntest ) = ulpinv
2039 IF( m3.EQ.0 .AND. n.GT.0 )
THEN
2040 result( ntest ) = ulpinv
2046 temp1 = dsxt1( 1, wa2, m2, wa3, m3, abstol, ulp, unfl )
2047 temp2 = dsxt1( 1, wa3, m3, wa2, m2, abstol, ulp, unfl )
2049 temp3 = max( abs( wa1( 1 ) ), abs( wa1( n ) ) )
2053 result( ntest ) = ( temp1+temp2 ) /
2054 $ max( unfl, temp3*ulp )
2060 IF( jtype.LE.7 )
THEN
2062 ELSE IF( jtype.GE.8 .AND. jtype.LE.15 )
THEN
2071 IF( iuplo.EQ.1 )
THEN
2073 DO 1090 i = max( 1, j-kd ), j
2074 v( kd+1+i-j, j ) = a( i, j )
2079 DO 1110 i = j, min( n, j+kd )
2080 v( 1+i-j, j ) = a( i, j )
2087 CALL dsbev(
'V', uplo, n, kd, v, ldu, d1, z, ldu, work,
2089 IF( iinfo.NE.0 )
THEN
2090 WRITE( nounit, fmt = 9999 )
'DSBEV(V,' // uplo //
')',
2091 $ iinfo, n, jtype, ioldsd
2093 IF( iinfo.LT.0 )
THEN
2096 result( ntest ) = ulpinv
2097 result( ntest+1 ) = ulpinv
2098 result( ntest+2 ) = ulpinv
2105 CALL dsyt21( 1, uplo, n, 0, a, lda, d1, d2, z, ldu, v,
2106 $ ldu, tau, work, result( ntest ) )
2108 IF( iuplo.EQ.1 )
THEN
2110 DO 1130 i = max( 1, j-kd ), j
2111 v( kd+1+i-j, j ) = a( i, j )
2116 DO 1150 i = j, min( n, j+kd )
2117 v( 1+i-j, j ) = a( i, j )
2123 srnamt =
'DSBEV_2STAGE'
2124 CALL dsbev_2stage(
'N', uplo, n, kd, v, ldu, d3, z, ldu,
2125 $ work, lwork, iinfo )
2126 IF( iinfo.NE.0 )
THEN
2127 WRITE( nounit, fmt = 9999 )
2128 $
'DSBEV_2STAGE(N,' // uplo //
')',
2129 $ iinfo, n, jtype, ioldsd
2131 IF( iinfo.LT.0 )
THEN
2134 result( ntest ) = ulpinv
2144 temp1 = max( temp1, abs( d1( j ) ), abs( d3( j ) ) )
2145 temp2 = max( temp2, abs( d1( j )-d3( j ) ) )
2147 result( ntest ) = temp2 / max( unfl,
2148 $ ulp*max( temp1, temp2 ) )
2154 IF( iuplo.EQ.1 )
THEN
2156 DO 1190 i = max( 1, j-kd ), j
2157 v( kd+1+i-j, j ) = a( i, j )
2162 DO 1210 i = j, min( n, j+kd )
2163 v( 1+i-j, j ) = a( i, j )
2170 CALL dsbevx(
'V',
'A', uplo, n, kd, v, ldu, u, ldu, vl,
2171 $ vu, il, iu, abstol, m, wa2, z, ldu, work,
2172 $ iwork, iwork( 5*n+1 ), iinfo )
2173 IF( iinfo.NE.0 )
THEN
2174 WRITE( nounit, fmt = 9999 )
'DSBEVX(V,A,' // uplo //
2175 $
')', iinfo, n, jtype, ioldsd
2177 IF( iinfo.LT.0 )
THEN
2180 result( ntest ) = ulpinv
2181 result( ntest+1 ) = ulpinv
2182 result( ntest+2 ) = ulpinv
2189 CALL dsyt21( 1, uplo, n, 0, a, ldu, wa2, d2, z, ldu, v,
2190 $ ldu, tau, work, result( ntest ) )
2194 IF( iuplo.EQ.1 )
THEN
2196 DO 1230 i = max( 1, j-kd ), j
2197 v( kd+1+i-j, j ) = a( i, j )
2202 DO 1250 i = j, min( n, j+kd )
2203 v( 1+i-j, j ) = a( i, j )
2208 srnamt =
'DSBEVX_2STAGE'
2210 $ u, ldu, vl, vu, il, iu, abstol, m3, wa3,
2211 $ z, ldu, work, lwork, iwork, iwork( 5*n+1 ),
2213 IF( iinfo.NE.0 )
THEN
2214 WRITE( nounit, fmt = 9999 )
2215 $
'DSBEVX_2STAGE(N,A,' // uplo //
2216 $
')', iinfo, n, jtype, ioldsd
2218 IF( iinfo.LT.0 )
THEN
2221 result( ntest ) = ulpinv
2231 temp1 = max( temp1, abs( wa2( j ) ), abs( wa3( j ) ) )
2232 temp2 = max( temp2, abs( wa2( j )-wa3( j ) ) )
2234 result( ntest ) = temp2 / max( unfl,
2235 $ ulp*max( temp1, temp2 ) )
2239 IF( iuplo.EQ.1 )
THEN
2241 DO 1290 i = max( 1, j-kd ), j
2242 v( kd+1+i-j, j ) = a( i, j )
2247 DO 1310 i = j, min( n, j+kd )
2248 v( 1+i-j, j ) = a( i, j )
2254 CALL dsbevx(
'V',
'I', uplo, n, kd, v, ldu, u, ldu, vl,
2255 $ vu, il, iu, abstol, m2, wa2, z, ldu, work,
2256 $ iwork, iwork( 5*n+1 ), iinfo )
2257 IF( iinfo.NE.0 )
THEN
2258 WRITE( nounit, fmt = 9999 )
'DSBEVX(V,I,' // uplo //
2259 $
')', iinfo, n, jtype, ioldsd
2261 IF( iinfo.LT.0 )
THEN
2264 result( ntest ) = ulpinv
2265 result( ntest+1 ) = ulpinv
2266 result( ntest+2 ) = ulpinv
2273 CALL dsyt22( 1, uplo, n, m2, 0, a, ldu, wa2, d2, z, ldu,
2274 $ v, ldu, tau, work, result( ntest ) )
2278 IF( iuplo.EQ.1 )
THEN
2280 DO 1330 i = max( 1, j-kd ), j
2281 v( kd+1+i-j, j ) = a( i, j )
2286 DO 1350 i = j, min( n, j+kd )
2287 v( 1+i-j, j ) = a( i, j )
2292 srnamt =
'DSBEVX_2STAGE'
2294 $ u, ldu, vl, vu, il, iu, abstol, m3, wa3,
2295 $ z, ldu, work, lwork, iwork, iwork( 5*n+1 ),
2297 IF( iinfo.NE.0 )
THEN
2298 WRITE( nounit, fmt = 9999 )
2299 $
'DSBEVX_2STAGE(N,I,' // uplo //
2300 $
')', iinfo, n, jtype, ioldsd
2302 IF( iinfo.LT.0 )
THEN
2305 result( ntest ) = ulpinv
2312 temp1 = dsxt1( 1, wa2, m2, wa3, m3, abstol, ulp, unfl )
2313 temp2 = dsxt1( 1, wa3, m3, wa2, m2, abstol, ulp, unfl )
2315 temp3 = max( abs( wa1( 1 ) ), abs( wa1( n ) ) )
2319 result( ntest ) = ( temp1+temp2 ) /
2320 $ max( unfl, temp3*ulp )
2324 IF( iuplo.EQ.1 )
THEN
2326 DO 1380 i = max( 1, j-kd ), j
2327 v( kd+1+i-j, j ) = a( i, j )
2332 DO 1400 i = j, min( n, j+kd )
2333 v( 1+i-j, j ) = a( i, j )
2339 CALL dsbevx(
'V',
'V', uplo, n, kd, v, ldu, u, ldu, vl,
2340 $ vu, il, iu, abstol, m2, wa2, z, ldu, work,
2341 $ iwork, iwork( 5*n+1 ), iinfo )
2342 IF( iinfo.NE.0 )
THEN
2343 WRITE( nounit, fmt = 9999 )
'DSBEVX(V,V,' // uplo //
2344 $
')', iinfo, n, jtype, ioldsd
2346 IF( iinfo.LT.0 )
THEN
2349 result( ntest ) = ulpinv
2350 result( ntest+1 ) = ulpinv
2351 result( ntest+2 ) = ulpinv
2358 CALL dsyt22( 1, uplo, n, m2, 0, a, ldu, wa2, d2, z, ldu,
2359 $ v, ldu, tau, work, result( ntest ) )
2363 IF( iuplo.EQ.1 )
THEN
2365 DO 1420 i = max( 1, j-kd ), j
2366 v( kd+1+i-j, j ) = a( i, j )
2371 DO 1440 i = j, min( n, j+kd )
2372 v( 1+i-j, j ) = a( i, j )
2377 srnamt =
'DSBEVX_2STAGE'
2379 $ u, ldu, vl, vu, il, iu, abstol, m3, wa3,
2380 $ z, ldu, work, lwork, iwork, iwork( 5*n+1 ),
2382 IF( iinfo.NE.0 )
THEN
2383 WRITE( nounit, fmt = 9999 )
2384 $
'DSBEVX_2STAGE(N,V,' // uplo //
2385 $
')', iinfo, n, jtype, ioldsd
2387 IF( iinfo.LT.0 )
THEN
2390 result( ntest ) = ulpinv
2395 IF( m3.EQ.0 .AND. n.GT.0 )
THEN
2396 result( ntest ) = ulpinv
2402 temp1 = dsxt1( 1, wa2, m2, wa3, m3, abstol, ulp, unfl )
2403 temp2 = dsxt1( 1, wa3, m3, wa2, m2, abstol, ulp, unfl )
2405 temp3 = max( abs( wa1( 1 ) ), abs( wa1( n ) ) )
2409 result( ntest ) = ( temp1+temp2 ) /
2410 $ max( unfl, temp3*ulp )
2416 CALL dlacpy(
' ', n, n, a, lda, v, ldu )
2420 CALL dsyevd(
'V', uplo, n, a, ldu, d1, work, lwedc,
2421 $ iwork, liwedc, iinfo )
2422 IF( iinfo.NE.0 )
THEN
2423 WRITE( nounit, fmt = 9999 )
'DSYEVD(V,' // uplo //
2424 $
')', iinfo, n, jtype, ioldsd
2426 IF( iinfo.LT.0 )
THEN
2429 result( ntest ) = ulpinv
2430 result( ntest+1 ) = ulpinv
2431 result( ntest+2 ) = ulpinv
2438 CALL dsyt21( 1, uplo, n, 0, v, ldu, d1, d2, a, ldu, z,
2439 $ ldu, tau, work, result( ntest ) )
2441 CALL dlacpy(
' ', n, n, v, ldu, a, lda )
2444 srnamt =
'DSYEVD_2STAGE'
2446 $ lwork, iwork, liwedc, iinfo )
2447 IF( iinfo.NE.0 )
THEN
2448 WRITE( nounit, fmt = 9999 )
2449 $
'DSYEVD_2STAGE(N,' // uplo //
2450 $
')', iinfo, n, jtype, ioldsd
2452 IF( iinfo.LT.0 )
THEN
2455 result( ntest ) = ulpinv
2465 temp1 = max( temp1, abs( d1( j ) ), abs( d3( j ) ) )
2466 temp2 = max( temp2, abs( d1( j )-d3( j ) ) )
2468 result( ntest ) = temp2 / max( unfl,
2469 $ ulp*max( temp1, temp2 ) )
2475 CALL dlacpy(
' ', n, n, v, ldu, a, lda )
2480 IF( iuplo.EQ.1 )
THEN
2484 work( indx ) = a( i, j )
2492 work( indx ) = a( i, j )
2500 CALL dspevd(
'V', uplo, n, work, d1, z, ldu,
2501 $ work( indx ), lwedc-indx+1, iwork, liwedc,
2503 IF( iinfo.NE.0 )
THEN
2504 WRITE( nounit, fmt = 9999 )
'DSPEVD(V,' // uplo //
2505 $
')', iinfo, n, jtype, ioldsd
2507 IF( iinfo.LT.0 )
THEN
2510 result( ntest ) = ulpinv
2511 result( ntest+1 ) = ulpinv
2512 result( ntest+2 ) = ulpinv
2519 CALL dsyt21( 1, uplo, n, 0, a, lda, d1, d2, z, ldu, v,
2520 $ ldu, tau, work, result( ntest ) )
2522 IF( iuplo.EQ.1 )
THEN
2527 work( indx ) = a( i, j )
2535 work( indx ) = a( i, j )
2543 CALL dspevd(
'N', uplo, n, work, d3, z, ldu,
2544 $ work( indx ), lwedc-indx+1, iwork, liwedc,
2546 IF( iinfo.NE.0 )
THEN
2547 WRITE( nounit, fmt = 9999 )
'DSPEVD(N,' // uplo //
2548 $
')', iinfo, n, jtype, ioldsd
2550 IF( iinfo.LT.0 )
THEN
2553 result( ntest ) = ulpinv
2563 temp1 = max( temp1, abs( d1( j ) ), abs( d3( j ) ) )
2564 temp2 = max( temp2, abs( d1( j )-d3( j ) ) )
2566 result( ntest ) = temp2 / max( unfl,
2567 $ ulp*max( temp1, temp2 ) )
2572 IF( jtype.LE.7 )
THEN
2574 ELSE IF( jtype.GE.8 .AND. jtype.LE.15 )
THEN
2583 IF( iuplo.EQ.1 )
THEN
2585 DO 1590 i = max( 1, j-kd ), j
2586 v( kd+1+i-j, j ) = a( i, j )
2591 DO 1610 i = j, min( n, j+kd )
2592 v( 1+i-j, j ) = a( i, j )
2599 CALL dsbevd(
'V', uplo, n, kd, v, ldu, d1, z, ldu, work,
2600 $ lwedc, iwork, liwedc, iinfo )
2601 IF( iinfo.NE.0 )
THEN
2602 WRITE( nounit, fmt = 9999 )
'DSBEVD(V,' // uplo //
2603 $
')', iinfo, n, jtype, ioldsd
2605 IF( iinfo.LT.0 )
THEN
2608 result( ntest ) = ulpinv
2609 result( ntest+1 ) = ulpinv
2610 result( ntest+2 ) = ulpinv
2617 CALL dsyt21( 1, uplo, n, 0, a, lda, d1, d2, z, ldu, v,
2618 $ ldu, tau, work, result( ntest ) )
2620 IF( iuplo.EQ.1 )
THEN
2622 DO 1630 i = max( 1, j-kd ), j
2623 v( kd+1+i-j, j ) = a( i, j )
2628 DO 1650 i = j, min( n, j+kd )
2629 v( 1+i-j, j ) = a( i, j )
2635 srnamt =
'DSBEVD_2STAGE'
2637 $ work, lwork, iwork, liwedc, iinfo )
2638 IF( iinfo.NE.0 )
THEN
2639 WRITE( nounit, fmt = 9999 )
2640 $
'DSBEVD_2STAGE(N,' // uplo //
2641 $
')', iinfo, n, jtype, ioldsd
2643 IF( iinfo.LT.0 )
THEN
2646 result( ntest ) = ulpinv
2656 temp1 = max( temp1, abs( d1( j ) ), abs( d3( j ) ) )
2657 temp2 = max( temp2, abs( d1( j )-d3( j ) ) )
2659 result( ntest ) = temp2 / max( unfl,
2660 $ ulp*max( temp1, temp2 ) )
2665 CALL dlacpy(
' ', n, n, a, lda, v, ldu )
2668 CALL dsyevr(
'V',
'A', uplo, n, a, ldu, vl, vu, il, iu,
2669 $ abstol, m, wa1, z, ldu, iwork, work, lwork,
2670 $ iwork(2*n+1), liwork-2*n, iinfo )
2671 IF( iinfo.NE.0 )
THEN
2672 WRITE( nounit, fmt = 9999 )
'DSYEVR(V,A,' // uplo //
2673 $
')', iinfo, n, jtype, ioldsd
2675 IF( iinfo.LT.0 )
THEN
2678 result( ntest ) = ulpinv
2679 result( ntest+1 ) = ulpinv
2680 result( ntest+2 ) = ulpinv
2687 CALL dlacpy(
' ', n, n, v, ldu, a, lda )
2689 CALL dsyt21( 1, uplo, n, 0, a, ldu, wa1, d2, z, ldu, v,
2690 $ ldu, tau, work, result( ntest ) )
2693 srnamt =
'DSYEVR_2STAGE'
2695 $ il, iu, abstol, m2, wa2, z, ldu, iwork,
2696 $ work, lwork, iwork(2*n+1), liwork-2*n,
2698 IF( iinfo.NE.0 )
THEN
2699 WRITE( nounit, fmt = 9999 )
2700 $
'DSYEVR_2STAGE(N,A,' // uplo //
2701 $
')', iinfo, n, jtype, ioldsd
2703 IF( iinfo.LT.0 )
THEN
2706 result( ntest ) = ulpinv
2716 temp1 = max( temp1, abs( wa1( j ) ), abs( wa2( j ) ) )
2717 temp2 = max( temp2, abs( wa1( j )-wa2( j ) ) )
2719 result( ntest ) = temp2 / max( unfl,
2720 $ ulp*max( temp1, temp2 ) )
2725 CALL dlacpy(
' ', n, n, v, ldu, a, lda )
2727 CALL dsyevr(
'V',
'I', uplo, n, a, ldu, vl, vu, il, iu,
2728 $ abstol, m2, wa2, z, ldu, iwork, work, lwork,
2729 $ iwork(2*n+1), liwork-2*n, iinfo )
2730 IF( iinfo.NE.0 )
THEN
2731 WRITE( nounit, fmt = 9999 )
'DSYEVR(V,I,' // uplo //
2732 $
')', iinfo, n, jtype, ioldsd
2734 IF( iinfo.LT.0 )
THEN
2737 result( ntest ) = ulpinv
2738 result( ntest+1 ) = ulpinv
2739 result( ntest+2 ) = ulpinv
2746 CALL dlacpy(
' ', n, n, v, ldu, a, lda )
2748 CALL dsyt22( 1, uplo, n, m2, 0, a, ldu, wa2, d2, z, ldu,
2749 $ v, ldu, tau, work, result( ntest ) )
2752 CALL dlacpy(
' ', n, n, v, ldu, a, lda )
2753 srnamt =
'DSYEVR_2STAGE'
2755 $ il, iu, abstol, m3, wa3, z, ldu, iwork,
2756 $ work, lwork, iwork(2*n+1), liwork-2*n,
2758 IF( iinfo.NE.0 )
THEN
2759 WRITE( nounit, fmt = 9999 )
2760 $
'DSYEVR_2STAGE(N,I,' // uplo //
2761 $
')', iinfo, n, jtype, ioldsd
2763 IF( iinfo.LT.0 )
THEN
2766 result( ntest ) = ulpinv
2773 temp1 = dsxt1( 1, wa2, m2, wa3, m3, abstol, ulp, unfl )
2774 temp2 = dsxt1( 1, wa3, m3, wa2, m2, abstol, ulp, unfl )
2775 result( ntest ) = ( temp1+temp2 ) /
2776 $ max( unfl, ulp*temp3 )
2780 CALL dlacpy(
' ', n, n, v, ldu, a, lda )
2782 CALL dsyevr(
'V',
'V', uplo, n, a, ldu, vl, vu, il, iu,
2783 $ abstol, m2, wa2, z, ldu, iwork, work, lwork,
2784 $ iwork(2*n+1), liwork-2*n, iinfo )
2785 IF( iinfo.NE.0 )
THEN
2786 WRITE( nounit, fmt = 9999 )
'DSYEVR(V,V,' // uplo //
2787 $
')', iinfo, n, jtype, ioldsd
2789 IF( iinfo.LT.0 )
THEN
2792 result( ntest ) = ulpinv
2793 result( ntest+1 ) = ulpinv
2794 result( ntest+2 ) = ulpinv
2801 CALL dlacpy(
' ', n, n, v, ldu, a, lda )
2803 CALL dsyt22( 1, uplo, n, m2, 0, a, ldu, wa2, d2, z, ldu,
2804 $ v, ldu, tau, work, result( ntest ) )
2807 CALL dlacpy(
' ', n, n, v, ldu, a, lda )
2808 srnamt =
'DSYEVR_2STAGE'
2810 $ il, iu, abstol, m3, wa3, z, ldu, iwork,
2811 $ work, lwork, iwork(2*n+1), liwork-2*n,
2813 IF( iinfo.NE.0 )
THEN
2814 WRITE( nounit, fmt = 9999 )
2815 $
'DSYEVR_2STAGE(N,V,' // uplo //
2816 $
')', iinfo, n, jtype, ioldsd
2818 IF( iinfo.LT.0 )
THEN
2821 result( ntest ) = ulpinv
2826 IF( m3.EQ.0 .AND. n.GT.0 )
THEN
2827 result( ntest ) = ulpinv
2833 temp1 = dsxt1( 1, wa2, m2, wa3, m3, abstol, ulp, unfl )
2834 temp2 = dsxt1( 1, wa3, m3, wa2, m2, abstol, ulp, unfl )
2836 temp3 = max( abs( wa1( 1 ) ), abs( wa1( n ) ) )
2840 result( ntest ) = ( temp1+temp2 ) /
2841 $ max( unfl, temp3*ulp )
2843 CALL dlacpy(
' ', n, n, v, ldu, a, lda )
2849 ntestt = ntestt + ntest
2851 CALL dlafts(
'DST', n, n, jtype, ntest, result, ioldsd,
2852 $ thresh, nounit, nerrs )
2859 CALL alasvm(
'DST', nounit, nerrs, ntestt, 0 )
2861 9999
FORMAT(
' DDRVST2STG: ', a,
' returned INFO=', i6,
'.', / 9x,
2862 $
'N=', i6,
', JTYPE=', i6,
', ISEED=(', 3( i5,
',' ), i5,
')' )
subroutine alasvm(type, nout, nfail, nrun, nerrs)
ALASVM
subroutine xerbla(srname, info)
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 dlafts(type, m, n, imat, ntests, result, iseed, thresh, iounit, ie)
DLAFTS
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 dstt21(n, kband, ad, ae, sd, se, u, ldu, work, result)
DSTT21
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 dsyt22(itype, uplo, n, m, kband, a, lda, d, e, u, ldu, v, ldv, tau, work, result)
DSYT22
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 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_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 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 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 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 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 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 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...
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 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 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 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 dsytrd_2stage(vect, uplo, n, a, lda, d, e, tau, hous2, lhous2, work, lwork, info)
DSYTRD_2STAGE
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 dsytrd_sy2sb(uplo, n, kd, a, lda, ab, ldab, tau, work, lwork, info)
DSYTRD_SY2SB
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 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 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 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 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 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 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...