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