00001 SUBROUTINE ZCKGLM( NN, NVAL, MVAL, PVAL, NMATS, ISEED, THRESH,
00002 $ NMAX, A, AF, B, BF, X, WORK, RWORK, NIN, NOUT,
00003 $ INFO )
00004
00005
00006
00007
00008
00009
00010 INTEGER INFO, NIN, NMATS, NMAX, NN, NOUT
00011 DOUBLE PRECISION THRESH
00012
00013
00014 INTEGER ISEED( 4 ), MVAL( * ), NVAL( * ), PVAL( * )
00015 DOUBLE PRECISION RWORK( * )
00016 COMPLEX*16 A( * ), AF( * ), B( * ), BF( * ), WORK( * ),
00017 $ X( * )
00018
00019
00020
00021
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 INTEGER NTYPES
00094 PARAMETER ( NTYPES = 8 )
00095
00096
00097 LOGICAL FIRSTT
00098 CHARACTER DISTA, DISTB, TYPE
00099 CHARACTER*3 PATH
00100 INTEGER I, IINFO, IK, IMAT, KLA, KLB, KUA, KUB, LDA,
00101 $ LDB, LWORK, M, MODEA, MODEB, N, NFAIL, NRUN, P
00102 DOUBLE PRECISION ANORM, BNORM, CNDNMA, CNDNMB, RESID
00103
00104
00105 LOGICAL DOTYPE( NTYPES )
00106
00107
00108 COMPLEX*16 ZLARND
00109 EXTERNAL ZLARND
00110
00111
00112 EXTERNAL ALAHDG, ALAREQ, ALASUM, DLATB9, ZGLMTS, ZLATMS
00113
00114
00115 INTRINSIC ABS
00116
00117
00118
00119
00120
00121 PATH( 1: 3 ) = 'GLM'
00122 INFO = 0
00123 NRUN = 0
00124 NFAIL = 0
00125 FIRSTT = .TRUE.
00126 CALL ALAREQ( PATH, NMATS, DOTYPE, NTYPES, NIN, NOUT )
00127 LDA = NMAX
00128 LDB = NMAX
00129 LWORK = NMAX*NMAX
00130
00131
00132
00133 DO 10 IK = 1, NN
00134 M = MVAL( IK )
00135 P = PVAL( IK )
00136 N = NVAL( IK )
00137 IF( M.GT.N .OR. N.GT.M+P ) THEN
00138 IF( FIRSTT ) THEN
00139 WRITE( NOUT, FMT = * )
00140 FIRSTT = .FALSE.
00141 END IF
00142 WRITE( NOUT, FMT = 9997 )M, P, N
00143 END IF
00144 10 CONTINUE
00145 FIRSTT = .TRUE.
00146
00147
00148
00149 DO 40 IK = 1, NN
00150 M = MVAL( IK )
00151 P = PVAL( IK )
00152 N = NVAL( IK )
00153 IF( M.GT.N .OR. N.GT.M+P )
00154 $ GO TO 40
00155
00156 DO 30 IMAT = 1, NTYPES
00157
00158
00159
00160 IF( .NOT.DOTYPE( IMAT ) )
00161 $ GO TO 30
00162
00163
00164
00165
00166 CALL DLATB9( PATH, IMAT, M, P, N, TYPE, KLA, KUA, KLB, KUB,
00167 $ ANORM, BNORM, MODEA, MODEB, CNDNMA, CNDNMB,
00168 $ DISTA, DISTB )
00169
00170 CALL ZLATMS( N, M, DISTA, ISEED, TYPE, RWORK, MODEA, CNDNMA,
00171 $ ANORM, KLA, KUA, 'No packing', A, LDA, WORK,
00172 $ IINFO )
00173 IF( IINFO.NE.0 ) THEN
00174 WRITE( NOUT, FMT = 9999 )IINFO
00175 INFO = ABS( IINFO )
00176 GO TO 30
00177 END IF
00178
00179 CALL ZLATMS( N, P, DISTB, ISEED, TYPE, RWORK, MODEB, CNDNMB,
00180 $ BNORM, KLB, KUB, 'No packing', B, LDB, WORK,
00181 $ IINFO )
00182 IF( IINFO.NE.0 ) THEN
00183 WRITE( NOUT, FMT = 9999 )IINFO
00184 INFO = ABS( IINFO )
00185 GO TO 30
00186 END IF
00187
00188
00189
00190 DO 20 I = 1, N
00191 X( I ) = ZLARND( 2, ISEED )
00192 20 CONTINUE
00193
00194 CALL ZGLMTS( N, M, P, A, AF, LDA, B, BF, LDB, X,
00195 $ X( NMAX+1 ), X( 2*NMAX+1 ), X( 3*NMAX+1 ),
00196 $ WORK, LWORK, RWORK, RESID )
00197
00198
00199
00200
00201 IF( RESID.GE.THRESH ) THEN
00202 IF( NFAIL.EQ.0 .AND. FIRSTT ) THEN
00203 FIRSTT = .FALSE.
00204 CALL ALAHDG( NOUT, PATH )
00205 END IF
00206 WRITE( NOUT, FMT = 9998 )N, M, P, IMAT, 1, RESID
00207 NFAIL = NFAIL + 1
00208 END IF
00209 NRUN = NRUN + 1
00210
00211 30 CONTINUE
00212 40 CONTINUE
00213
00214
00215
00216 CALL ALASUM( PATH, NOUT, NFAIL, NRUN, 0 )
00217
00218 9999 FORMAT( ' ZLATMS in ZCKGLM INFO = ', I5 )
00219 9998 FORMAT( ' N=', I4, ' M=', I4, ', P=', I4, ', type ', I2,
00220 $ ', test ', I2, ', ratio=', G13.6 )
00221 9997 FORMAT( ' *** Invalid input for GLM: M = ', I6, ', P = ', I6,
00222 $ ', N = ', I6, ';', / ' must satisfy M <= N <= M+P ',
00223 $ '(this set of values will be skipped)' )
00224 RETURN
00225
00226
00227
00228 END