00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013 #include "f2c.h"
00014 #include "blaswrap.h"
00015
00016
00017
00018 static integer c__8 = 8;
00019 static integer c__1 = 1;
00020 static integer c__0 = 0;
00021
00022 int dckgqr_(integer *nm, integer *mval, integer *np, integer
00023 *pval, integer *nn, integer *nval, integer *nmats, integer *iseed,
00024 doublereal *thresh, integer *nmax, doublereal *a, doublereal *af,
00025 doublereal *aq, doublereal *ar, doublereal *taua, doublereal *b,
00026 doublereal *bf, doublereal *bz, doublereal *bt, doublereal *bwk,
00027 doublereal *taub, doublereal *work, doublereal *rwork, integer *nin,
00028 integer *nout, integer *info)
00029 {
00030
00031 static char fmt_9999[] = "(\002 DLATMS in DCKGQR: INFO = \002,i5)";
00032 static char fmt_9998[] = "(\002 M=\002,i4,\002 P=\002,i4,\002, N=\002,"
00033 "i4,\002, type \002,i2,\002, test \002,i2,\002, ratio=\002,g13.6)";
00034 static char fmt_9997[] = "(\002 N=\002,i4,\002 M=\002,i4,\002, P=\002,"
00035 "i4,\002, type \002,i2,\002, test \002,i2,\002, ratio=\002,g13.6)";
00036
00037
00038 integer i__1, i__2, i__3, i__4;
00039
00040
00041 int s_copy(char *, char *, ftnlen, ftnlen);
00042 integer s_wsfe(cilist *), do_fio(integer *, char *, ftnlen), e_wsfe(void);
00043
00044
00045 integer i__, m, n, p, im, in, ip, nt, lda, ldb, kla, klb, kua, kub;
00046 char path[3];
00047 integer imat;
00048 char type__[1];
00049 integer nrun, modea, modeb, nfail;
00050 char dista[1], distb[1];
00051 integer iinfo;
00052 doublereal anorm, bnorm;
00053 integer lwork;
00054 extern int dlatb9_(char *, integer *, integer *, integer
00055 *, integer *, char *, integer *, integer *, integer *, integer *,
00056 doublereal *, doublereal *, integer *, integer *, doublereal *,
00057 doublereal *, char *, char *),
00058 alahdg_(integer *, char *);
00059 doublereal cndnma, cndnmb;
00060 extern int alareq_(char *, integer *, logical *, integer
00061 *, integer *, integer *), alasum_(char *, integer *,
00062 integer *, integer *, integer *), dlatms_(integer *,
00063 integer *, char *, integer *, char *, doublereal *, integer *,
00064 doublereal *, doublereal *, integer *, integer *, char *,
00065 doublereal *, integer *, doublereal *, integer *);
00066 logical dotype[8];
00067 extern int dgqrts_(integer *, integer *, integer *,
00068 doublereal *, doublereal *, doublereal *, doublereal *, integer *,
00069 doublereal *, doublereal *, doublereal *, doublereal *,
00070 doublereal *, doublereal *, integer *, doublereal *, doublereal *,
00071 integer *, doublereal *, doublereal *), dgrqts_(integer *,
00072 integer *, integer *, doublereal *, doublereal *, doublereal *,
00073 doublereal *, integer *, doublereal *, doublereal *, doublereal *,
00074 doublereal *, doublereal *, doublereal *, integer *, doublereal *
00075 , doublereal *, integer *, doublereal *, doublereal *);
00076 logical firstt;
00077 doublereal result[7];
00078
00079
00080 static cilist io___30 = { 0, 0, 0, fmt_9999, 0 };
00081 static cilist io___31 = { 0, 0, 0, fmt_9999, 0 };
00082 static cilist io___35 = { 0, 0, 0, fmt_9998, 0 };
00083 static cilist io___36 = { 0, 0, 0, fmt_9999, 0 };
00084 static cilist io___37 = { 0, 0, 0, fmt_9999, 0 };
00085 static cilist io___38 = { 0, 0, 0, fmt_9997, 0 };
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 --rwork;
00204 --work;
00205 --taub;
00206 --bwk;
00207 --bt;
00208 --bz;
00209 --bf;
00210 --b;
00211 --taua;
00212 --ar;
00213 --aq;
00214 --af;
00215 --a;
00216 --iseed;
00217 --nval;
00218 --pval;
00219 --mval;
00220
00221
00222 s_copy(path, "GQR", (ftnlen)3, (ftnlen)3);
00223 *info = 0;
00224 nrun = 0;
00225 nfail = 0;
00226 firstt = TRUE_;
00227 alareq_(path, nmats, dotype, &c__8, nin, nout);
00228 lda = *nmax;
00229 ldb = *nmax;
00230 lwork = *nmax * *nmax;
00231
00232
00233
00234 i__1 = *nm;
00235 for (im = 1; im <= i__1; ++im) {
00236 m = mval[im];
00237
00238
00239
00240 i__2 = *np;
00241 for (ip = 1; ip <= i__2; ++ip) {
00242 p = pval[ip];
00243
00244
00245
00246 i__3 = *nn;
00247 for (in = 1; in <= i__3; ++in) {
00248 n = nval[in];
00249
00250 for (imat = 1; imat <= 8; ++imat) {
00251
00252
00253
00254 if (! dotype[imat - 1]) {
00255 goto L30;
00256 }
00257
00258
00259
00260
00261
00262
00263 dlatb9_("GRQ", &imat, &m, &p, &n, type__, &kla, &kua, &
00264 klb, &kub, &anorm, &bnorm, &modea, &modeb, &
00265 cndnma, &cndnmb, dista, distb);
00266
00267
00268
00269 dlatms_(&m, &n, dista, &iseed[1], type__, &rwork[1], &
00270 modea, &cndnma, &anorm, &kla, &kua, "No packing",
00271 &a[1], &lda, &work[1], &iinfo);
00272 if (iinfo != 0) {
00273 io___30.ciunit = *nout;
00274 s_wsfe(&io___30);
00275 do_fio(&c__1, (char *)&iinfo, (ftnlen)sizeof(integer))
00276 ;
00277 e_wsfe();
00278 *info = abs(iinfo);
00279 goto L30;
00280 }
00281
00282
00283
00284 dlatms_(&p, &n, distb, &iseed[1], type__, &rwork[1], &
00285 modeb, &cndnmb, &bnorm, &klb, &kub, "No packing",
00286 &b[1], &ldb, &work[1], &iinfo);
00287 if (iinfo != 0) {
00288 io___31.ciunit = *nout;
00289 s_wsfe(&io___31);
00290 do_fio(&c__1, (char *)&iinfo, (ftnlen)sizeof(integer))
00291 ;
00292 e_wsfe();
00293 *info = abs(iinfo);
00294 goto L30;
00295 }
00296
00297 nt = 4;
00298
00299 dgrqts_(&m, &p, &n, &a[1], &af[1], &aq[1], &ar[1], &lda, &
00300 taua[1], &b[1], &bf[1], &bz[1], &bt[1], &bwk[1], &
00301 ldb, &taub[1], &work[1], &lwork, &rwork[1],
00302 result);
00303
00304
00305
00306
00307 i__4 = nt;
00308 for (i__ = 1; i__ <= i__4; ++i__) {
00309 if (result[i__ - 1] >= *thresh) {
00310 if (nfail == 0 && firstt) {
00311 firstt = FALSE_;
00312 alahdg_(nout, "GRQ");
00313 }
00314 io___35.ciunit = *nout;
00315 s_wsfe(&io___35);
00316 do_fio(&c__1, (char *)&m, (ftnlen)sizeof(integer))
00317 ;
00318 do_fio(&c__1, (char *)&p, (ftnlen)sizeof(integer))
00319 ;
00320 do_fio(&c__1, (char *)&n, (ftnlen)sizeof(integer))
00321 ;
00322 do_fio(&c__1, (char *)&imat, (ftnlen)sizeof(
00323 integer));
00324 do_fio(&c__1, (char *)&i__, (ftnlen)sizeof(
00325 integer));
00326 do_fio(&c__1, (char *)&result[i__ - 1], (ftnlen)
00327 sizeof(doublereal));
00328 e_wsfe();
00329 ++nfail;
00330 }
00331
00332 }
00333 nrun += nt;
00334
00335
00336
00337
00338
00339
00340 dlatb9_("GQR", &imat, &m, &p, &n, type__, &kla, &kua, &
00341 klb, &kub, &anorm, &bnorm, &modea, &modeb, &
00342 cndnma, &cndnmb, dista, distb);
00343
00344
00345
00346 dlatms_(&n, &m, dista, &iseed[1], type__, &rwork[1], &
00347 modea, &cndnma, &anorm, &kla, &kua, "No packing",
00348 &a[1], &lda, &work[1], &iinfo);
00349 if (iinfo != 0) {
00350 io___36.ciunit = *nout;
00351 s_wsfe(&io___36);
00352 do_fio(&c__1, (char *)&iinfo, (ftnlen)sizeof(integer))
00353 ;
00354 e_wsfe();
00355 *info = abs(iinfo);
00356 goto L30;
00357 }
00358
00359
00360
00361 dlatms_(&n, &p, distb, &iseed[1], type__, &rwork[1], &
00362 modea, &cndnma, &bnorm, &klb, &kub, "No packing",
00363 &b[1], &ldb, &work[1], &iinfo);
00364 if (iinfo != 0) {
00365 io___37.ciunit = *nout;
00366 s_wsfe(&io___37);
00367 do_fio(&c__1, (char *)&iinfo, (ftnlen)sizeof(integer))
00368 ;
00369 e_wsfe();
00370 *info = abs(iinfo);
00371 goto L30;
00372 }
00373
00374 nt = 4;
00375
00376 dgqrts_(&n, &m, &p, &a[1], &af[1], &aq[1], &ar[1], &lda, &
00377 taua[1], &b[1], &bf[1], &bz[1], &bt[1], &bwk[1], &
00378 ldb, &taub[1], &work[1], &lwork, &rwork[1],
00379 result);
00380
00381
00382
00383
00384 i__4 = nt;
00385 for (i__ = 1; i__ <= i__4; ++i__) {
00386 if (result[i__ - 1] >= *thresh) {
00387 if (nfail == 0 && firstt) {
00388 firstt = FALSE_;
00389 alahdg_(nout, path);
00390 }
00391 io___38.ciunit = *nout;
00392 s_wsfe(&io___38);
00393 do_fio(&c__1, (char *)&n, (ftnlen)sizeof(integer))
00394 ;
00395 do_fio(&c__1, (char *)&m, (ftnlen)sizeof(integer))
00396 ;
00397 do_fio(&c__1, (char *)&p, (ftnlen)sizeof(integer))
00398 ;
00399 do_fio(&c__1, (char *)&imat, (ftnlen)sizeof(
00400 integer));
00401 do_fio(&c__1, (char *)&i__, (ftnlen)sizeof(
00402 integer));
00403 do_fio(&c__1, (char *)&result[i__ - 1], (ftnlen)
00404 sizeof(doublereal));
00405 e_wsfe();
00406 ++nfail;
00407 }
00408
00409 }
00410 nrun += nt;
00411
00412 L30:
00413 ;
00414 }
00415
00416 }
00417
00418 }
00419
00420 }
00421
00422
00423
00424 alasum_(path, nout, &nfail, &nrun, &c__0);
00425
00426 return 0;
00427
00428
00429
00430 }