00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013 #include "f2c.h"
00014 #include "blaswrap.h"
00015
00016
00017
00018 struct {
00019 integer infot, nunit;
00020 logical ok, lerr;
00021 } infoc_;
00022
00023 #define infoc_1 infoc_
00024
00025 struct {
00026 char srnamt[32];
00027 } srnamc_;
00028
00029 #define srnamc_1 srnamc_
00030
00031
00032
00033 static integer c__1 = 1;
00034 static integer c__3 = 3;
00035 static integer c__12 = 12;
00036 static integer c__0 = 0;
00037 static integer c__132 = 132;
00038 static integer c__16 = 16;
00039 static integer c__5 = 5;
00040 static integer c__8 = 8;
00041 static integer c__2 = 2;
00042 static integer c__6 = 6;
00043
00044 int MAIN__(void)
00045 {
00046
00047
00048 static char intstr[10] = "0123456789";
00049
00050
00051 static char fmt_9994[] = "(\002 Tests of the COMPLEX*16 LAPACK ZCGESV/ZC"
00052 "POSV routines \002,/\002 LAPACK VERSION \002,i1,\002.\002,i1,"
00053 "\002.\002,i1,//\002 The following parameter values will be used"
00054 ":\002)";
00055 static char fmt_9996[] = "(\002 Invalid input value: \002,a4,\002=\002,i"
00056 "6,\002; must be >=\002,i6)";
00057 static char fmt_9995[] = "(\002 Invalid input value: \002,a4,\002=\002,i"
00058 "6,\002; must be <=\002,i6)";
00059 static char fmt_9993[] = "(4x,a4,\002: \002,10i6,/11x,10i6)";
00060 static char fmt_9992[] = "(/\002 Routines pass computational tests if te"
00061 "st ratio is \002,\002less than\002,f8.2,/)";
00062 static char fmt_9999[] = "(/\002 Execution not attempted due to input er"
00063 "rors\002)";
00064 static char fmt_9991[] = "(\002 Relative machine \002,a,\002 is taken to"
00065 " be\002,d16.6)";
00066 static char fmt_9990[] = "(/1x,a6,\002 routines were not tested\002)";
00067 static char fmt_9989[] = "(/1x,a6,\002 driver routines were not teste"
00068 "d\002)";
00069 static char fmt_9998[] = "(/\002 End of tests\002)";
00070 static char fmt_9997[] = "(\002 Total time used = \002,f12.2,\002 seco"
00071 "nds\002,/)";
00072
00073
00074 integer i__1;
00075 doublereal d__1;
00076 cilist ci__1;
00077 cllist cl__1;
00078
00079
00080 integer s_rsle(cilist *), e_rsle(void), s_wsfe(cilist *), do_fio(integer *
00081 , char *, ftnlen), e_wsfe(void), do_lio(integer *, integer *,
00082 char *, ftnlen);
00083 int s_stop(char *, ftnlen);
00084 integer s_wsle(cilist *), e_wsle(void), s_rsfe(cilist *), e_rsfe(void);
00085 int s_copy(char *, char *, ftnlen, ftnlen);
00086 integer f_clos(cllist *);
00087
00088
00089 doublecomplex a[34848] , b[4224]
00090 ;
00091 integer i__, k;
00092 char c1[1], c2[2];
00093 doublereal s1, s2;
00094 integer ic, nm, vers_patch__, vers_major__, vers_minor__, lda;
00095 doublereal eps;
00096 integer nns;
00097 char path[3];
00098 integer mval[12], nrhs;
00099 real seps;
00100 doublecomplex work[4224];
00101 logical fatal;
00102 char aline[72];
00103 extern logical lsame_(char *, char *);
00104 integer nmats, nsval[12], iwork[132];
00105 doublereal rwork[132];
00106 complex swork[19536];
00107 extern doublereal dlamch_(char *), dsecnd_(void);
00108 extern int alareq_(char *, integer *, logical *, integer
00109 *, integer *, integer *);
00110 extern doublereal slamch_(char *);
00111 extern logical lsamen_(integer *, char *, char *);
00112 extern int ilaver_(integer *, integer *, integer *),
00113 zerrab_(integer *), zerrac_(integer *), zdrvab_(logical *,
00114 integer *, integer *, integer *, integer *, doublereal *, integer
00115 *, doublecomplex *, doublecomplex *, doublecomplex *,
00116 doublecomplex *, doublecomplex *, doublereal *, complex *,
00117 integer *, integer *), zdrvac_(logical *, integer *, integer *,
00118 integer *, integer *, doublereal *, integer *, doublecomplex *,
00119 doublecomplex *, doublecomplex *, doublecomplex *, doublecomplex *
00120 , doublereal *, complex *, integer *);
00121 doublereal thresh;
00122 logical dotype[30];
00123 integer ntypes;
00124 logical tsterr, tstdrv;
00125
00126
00127 static cilist io___5 = { 0, 5, 0, 0, 0 };
00128 static cilist io___9 = { 0, 6, 0, fmt_9994, 0 };
00129 static cilist io___10 = { 0, 5, 0, 0, 0 };
00130 static cilist io___12 = { 0, 6, 0, fmt_9996, 0 };
00131 static cilist io___13 = { 0, 6, 0, fmt_9995, 0 };
00132 static cilist io___14 = { 0, 5, 0, 0, 0 };
00133 static cilist io___17 = { 0, 6, 0, fmt_9996, 0 };
00134 static cilist io___18 = { 0, 6, 0, fmt_9995, 0 };
00135 static cilist io___19 = { 0, 6, 0, fmt_9993, 0 };
00136 static cilist io___20 = { 0, 5, 0, 0, 0 };
00137 static cilist io___22 = { 0, 6, 0, fmt_9996, 0 };
00138 static cilist io___23 = { 0, 6, 0, fmt_9995, 0 };
00139 static cilist io___24 = { 0, 5, 0, 0, 0 };
00140 static cilist io___26 = { 0, 6, 0, fmt_9996, 0 };
00141 static cilist io___27 = { 0, 6, 0, fmt_9995, 0 };
00142 static cilist io___28 = { 0, 6, 0, fmt_9993, 0 };
00143 static cilist io___29 = { 0, 5, 0, 0, 0 };
00144 static cilist io___31 = { 0, 6, 0, fmt_9992, 0 };
00145 static cilist io___32 = { 0, 5, 0, 0, 0 };
00146 static cilist io___34 = { 0, 5, 0, 0, 0 };
00147 static cilist io___36 = { 0, 6, 0, fmt_9999, 0 };
00148 static cilist io___38 = { 0, 6, 0, fmt_9991, 0 };
00149 static cilist io___39 = { 0, 6, 0, fmt_9991, 0 };
00150 static cilist io___40 = { 0, 6, 0, fmt_9991, 0 };
00151 static cilist io___41 = { 0, 6, 0, 0, 0 };
00152 static cilist io___43 = { 0, 6, 0, fmt_9991, 0 };
00153 static cilist io___44 = { 0, 6, 0, fmt_9991, 0 };
00154 static cilist io___45 = { 0, 6, 0, fmt_9991, 0 };
00155 static cilist io___46 = { 0, 6, 0, 0, 0 };
00156 static cilist io___55 = { 0, 6, 0, fmt_9990, 0 };
00157 static cilist io___56 = { 0, 6, 0, fmt_9990, 0 };
00158 static cilist io___65 = { 0, 6, 0, fmt_9989, 0 };
00159 static cilist io___66 = { 0, 6, 0, fmt_9989, 0 };
00160 static cilist io___68 = { 0, 6, 0, fmt_9998, 0 };
00161 static cilist io___69 = { 0, 6, 0, fmt_9997, 0 };
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 s1 = dsecnd_();
00232 lda = 132;
00233 fatal = FALSE_;
00234
00235
00236
00237 s_rsle(&io___5);
00238 e_rsle();
00239
00240
00241
00242 ilaver_(&vers_major__, &vers_minor__, &vers_patch__);
00243 s_wsfe(&io___9);
00244 do_fio(&c__1, (char *)&vers_major__, (ftnlen)sizeof(integer));
00245 do_fio(&c__1, (char *)&vers_minor__, (ftnlen)sizeof(integer));
00246 do_fio(&c__1, (char *)&vers_patch__, (ftnlen)sizeof(integer));
00247 e_wsfe();
00248
00249
00250
00251 s_rsle(&io___10);
00252 do_lio(&c__3, &c__1, (char *)&nm, (ftnlen)sizeof(integer));
00253 e_rsle();
00254 if (nm < 1) {
00255 s_wsfe(&io___12);
00256 do_fio(&c__1, " NM ", (ftnlen)4);
00257 do_fio(&c__1, (char *)&nm, (ftnlen)sizeof(integer));
00258 do_fio(&c__1, (char *)&c__1, (ftnlen)sizeof(integer));
00259 e_wsfe();
00260 nm = 0;
00261 fatal = TRUE_;
00262 } else if (nm > 12) {
00263 s_wsfe(&io___13);
00264 do_fio(&c__1, " NM ", (ftnlen)4);
00265 do_fio(&c__1, (char *)&nm, (ftnlen)sizeof(integer));
00266 do_fio(&c__1, (char *)&c__12, (ftnlen)sizeof(integer));
00267 e_wsfe();
00268 nm = 0;
00269 fatal = TRUE_;
00270 }
00271 s_rsle(&io___14);
00272 i__1 = nm;
00273 for (i__ = 1; i__ <= i__1; ++i__) {
00274 do_lio(&c__3, &c__1, (char *)&mval[i__ - 1], (ftnlen)sizeof(integer));
00275 }
00276 e_rsle();
00277 i__1 = nm;
00278 for (i__ = 1; i__ <= i__1; ++i__) {
00279 if (mval[i__ - 1] < 0) {
00280 s_wsfe(&io___17);
00281 do_fio(&c__1, " M ", (ftnlen)4);
00282 do_fio(&c__1, (char *)&mval[i__ - 1], (ftnlen)sizeof(integer));
00283 do_fio(&c__1, (char *)&c__0, (ftnlen)sizeof(integer));
00284 e_wsfe();
00285 fatal = TRUE_;
00286 } else if (mval[i__ - 1] > 132) {
00287 s_wsfe(&io___18);
00288 do_fio(&c__1, " M ", (ftnlen)4);
00289 do_fio(&c__1, (char *)&mval[i__ - 1], (ftnlen)sizeof(integer));
00290 do_fio(&c__1, (char *)&c__132, (ftnlen)sizeof(integer));
00291 e_wsfe();
00292 fatal = TRUE_;
00293 }
00294
00295 }
00296 if (nm > 0) {
00297 s_wsfe(&io___19);
00298 do_fio(&c__1, "M ", (ftnlen)4);
00299 i__1 = nm;
00300 for (i__ = 1; i__ <= i__1; ++i__) {
00301 do_fio(&c__1, (char *)&mval[i__ - 1], (ftnlen)sizeof(integer));
00302 }
00303 e_wsfe();
00304 }
00305
00306
00307
00308 s_rsle(&io___20);
00309 do_lio(&c__3, &c__1, (char *)&nns, (ftnlen)sizeof(integer));
00310 e_rsle();
00311 if (nns < 1) {
00312 s_wsfe(&io___22);
00313 do_fio(&c__1, " NNS", (ftnlen)4);
00314 do_fio(&c__1, (char *)&nns, (ftnlen)sizeof(integer));
00315 do_fio(&c__1, (char *)&c__1, (ftnlen)sizeof(integer));
00316 e_wsfe();
00317 nns = 0;
00318 fatal = TRUE_;
00319 } else if (nns > 12) {
00320 s_wsfe(&io___23);
00321 do_fio(&c__1, " NNS", (ftnlen)4);
00322 do_fio(&c__1, (char *)&nns, (ftnlen)sizeof(integer));
00323 do_fio(&c__1, (char *)&c__12, (ftnlen)sizeof(integer));
00324 e_wsfe();
00325 nns = 0;
00326 fatal = TRUE_;
00327 }
00328 s_rsle(&io___24);
00329 i__1 = nns;
00330 for (i__ = 1; i__ <= i__1; ++i__) {
00331 do_lio(&c__3, &c__1, (char *)&nsval[i__ - 1], (ftnlen)sizeof(integer))
00332 ;
00333 }
00334 e_rsle();
00335 i__1 = nns;
00336 for (i__ = 1; i__ <= i__1; ++i__) {
00337 if (nsval[i__ - 1] < 0) {
00338 s_wsfe(&io___26);
00339 do_fio(&c__1, "NRHS", (ftnlen)4);
00340 do_fio(&c__1, (char *)&nsval[i__ - 1], (ftnlen)sizeof(integer));
00341 do_fio(&c__1, (char *)&c__0, (ftnlen)sizeof(integer));
00342 e_wsfe();
00343 fatal = TRUE_;
00344 } else if (nsval[i__ - 1] > 16) {
00345 s_wsfe(&io___27);
00346 do_fio(&c__1, "NRHS", (ftnlen)4);
00347 do_fio(&c__1, (char *)&nsval[i__ - 1], (ftnlen)sizeof(integer));
00348 do_fio(&c__1, (char *)&c__16, (ftnlen)sizeof(integer));
00349 e_wsfe();
00350 fatal = TRUE_;
00351 }
00352
00353 }
00354 if (nns > 0) {
00355 s_wsfe(&io___28);
00356 do_fio(&c__1, "NRHS", (ftnlen)4);
00357 i__1 = nns;
00358 for (i__ = 1; i__ <= i__1; ++i__) {
00359 do_fio(&c__1, (char *)&nsval[i__ - 1], (ftnlen)sizeof(integer));
00360 }
00361 e_wsfe();
00362 }
00363
00364
00365
00366 s_rsle(&io___29);
00367 do_lio(&c__5, &c__1, (char *)&thresh, (ftnlen)sizeof(doublereal));
00368 e_rsle();
00369 s_wsfe(&io___31);
00370 do_fio(&c__1, (char *)&thresh, (ftnlen)sizeof(doublereal));
00371 e_wsfe();
00372
00373
00374
00375 s_rsle(&io___32);
00376 do_lio(&c__8, &c__1, (char *)&tstdrv, (ftnlen)sizeof(logical));
00377 e_rsle();
00378
00379
00380
00381 s_rsle(&io___34);
00382 do_lio(&c__8, &c__1, (char *)&tsterr, (ftnlen)sizeof(logical));
00383 e_rsle();
00384
00385 if (fatal) {
00386 s_wsfe(&io___36);
00387 e_wsfe();
00388 s_stop("", (ftnlen)0);
00389 }
00390
00391
00392
00393 seps = slamch_("Underflow threshold");
00394 s_wsfe(&io___38);
00395 do_fio(&c__1, "(single precision) underflow", (ftnlen)28);
00396 do_fio(&c__1, (char *)&seps, (ftnlen)sizeof(real));
00397 e_wsfe();
00398 seps = slamch_("Overflow threshold");
00399 s_wsfe(&io___39);
00400 do_fio(&c__1, "(single precision) overflow ", (ftnlen)28);
00401 do_fio(&c__1, (char *)&seps, (ftnlen)sizeof(real));
00402 e_wsfe();
00403 seps = slamch_("Epsilon");
00404 s_wsfe(&io___40);
00405 do_fio(&c__1, "(single precision) precision", (ftnlen)28);
00406 do_fio(&c__1, (char *)&seps, (ftnlen)sizeof(real));
00407 e_wsfe();
00408 s_wsle(&io___41);
00409 e_wsle();
00410
00411 eps = dlamch_("Underflow threshold");
00412 s_wsfe(&io___43);
00413 do_fio(&c__1, "(double precision) underflow", (ftnlen)28);
00414 do_fio(&c__1, (char *)&eps, (ftnlen)sizeof(doublereal));
00415 e_wsfe();
00416 eps = dlamch_("Overflow threshold");
00417 s_wsfe(&io___44);
00418 do_fio(&c__1, "(double precision) overflow ", (ftnlen)28);
00419 do_fio(&c__1, (char *)&eps, (ftnlen)sizeof(doublereal));
00420 e_wsfe();
00421 eps = dlamch_("Epsilon");
00422 s_wsfe(&io___45);
00423 do_fio(&c__1, "(double precision) precision", (ftnlen)28);
00424 do_fio(&c__1, (char *)&eps, (ftnlen)sizeof(doublereal));
00425 e_wsfe();
00426 s_wsle(&io___46);
00427 e_wsle();
00428
00429 L80:
00430
00431
00432
00433 ci__1.cierr = 0;
00434 ci__1.ciend = 1;
00435 ci__1.ciunit = 5;
00436 ci__1.cifmt = "(A72)";
00437 i__1 = s_rsfe(&ci__1);
00438 if (i__1 != 0) {
00439 goto L140;
00440 }
00441 i__1 = do_fio(&c__1, aline, (ftnlen)72);
00442 if (i__1 != 0) {
00443 goto L140;
00444 }
00445 i__1 = e_rsfe();
00446 if (i__1 != 0) {
00447 goto L140;
00448 }
00449 s_copy(path, aline, (ftnlen)3, (ftnlen)3);
00450 nmats = 30;
00451 i__ = 3;
00452 L90:
00453 ++i__;
00454 if (i__ > 72) {
00455 nmats = 30;
00456 goto L130;
00457 }
00458 if (*(unsigned char *)&aline[i__ - 1] == ' ') {
00459 goto L90;
00460 }
00461 nmats = 0;
00462 L100:
00463 *(unsigned char *)c1 = *(unsigned char *)&aline[i__ - 1];
00464 for (k = 1; k <= 10; ++k) {
00465 if (*(unsigned char *)c1 == *(unsigned char *)&intstr[k - 1]) {
00466 ic = k - 1;
00467 goto L120;
00468 }
00469
00470 }
00471 goto L130;
00472 L120:
00473 nmats = nmats * 10 + ic;
00474 ++i__;
00475 if (i__ > 72) {
00476 goto L130;
00477 }
00478 goto L100;
00479 L130:
00480 *(unsigned char *)c1 = *(unsigned char *)path;
00481 s_copy(c2, path + 1, (ftnlen)2, (ftnlen)2);
00482 nrhs = nsval[0];
00483 nrhs = nsval[0];
00484
00485
00486
00487 if (! lsame_(c1, "Zomplex precision")) {
00488 s_wsfe(&io___55);
00489 do_fio(&c__1, path, (ftnlen)3);
00490 e_wsfe();
00491
00492 } else if (nmats <= 0) {
00493
00494
00495
00496 s_wsfe(&io___56);
00497 do_fio(&c__1, "ZCGESV", (ftnlen)6);
00498 e_wsfe();
00499 goto L140;
00500
00501 } else if (lsamen_(&c__2, c2, "GE")) {
00502
00503
00504
00505 ntypes = 11;
00506 alareq_("ZGE", &nmats, dotype, &ntypes, &c__5, &c__6);
00507
00508
00509
00510 if (tsterr) {
00511 zerrab_(&c__6);
00512 }
00513
00514 if (tstdrv) {
00515 zdrvab_(dotype, &nm, mval, &nns, nsval, &thresh, &lda, a, &a[
00516 17424], b, &b[2112], work, rwork, swork, iwork, &c__6);
00517 } else {
00518 s_wsfe(&io___65);
00519 do_fio(&c__1, "ZCGESV", (ftnlen)6);
00520 e_wsfe();
00521 }
00522
00523 } else if (lsamen_(&c__2, c2, "PO")) {
00524
00525
00526
00527 ntypes = 9;
00528 alareq_("DPO", &nmats, dotype, &ntypes, &c__5, &c__6);
00529
00530 if (tsterr) {
00531 zerrac_(&c__6);
00532 }
00533
00534
00535 if (tstdrv) {
00536 zdrvac_(dotype, &nm, mval, &nns, nsval, &thresh, &lda, a, &a[
00537 17424], b, &b[2112], work, rwork, swork, &c__6);
00538 } else {
00539 s_wsfe(&io___66);
00540 do_fio(&c__1, "ZCPOSV", (ftnlen)6);
00541 e_wsfe();
00542 }
00543
00544 } else {
00545
00546 }
00547
00548
00549
00550 goto L80;
00551
00552
00553
00554 L140:
00555 cl__1.cerr = 0;
00556 cl__1.cunit = 5;
00557 cl__1.csta = 0;
00558 f_clos(&cl__1);
00559 s2 = dsecnd_();
00560 s_wsfe(&io___68);
00561 e_wsfe();
00562 s_wsfe(&io___69);
00563 d__1 = s2 - s1;
00564 do_fio(&c__1, (char *)&d__1, (ftnlen)sizeof(doublereal));
00565 e_wsfe();
00566
00567
00568
00569
00570
00571 return 0;
00572 }
00573
00574 int zchkab_ () { MAIN__ (); return 0; }