00001 SUBROUTINE SCHKBD( NSIZES, MVAL, NVAL, NTYPES, DOTYPE, NRHS,
00002 $ ISEED, THRESH, A, LDA, BD, BE, S1, S2, X, LDX,
00003 $ Y, Z, Q, LDQ, PT, LDPT, U, VT, WORK, LWORK,
00004 $ IWORK, NOUT, INFO )
00005
00006
00007
00008
00009
00010
00011 INTEGER INFO, LDA, LDPT, LDQ, LDX, LWORK, NOUT, NRHS,
00012 $ NSIZES, NTYPES
00013 REAL THRESH
00014
00015
00016 LOGICAL DOTYPE( * )
00017 INTEGER ISEED( 4 ), IWORK( * ), MVAL( * ), NVAL( * )
00018 REAL A( LDA, * ), BD( * ), BE( * ), PT( LDPT, * ),
00019 $ Q( LDQ, * ), S1( * ), S2( * ), U( LDPT, * ),
00020 $ VT( LDPT, * ), WORK( * ), X( LDX, * ),
00021 $ Y( LDX, * ), Z( LDX, * )
00022
00023
00024
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 REAL ZERO, ONE, TWO, HALF
00328 PARAMETER ( ZERO = 0.0E0, ONE = 1.0E0, TWO = 2.0E0,
00329 $ HALF = 0.5E0 )
00330 INTEGER MAXTYP
00331 PARAMETER ( MAXTYP = 16 )
00332
00333
00334 LOGICAL BADMM, BADNN, BIDIAG
00335 CHARACTER UPLO
00336 CHARACTER*3 PATH
00337 INTEGER I, IINFO, IMODE, ITYPE, J, JCOL, JSIZE, JTYPE,
00338 $ LOG2UI, M, MINWRK, MMAX, MNMAX, MNMIN, MQ,
00339 $ MTYPES, N, NFAIL, NMAX, NTEST
00340 REAL AMNINV, ANORM, COND, OVFL, RTOVFL, RTUNFL,
00341 $ TEMP1, TEMP2, ULP, ULPINV, UNFL
00342
00343
00344 INTEGER IDUM( 1 ), IOLDSD( 4 ), KMAGN( MAXTYP ),
00345 $ KMODE( MAXTYP ), KTYPE( MAXTYP )
00346 REAL DUM( 1 ), DUMMA( 1 ), RESULT( 19 )
00347
00348
00349 REAL SLAMCH, SLARND
00350 EXTERNAL SLAMCH, SLARND
00351
00352
00353 EXTERNAL ALASUM, SBDSDC, SBDSQR, SBDT01, SBDT02, SBDT03,
00354 $ SCOPY, SGEBRD, SGEMM, SLABAD, SLACPY, SLAHD2,
00355 $ SLASET, SLATMR, SLATMS, SORGBR, SORT01, XERBLA
00356
00357
00358 INTRINSIC ABS, EXP, INT, LOG, MAX, MIN, SQRT
00359
00360
00361 LOGICAL LERR, OK
00362 CHARACTER*32 SRNAMT
00363 INTEGER INFOT, NUNIT
00364
00365
00366 COMMON / INFOC / INFOT, NUNIT, OK, LERR
00367 COMMON / SRNAMC / SRNAMT
00368
00369
00370 DATA KTYPE / 1, 2, 5*4, 5*6, 3*9, 10 /
00371 DATA KMAGN / 2*1, 3*1, 2, 3, 3*1, 2, 3, 1, 2, 3, 0 /
00372 DATA KMODE / 2*0, 4, 3, 1, 4, 4, 4, 3, 1, 4, 4, 0,
00373 $ 0, 0, 0 /
00374
00375
00376
00377
00378
00379 INFO = 0
00380
00381 BADMM = .FALSE.
00382 BADNN = .FALSE.
00383 MMAX = 1
00384 NMAX = 1
00385 MNMAX = 1
00386 MINWRK = 1
00387 DO 10 J = 1, NSIZES
00388 MMAX = MAX( MMAX, MVAL( J ) )
00389 IF( MVAL( J ).LT.0 )
00390 $ BADMM = .TRUE.
00391 NMAX = MAX( NMAX, NVAL( J ) )
00392 IF( NVAL( J ).LT.0 )
00393 $ BADNN = .TRUE.
00394 MNMAX = MAX( MNMAX, MIN( MVAL( J ), NVAL( J ) ) )
00395 MINWRK = MAX( MINWRK, 3*( MVAL( J )+NVAL( J ) ),
00396 $ MVAL( J )*( MVAL( J )+MAX( MVAL( J ), NVAL( J ),
00397 $ NRHS )+1 )+NVAL( J )*MIN( NVAL( J ), MVAL( J ) ) )
00398 10 CONTINUE
00399
00400
00401
00402 IF( NSIZES.LT.0 ) THEN
00403 INFO = -1
00404 ELSE IF( BADMM ) THEN
00405 INFO = -2
00406 ELSE IF( BADNN ) THEN
00407 INFO = -3
00408 ELSE IF( NTYPES.LT.0 ) THEN
00409 INFO = -4
00410 ELSE IF( NRHS.LT.0 ) THEN
00411 INFO = -6
00412 ELSE IF( LDA.LT.MMAX ) THEN
00413 INFO = -11
00414 ELSE IF( LDX.LT.MMAX ) THEN
00415 INFO = -17
00416 ELSE IF( LDQ.LT.MMAX ) THEN
00417 INFO = -21
00418 ELSE IF( LDPT.LT.MNMAX ) THEN
00419 INFO = -23
00420 ELSE IF( MINWRK.GT.LWORK ) THEN
00421 INFO = -27
00422 END IF
00423
00424 IF( INFO.NE.0 ) THEN
00425 CALL XERBLA( 'SCHKBD', -INFO )
00426 RETURN
00427 END IF
00428
00429
00430
00431 PATH( 1: 1 ) = 'Single precision'
00432 PATH( 2: 3 ) = 'BD'
00433 NFAIL = 0
00434 NTEST = 0
00435 UNFL = SLAMCH( 'Safe minimum' )
00436 OVFL = SLAMCH( 'Overflow' )
00437 CALL SLABAD( UNFL, OVFL )
00438 ULP = SLAMCH( 'Precision' )
00439 ULPINV = ONE / ULP
00440 LOG2UI = INT( LOG( ULPINV ) / LOG( TWO ) )
00441 RTUNFL = SQRT( UNFL )
00442 RTOVFL = SQRT( OVFL )
00443 INFOT = 0
00444
00445
00446
00447 DO 200 JSIZE = 1, NSIZES
00448 M = MVAL( JSIZE )
00449 N = NVAL( JSIZE )
00450 MNMIN = MIN( M, N )
00451 AMNINV = ONE / MAX( M, N, 1 )
00452
00453 IF( NSIZES.NE.1 ) THEN
00454 MTYPES = MIN( MAXTYP, NTYPES )
00455 ELSE
00456 MTYPES = MIN( MAXTYP+1, NTYPES )
00457 END IF
00458
00459 DO 190 JTYPE = 1, MTYPES
00460 IF( .NOT.DOTYPE( JTYPE ) )
00461 $ GO TO 190
00462
00463 DO 20 J = 1, 4
00464 IOLDSD( J ) = ISEED( J )
00465 20 CONTINUE
00466
00467 DO 30 J = 1, 14
00468 RESULT( J ) = -ONE
00469 30 CONTINUE
00470
00471 UPLO = ' '
00472
00473
00474
00475
00476
00477
00478
00479
00480
00481
00482
00483
00484
00485
00486
00487
00488
00489 IF( MTYPES.GT.MAXTYP )
00490 $ GO TO 100
00491
00492 ITYPE = KTYPE( JTYPE )
00493 IMODE = KMODE( JTYPE )
00494
00495
00496
00497 GO TO ( 40, 50, 60 )KMAGN( JTYPE )
00498
00499 40 CONTINUE
00500 ANORM = ONE
00501 GO TO 70
00502
00503 50 CONTINUE
00504 ANORM = ( RTOVFL*ULP )*AMNINV
00505 GO TO 70
00506
00507 60 CONTINUE
00508 ANORM = RTUNFL*MAX( M, N )*ULPINV
00509 GO TO 70
00510
00511 70 CONTINUE
00512
00513 CALL SLASET( 'Full', LDA, N, ZERO, ZERO, A, LDA )
00514 IINFO = 0
00515 COND = ULPINV
00516
00517 BIDIAG = .FALSE.
00518 IF( ITYPE.EQ.1 ) THEN
00519
00520
00521
00522 IINFO = 0
00523
00524 ELSE IF( ITYPE.EQ.2 ) THEN
00525
00526
00527
00528 DO 80 JCOL = 1, MNMIN
00529 A( JCOL, JCOL ) = ANORM
00530 80 CONTINUE
00531
00532 ELSE IF( ITYPE.EQ.4 ) THEN
00533
00534
00535
00536 CALL SLATMS( MNMIN, MNMIN, 'S', ISEED, 'N', WORK, IMODE,
00537 $ COND, ANORM, 0, 0, 'N', A, LDA,
00538 $ WORK( MNMIN+1 ), IINFO )
00539
00540 ELSE IF( ITYPE.EQ.5 ) THEN
00541
00542
00543
00544 CALL SLATMS( MNMIN, MNMIN, 'S', ISEED, 'S', WORK, IMODE,
00545 $ COND, ANORM, M, N, 'N', A, LDA,
00546 $ WORK( MNMIN+1 ), IINFO )
00547
00548 ELSE IF( ITYPE.EQ.6 ) THEN
00549
00550
00551
00552 CALL SLATMS( M, N, 'S', ISEED, 'N', WORK, IMODE, COND,
00553 $ ANORM, M, N, 'N', A, LDA, WORK( MNMIN+1 ),
00554 $ IINFO )
00555
00556 ELSE IF( ITYPE.EQ.7 ) THEN
00557
00558
00559
00560 CALL SLATMR( MNMIN, MNMIN, 'S', ISEED, 'N', WORK, 6, ONE,
00561 $ ONE, 'T', 'N', WORK( MNMIN+1 ), 1, ONE,
00562 $ WORK( 2*MNMIN+1 ), 1, ONE, 'N', IWORK, 0, 0,
00563 $ ZERO, ANORM, 'NO', A, LDA, IWORK, IINFO )
00564
00565 ELSE IF( ITYPE.EQ.8 ) THEN
00566
00567
00568
00569 CALL SLATMR( MNMIN, MNMIN, 'S', ISEED, 'S', WORK, 6, ONE,
00570 $ ONE, 'T', 'N', WORK( MNMIN+1 ), 1, ONE,
00571 $ WORK( M+MNMIN+1 ), 1, ONE, 'N', IWORK, M, N,
00572 $ ZERO, ANORM, 'NO', A, LDA, IWORK, IINFO )
00573
00574 ELSE IF( ITYPE.EQ.9 ) THEN
00575
00576
00577
00578 CALL SLATMR( M, N, 'S', ISEED, 'N', WORK, 6, ONE, ONE,
00579 $ 'T', 'N', WORK( MNMIN+1 ), 1, ONE,
00580 $ WORK( M+MNMIN+1 ), 1, ONE, 'N', IWORK, M, N,
00581 $ ZERO, ANORM, 'NO', A, LDA, IWORK, IINFO )
00582
00583 ELSE IF( ITYPE.EQ.10 ) THEN
00584
00585
00586
00587 TEMP1 = -TWO*LOG( ULP )
00588 DO 90 J = 1, MNMIN
00589 BD( J ) = EXP( TEMP1*SLARND( 2, ISEED ) )
00590 IF( J.LT.MNMIN )
00591 $ BE( J ) = EXP( TEMP1*SLARND( 2, ISEED ) )
00592 90 CONTINUE
00593
00594 IINFO = 0
00595 BIDIAG = .TRUE.
00596 IF( M.GE.N ) THEN
00597 UPLO = 'U'
00598 ELSE
00599 UPLO = 'L'
00600 END IF
00601 ELSE
00602 IINFO = 1
00603 END IF
00604
00605 IF( IINFO.EQ.0 ) THEN
00606
00607
00608
00609 IF( BIDIAG ) THEN
00610 CALL SLATMR( MNMIN, NRHS, 'S', ISEED, 'N', WORK, 6,
00611 $ ONE, ONE, 'T', 'N', WORK( MNMIN+1 ), 1,
00612 $ ONE, WORK( 2*MNMIN+1 ), 1, ONE, 'N',
00613 $ IWORK, MNMIN, NRHS, ZERO, ONE, 'NO', Y,
00614 $ LDX, IWORK, IINFO )
00615 ELSE
00616 CALL SLATMR( M, NRHS, 'S', ISEED, 'N', WORK, 6, ONE,
00617 $ ONE, 'T', 'N', WORK( M+1 ), 1, ONE,
00618 $ WORK( 2*M+1 ), 1, ONE, 'N', IWORK, M,
00619 $ NRHS, ZERO, ONE, 'NO', X, LDX, IWORK,
00620 $ IINFO )
00621 END IF
00622 END IF
00623
00624
00625
00626 IF( IINFO.NE.0 ) THEN
00627 WRITE( NOUT, FMT = 9998 )'Generator', IINFO, M, N,
00628 $ JTYPE, IOLDSD
00629 INFO = ABS( IINFO )
00630 RETURN
00631 END IF
00632
00633 100 CONTINUE
00634
00635
00636
00637 IF( .NOT.BIDIAG ) THEN
00638
00639
00640
00641
00642 CALL SLACPY( ' ', M, N, A, LDA, Q, LDQ )
00643 CALL SGEBRD( M, N, Q, LDQ, BD, BE, WORK, WORK( MNMIN+1 ),
00644 $ WORK( 2*MNMIN+1 ), LWORK-2*MNMIN, IINFO )
00645
00646
00647
00648 IF( IINFO.NE.0 ) THEN
00649 WRITE( NOUT, FMT = 9998 )'SGEBRD', IINFO, M, N,
00650 $ JTYPE, IOLDSD
00651 INFO = ABS( IINFO )
00652 RETURN
00653 END IF
00654
00655 CALL SLACPY( ' ', M, N, Q, LDQ, PT, LDPT )
00656 IF( M.GE.N ) THEN
00657 UPLO = 'U'
00658 ELSE
00659 UPLO = 'L'
00660 END IF
00661
00662
00663
00664 MQ = M
00665 IF( NRHS.LE.0 )
00666 $ MQ = MNMIN
00667 CALL SORGBR( 'Q', M, MQ, N, Q, LDQ, WORK,
00668 $ WORK( 2*MNMIN+1 ), LWORK-2*MNMIN, IINFO )
00669
00670
00671
00672 IF( IINFO.NE.0 ) THEN
00673 WRITE( NOUT, FMT = 9998 )'SORGBR(Q)', IINFO, M, N,
00674 $ JTYPE, IOLDSD
00675 INFO = ABS( IINFO )
00676 RETURN
00677 END IF
00678
00679
00680
00681 CALL SORGBR( 'P', MNMIN, N, M, PT, LDPT, WORK( MNMIN+1 ),
00682 $ WORK( 2*MNMIN+1 ), LWORK-2*MNMIN, IINFO )
00683
00684
00685
00686 IF( IINFO.NE.0 ) THEN
00687 WRITE( NOUT, FMT = 9998 )'SORGBR(P)', IINFO, M, N,
00688 $ JTYPE, IOLDSD
00689 INFO = ABS( IINFO )
00690 RETURN
00691 END IF
00692
00693
00694
00695 CALL SGEMM( 'Transpose', 'No transpose', M, NRHS, M, ONE,
00696 $ Q, LDQ, X, LDX, ZERO, Y, LDX )
00697
00698
00699
00700
00701
00702 CALL SBDT01( M, N, 1, A, LDA, Q, LDQ, BD, BE, PT, LDPT,
00703 $ WORK, RESULT( 1 ) )
00704 CALL SORT01( 'Columns', M, MQ, Q, LDQ, WORK, LWORK,
00705 $ RESULT( 2 ) )
00706 CALL SORT01( 'Rows', MNMIN, N, PT, LDPT, WORK, LWORK,
00707 $ RESULT( 3 ) )
00708 END IF
00709
00710
00711
00712
00713 CALL SCOPY( MNMIN, BD, 1, S1, 1 )
00714 IF( MNMIN.GT.0 )
00715 $ CALL SCOPY( MNMIN-1, BE, 1, WORK, 1 )
00716 CALL SLACPY( ' ', M, NRHS, Y, LDX, Z, LDX )
00717 CALL SLASET( 'Full', MNMIN, MNMIN, ZERO, ONE, U, LDPT )
00718 CALL SLASET( 'Full', MNMIN, MNMIN, ZERO, ONE, VT, LDPT )
00719
00720 CALL SBDSQR( UPLO, MNMIN, MNMIN, MNMIN, NRHS, S1, WORK, VT,
00721 $ LDPT, U, LDPT, Z, LDX, WORK( MNMIN+1 ), IINFO )
00722
00723
00724
00725 IF( IINFO.NE.0 ) THEN
00726 WRITE( NOUT, FMT = 9998 )'SBDSQR(vects)', IINFO, M, N,
00727 $ JTYPE, IOLDSD
00728 INFO = ABS( IINFO )
00729 IF( IINFO.LT.0 ) THEN
00730 RETURN
00731 ELSE
00732 RESULT( 4 ) = ULPINV
00733 GO TO 170
00734 END IF
00735 END IF
00736
00737
00738
00739
00740 CALL SCOPY( MNMIN, BD, 1, S2, 1 )
00741 IF( MNMIN.GT.0 )
00742 $ CALL SCOPY( MNMIN-1, BE, 1, WORK, 1 )
00743
00744 CALL SBDSQR( UPLO, MNMIN, 0, 0, 0, S2, WORK, VT, LDPT, U,
00745 $ LDPT, Z, LDX, WORK( MNMIN+1 ), IINFO )
00746
00747
00748
00749 IF( IINFO.NE.0 ) THEN
00750 WRITE( NOUT, FMT = 9998 )'SBDSQR(values)', IINFO, M, N,
00751 $ JTYPE, IOLDSD
00752 INFO = ABS( IINFO )
00753 IF( IINFO.LT.0 ) THEN
00754 RETURN
00755 ELSE
00756 RESULT( 9 ) = ULPINV
00757 GO TO 170
00758 END IF
00759 END IF
00760
00761
00762
00763
00764
00765
00766 CALL SBDT03( UPLO, MNMIN, 1, BD, BE, U, LDPT, S1, VT, LDPT,
00767 $ WORK, RESULT( 4 ) )
00768 CALL SBDT02( MNMIN, NRHS, Y, LDX, Z, LDX, U, LDPT, WORK,
00769 $ RESULT( 5 ) )
00770 CALL SORT01( 'Columns', MNMIN, MNMIN, U, LDPT, WORK, LWORK,
00771 $ RESULT( 6 ) )
00772 CALL SORT01( 'Rows', MNMIN, MNMIN, VT, LDPT, WORK, LWORK,
00773 $ RESULT( 7 ) )
00774
00775
00776
00777
00778 RESULT( 8 ) = ZERO
00779 DO 110 I = 1, MNMIN - 1
00780 IF( S1( I ).LT.S1( I+1 ) )
00781 $ RESULT( 8 ) = ULPINV
00782 IF( S1( I ).LT.ZERO )
00783 $ RESULT( 8 ) = ULPINV
00784 110 CONTINUE
00785 IF( MNMIN.GE.1 ) THEN
00786 IF( S1( MNMIN ).LT.ZERO )
00787 $ RESULT( 8 ) = ULPINV
00788 END IF
00789
00790
00791
00792 TEMP2 = ZERO
00793
00794 DO 120 J = 1, MNMIN
00795 TEMP1 = ABS( S1( J )-S2( J ) ) /
00796 $ MAX( SQRT( UNFL )*MAX( S1( 1 ), ONE ),
00797 $ ULP*MAX( ABS( S1( J ) ), ABS( S2( J ) ) ) )
00798 TEMP2 = MAX( TEMP1, TEMP2 )
00799 120 CONTINUE
00800
00801 RESULT( 9 ) = TEMP2
00802
00803
00804
00805
00806 TEMP1 = THRESH*( HALF-ULP )
00807
00808 DO 130 J = 0, LOG2UI
00809
00810 IF( IINFO.EQ.0 )
00811 $ GO TO 140
00812 TEMP1 = TEMP1*TWO
00813 130 CONTINUE
00814
00815 140 CONTINUE
00816 RESULT( 10 ) = TEMP1
00817
00818
00819
00820
00821 IF( .NOT.BIDIAG ) THEN
00822 CALL SCOPY( MNMIN, BD, 1, S2, 1 )
00823 IF( MNMIN.GT.0 )
00824 $ CALL SCOPY( MNMIN-1, BE, 1, WORK, 1 )
00825
00826 CALL SBDSQR( UPLO, MNMIN, N, M, NRHS, S2, WORK, PT, LDPT,
00827 $ Q, LDQ, Y, LDX, WORK( MNMIN+1 ), IINFO )
00828
00829
00830
00831
00832
00833
00834 CALL SBDT01( M, N, 0, A, LDA, Q, LDQ, S2, DUMMA, PT,
00835 $ LDPT, WORK, RESULT( 11 ) )
00836 CALL SBDT02( M, NRHS, X, LDX, Y, LDX, Q, LDQ, WORK,
00837 $ RESULT( 12 ) )
00838 CALL SORT01( 'Columns', M, MQ, Q, LDQ, WORK, LWORK,
00839 $ RESULT( 13 ) )
00840 CALL SORT01( 'Rows', MNMIN, N, PT, LDPT, WORK, LWORK,
00841 $ RESULT( 14 ) )
00842 END IF
00843
00844
00845
00846
00847 CALL SCOPY( MNMIN, BD, 1, S1, 1 )
00848 IF( MNMIN.GT.0 )
00849 $ CALL SCOPY( MNMIN-1, BE, 1, WORK, 1 )
00850 CALL SLASET( 'Full', MNMIN, MNMIN, ZERO, ONE, U, LDPT )
00851 CALL SLASET( 'Full', MNMIN, MNMIN, ZERO, ONE, VT, LDPT )
00852
00853 CALL SBDSDC( UPLO, 'I', MNMIN, S1, WORK, U, LDPT, VT, LDPT,
00854 $ DUM, IDUM, WORK( MNMIN+1 ), IWORK, IINFO )
00855
00856
00857
00858 IF( IINFO.NE.0 ) THEN
00859 WRITE( NOUT, FMT = 9998 )'SBDSDC(vects)', IINFO, M, N,
00860 $ JTYPE, IOLDSD
00861 INFO = ABS( IINFO )
00862 IF( IINFO.LT.0 ) THEN
00863 RETURN
00864 ELSE
00865 RESULT( 15 ) = ULPINV
00866 GO TO 170
00867 END IF
00868 END IF
00869
00870
00871
00872
00873 CALL SCOPY( MNMIN, BD, 1, S2, 1 )
00874 IF( MNMIN.GT.0 )
00875 $ CALL SCOPY( MNMIN-1, BE, 1, WORK, 1 )
00876
00877 CALL SBDSDC( UPLO, 'N', MNMIN, S2, WORK, DUM, 1, DUM, 1,
00878 $ DUM, IDUM, WORK( MNMIN+1 ), IWORK, IINFO )
00879
00880
00881
00882 IF( IINFO.NE.0 ) THEN
00883 WRITE( NOUT, FMT = 9998 )'SBDSDC(values)', IINFO, M, N,
00884 $ JTYPE, IOLDSD
00885 INFO = ABS( IINFO )
00886 IF( IINFO.LT.0 ) THEN
00887 RETURN
00888 ELSE
00889 RESULT( 18 ) = ULPINV
00890 GO TO 170
00891 END IF
00892 END IF
00893
00894
00895
00896
00897
00898 CALL SBDT03( UPLO, MNMIN, 1, BD, BE, U, LDPT, S1, VT, LDPT,
00899 $ WORK, RESULT( 15 ) )
00900 CALL SORT01( 'Columns', MNMIN, MNMIN, U, LDPT, WORK, LWORK,
00901 $ RESULT( 16 ) )
00902 CALL SORT01( 'Rows', MNMIN, MNMIN, VT, LDPT, WORK, LWORK,
00903 $ RESULT( 17 ) )
00904
00905
00906
00907
00908 RESULT( 18 ) = ZERO
00909 DO 150 I = 1, MNMIN - 1
00910 IF( S1( I ).LT.S1( I+1 ) )
00911 $ RESULT( 18 ) = ULPINV
00912 IF( S1( I ).LT.ZERO )
00913 $ RESULT( 18 ) = ULPINV
00914 150 CONTINUE
00915 IF( MNMIN.GE.1 ) THEN
00916 IF( S1( MNMIN ).LT.ZERO )
00917 $ RESULT( 18 ) = ULPINV
00918 END IF
00919
00920
00921
00922 TEMP2 = ZERO
00923
00924 DO 160 J = 1, MNMIN
00925 TEMP1 = ABS( S1( J )-S2( J ) ) /
00926 $ MAX( SQRT( UNFL )*MAX( S1( 1 ), ONE ),
00927 $ ULP*MAX( ABS( S1( 1 ) ), ABS( S2( 1 ) ) ) )
00928 TEMP2 = MAX( TEMP1, TEMP2 )
00929 160 CONTINUE
00930
00931 RESULT( 19 ) = TEMP2
00932
00933
00934
00935 170 CONTINUE
00936 DO 180 J = 1, 19
00937 IF( RESULT( J ).GE.THRESH ) THEN
00938 IF( NFAIL.EQ.0 )
00939 $ CALL SLAHD2( NOUT, PATH )
00940 WRITE( NOUT, FMT = 9999 )M, N, JTYPE, IOLDSD, J,
00941 $ RESULT( J )
00942 NFAIL = NFAIL + 1
00943 END IF
00944 180 CONTINUE
00945 IF( .NOT.BIDIAG ) THEN
00946 NTEST = NTEST + 19
00947 ELSE
00948 NTEST = NTEST + 5
00949 END IF
00950
00951 190 CONTINUE
00952 200 CONTINUE
00953
00954
00955
00956 CALL ALASUM( PATH, NOUT, NFAIL, NTEST, 0 )
00957
00958 RETURN
00959
00960
00961
00962 9999 FORMAT( ' M=', I5, ', N=', I5, ', type ', I2, ', seed=',
00963 $ 4( I4, ',' ), ' test(', I2, ')=', G11.4 )
00964 9998 FORMAT( ' SCHKBD: ', A, ' returned INFO=', I6, '.', / 9X, 'M=',
00965 $ I6, ', N=', I6, ', JTYPE=', I6, ', ISEED=(', 3( I5, ',' ),
00966 $ I5, ')' )
00967
00968 END