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__1 = 1;
00019 static integer c__3 = 3;
00020 static integer c__12 = 12;
00021 static integer c__0 = 0;
00022 static integer c__50 = 50;
00023 static integer c__16 = 16;
00024 static integer c__9 = 9;
00025 static integer c__5 = 5;
00026 static integer c__8 = 8;
00027 static integer c__6 = 6;
00028
00029 int MAIN__(void)
00030 {
00031
00032 static char fmt_9994[] = "(/\002 Tests of the COMPLEX*16 LAPACK RFP rout"
00033 "ines \002,/\002 LAPACK VERSION \002,i1,\002.\002,i1,\002.\002,i1"
00034 ",//\002 The following parameter values will be used:\002)";
00035 static char fmt_9996[] = "(\002 !! Invalid input value: \002,a4,\002="
00036 "\002,i6,\002; must be >=\002,i6)";
00037 static char fmt_9995[] = "(\002 !! Invalid input value: \002,a4,\002="
00038 "\002,i6,\002; must be <=\002,i6)";
00039 static char fmt_9993[] = "(4x,a4,\002: \002,10i6,/11x,10i6)";
00040 static char fmt_9992[] = "(/\002 Routines pass computational tests if te"
00041 "st ratio is \002,\002less than\002,f8.2,/)";
00042 static char fmt_9999[] = "(/\002 Execution not attempted due to input er"
00043 "rors\002)";
00044 static char fmt_9991[] = "(\002 Relative machine \002,a,\002 is taken to"
00045 " be\002,d16.6)";
00046 static char fmt_9998[] = "(/\002 End of tests\002)";
00047 static char fmt_9997[] = "(\002 Total time used = \002,f12.2,\002 seco"
00048 "nds\002,/)";
00049
00050
00051 integer i__1;
00052 doublereal d__1;
00053 cllist cl__1;
00054
00055
00056 integer s_rsle(cilist *), e_rsle(void), s_wsfe(cilist *), do_fio(integer *
00057 , char *, ftnlen), e_wsfe(void), do_lio(integer *, integer *,
00058 char *, ftnlen);
00059 int s_stop(char *, ftnlen);
00060 integer s_wsle(cilist *), e_wsle(void), f_clos(cllist *);
00061
00062
00063 doublecomplex workafac[2500] , workasav[2500]
00064 , workbsav[800] , workainv[
00065 2500] , workxact[800]
00066 ;
00067 integer i__;
00068 doublereal s1, s2;
00069 integer nn, vers_patch__, vers_major__, vers_minor__;
00070 doublecomplex workarfinv[1275];
00071 doublereal eps;
00072 integer nns, nnt, nval[12];
00073 doublereal d_work_zpot02__[50], d_work_zpot03__[50];
00074 doublecomplex z_work_zpot01__[50];
00075 logical fatal;
00076 doublecomplex z_work_zpot02__[800] , z_work_zpot03__[
00077 2500] ;
00078 integer nsval[12], ntval[9];
00079 doublecomplex worka[2500] , workb[800]
00080 , workx[800] ;
00081 doublereal d_work_zlanhe__[50], d_work_zlatms__[50];
00082 extern doublereal dlamch_(char *), dsecnd_(void);
00083 doublecomplex z_work_zlatms__[150];
00084 extern int ilaver_(integer *, integer *, integer *);
00085 doublereal thresh;
00086 doublecomplex workap[1275];
00087 logical tsterr;
00088 extern int zdrvrf1_(integer *, integer *, integer *,
00089 doublereal *, doublecomplex *, integer *, doublecomplex *,
00090 doublereal *), zdrvrf2_(integer *, integer *, integer *,
00091 doublecomplex *, integer *, doublecomplex *, doublecomplex *,
00092 doublecomplex *), zdrvrf3_(integer *, integer *, integer *,
00093 doublereal *, doublecomplex *, integer *, doublecomplex *,
00094 doublecomplex *, doublecomplex *, doublereal *, doublecomplex *,
00095 doublecomplex *), zdrvrf4_(integer *, integer *, integer *,
00096 doublereal *, doublecomplex *, doublecomplex *, integer *,
00097 doublecomplex *, doublecomplex *, integer *, doublereal *);
00098 doublecomplex workarf[1275];
00099 extern int zerrrfp_(integer *), zdrvrfp_(integer *,
00100 integer *, integer *, integer *, integer *, integer *, integer *,
00101 doublereal *, doublecomplex *, doublecomplex *, doublecomplex *,
00102 doublecomplex *, doublecomplex *, doublecomplex *, doublecomplex *
00103 , doublecomplex *, doublecomplex *, doublecomplex *,
00104 doublecomplex *, doublecomplex *, doublecomplex *, doublecomplex *
00105 , doublereal *, doublereal *, doublereal *, doublereal *);
00106
00107
00108 static cilist io___3 = { 0, 5, 0, 0, 0 };
00109 static cilist io___7 = { 0, 6, 0, fmt_9994, 0 };
00110 static cilist io___8 = { 0, 5, 0, 0, 0 };
00111 static cilist io___10 = { 0, 6, 0, fmt_9996, 0 };
00112 static cilist io___11 = { 0, 6, 0, fmt_9995, 0 };
00113 static cilist io___12 = { 0, 5, 0, 0, 0 };
00114 static cilist io___15 = { 0, 6, 0, fmt_9996, 0 };
00115 static cilist io___16 = { 0, 6, 0, fmt_9995, 0 };
00116 static cilist io___17 = { 0, 6, 0, fmt_9993, 0 };
00117 static cilist io___18 = { 0, 5, 0, 0, 0 };
00118 static cilist io___20 = { 0, 6, 0, fmt_9996, 0 };
00119 static cilist io___21 = { 0, 6, 0, fmt_9995, 0 };
00120 static cilist io___22 = { 0, 5, 0, 0, 0 };
00121 static cilist io___24 = { 0, 6, 0, fmt_9996, 0 };
00122 static cilist io___25 = { 0, 6, 0, fmt_9995, 0 };
00123 static cilist io___26 = { 0, 6, 0, fmt_9993, 0 };
00124 static cilist io___27 = { 0, 5, 0, 0, 0 };
00125 static cilist io___29 = { 0, 6, 0, fmt_9996, 0 };
00126 static cilist io___30 = { 0, 6, 0, fmt_9995, 0 };
00127 static cilist io___31 = { 0, 5, 0, 0, 0 };
00128 static cilist io___33 = { 0, 6, 0, fmt_9996, 0 };
00129 static cilist io___34 = { 0, 6, 0, fmt_9995, 0 };
00130 static cilist io___35 = { 0, 6, 0, fmt_9993, 0 };
00131 static cilist io___36 = { 0, 5, 0, 0, 0 };
00132 static cilist io___38 = { 0, 6, 0, fmt_9992, 0 };
00133 static cilist io___39 = { 0, 5, 0, 0, 0 };
00134 static cilist io___41 = { 0, 6, 0, fmt_9999, 0 };
00135 static cilist io___42 = { 0, 6, 0, fmt_9999, 0 };
00136 static cilist io___44 = { 0, 6, 0, fmt_9991, 0 };
00137 static cilist io___45 = { 0, 6, 0, fmt_9991, 0 };
00138 static cilist io___46 = { 0, 6, 0, fmt_9991, 0 };
00139 static cilist io___47 = { 0, 6, 0, 0, 0 };
00140 static cilist io___68 = { 0, 6, 0, fmt_9998, 0 };
00141 static cilist io___69 = { 0, 6, 0, fmt_9997, 0 };
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 s1 = dsecnd_();
00192 fatal = FALSE_;
00193
00194
00195
00196 s_rsle(&io___3);
00197 e_rsle();
00198
00199
00200
00201 ilaver_(&vers_major__, &vers_minor__, &vers_patch__);
00202 s_wsfe(&io___7);
00203 do_fio(&c__1, (char *)&vers_major__, (ftnlen)sizeof(integer));
00204 do_fio(&c__1, (char *)&vers_minor__, (ftnlen)sizeof(integer));
00205 do_fio(&c__1, (char *)&vers_patch__, (ftnlen)sizeof(integer));
00206 e_wsfe();
00207
00208
00209
00210 s_rsle(&io___8);
00211 do_lio(&c__3, &c__1, (char *)&nn, (ftnlen)sizeof(integer));
00212 e_rsle();
00213 if (nn < 1) {
00214 s_wsfe(&io___10);
00215 do_fio(&c__1, " NN ", (ftnlen)4);
00216 do_fio(&c__1, (char *)&nn, (ftnlen)sizeof(integer));
00217 do_fio(&c__1, (char *)&c__1, (ftnlen)sizeof(integer));
00218 e_wsfe();
00219 nn = 0;
00220 fatal = TRUE_;
00221 } else if (nn > 12) {
00222 s_wsfe(&io___11);
00223 do_fio(&c__1, " NN ", (ftnlen)4);
00224 do_fio(&c__1, (char *)&nn, (ftnlen)sizeof(integer));
00225 do_fio(&c__1, (char *)&c__12, (ftnlen)sizeof(integer));
00226 e_wsfe();
00227 nn = 0;
00228 fatal = TRUE_;
00229 }
00230 s_rsle(&io___12);
00231 i__1 = nn;
00232 for (i__ = 1; i__ <= i__1; ++i__) {
00233 do_lio(&c__3, &c__1, (char *)&nval[i__ - 1], (ftnlen)sizeof(integer));
00234 }
00235 e_rsle();
00236 i__1 = nn;
00237 for (i__ = 1; i__ <= i__1; ++i__) {
00238 if (nval[i__ - 1] < 0) {
00239 s_wsfe(&io___15);
00240 do_fio(&c__1, " M ", (ftnlen)4);
00241 do_fio(&c__1, (char *)&nval[i__ - 1], (ftnlen)sizeof(integer));
00242 do_fio(&c__1, (char *)&c__0, (ftnlen)sizeof(integer));
00243 e_wsfe();
00244 fatal = TRUE_;
00245 } else if (nval[i__ - 1] > 50) {
00246 s_wsfe(&io___16);
00247 do_fio(&c__1, " M ", (ftnlen)4);
00248 do_fio(&c__1, (char *)&nval[i__ - 1], (ftnlen)sizeof(integer));
00249 do_fio(&c__1, (char *)&c__50, (ftnlen)sizeof(integer));
00250 e_wsfe();
00251 fatal = TRUE_;
00252 }
00253
00254 }
00255 if (nn > 0) {
00256 s_wsfe(&io___17);
00257 do_fio(&c__1, "N ", (ftnlen)4);
00258 i__1 = nn;
00259 for (i__ = 1; i__ <= i__1; ++i__) {
00260 do_fio(&c__1, (char *)&nval[i__ - 1], (ftnlen)sizeof(integer));
00261 }
00262 e_wsfe();
00263 }
00264
00265
00266
00267 s_rsle(&io___18);
00268 do_lio(&c__3, &c__1, (char *)&nns, (ftnlen)sizeof(integer));
00269 e_rsle();
00270 if (nns < 1) {
00271 s_wsfe(&io___20);
00272 do_fio(&c__1, " NNS", (ftnlen)4);
00273 do_fio(&c__1, (char *)&nns, (ftnlen)sizeof(integer));
00274 do_fio(&c__1, (char *)&c__1, (ftnlen)sizeof(integer));
00275 e_wsfe();
00276 nns = 0;
00277 fatal = TRUE_;
00278 } else if (nns > 12) {
00279 s_wsfe(&io___21);
00280 do_fio(&c__1, " NNS", (ftnlen)4);
00281 do_fio(&c__1, (char *)&nns, (ftnlen)sizeof(integer));
00282 do_fio(&c__1, (char *)&c__12, (ftnlen)sizeof(integer));
00283 e_wsfe();
00284 nns = 0;
00285 fatal = TRUE_;
00286 }
00287 s_rsle(&io___22);
00288 i__1 = nns;
00289 for (i__ = 1; i__ <= i__1; ++i__) {
00290 do_lio(&c__3, &c__1, (char *)&nsval[i__ - 1], (ftnlen)sizeof(integer))
00291 ;
00292 }
00293 e_rsle();
00294 i__1 = nns;
00295 for (i__ = 1; i__ <= i__1; ++i__) {
00296 if (nsval[i__ - 1] < 0) {
00297 s_wsfe(&io___24);
00298 do_fio(&c__1, "NRHS", (ftnlen)4);
00299 do_fio(&c__1, (char *)&nsval[i__ - 1], (ftnlen)sizeof(integer));
00300 do_fio(&c__1, (char *)&c__0, (ftnlen)sizeof(integer));
00301 e_wsfe();
00302 fatal = TRUE_;
00303 } else if (nsval[i__ - 1] > 16) {
00304 s_wsfe(&io___25);
00305 do_fio(&c__1, "NRHS", (ftnlen)4);
00306 do_fio(&c__1, (char *)&nsval[i__ - 1], (ftnlen)sizeof(integer));
00307 do_fio(&c__1, (char *)&c__16, (ftnlen)sizeof(integer));
00308 e_wsfe();
00309 fatal = TRUE_;
00310 }
00311
00312 }
00313 if (nns > 0) {
00314 s_wsfe(&io___26);
00315 do_fio(&c__1, "NRHS", (ftnlen)4);
00316 i__1 = nns;
00317 for (i__ = 1; i__ <= i__1; ++i__) {
00318 do_fio(&c__1, (char *)&nsval[i__ - 1], (ftnlen)sizeof(integer));
00319 }
00320 e_wsfe();
00321 }
00322
00323
00324
00325 s_rsle(&io___27);
00326 do_lio(&c__3, &c__1, (char *)&nnt, (ftnlen)sizeof(integer));
00327 e_rsle();
00328 if (nnt < 1) {
00329 s_wsfe(&io___29);
00330 do_fio(&c__1, " NMA", (ftnlen)4);
00331 do_fio(&c__1, (char *)&nnt, (ftnlen)sizeof(integer));
00332 do_fio(&c__1, (char *)&c__1, (ftnlen)sizeof(integer));
00333 e_wsfe();
00334 nnt = 0;
00335 fatal = TRUE_;
00336 } else if (nnt > 9) {
00337 s_wsfe(&io___30);
00338 do_fio(&c__1, " NMA", (ftnlen)4);
00339 do_fio(&c__1, (char *)&nnt, (ftnlen)sizeof(integer));
00340 do_fio(&c__1, (char *)&c__9, (ftnlen)sizeof(integer));
00341 e_wsfe();
00342 nnt = 0;
00343 fatal = TRUE_;
00344 }
00345 s_rsle(&io___31);
00346 i__1 = nnt;
00347 for (i__ = 1; i__ <= i__1; ++i__) {
00348 do_lio(&c__3, &c__1, (char *)&ntval[i__ - 1], (ftnlen)sizeof(integer))
00349 ;
00350 }
00351 e_rsle();
00352 i__1 = nnt;
00353 for (i__ = 1; i__ <= i__1; ++i__) {
00354 if (ntval[i__ - 1] < 0) {
00355 s_wsfe(&io___33);
00356 do_fio(&c__1, "TYPE", (ftnlen)4);
00357 do_fio(&c__1, (char *)&ntval[i__ - 1], (ftnlen)sizeof(integer));
00358 do_fio(&c__1, (char *)&c__0, (ftnlen)sizeof(integer));
00359 e_wsfe();
00360 fatal = TRUE_;
00361 } else if (ntval[i__ - 1] > 9) {
00362 s_wsfe(&io___34);
00363 do_fio(&c__1, "TYPE", (ftnlen)4);
00364 do_fio(&c__1, (char *)&ntval[i__ - 1], (ftnlen)sizeof(integer));
00365 do_fio(&c__1, (char *)&c__9, (ftnlen)sizeof(integer));
00366 e_wsfe();
00367 fatal = TRUE_;
00368 }
00369
00370 }
00371 if (nnt > 0) {
00372 s_wsfe(&io___35);
00373 do_fio(&c__1, "TYPE", (ftnlen)4);
00374 i__1 = nnt;
00375 for (i__ = 1; i__ <= i__1; ++i__) {
00376 do_fio(&c__1, (char *)&ntval[i__ - 1], (ftnlen)sizeof(integer));
00377 }
00378 e_wsfe();
00379 }
00380
00381
00382
00383 s_rsle(&io___36);
00384 do_lio(&c__5, &c__1, (char *)&thresh, (ftnlen)sizeof(doublereal));
00385 e_rsle();
00386 s_wsfe(&io___38);
00387 do_fio(&c__1, (char *)&thresh, (ftnlen)sizeof(doublereal));
00388 e_wsfe();
00389
00390
00391
00392 s_rsle(&io___39);
00393 do_lio(&c__8, &c__1, (char *)&tsterr, (ftnlen)sizeof(logical));
00394 e_rsle();
00395
00396 if (fatal) {
00397 s_wsfe(&io___41);
00398 e_wsfe();
00399 s_stop("", (ftnlen)0);
00400 }
00401
00402 if (fatal) {
00403 s_wsfe(&io___42);
00404 e_wsfe();
00405 s_stop("", (ftnlen)0);
00406 }
00407
00408
00409
00410 eps = dlamch_("Underflow threshold");
00411 s_wsfe(&io___44);
00412 do_fio(&c__1, "underflow", (ftnlen)9);
00413 do_fio(&c__1, (char *)&eps, (ftnlen)sizeof(doublereal));
00414 e_wsfe();
00415 eps = dlamch_("Overflow threshold");
00416 s_wsfe(&io___45);
00417 do_fio(&c__1, "overflow ", (ftnlen)9);
00418 do_fio(&c__1, (char *)&eps, (ftnlen)sizeof(doublereal));
00419 e_wsfe();
00420 eps = dlamch_("Epsilon");
00421 s_wsfe(&io___46);
00422 do_fio(&c__1, "precision", (ftnlen)9);
00423 do_fio(&c__1, (char *)&eps, (ftnlen)sizeof(doublereal));
00424 e_wsfe();
00425 s_wsle(&io___47);
00426 e_wsle();
00427
00428
00429
00430 if (tsterr) {
00431 zerrrfp_(&c__6);
00432 }
00433
00434
00435
00436
00437 zdrvrfp_(&c__6, &nn, nval, &nns, nsval, &nnt, ntval, &thresh, worka,
00438 workasav, workafac, workainv, workb, workbsav, workxact, workx,
00439 workarf, workarfinv, z_work_zlatms__, z_work_zpot01__,
00440 z_work_zpot02__, z_work_zpot03__, d_work_zlatms__,
00441 d_work_zlanhe__, d_work_zpot02__, d_work_zpot03__);
00442
00443
00444
00445 zdrvrf1_(&c__6, &nn, nval, &thresh, worka, &c__50, workarf,
00446 d_work_zlanhe__);
00447
00448
00449
00450
00451 zdrvrf2_(&c__6, &nn, nval, worka, &c__50, workarf, workap, workasav);
00452
00453
00454
00455 zdrvrf3_(&c__6, &nn, nval, &thresh, worka, &c__50, workarf, workainv,
00456 workafac, d_work_zlanhe__, z_work_zpot03__, z_work_zpot01__);
00457
00458
00459
00460 zdrvrf4_(&c__6, &nn, nval, &thresh, worka, workafac, &c__50, workarf,
00461 workainv, &c__50, d_work_zlanhe__);
00462
00463 cl__1.cerr = 0;
00464 cl__1.cunit = 5;
00465 cl__1.csta = 0;
00466 f_clos(&cl__1);
00467 s2 = dsecnd_();
00468 s_wsfe(&io___68);
00469 e_wsfe();
00470 s_wsfe(&io___69);
00471 d__1 = s2 - s1;
00472 do_fio(&c__1, (char *)&d__1, (ftnlen)sizeof(doublereal));
00473 e_wsfe();
00474
00475
00476
00477
00478 return 0;
00479 }
00480
00481 int zchkrfp_ () { MAIN__ (); return 0; }