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