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