587 SUBROUTINE dchkst( NSIZES, NN, NTYPES, DOTYPE, ISEED, THRESH,
588 $ NOUNIT, A, LDA, AP, SD, SE, D1, D2, D3, D4, D5,
589 $ WA1, WA2, WA3, WR, U, LDU, V, VP, TAU, Z, WORK,
590 $ LWORK, IWORK, LIWORK, RESULT, INFO )
597 INTEGER INFO, LDA, LDU, LIWORK, LWORK, NOUNIT, NSIZES,
599 DOUBLE PRECISION THRESH
603 INTEGER ISEED( 4 ), IWORK( * ), NN( * )
604 DOUBLE PRECISION A( LDA, * ), AP( * ), D1( * ), D2( * ),
605 $ d3( * ), d4( * ), d5( * ), result( * ),
606 $ sd( * ), se( * ), tau( * ), u( ldu, * ),
607 $ v( ldu, * ), vp( * ), wa1( * ), wa2( * ),
608 $ wa3( * ), work( * ), wr( * ), z( ldu, * )
614 DOUBLE PRECISION ZERO, ONE, TWO, EIGHT, TEN, HUN
615 PARAMETER ( ZERO = 0.0d0, one = 1.0d0, two = 2.0d0,
616 $ eight = 8.0d0, ten = 10.0d0, hun = 100.0d0 )
617 DOUBLE PRECISION HALF
618 parameter( half = one / two )
620 parameter( maxtyp = 21 )
622 parameter( srange = .false. )
624 parameter( srel = .false. )
627 LOGICAL BADNN, TRYRAC
628 INTEGER I, IINFO, IL, IMODE, ITEMP, ITYPE, IU, J, JC,
629 $ JR, JSIZE, JTYPE, LGN, LIWEDC, LOG2UI, LWEDC,
630 $ m, m2, m3, mtypes, n, nap, nblock, nerrs,
631 $ nmats, nmax, nsplit, ntest, ntestt
632 DOUBLE PRECISION ABSTOL, ANINV, ANORM, COND, OVFL, RTOVFL,
633 $ RTUNFL, TEMP1, TEMP2, TEMP3, TEMP4, ULP,
634 $ ULPINV, UNFL, VL, VU
637 INTEGER IDUMMA( 1 ), IOLDSD( 4 ), ISEED2( 4 ),
638 $ KMAGN( MAXTYP ), KMODE( MAXTYP ),
640 DOUBLE PRECISION DUMMA( 1 )
644 DOUBLE PRECISION DLAMCH, DLARND, DSXT1
645 EXTERNAL ILAENV, DLAMCH, DLARND, DSXT1
654 INTRINSIC abs, dble, int, log, max, min, sqrt
657 DATA ktype / 1, 2, 4, 4, 4, 4, 4, 5, 5, 5, 5, 5, 8,
658 $ 8, 8, 9, 9, 9, 9, 9, 10 /
659 DATA kmagn / 1, 1, 1, 1, 1, 2, 3, 1, 1, 1, 2, 3, 1,
660 $ 2, 3, 1, 1, 1, 2, 3, 1 /
661 DATA kmode / 0, 0, 4, 3, 1, 4, 4, 4, 3, 1, 4, 4, 0,
662 $ 0, 0, 4, 3, 1, 4, 4, 3 /
680 nmax = max( nmax, nn( j ) )
685 nblock = ilaenv( 1,
'DSYTRD',
'L', nmax, -1, -1, -1 )
686 nblock = min( nmax, max( 1, nblock ) )
690 IF( nsizes.LT.0 )
THEN
692 ELSE IF( badnn )
THEN
694 ELSE IF( ntypes.LT.0 )
THEN
696 ELSE IF( lda.LT.nmax )
THEN
698 ELSE IF( ldu.LT.nmax )
THEN
700 ELSE IF( 2*max( 2, nmax )**2.GT.lwork )
THEN
705 CALL xerbla(
'DCHKST', -info )
711 IF( nsizes.EQ.0 .OR. ntypes.EQ.0 )
716 unfl = dlamch(
'Safe minimum' )
718 ulp = dlamch(
'Epsilon' )*dlamch(
'Base' )
720 log2ui = int( log( ulpinv ) / log( two ) )
721 rtunfl = sqrt( unfl )
722 rtovfl = sqrt( ovfl )
727 iseed2( i ) = iseed( i )
732 DO 310 jsize = 1, nsizes
735 lgn = int( log( dble( n ) ) / log( two ) )
740 lwedc = 1 + 4*n + 2*n*lgn + 4*n**2
741 liwedc = 6 + 6*n + 5*n*lgn
746 nap = ( n*( n+1 ) ) / 2
747 aninv = one / dble( max( 1, n ) )
749 IF( nsizes.NE.1 )
THEN
750 mtypes = min( maxtyp, ntypes )
752 mtypes = min( maxtyp+1, ntypes )
755 DO 300 jtype = 1, mtypes
756 IF( .NOT.dotype( jtype ) )
762 ioldsd( j ) = iseed( j )
781 IF( mtypes.GT.maxtyp )
784 itype = ktype( jtype )
785 imode = kmode( jtype )
789 GO TO ( 40, 50, 60 )kmagn( jtype )
796 anorm = ( rtovfl*ulp )*aninv
800 anorm = rtunfl*n*ulpinv
805 CALL dlaset(
'Full', lda, n, zero, zero, a, lda )
807 IF( jtype.LE.15 )
THEN
810 cond = ulpinv*aninv / ten
817 IF( itype.EQ.1 )
THEN
820 ELSE IF( itype.EQ.2 )
THEN
828 ELSE IF( itype.EQ.4 )
THEN
832 CALL dlatms( n, n,
'S', iseed,
'S', work, imode, cond,
833 $ anorm, 0, 0,
'N', a, lda, work( n+1 ),
837 ELSE IF( itype.EQ.5 )
THEN
841 CALL dlatms( n, n,
'S', iseed,
'S', work, imode, cond,
842 $ anorm, n, n,
'N', a, lda, work( n+1 ),
845 ELSE IF( itype.EQ.7 )
THEN
849 CALL dlatmr( n, n,
'S', iseed,
'S', work, 6, one, one,
850 $
'T',
'N', work( n+1 ), 1, one,
851 $ work( 2*n+1 ), 1, one,
'N', idumma, 0, 0,
852 $ zero, anorm,
'NO', a, lda, iwork, iinfo )
854 ELSE IF( itype.EQ.8 )
THEN
858 CALL dlatmr( n, n,
'S', iseed,
'S', work, 6, one, one,
859 $
'T',
'N', work( n+1 ), 1, one,
860 $ work( 2*n+1 ), 1, one,
'N', idumma, n, n,
861 $ zero, anorm,
'NO', a, lda, iwork, iinfo )
863 ELSE IF( itype.EQ.9 )
THEN
867 CALL dlatms( n, n,
'S', iseed,
'P', work, imode, cond,
868 $ anorm, n, n,
'N', a, lda, work( n+1 ),
871 ELSE IF( itype.EQ.10 )
THEN
875 CALL dlatms( n, n,
'S', iseed,
'P', work, imode, cond,
876 $ anorm, 1, 1,
'N', a, lda, work( n+1 ),
879 temp1 = abs( a( i-1, i ) ) /
880 $ sqrt( abs( a( i-1, i-1 )*a( i, i ) ) )
881 IF( temp1.GT.half )
THEN
882 a( i-1, i ) = half*sqrt( abs( a( i-1, i-1 )*a( i,
884 a( i, i-1 ) = a( i-1, i )
893 IF( iinfo.NE.0 )
THEN
894 WRITE( nounit, fmt = 9999 )
'Generator', iinfo, n, jtype,
905 CALL dlacpy(
'U', n, n, a, lda, v, ldu )
908 CALL dsytrd(
'U', n, v, ldu, sd, se, tau, work, lwork,
911 IF( iinfo.NE.0 )
THEN
912 WRITE( nounit, fmt = 9999 )
'DSYTRD(U)', iinfo, n, jtype,
915 IF( iinfo.LT.0 )
THEN
923 CALL dlacpy(
'U', n, n, v, ldu, u, ldu )
926 CALL dorgtr(
'U', n, u, ldu, tau, work, lwork, iinfo )
927 IF( iinfo.NE.0 )
THEN
928 WRITE( nounit, fmt = 9999 )
'DORGTR(U)', iinfo, n, jtype,
931 IF( iinfo.LT.0 )
THEN
941 CALL dsyt21( 2,
'Upper', n, 1, a, lda, sd, se, u, ldu, v,
942 $ ldu, tau, work, result( 1 ) )
943 CALL dsyt21( 3,
'Upper', n, 1, a, lda, sd, se, u, ldu, v,
944 $ ldu, tau, work, result( 2 ) )
949 CALL dlacpy(
'L', n, n, a, lda, v, ldu )
952 CALL dsytrd(
'L', n, v, ldu, sd, se, tau, work, lwork,
955 IF( iinfo.NE.0 )
THEN
956 WRITE( nounit, fmt = 9999 )
'DSYTRD(L)', iinfo, n, jtype,
959 IF( iinfo.LT.0 )
THEN
967 CALL dlacpy(
'L', n, n, v, ldu, u, ldu )
970 CALL dorgtr(
'L', n, u, ldu, tau, work, lwork, iinfo )
971 IF( iinfo.NE.0 )
THEN
972 WRITE( nounit, fmt = 9999 )
'DORGTR(L)', iinfo, n, jtype,
975 IF( iinfo.LT.0 )
THEN
983 CALL dsyt21( 2,
'Lower', n, 1, a, lda, sd, se, u, ldu, v,
984 $ ldu, tau, work, result( 3 ) )
985 CALL dsyt21( 3,
'Lower', n, 1, a, lda, sd, se, u, ldu, v,
986 $ ldu, tau, work, result( 4 ) )
994 ap( i ) = a( jr, jc )
1000 CALL dcopy( nap, ap, 1, vp, 1 )
1003 CALL dsptrd(
'U', n, vp, sd, se, tau, iinfo )
1005 IF( iinfo.NE.0 )
THEN
1006 WRITE( nounit, fmt = 9999 )
'DSPTRD(U)', iinfo, n, jtype,
1009 IF( iinfo.LT.0 )
THEN
1012 result( 5 ) = ulpinv
1018 CALL dopgtr(
'U', n, vp, tau, u, ldu, work, iinfo )
1019 IF( iinfo.NE.0 )
THEN
1020 WRITE( nounit, fmt = 9999 )
'DOPGTR(U)', iinfo, n, jtype,
1023 IF( iinfo.LT.0 )
THEN
1026 result( 6 ) = ulpinv
1033 CALL dspt21( 2,
'Upper', n, 1, ap, sd, se, u, ldu, vp, tau,
1034 $ work, result( 5 ) )
1035 CALL dspt21( 3,
'Upper', n, 1, ap, sd, se, u, ldu, vp, tau,
1036 $ work, result( 6 ) )
1044 ap( i ) = a( jr, jc )
1050 CALL dcopy( nap, ap, 1, vp, 1 )
1053 CALL dsptrd(
'L', n, vp, sd, se, tau, iinfo )
1055 IF( iinfo.NE.0 )
THEN
1056 WRITE( nounit, fmt = 9999 )
'DSPTRD(L)', iinfo, n, jtype,
1059 IF( iinfo.LT.0 )
THEN
1062 result( 7 ) = ulpinv
1068 CALL dopgtr(
'L', n, vp, tau, u, ldu, work, iinfo )
1069 IF( iinfo.NE.0 )
THEN
1070 WRITE( nounit, fmt = 9999 )
'DOPGTR(L)', iinfo, n, jtype,
1073 IF( iinfo.LT.0 )
THEN
1076 result( 8 ) = ulpinv
1081 CALL dspt21( 2,
'Lower', n, 1, ap, sd, se, u, ldu, vp, tau,
1082 $ work, result( 7 ) )
1083 CALL dspt21( 3,
'Lower', n, 1, ap, sd, se, u, ldu, vp, tau,
1084 $ work, result( 8 ) )
1090 CALL dcopy( n, sd, 1, d1, 1 )
1092 $
CALL dcopy( n-1, se, 1, work, 1 )
1093 CALL dlaset(
'Full', n, n, zero, one, z, ldu )
1096 CALL dsteqr(
'V', n, d1, work, z, ldu, work( n+1 ), iinfo )
1097 IF( iinfo.NE.0 )
THEN
1098 WRITE( nounit, fmt = 9999 )
'DSTEQR(V)', iinfo, n, jtype,
1101 IF( iinfo.LT.0 )
THEN
1104 result( 9 ) = ulpinv
1111 CALL dcopy( n, sd, 1, d2, 1 )
1113 $
CALL dcopy( n-1, se, 1, work, 1 )
1116 CALL dsteqr(
'N', n, d2, work, work( n+1 ), ldu,
1117 $ work( n+1 ), iinfo )
1118 IF( iinfo.NE.0 )
THEN
1119 WRITE( nounit, fmt = 9999 )
'DSTEQR(N)', iinfo, n, jtype,
1122 IF( iinfo.LT.0 )
THEN
1125 result( 11 ) = ulpinv
1132 CALL dcopy( n, sd, 1, d3, 1 )
1134 $
CALL dcopy( n-1, se, 1, work, 1 )
1137 CALL dsterf( n, d3, work, iinfo )
1138 IF( iinfo.NE.0 )
THEN
1139 WRITE( nounit, fmt = 9999 )
'DSTERF', iinfo, n, jtype,
1142 IF( iinfo.LT.0 )
THEN
1145 result( 12 ) = ulpinv
1152 CALL dstt21( n, 0, sd, se, d1, dumma, z, ldu, work,
1163 temp1 = max( temp1, abs( d1( j ) ), abs( d2( j ) ) )
1164 temp2 = max( temp2, abs( d1( j )-d2( j ) ) )
1165 temp3 = max( temp3, abs( d1( j ) ), abs( d3( j ) ) )
1166 temp4 = max( temp4, abs( d1( j )-d3( j ) ) )
1169 result( 11 ) = temp2 / max( unfl, ulp*max( temp1, temp2 ) )
1170 result( 12 ) = temp4 / max( unfl, ulp*max( temp3, temp4 ) )
1176 temp1 = thresh*( half-ulp )
1178 DO 160 j = 0, log2ui
1179 CALL dstech( n, sd, se, d1, temp1, work, iinfo )
1186 result( 13 ) = temp1
1191 IF( jtype.GT.15 )
THEN
1195 CALL dcopy( n, sd, 1, d4, 1 )
1197 $
CALL dcopy( n-1, se, 1, work, 1 )
1198 CALL dlaset(
'Full', n, n, zero, one, z, ldu )
1201 CALL dpteqr(
'V', n, d4, work, z, ldu, work( n+1 ),
1203 IF( iinfo.NE.0 )
THEN
1204 WRITE( nounit, fmt = 9999 )
'DPTEQR(V)', iinfo, n,
1207 IF( iinfo.LT.0 )
THEN
1210 result( 14 ) = ulpinv
1217 CALL dstt21( n, 0, sd, se, d4, dumma, z, ldu, work,
1222 CALL dcopy( n, sd, 1, d5, 1 )
1224 $
CALL dcopy( n-1, se, 1, work, 1 )
1227 CALL dpteqr(
'N', n, d5, work, z, ldu, work( n+1 ),
1229 IF( iinfo.NE.0 )
THEN
1230 WRITE( nounit, fmt = 9999 )
'DPTEQR(N)', iinfo, n,
1233 IF( iinfo.LT.0 )
THEN
1236 result( 16 ) = ulpinv
1246 temp1 = max( temp1, abs( d4( j ) ), abs( d5( j ) ) )
1247 temp2 = max( temp2, abs( d4( j )-d5( j ) ) )
1250 result( 16 ) = temp2 / max( unfl,
1251 $ hun*ulp*max( temp1, temp2 ) )
1267 IF( jtype.EQ.21 )
THEN
1269 abstol = unfl + unfl
1270 CALL dstebz(
'A',
'E', n, vl, vu, il, iu, abstol, sd, se,
1271 $ m, nsplit, wr, iwork( 1 ), iwork( n+1 ),
1272 $ work, iwork( 2*n+1 ), iinfo )
1273 IF( iinfo.NE.0 )
THEN
1274 WRITE( nounit, fmt = 9999 )
'DSTEBZ(A,rel)', iinfo, n,
1277 IF( iinfo.LT.0 )
THEN
1280 result( 17 ) = ulpinv
1287 temp2 = two*( two*n-one )*ulp*( one+eight*half**2 ) /
1292 temp1 = max( temp1, abs( d4( j )-wr( n-j+1 ) ) /
1293 $ ( abstol+abs( d4( j ) ) ) )
1296 result( 17 ) = temp1 / temp2
1304 abstol = unfl + unfl
1305 CALL dstebz(
'A',
'E', n, vl, vu, il, iu, abstol, sd, se, m,
1306 $ nsplit, wa1, iwork( 1 ), iwork( n+1 ), work,
1307 $ iwork( 2*n+1 ), iinfo )
1308 IF( iinfo.NE.0 )
THEN
1309 WRITE( nounit, fmt = 9999 )
'DSTEBZ(A)', iinfo, n, jtype,
1312 IF( iinfo.LT.0 )
THEN
1315 result( 18 ) = ulpinv
1325 temp1 = max( temp1, abs( d3( j ) ), abs( wa1( j ) ) )
1326 temp2 = max( temp2, abs( d3( j )-wa1( j ) ) )
1329 result( 18 ) = temp2 / max( unfl, ulp*max( temp1, temp2 ) )
1339 il = 1 + ( n-1 )*int( dlarnd( 1, iseed2 ) )
1340 iu = 1 + ( n-1 )*int( dlarnd( 1, iseed2 ) )
1348 CALL dstebz(
'I',
'E', n, vl, vu, il, iu, abstol, sd, se,
1349 $ m2, nsplit, wa2, iwork( 1 ), iwork( n+1 ),
1350 $ work, iwork( 2*n+1 ), iinfo )
1351 IF( iinfo.NE.0 )
THEN
1352 WRITE( nounit, fmt = 9999 )
'DSTEBZ(I)', iinfo, n, jtype,
1355 IF( iinfo.LT.0 )
THEN
1358 result( 19 ) = ulpinv
1368 vl = wa1( il ) - max( half*( wa1( il )-wa1( il-1 ) ),
1369 $ ulp*anorm, two*rtunfl )
1371 vl = wa1( 1 ) - max( half*( wa1( n )-wa1( 1 ) ),
1372 $ ulp*anorm, two*rtunfl )
1375 vu = wa1( iu ) + max( half*( wa1( iu+1 )-wa1( iu ) ),
1376 $ ulp*anorm, two*rtunfl )
1378 vu = wa1( n ) + max( half*( wa1( n )-wa1( 1 ) ),
1379 $ ulp*anorm, two*rtunfl )
1386 CALL dstebz(
'V',
'E', n, vl, vu, il, iu, abstol, sd, se,
1387 $ m3, nsplit, wa3, iwork( 1 ), iwork( n+1 ),
1388 $ work, iwork( 2*n+1 ), iinfo )
1389 IF( iinfo.NE.0 )
THEN
1390 WRITE( nounit, fmt = 9999 )
'DSTEBZ(V)', iinfo, n, jtype,
1393 IF( iinfo.LT.0 )
THEN
1396 result( 19 ) = ulpinv
1401 IF( m3.EQ.0 .AND. n.NE.0 )
THEN
1402 result( 19 ) = ulpinv
1408 temp1 = dsxt1( 1, wa2, m2, wa3, m3, abstol, ulp, unfl )
1409 temp2 = dsxt1( 1, wa3, m3, wa2, m2, abstol, ulp, unfl )
1411 temp3 = max( abs( wa1( n ) ), abs( wa1( 1 ) ) )
1416 result( 19 ) = ( temp1+temp2 ) / max( unfl, temp3*ulp )
1423 CALL dstebz(
'A',
'B', n, vl, vu, il, iu, abstol, sd, se, m,
1424 $ nsplit, wa1, iwork( 1 ), iwork( n+1 ), work,
1425 $ iwork( 2*n+1 ), iinfo )
1426 IF( iinfo.NE.0 )
THEN
1427 WRITE( nounit, fmt = 9999 )
'DSTEBZ(A,B)', iinfo, n,
1430 IF( iinfo.LT.0 )
THEN
1433 result( 20 ) = ulpinv
1434 result( 21 ) = ulpinv
1439 CALL dstein( n, sd, se, m, wa1, iwork( 1 ), iwork( n+1 ), z,
1440 $ ldu, work, iwork( 2*n+1 ), iwork( 3*n+1 ),
1442 IF( iinfo.NE.0 )
THEN
1443 WRITE( nounit, fmt = 9999 )
'DSTEIN', iinfo, n, jtype,
1446 IF( iinfo.LT.0 )
THEN
1449 result( 20 ) = ulpinv
1450 result( 21 ) = ulpinv
1457 CALL dstt21( n, 0, sd, se, wa1, dumma, z, ldu, work,
1464 CALL dcopy( n, sd, 1, d1, 1 )
1466 $
CALL dcopy( n-1, se, 1, work, 1 )
1467 CALL dlaset(
'Full', n, n, zero, one, z, ldu )
1470 CALL dstedc(
'I', n, d1, work, z, ldu, work( n+1 ), lwedc-n,
1471 $ iwork, liwedc, iinfo )
1472 IF( iinfo.NE.0 )
THEN
1473 WRITE( nounit, fmt = 9999 )
'DSTEDC(I)', iinfo, n, jtype,
1476 IF( iinfo.LT.0 )
THEN
1479 result( 22 ) = ulpinv
1486 CALL dstt21( n, 0, sd, se, d1, dumma, z, ldu, work,
1493 CALL dcopy( n, sd, 1, d1, 1 )
1495 $
CALL dcopy( n-1, se, 1, work, 1 )
1496 CALL dlaset(
'Full', n, n, zero, one, z, ldu )
1499 CALL dstedc(
'V', n, d1, work, z, ldu, work( n+1 ), lwedc-n,
1500 $ iwork, liwedc, iinfo )
1501 IF( iinfo.NE.0 )
THEN
1502 WRITE( nounit, fmt = 9999 )
'DSTEDC(V)', iinfo, n, jtype,
1505 IF( iinfo.LT.0 )
THEN
1508 result( 24 ) = ulpinv
1515 CALL dstt21( n, 0, sd, se, d1, dumma, z, ldu, work,
1522 CALL dcopy( n, sd, 1, d2, 1 )
1524 $
CALL dcopy( n-1, se, 1, work, 1 )
1525 CALL dlaset(
'Full', n, n, zero, one, z, ldu )
1528 CALL dstedc(
'N', n, d2, work, z, ldu, work( n+1 ), lwedc-n,
1529 $ iwork, liwedc, iinfo )
1530 IF( iinfo.NE.0 )
THEN
1531 WRITE( nounit, fmt = 9999 )
'DSTEDC(N)', iinfo, n, jtype,
1534 IF( iinfo.LT.0 )
THEN
1537 result( 26 ) = ulpinv
1548 temp1 = max( temp1, abs( d1( j ) ), abs( d2( j ) ) )
1549 temp2 = max( temp2, abs( d1( j )-d2( j ) ) )
1552 result( 26 ) = temp2 / max( unfl, ulp*max( temp1, temp2 ) )
1556 IF( ilaenv( 10,
'DSTEMR',
'VA', 1, 0, 0, 0 ).EQ.1 .AND.
1557 $ ilaenv( 11,
'DSTEMR',
'VA', 1, 0, 0, 0 ).EQ.1 )
THEN
1568 IF( jtype.EQ.21 .AND. srel )
THEN
1570 abstol = unfl + unfl
1571 CALL dstemr(
'V',
'A', n, sd, se, vl, vu, il, iu,
1572 $ m, wr, z, ldu, n, iwork( 1 ), tryrac,
1573 $ work, lwork, iwork( 2*n+1 ), lwork-2*n,
1575 IF( iinfo.NE.0 )
THEN
1576 WRITE( nounit, fmt = 9999 )
'DSTEMR(V,A,rel)',
1577 $ iinfo, n, jtype, ioldsd
1579 IF( iinfo.LT.0 )
THEN
1582 result( 27 ) = ulpinv
1589 temp2 = two*( two*n-one )*ulp*( one+eight*half**2 ) /
1594 temp1 = max( temp1, abs( d4( j )-wr( n-j+1 ) ) /
1595 $ ( abstol+abs( d4( j ) ) ) )
1598 result( 27 ) = temp1 / temp2
1600 il = 1 + ( n-1 )*int( dlarnd( 1, iseed2 ) )
1601 iu = 1 + ( n-1 )*int( dlarnd( 1, iseed2 ) )
1610 abstol = unfl + unfl
1611 CALL dstemr(
'V',
'I', n, sd, se, vl, vu, il, iu,
1612 $ m, wr, z, ldu, n, iwork( 1 ), tryrac,
1613 $ work, lwork, iwork( 2*n+1 ),
1614 $ lwork-2*n, iinfo )
1616 IF( iinfo.NE.0 )
THEN
1617 WRITE( nounit, fmt = 9999 )
'DSTEMR(V,I,rel)',
1618 $ iinfo, n, jtype, ioldsd
1620 IF( iinfo.LT.0 )
THEN
1623 result( 28 ) = ulpinv
1631 temp2 = two*( two*n-one )*ulp*
1632 $ ( one+eight*half**2 ) / ( one-half )**4
1636 temp1 = max( temp1, abs( wr( j-il+1 )-d4( n-j+
1637 $ 1 ) ) / ( abstol+abs( wr( j-il+1 ) ) ) )
1640 result( 28 ) = temp1 / temp2
1653 CALL dcopy( n, sd, 1, d5, 1 )
1655 $
CALL dcopy( n-1, se, 1, work, 1 )
1656 CALL dlaset(
'Full', n, n, zero, one, z, ldu )
1660 il = 1 + ( n-1 )*int( dlarnd( 1, iseed2 ) )
1661 iu = 1 + ( n-1 )*int( dlarnd( 1, iseed2 ) )
1667 CALL dstemr(
'V',
'I', n, d5, work, vl, vu, il, iu,
1668 $ m, d1, z, ldu, n, iwork( 1 ), tryrac,
1669 $ work( n+1 ), lwork-n, iwork( 2*n+1 ),
1670 $ liwork-2*n, iinfo )
1671 IF( iinfo.NE.0 )
THEN
1672 WRITE( nounit, fmt = 9999 )
'DSTEMR(V,I)', iinfo,
1675 IF( iinfo.LT.0 )
THEN
1678 result( 29 ) = ulpinv
1685 CALL dstt22( n, m, 0, sd, se, d1, dumma, z, ldu, work,
1692 CALL dcopy( n, sd, 1, d5, 1 )
1694 $
CALL dcopy( n-1, se, 1, work, 1 )
1697 CALL dstemr(
'N',
'I', n, d5, work, vl, vu, il, iu,
1698 $ m, d2, z, ldu, n, iwork( 1 ), tryrac,
1699 $ work( n+1 ), lwork-n, iwork( 2*n+1 ),
1700 $ liwork-2*n, iinfo )
1701 IF( iinfo.NE.0 )
THEN
1702 WRITE( nounit, fmt = 9999 )
'DSTEMR(N,I)', iinfo,
1705 IF( iinfo.LT.0 )
THEN
1708 result( 31 ) = ulpinv
1718 DO 240 j = 1, iu - il + 1
1719 temp1 = max( temp1, abs( d1( j ) ),
1721 temp2 = max( temp2, abs( d1( j )-d2( j ) ) )
1724 result( 31 ) = temp2 / max( unfl,
1725 $ ulp*max( temp1, temp2 ) )
1732 CALL dcopy( n, sd, 1, d5, 1 )
1734 $
CALL dcopy( n-1, se, 1, work, 1 )
1735 CALL dlaset(
'Full', n, n, zero, one, z, ldu )
1741 vl = d2( il ) - max( half*
1742 $ ( d2( il )-d2( il-1 ) ), ulp*anorm,
1745 vl = d2( 1 ) - max( half*( d2( n )-d2( 1 ) ),
1746 $ ulp*anorm, two*rtunfl )
1749 vu = d2( iu ) + max( half*
1750 $ ( d2( iu+1 )-d2( iu ) ), ulp*anorm,
1753 vu = d2( n ) + max( half*( d2( n )-d2( 1 ) ),
1754 $ ulp*anorm, two*rtunfl )
1761 CALL dstemr(
'V',
'V', n, d5, work, vl, vu, il, iu,
1762 $ m, d1, z, ldu, n, iwork( 1 ), tryrac,
1763 $ work( n+1 ), lwork-n, iwork( 2*n+1 ),
1764 $ liwork-2*n, iinfo )
1765 IF( iinfo.NE.0 )
THEN
1766 WRITE( nounit, fmt = 9999 )
'DSTEMR(V,V)', iinfo,
1769 IF( iinfo.LT.0 )
THEN
1772 result( 32 ) = ulpinv
1779 CALL dstt22( n, m, 0, sd, se, d1, dumma, z, ldu, work,
1786 CALL dcopy( n, sd, 1, d5, 1 )
1788 $
CALL dcopy( n-1, se, 1, work, 1 )
1791 CALL dstemr(
'N',
'V', n, d5, work, vl, vu, il, iu,
1792 $ m, d2, z, ldu, n, iwork( 1 ), tryrac,
1793 $ work( n+1 ), lwork-n, iwork( 2*n+1 ),
1794 $ liwork-2*n, iinfo )
1795 IF( iinfo.NE.0 )
THEN
1796 WRITE( nounit, fmt = 9999 )
'DSTEMR(N,V)', iinfo,
1799 IF( iinfo.LT.0 )
THEN
1802 result( 34 ) = ulpinv
1812 DO 250 j = 1, iu - il + 1
1813 temp1 = max( temp1, abs( d1( j ) ),
1815 temp2 = max( temp2, abs( d1( j )-d2( j ) ) )
1818 result( 34 ) = temp2 / max( unfl,
1819 $ ulp*max( temp1, temp2 ) )
1834 CALL dcopy( n, sd, 1, d5, 1 )
1836 $
CALL dcopy( n-1, se, 1, work, 1 )
1840 CALL dstemr(
'V',
'A', n, d5, work, vl, vu, il, iu,
1841 $ m, d1, z, ldu, n, iwork( 1 ), tryrac,
1842 $ work( n+1 ), lwork-n, iwork( 2*n+1 ),
1843 $ liwork-2*n, iinfo )
1844 IF( iinfo.NE.0 )
THEN
1845 WRITE( nounit, fmt = 9999 )
'DSTEMR(V,A)', iinfo, n,
1848 IF( iinfo.LT.0 )
THEN
1851 result( 35 ) = ulpinv
1858 CALL dstt22( n, m, 0, sd, se, d1, dumma, z, ldu, work, m,
1865 CALL dcopy( n, sd, 1, d5, 1 )
1867 $
CALL dcopy( n-1, se, 1, work, 1 )
1870 CALL dstemr(
'N',
'A', n, d5, work, vl, vu, il, iu,
1871 $ m, d2, z, ldu, n, iwork( 1 ), tryrac,
1872 $ work( n+1 ), lwork-n, iwork( 2*n+1 ),
1873 $ liwork-2*n, iinfo )
1874 IF( iinfo.NE.0 )
THEN
1875 WRITE( nounit, fmt = 9999 )
'DSTEMR(N,A)', iinfo, n,
1878 IF( iinfo.LT.0 )
THEN
1881 result( 37 ) = ulpinv
1892 temp1 = max( temp1, abs( d1( j ) ), abs( d2( j ) ) )
1893 temp2 = max( temp2, abs( d1( j )-d2( j ) ) )
1896 result( 37 ) = temp2 / max( unfl,
1897 $ ulp*max( temp1, temp2 ) )
1901 ntestt = ntestt + ntest
1908 DO 290 jr = 1, ntest
1909 IF( result( jr ).GE.thresh )
THEN
1914 IF( nerrs.EQ.0 )
THEN
1915 WRITE( nounit, fmt = 9998 )
'DST'
1916 WRITE( nounit, fmt = 9997 )
1917 WRITE( nounit, fmt = 9996 )
1918 WRITE( nounit, fmt = 9995 )
'Symmetric'
1919 WRITE( nounit, fmt = 9994 )
1923 WRITE( nounit, fmt = 9988 )
1926 WRITE( nounit, fmt = 9990 )n, ioldsd, jtype, jr,
1935 CALL dlasum(
'DST', nounit, nerrs, ntestt )
1938 9999
FORMAT(
' DCHKST: ', a,
' returned INFO=', i6,
'.', / 9x,
'N=',
1939 $ i6,
', JTYPE=', i6,
', ISEED=(', 3( i5,
',' ), i5,
')' )
1941 9998
FORMAT( / 1x, a3,
' -- Real Symmetric eigenvalue problem' )
1942 9997
FORMAT(
' Matrix types (see DCHKST for details): ' )
1944 9996
FORMAT( /
' Special Matrices:',
1945 $ /
' 1=Zero matrix. ',
1946 $
' 5=Diagonal: clustered entries.',
1947 $ /
' 2=Identity matrix. ',
1948 $
' 6=Diagonal: large, evenly spaced.',
1949 $ /
' 3=Diagonal: evenly spaced entries. ',
1950 $
' 7=Diagonal: small, evenly spaced.',
1951 $ /
' 4=Diagonal: geometr. spaced entries.' )
1952 9995
FORMAT(
' Dense ', a,
' Matrices:',
1953 $ /
' 8=Evenly spaced eigenvals. ',
1954 $
' 12=Small, evenly spaced eigenvals.',
1955 $ /
' 9=Geometrically spaced eigenvals. ',
1956 $
' 13=Matrix with random O(1) entries.',
1957 $ /
' 10=Clustered eigenvalues. ',
1958 $
' 14=Matrix with large random entries.',
1959 $ /
' 11=Large, evenly spaced eigenvals. ',
1960 $
' 15=Matrix with small random entries.' )
1961 9994
FORMAT(
' 16=Positive definite, evenly spaced eigenvalues',
1962 $ /
' 17=Positive definite, geometrically spaced eigenvlaues',
1963 $ /
' 18=Positive definite, clustered eigenvalues',
1964 $ /
' 19=Positive definite, small evenly spaced eigenvalues',
1965 $ /
' 20=Positive definite, large evenly spaced eigenvalues',
1966 $ /
' 21=Diagonally dominant tridiagonal, geometrically',
1967 $
' spaced eigenvalues' )
1969 9990
FORMAT(
' N=', i5,
', seed=', 4( i4,
',' ),
' type ', i2,
1970 $
', test(', i2,
')=', g10.3 )
1972 9988
FORMAT( /
'Test performed: see DCHKST for details.', / )
subroutine xerbla(srname, info)
subroutine dchkst(nsizes, nn, ntypes, dotype, iseed, thresh, nounit, a, lda, ap, sd, se, d1, d2, d3, d4, d5, wa1, wa2, wa3, wr, u, ldu, v, vp, tau, z, work, lwork, iwork, liwork, result, info)
DCHKST
subroutine dlasum(type, iounit, ie, nrun)
DLASUM
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 dspt21(itype, uplo, n, kband, ap, d, e, u, ldu, vp, tau, work, result)
DSPT21
subroutine dstech(n, a, b, eig, tol, work, info)
DSTECH
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 dcopy(n, dx, incx, dy, incy)
DCOPY
subroutine dsytrd(uplo, n, a, lda, d, e, tau, work, lwork, info)
DSYTRD
subroutine dsptrd(uplo, n, ap, d, e, tau, info)
DSPTRD
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 dpteqr(compz, n, d, e, z, ldz, work, info)
DPTEQR
subroutine dstebz(range, order, n, vl, vu, il, iu, abstol, d, e, m, nsplit, w, iblock, isplit, work, iwork, info)
DSTEBZ
subroutine dstedc(compz, n, d, e, z, ldz, work, lwork, iwork, liwork, info)
DSTEDC
subroutine dstein(n, d, e, m, w, iblock, isplit, z, ldz, work, iwork, ifail, info)
DSTEIN
subroutine dstemr(jobz, range, n, d, e, vl, vu, il, iu, m, w, z, ldz, nzc, isuppz, tryrac, work, lwork, iwork, liwork, info)
DSTEMR
subroutine dsteqr(compz, n, d, e, z, ldz, work, info)
DSTEQR
subroutine dsterf(n, d, e, info)
DSTERF
subroutine dorgtr(uplo, n, a, lda, tau, work, lwork, info)
DORGTR
subroutine dopgtr(uplo, n, ap, tau, q, ldq, work, info)
DOPGTR