00001 SUBROUTINE ZCHKHS( NSIZES, NN, NTYPES, DOTYPE, ISEED, THRESH,
00002 $ NOUNIT, A, LDA, H, T1, T2, U, LDU, Z, UZ, W1,
00003 $ W3, EVECTL, EVECTR, EVECTY, EVECTX, UU, TAU,
00004 $ WORK, NWORK, RWORK, IWORK, SELECT, RESULT,
00005 $ INFO )
00006
00007
00008
00009
00010
00011
00012 INTEGER INFO, LDA, LDU, NOUNIT, NSIZES, NTYPES, NWORK
00013 DOUBLE PRECISION THRESH
00014
00015
00016 LOGICAL DOTYPE( * ), SELECT( * )
00017 INTEGER ISEED( 4 ), IWORK( * ), NN( * )
00018 DOUBLE PRECISION RESULT( 14 ), RWORK( * )
00019 COMPLEX*16 A( LDA, * ), EVECTL( LDU, * ),
00020 $ EVECTR( LDU, * ), EVECTX( LDU, * ),
00021 $ EVECTY( LDU, * ), H( LDA, * ), T1( LDA, * ),
00022 $ T2( LDA, * ), TAU( * ), U( LDU, * ),
00023 $ UU( LDU, * ), UZ( LDU, * ), W1( * ), W3( * ),
00024 $ WORK( * ), Z( LDU, * )
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035
00036
00037
00038
00039
00040
00041
00042
00043
00044
00045
00046
00047
00048
00049
00050
00051
00052
00053
00054
00055
00056
00057
00058
00059
00060
00061
00062
00063
00064
00065
00066
00067
00068
00069
00070
00071
00072
00073
00074
00075
00076
00077
00078
00079
00080
00081
00082
00083
00084
00085
00086
00087
00088
00089
00090
00091
00092
00093
00094
00095
00096
00097
00098
00099
00100
00101
00102
00103
00104
00105
00106
00107
00108
00109
00110
00111
00112
00113
00114
00115
00116
00117
00118
00119
00120
00121
00122
00123
00124
00125
00126
00127
00128
00129
00130
00131
00132
00133
00134
00135
00136
00137
00138
00139
00140
00141
00142
00143
00144
00145
00146
00147
00148
00149
00150
00151
00152
00153
00154
00155
00156
00157
00158
00159
00160
00161
00162
00163
00164
00165
00166
00167
00168
00169
00170
00171
00172
00173
00174
00175
00176
00177
00178
00179
00180
00181
00182
00183
00184
00185
00186
00187
00188
00189
00190
00191
00192
00193
00194
00195
00196
00197
00198
00199
00200
00201
00202
00203
00204
00205
00206
00207
00208
00209
00210
00211
00212
00213
00214
00215
00216
00217
00218
00219
00220
00221
00222
00223
00224
00225
00226
00227
00228
00229
00230
00231
00232
00233
00234
00235
00236
00237
00238
00239
00240
00241
00242
00243
00244
00245
00246
00247
00248
00249
00250
00251
00252
00253
00254
00255
00256
00257
00258
00259
00260
00261
00262
00263
00264
00265
00266
00267
00268
00269
00270
00271
00272
00273
00274
00275
00276
00277
00278
00279
00280
00281
00282
00283
00284
00285
00286
00287
00288
00289
00290
00291
00292
00293
00294
00295
00296
00297
00298
00299
00300
00301
00302
00303
00304
00305
00306
00307
00308
00309
00310
00311
00312
00313
00314
00315
00316
00317
00318
00319
00320
00321
00322
00323
00324
00325
00326
00327
00328
00329
00330
00331
00332
00333
00334
00335
00336
00337
00338
00339
00340
00341
00342
00343
00344
00345
00346
00347
00348
00349
00350
00351
00352
00353
00354
00355
00356
00357
00358
00359
00360
00361
00362
00363
00364
00365
00366
00367
00368
00369
00370
00371
00372
00373
00374
00375
00376
00377
00378
00379
00380
00381
00382
00383
00384
00385
00386
00387 DOUBLE PRECISION ZERO, ONE
00388 PARAMETER ( ZERO = 0.0D+0, ONE = 1.0D+0 )
00389 COMPLEX*16 CZERO, CONE
00390 PARAMETER ( CZERO = ( 0.0D+0, 0.0D+0 ),
00391 $ CONE = ( 1.0D+0, 0.0D+0 ) )
00392 INTEGER MAXTYP
00393 PARAMETER ( MAXTYP = 21 )
00394
00395
00396 LOGICAL BADNN, MATCH
00397 INTEGER I, IHI, IINFO, ILO, IMODE, IN, ITYPE, J, JCOL,
00398 $ JJ, JSIZE, JTYPE, K, MTYPES, N, N1, NERRS,
00399 $ NMATS, NMAX, NTEST, NTESTT
00400 DOUBLE PRECISION ANINV, ANORM, COND, CONDS, OVFL, RTOVFL, RTULP,
00401 $ RTULPI, RTUNFL, TEMP1, TEMP2, ULP, ULPINV, UNFL
00402
00403
00404 INTEGER IDUMMA( 1 ), IOLDSD( 4 ), KCONDS( MAXTYP ),
00405 $ KMAGN( MAXTYP ), KMODE( MAXTYP ),
00406 $ KTYPE( MAXTYP )
00407 DOUBLE PRECISION DUMMA( 4 )
00408 COMPLEX*16 CDUMMA( 4 )
00409
00410
00411 DOUBLE PRECISION DLAMCH
00412 EXTERNAL DLAMCH
00413
00414
00415 EXTERNAL DLABAD, DLAFTS, DLASUM, XERBLA, ZCOPY, ZGEHRD,
00416 $ ZGEMM, ZGET10, ZGET22, ZHSEIN, ZHSEQR, ZHST01,
00417 $ ZLACPY, ZLASET, ZLATME, ZLATMR, ZLATMS, ZTREVC,
00418 $ ZUNGHR, ZUNMHR
00419
00420
00421 INTRINSIC ABS, DBLE, MAX, MIN, SQRT
00422
00423
00424 DATA KTYPE / 1, 2, 3, 5*4, 4*6, 6*6, 3*9 /
00425 DATA KMAGN / 3*1, 1, 1, 1, 2, 3, 4*1, 1, 1, 1, 1, 2,
00426 $ 3, 1, 2, 3 /
00427 DATA KMODE / 3*0, 4, 3, 1, 4, 4, 4, 3, 1, 5, 4, 3,
00428 $ 1, 5, 5, 5, 4, 3, 1 /
00429 DATA KCONDS / 3*0, 5*0, 4*1, 6*2, 3*0 /
00430
00431
00432
00433
00434
00435 NTESTT = 0
00436 INFO = 0
00437
00438 BADNN = .FALSE.
00439 NMAX = 0
00440 DO 10 J = 1, NSIZES
00441 NMAX = MAX( NMAX, NN( J ) )
00442 IF( NN( J ).LT.0 )
00443 $ BADNN = .TRUE.
00444 10 CONTINUE
00445
00446
00447
00448 IF( NSIZES.LT.0 ) THEN
00449 INFO = -1
00450 ELSE IF( BADNN ) THEN
00451 INFO = -2
00452 ELSE IF( NTYPES.LT.0 ) THEN
00453 INFO = -3
00454 ELSE IF( THRESH.LT.ZERO ) THEN
00455 INFO = -6
00456 ELSE IF( LDA.LE.1 .OR. LDA.LT.NMAX ) THEN
00457 INFO = -9
00458 ELSE IF( LDU.LE.1 .OR. LDU.LT.NMAX ) THEN
00459 INFO = -14
00460 ELSE IF( 4*NMAX*NMAX+2.GT.NWORK ) THEN
00461 INFO = -26
00462 END IF
00463
00464 IF( INFO.NE.0 ) THEN
00465 CALL XERBLA( 'ZCHKHS', -INFO )
00466 RETURN
00467 END IF
00468
00469
00470
00471 IF( NSIZES.EQ.0 .OR. NTYPES.EQ.0 )
00472 $ RETURN
00473
00474
00475
00476 UNFL = DLAMCH( 'Safe minimum' )
00477 OVFL = DLAMCH( 'Overflow' )
00478 CALL DLABAD( UNFL, OVFL )
00479 ULP = DLAMCH( 'Epsilon' )*DLAMCH( 'Base' )
00480 ULPINV = ONE / ULP
00481 RTUNFL = SQRT( UNFL )
00482 RTOVFL = SQRT( OVFL )
00483 RTULP = SQRT( ULP )
00484 RTULPI = ONE / RTULP
00485
00486
00487
00488 NERRS = 0
00489 NMATS = 0
00490
00491 DO 260 JSIZE = 1, NSIZES
00492 N = NN( JSIZE )
00493 N1 = MAX( 1, N )
00494 ANINV = ONE / DBLE( N1 )
00495
00496 IF( NSIZES.NE.1 ) THEN
00497 MTYPES = MIN( MAXTYP, NTYPES )
00498 ELSE
00499 MTYPES = MIN( MAXTYP+1, NTYPES )
00500 END IF
00501
00502 DO 250 JTYPE = 1, MTYPES
00503 IF( .NOT.DOTYPE( JTYPE ) )
00504 $ GO TO 250
00505 NMATS = NMATS + 1
00506 NTEST = 0
00507
00508
00509
00510 DO 20 J = 1, 4
00511 IOLDSD( J ) = ISEED( J )
00512 20 CONTINUE
00513
00514
00515
00516 DO 30 J = 1, 14
00517 RESULT( J ) = ZERO
00518 30 CONTINUE
00519
00520
00521
00522
00523
00524
00525
00526
00527
00528
00529
00530
00531
00532
00533
00534
00535
00536 IF( MTYPES.GT.MAXTYP )
00537 $ GO TO 100
00538
00539 ITYPE = KTYPE( JTYPE )
00540 IMODE = KMODE( JTYPE )
00541
00542
00543
00544 GO TO ( 40, 50, 60 )KMAGN( JTYPE )
00545
00546 40 CONTINUE
00547 ANORM = ONE
00548 GO TO 70
00549
00550 50 CONTINUE
00551 ANORM = ( RTOVFL*ULP )*ANINV
00552 GO TO 70
00553
00554 60 CONTINUE
00555 ANORM = RTUNFL*N*ULPINV
00556 GO TO 70
00557
00558 70 CONTINUE
00559
00560 CALL ZLASET( 'Full', LDA, N, CZERO, CZERO, A, LDA )
00561 IINFO = 0
00562 COND = ULPINV
00563
00564
00565
00566 IF( ITYPE.EQ.1 ) THEN
00567
00568
00569
00570 IINFO = 0
00571 ELSE IF( ITYPE.EQ.2 ) THEN
00572
00573
00574
00575 DO 80 JCOL = 1, N
00576 A( JCOL, JCOL ) = ANORM
00577 80 CONTINUE
00578
00579 ELSE IF( ITYPE.EQ.3 ) THEN
00580
00581
00582
00583 DO 90 JCOL = 1, N
00584 A( JCOL, JCOL ) = ANORM
00585 IF( JCOL.GT.1 )
00586 $ A( JCOL, JCOL-1 ) = ONE
00587 90 CONTINUE
00588
00589 ELSE IF( ITYPE.EQ.4 ) THEN
00590
00591
00592
00593 CALL ZLATMR( N, N, 'D', ISEED, 'N', WORK, IMODE, COND,
00594 $ CONE, 'T', 'N', WORK( N+1 ), 1, ONE,
00595 $ WORK( 2*N+1 ), 1, ONE, 'N', IDUMMA, 0, 0,
00596 $ ZERO, ANORM, 'NO', A, LDA, IWORK, IINFO )
00597
00598 ELSE IF( ITYPE.EQ.5 ) THEN
00599
00600
00601
00602 CALL ZLATMS( N, N, 'D', ISEED, 'H', RWORK, IMODE, COND,
00603 $ ANORM, N, N, 'N', A, LDA, WORK, IINFO )
00604
00605 ELSE IF( ITYPE.EQ.6 ) THEN
00606
00607
00608
00609 IF( KCONDS( JTYPE ).EQ.1 ) THEN
00610 CONDS = ONE
00611 ELSE IF( KCONDS( JTYPE ).EQ.2 ) THEN
00612 CONDS = RTULPI
00613 ELSE
00614 CONDS = ZERO
00615 END IF
00616
00617 CALL ZLATME( N, 'D', ISEED, WORK, IMODE, COND, CONE, ' ',
00618 $ 'T', 'T', 'T', RWORK, 4, CONDS, N, N, ANORM,
00619 $ A, LDA, WORK( N+1 ), IINFO )
00620
00621 ELSE IF( ITYPE.EQ.7 ) THEN
00622
00623
00624
00625 CALL ZLATMR( N, N, 'D', ISEED, 'N', WORK, 6, ONE, CONE,
00626 $ 'T', 'N', WORK( N+1 ), 1, ONE,
00627 $ WORK( 2*N+1 ), 1, ONE, 'N', IDUMMA, 0, 0,
00628 $ ZERO, ANORM, 'NO', A, LDA, IWORK, IINFO )
00629
00630 ELSE IF( ITYPE.EQ.8 ) THEN
00631
00632
00633
00634 CALL ZLATMR( N, N, 'D', ISEED, 'H', WORK, 6, ONE, CONE,
00635 $ 'T', 'N', WORK( N+1 ), 1, ONE,
00636 $ WORK( 2*N+1 ), 1, ONE, 'N', IDUMMA, N, N,
00637 $ ZERO, ANORM, 'NO', A, LDA, IWORK, IINFO )
00638
00639 ELSE IF( ITYPE.EQ.9 ) THEN
00640
00641
00642
00643 CALL ZLATMR( N, N, 'D', ISEED, 'N', WORK, 6, ONE, CONE,
00644 $ 'T', 'N', WORK( N+1 ), 1, ONE,
00645 $ WORK( 2*N+1 ), 1, ONE, 'N', IDUMMA, N, N,
00646 $ ZERO, ANORM, 'NO', A, LDA, IWORK, IINFO )
00647
00648 ELSE IF( ITYPE.EQ.10 ) THEN
00649
00650
00651
00652 CALL ZLATMR( N, N, 'D', ISEED, 'N', WORK, 6, ONE, CONE,
00653 $ 'T', 'N', WORK( N+1 ), 1, ONE,
00654 $ WORK( 2*N+1 ), 1, ONE, 'N', IDUMMA, N, 0,
00655 $ ZERO, ANORM, 'NO', A, LDA, IWORK, IINFO )
00656
00657 ELSE
00658
00659 IINFO = 1
00660 END IF
00661
00662 IF( IINFO.NE.0 ) THEN
00663 WRITE( NOUNIT, FMT = 9999 )'Generator', IINFO, N, JTYPE,
00664 $ IOLDSD
00665 INFO = ABS( IINFO )
00666 RETURN
00667 END IF
00668
00669 100 CONTINUE
00670
00671
00672
00673 CALL ZLACPY( ' ', N, N, A, LDA, H, LDA )
00674 NTEST = 1
00675
00676 ILO = 1
00677 IHI = N
00678
00679 CALL ZGEHRD( N, ILO, IHI, H, LDA, WORK, WORK( N+1 ),
00680 $ NWORK-N, IINFO )
00681
00682 IF( IINFO.NE.0 ) THEN
00683 RESULT( 1 ) = ULPINV
00684 WRITE( NOUNIT, FMT = 9999 )'ZGEHRD', IINFO, N, JTYPE,
00685 $ IOLDSD
00686 INFO = ABS( IINFO )
00687 GO TO 240
00688 END IF
00689
00690 DO 120 J = 1, N - 1
00691 UU( J+1, J ) = CZERO
00692 DO 110 I = J + 2, N
00693 U( I, J ) = H( I, J )
00694 UU( I, J ) = H( I, J )
00695 H( I, J ) = CZERO
00696 110 CONTINUE
00697 120 CONTINUE
00698 CALL ZCOPY( N-1, WORK, 1, TAU, 1 )
00699 CALL ZUNGHR( N, ILO, IHI, U, LDU, WORK, WORK( N+1 ),
00700 $ NWORK-N, IINFO )
00701 NTEST = 2
00702
00703 CALL ZHST01( N, ILO, IHI, A, LDA, H, LDA, U, LDU, WORK,
00704 $ NWORK, RWORK, RESULT( 1 ) )
00705
00706
00707
00708
00709
00710 CALL ZLACPY( ' ', N, N, H, LDA, T2, LDA )
00711 NTEST = 3
00712 RESULT( 3 ) = ULPINV
00713
00714 CALL ZHSEQR( 'E', 'N', N, ILO, IHI, T2, LDA, W3, UZ, LDU,
00715 $ WORK, NWORK, IINFO )
00716 IF( IINFO.NE.0 ) THEN
00717 WRITE( NOUNIT, FMT = 9999 )'ZHSEQR(E)', IINFO, N, JTYPE,
00718 $ IOLDSD
00719 IF( IINFO.LE.N+2 ) THEN
00720 INFO = ABS( IINFO )
00721 GO TO 240
00722 END IF
00723 END IF
00724
00725
00726
00727 CALL ZLACPY( ' ', N, N, H, LDA, T2, LDA )
00728
00729 CALL ZHSEQR( 'S', 'N', N, ILO, IHI, T2, LDA, W1, UZ, LDU,
00730 $ WORK, NWORK, IINFO )
00731 IF( IINFO.NE.0 .AND. IINFO.LE.N+2 ) THEN
00732 WRITE( NOUNIT, FMT = 9999 )'ZHSEQR(S)', IINFO, N, JTYPE,
00733 $ IOLDSD
00734 INFO = ABS( IINFO )
00735 GO TO 240
00736 END IF
00737
00738
00739
00740 CALL ZLACPY( ' ', N, N, H, LDA, T1, LDA )
00741 CALL ZLACPY( ' ', N, N, U, LDU, UZ, LDU )
00742
00743 CALL ZHSEQR( 'S', 'V', N, ILO, IHI, T1, LDA, W1, UZ, LDU,
00744 $ WORK, NWORK, IINFO )
00745 IF( IINFO.NE.0 .AND. IINFO.LE.N+2 ) THEN
00746 WRITE( NOUNIT, FMT = 9999 )'ZHSEQR(V)', IINFO, N, JTYPE,
00747 $ IOLDSD
00748 INFO = ABS( IINFO )
00749 GO TO 240
00750 END IF
00751
00752
00753
00754 CALL ZGEMM( 'C', 'N', N, N, N, CONE, U, LDU, UZ, LDU, CZERO,
00755 $ Z, LDU )
00756 NTEST = 8
00757
00758
00759
00760
00761 CALL ZHST01( N, ILO, IHI, H, LDA, T1, LDA, Z, LDU, WORK,
00762 $ NWORK, RWORK, RESULT( 3 ) )
00763
00764
00765
00766
00767 CALL ZHST01( N, ILO, IHI, A, LDA, T1, LDA, UZ, LDU, WORK,
00768 $ NWORK, RWORK, RESULT( 5 ) )
00769
00770
00771
00772 CALL ZGET10( N, N, T2, LDA, T1, LDA, WORK, RWORK,
00773 $ RESULT( 7 ) )
00774
00775
00776
00777 TEMP1 = ZERO
00778 TEMP2 = ZERO
00779 DO 130 J = 1, N
00780 TEMP1 = MAX( TEMP1, ABS( W1( J ) ), ABS( W3( J ) ) )
00781 TEMP2 = MAX( TEMP2, ABS( W1( J )-W3( J ) ) )
00782 130 CONTINUE
00783
00784 RESULT( 8 ) = TEMP2 / MAX( UNFL, ULP*MAX( TEMP1, TEMP2 ) )
00785
00786
00787
00788
00789
00790 NTEST = 9
00791 RESULT( 9 ) = ULPINV
00792
00793
00794
00795 DO 140 J = 1, N
00796 SELECT( J ) = .FALSE.
00797 140 CONTINUE
00798 DO 150 J = 1, N, 2
00799 SELECT( J ) = .TRUE.
00800 150 CONTINUE
00801 CALL ZTREVC( 'Right', 'All', SELECT, N, T1, LDA, CDUMMA,
00802 $ LDU, EVECTR, LDU, N, IN, WORK, RWORK, IINFO )
00803 IF( IINFO.NE.0 ) THEN
00804 WRITE( NOUNIT, FMT = 9999 )'ZTREVC(R,A)', IINFO, N,
00805 $ JTYPE, IOLDSD
00806 INFO = ABS( IINFO )
00807 GO TO 240
00808 END IF
00809
00810
00811
00812 CALL ZGET22( 'N', 'N', 'N', N, T1, LDA, EVECTR, LDU, W1,
00813 $ WORK, RWORK, DUMMA( 1 ) )
00814 RESULT( 9 ) = DUMMA( 1 )
00815 IF( DUMMA( 2 ).GT.THRESH ) THEN
00816 WRITE( NOUNIT, FMT = 9998 )'Right', 'ZTREVC',
00817 $ DUMMA( 2 ), N, JTYPE, IOLDSD
00818 END IF
00819
00820
00821
00822
00823 CALL ZTREVC( 'Right', 'Some', SELECT, N, T1, LDA, CDUMMA,
00824 $ LDU, EVECTL, LDU, N, IN, WORK, RWORK, IINFO )
00825 IF( IINFO.NE.0 ) THEN
00826 WRITE( NOUNIT, FMT = 9999 )'ZTREVC(R,S)', IINFO, N,
00827 $ JTYPE, IOLDSD
00828 INFO = ABS( IINFO )
00829 GO TO 240
00830 END IF
00831
00832 K = 1
00833 MATCH = .TRUE.
00834 DO 170 J = 1, N
00835 IF( SELECT( J ) ) THEN
00836 DO 160 JJ = 1, N
00837 IF( EVECTR( JJ, J ).NE.EVECTL( JJ, K ) ) THEN
00838 MATCH = .FALSE.
00839 GO TO 180
00840 END IF
00841 160 CONTINUE
00842 K = K + 1
00843 END IF
00844 170 CONTINUE
00845 180 CONTINUE
00846 IF( .NOT.MATCH )
00847 $ WRITE( NOUNIT, FMT = 9997 )'Right', 'ZTREVC', N, JTYPE,
00848 $ IOLDSD
00849
00850
00851
00852 NTEST = 10
00853 RESULT( 10 ) = ULPINV
00854 CALL ZTREVC( 'Left', 'All', SELECT, N, T1, LDA, EVECTL, LDU,
00855 $ CDUMMA, LDU, N, IN, WORK, RWORK, IINFO )
00856 IF( IINFO.NE.0 ) THEN
00857 WRITE( NOUNIT, FMT = 9999 )'ZTREVC(L,A)', IINFO, N,
00858 $ JTYPE, IOLDSD
00859 INFO = ABS( IINFO )
00860 GO TO 240
00861 END IF
00862
00863
00864
00865 CALL ZGET22( 'C', 'N', 'C', N, T1, LDA, EVECTL, LDU, W1,
00866 $ WORK, RWORK, DUMMA( 3 ) )
00867 RESULT( 10 ) = DUMMA( 3 )
00868 IF( DUMMA( 4 ).GT.THRESH ) THEN
00869 WRITE( NOUNIT, FMT = 9998 )'Left', 'ZTREVC', DUMMA( 4 ),
00870 $ N, JTYPE, IOLDSD
00871 END IF
00872
00873
00874
00875
00876 CALL ZTREVC( 'Left', 'Some', SELECT, N, T1, LDA, EVECTR,
00877 $ LDU, CDUMMA, LDU, N, IN, WORK, RWORK, IINFO )
00878 IF( IINFO.NE.0 ) THEN
00879 WRITE( NOUNIT, FMT = 9999 )'ZTREVC(L,S)', IINFO, N,
00880 $ JTYPE, IOLDSD
00881 INFO = ABS( IINFO )
00882 GO TO 240
00883 END IF
00884
00885 K = 1
00886 MATCH = .TRUE.
00887 DO 200 J = 1, N
00888 IF( SELECT( J ) ) THEN
00889 DO 190 JJ = 1, N
00890 IF( EVECTL( JJ, J ).NE.EVECTR( JJ, K ) ) THEN
00891 MATCH = .FALSE.
00892 GO TO 210
00893 END IF
00894 190 CONTINUE
00895 K = K + 1
00896 END IF
00897 200 CONTINUE
00898 210 CONTINUE
00899 IF( .NOT.MATCH )
00900 $ WRITE( NOUNIT, FMT = 9997 )'Left', 'ZTREVC', N, JTYPE,
00901 $ IOLDSD
00902
00903
00904
00905 NTEST = 11
00906 RESULT( 11 ) = ULPINV
00907 DO 220 J = 1, N
00908 SELECT( J ) = .TRUE.
00909 220 CONTINUE
00910
00911 CALL ZHSEIN( 'Right', 'Qr', 'Ninitv', SELECT, N, H, LDA, W3,
00912 $ CDUMMA, LDU, EVECTX, LDU, N1, IN, WORK, RWORK,
00913 $ IWORK, IWORK, IINFO )
00914 IF( IINFO.NE.0 ) THEN
00915 WRITE( NOUNIT, FMT = 9999 )'ZHSEIN(R)', IINFO, N, JTYPE,
00916 $ IOLDSD
00917 INFO = ABS( IINFO )
00918 IF( IINFO.LT.0 )
00919 $ GO TO 240
00920 ELSE
00921
00922
00923
00924
00925
00926 CALL ZGET22( 'N', 'N', 'N', N, H, LDA, EVECTX, LDU, W3,
00927 $ WORK, RWORK, DUMMA( 1 ) )
00928 IF( DUMMA( 1 ).LT.ULPINV )
00929 $ RESULT( 11 ) = DUMMA( 1 )*ANINV
00930 IF( DUMMA( 2 ).GT.THRESH ) THEN
00931 WRITE( NOUNIT, FMT = 9998 )'Right', 'ZHSEIN',
00932 $ DUMMA( 2 ), N, JTYPE, IOLDSD
00933 END IF
00934 END IF
00935
00936
00937
00938 NTEST = 12
00939 RESULT( 12 ) = ULPINV
00940 DO 230 J = 1, N
00941 SELECT( J ) = .TRUE.
00942 230 CONTINUE
00943
00944 CALL ZHSEIN( 'Left', 'Qr', 'Ninitv', SELECT, N, H, LDA, W3,
00945 $ EVECTY, LDU, CDUMMA, LDU, N1, IN, WORK, RWORK,
00946 $ IWORK, IWORK, IINFO )
00947 IF( IINFO.NE.0 ) THEN
00948 WRITE( NOUNIT, FMT = 9999 )'ZHSEIN(L)', IINFO, N, JTYPE,
00949 $ IOLDSD
00950 INFO = ABS( IINFO )
00951 IF( IINFO.LT.0 )
00952 $ GO TO 240
00953 ELSE
00954
00955
00956
00957
00958
00959 CALL ZGET22( 'C', 'N', 'C', N, H, LDA, EVECTY, LDU, W3,
00960 $ WORK, RWORK, DUMMA( 3 ) )
00961 IF( DUMMA( 3 ).LT.ULPINV )
00962 $ RESULT( 12 ) = DUMMA( 3 )*ANINV
00963 IF( DUMMA( 4 ).GT.THRESH ) THEN
00964 WRITE( NOUNIT, FMT = 9998 )'Left', 'ZHSEIN',
00965 $ DUMMA( 4 ), N, JTYPE, IOLDSD
00966 END IF
00967 END IF
00968
00969
00970
00971 NTEST = 13
00972 RESULT( 13 ) = ULPINV
00973
00974 CALL ZUNMHR( 'Left', 'No transpose', N, N, ILO, IHI, UU,
00975 $ LDU, TAU, EVECTX, LDU, WORK, NWORK, IINFO )
00976 IF( IINFO.NE.0 ) THEN
00977 WRITE( NOUNIT, FMT = 9999 )'ZUNMHR(L)', IINFO, N, JTYPE,
00978 $ IOLDSD
00979 INFO = ABS( IINFO )
00980 IF( IINFO.LT.0 )
00981 $ GO TO 240
00982 ELSE
00983
00984
00985
00986
00987
00988 CALL ZGET22( 'N', 'N', 'N', N, A, LDA, EVECTX, LDU, W3,
00989 $ WORK, RWORK, DUMMA( 1 ) )
00990 IF( DUMMA( 1 ).LT.ULPINV )
00991 $ RESULT( 13 ) = DUMMA( 1 )*ANINV
00992 END IF
00993
00994
00995
00996 NTEST = 14
00997 RESULT( 14 ) = ULPINV
00998
00999 CALL ZUNMHR( 'Left', 'No transpose', N, N, ILO, IHI, UU,
01000 $ LDU, TAU, EVECTY, LDU, WORK, NWORK, IINFO )
01001 IF( IINFO.NE.0 ) THEN
01002 WRITE( NOUNIT, FMT = 9999 )'ZUNMHR(L)', IINFO, N, JTYPE,
01003 $ IOLDSD
01004 INFO = ABS( IINFO )
01005 IF( IINFO.LT.0 )
01006 $ GO TO 240
01007 ELSE
01008
01009
01010
01011
01012
01013 CALL ZGET22( 'C', 'N', 'C', N, A, LDA, EVECTY, LDU, W3,
01014 $ WORK, RWORK, DUMMA( 3 ) )
01015 IF( DUMMA( 3 ).LT.ULPINV )
01016 $ RESULT( 14 ) = DUMMA( 3 )*ANINV
01017 END IF
01018
01019
01020
01021 240 CONTINUE
01022
01023 NTESTT = NTESTT + NTEST
01024 CALL DLAFTS( 'ZHS', N, N, JTYPE, NTEST, RESULT, IOLDSD,
01025 $ THRESH, NOUNIT, NERRS )
01026
01027 250 CONTINUE
01028 260 CONTINUE
01029
01030
01031
01032 CALL DLASUM( 'ZHS', NOUNIT, NERRS, NTESTT )
01033
01034 RETURN
01035
01036 9999 FORMAT( ' ZCHKHS: ', A, ' returned INFO=', I6, '.', / 9X, 'N=',
01037 $ I6, ', JTYPE=', I6, ', ISEED=(', 3( I5, ',' ), I5, ')' )
01038 9998 FORMAT( ' ZCHKHS: ', A, ' Eigenvectors from ', A, ' incorrectly ',
01039 $ 'normalized.', / ' Bits of error=', 0P, G10.3, ',', 9X,
01040 $ 'N=', I6, ', JTYPE=', I6, ', ISEED=(', 3( I5, ',' ), I5,
01041 $ ')' )
01042 9997 FORMAT( ' ZCHKHS: Selected ', A, ' Eigenvectors from ', A,
01043 $ ' do not match other eigenvectors ', 9X, 'N=', I6,
01044 $ ', JTYPE=', I6, ', ISEED=(', 3( I5, ',' ), I5, ')' )
01045
01046
01047
01048 END