schkec.c
Go to the documentation of this file.
00001 /* schkec.f -- translated by f2c (version 20061008).
00002    You must link the resulting object file with libf2c:
00003         on Microsoft Windows system, link with libf2c.lib;
00004         on Linux or Unix systems, link with .../path/to/libf2c.a -lm
00005         or, if you install libf2c.a in a standard place, with -lf2c -lm
00006         -- in that order, at the end of the command line, as in
00007                 cc *.o -lf2c -lm
00008         Source for libf2c is in /netlib/f2c/libf2c.zip, e.g.,
00009 
00010                 http://www.netlib.org/f2c/libf2c.zip
00011 */
00012 
00013 #include "f2c.h"
00014 #include "blaswrap.h"
00015 
00016 /* Table of constant values */
00017 
00018 static integer c__1 = 1;
00019 static integer c__2 = 2;
00020 static integer c__3 = 3;
00021 
00022 /* Subroutine */ int schkec_(real *thresh, logical *tsterr, integer *nin, 
00023         integer *nout)
00024 {
00025     /* Format strings */
00026     static char fmt_9989[] = "(\002 Tests of the Nonsymmetric eigenproblem c"
00027             "ondition estim\002,\002ation routines\002,/\002 SLALN2, SLASY2, "
00028             "SLANV2, SLAEXC, STRS\002,\002YL, STREXC, STRSNA, STRSEN, SLAQT"
00029             "R\002,/)";
00030     static char fmt_9988[] = "(\002 Relative machine precision (EPS) = \002,"
00031             "e16.6,/\002 Safe \002,\002minimum (SFMIN)             = \002,e16"
00032             ".6,/)";
00033     static char fmt_9987[] = "(\002 Routines pass computational tests if tes"
00034             "t ratio is les\002,\002s than\002,f8.2,//)";
00035     static char fmt_9999[] = "(\002 Error in SLALN2: RMAX =\002,e12.3,/\002 "
00036             "LMAX = \002,i8,\002 N\002,\002INFO=\002,2i8,\002 KNT=\002,i8)";
00037     static char fmt_9998[] = "(\002 Error in SLASY2: RMAX =\002,e12.3,/\002 "
00038             "LMAX = \002,i8,\002 N\002,\002INFO=\002,i8,\002 KNT=\002,i8)";
00039     static char fmt_9997[] = "(\002 Error in SLANV2: RMAX =\002,e12.3,/\002 "
00040             "LMAX = \002,i8,\002 N\002,\002INFO=\002,i8,\002 KNT=\002,i8)";
00041     static char fmt_9996[] = "(\002 Error in SLAEXC: RMAX =\002,e12.3,/\002 "
00042             "LMAX = \002,i8,\002 N\002,\002INFO=\002,2i8,\002 KNT=\002,i8)";
00043     static char fmt_9995[] = "(\002 Error in STRSYL: RMAX =\002,e12.3,/\002 "
00044             "LMAX = \002,i8,\002 N\002,\002INFO=\002,i8,\002 KNT=\002,i8)";
00045     static char fmt_9994[] = "(\002 Error in STREXC: RMAX =\002,e12.3,/\002 "
00046             "LMAX = \002,i8,\002 N\002,\002INFO=\002,3i8,\002 KNT=\002,i8)";
00047     static char fmt_9993[] = "(\002 Error in STRSNA: RMAX =\002,3e12.3,/\002"
00048             " LMAX = \002,3i8,\002 NINFO=\002,3i8,\002 KNT=\002,i8)";
00049     static char fmt_9992[] = "(\002 Error in STRSEN: RMAX =\002,3e12.3,/\002"
00050             " LMAX = \002,3i8,\002 NINFO=\002,3i8,\002 KNT=\002,i8)";
00051     static char fmt_9991[] = "(\002 Error in SLAQTR: RMAX =\002,e12.3,/\002 "
00052             "LMAX = \002,i8,\002 N\002,\002INFO=\002,i8,\002 KNT=\002,i8)";
00053     static char fmt_9990[] = "(/1x,\002All tests for \002,a3,\002 routines p"
00054             "assed the thresh\002,\002old (\002,i6,\002 tests run)\002)";
00055 
00056     /* Builtin functions */
00057     /* Subroutine */ int s_copy(char *, char *, ftnlen, ftnlen);
00058     integer s_wsfe(cilist *), e_wsfe(void), do_fio(integer *, char *, ftnlen);
00059 
00060     /* Local variables */
00061     logical ok;
00062     real eps;
00063     char path[3];
00064     extern /* Subroutine */ int sget31_(real *, integer *, integer *, integer 
00065             *), sget32_(real *, integer *, integer *, integer *), sget33_(
00066             real *, integer *, integer *, integer *), sget34_(real *, integer 
00067             *, integer *, integer *), sget35_(real *, integer *, integer *, 
00068             integer *), sget36_(real *, integer *, integer *, integer *, 
00069             integer *);
00070     real sfmin;
00071     extern /* Subroutine */ int sget37_(real *, integer *, integer *, integer 
00072             *, integer *), sget38_(real *, integer *, integer *, integer *, 
00073             integer *), sget39_(real *, integer *, integer *, integer *);
00074     integer klaln2, llaln2, nlaln2[2];
00075     real rlaln2;
00076     integer klanv2, llanv2, nlanv2;
00077     real rlanv2;
00078     integer klasy2, llasy2, nlasy2;
00079     real rlasy2;
00080     integer klaexc, llaexc;
00081     extern doublereal slamch_(char *);
00082     integer nlaexc[2];
00083     real rlaexc;
00084     extern /* Subroutine */ int serrec_(char *, integer *);
00085     integer klaqtr, llaqtr, ktrexc, ltrexc, ktrsna, nlaqtr, ltrsna[3];
00086     real rlaqtr;
00087     integer ktrsen;
00088     real rtrexc;
00089     integer ltrsen[3], ntrexc[3], ntrsen[3], ntrsna[3];
00090     real rtrsna[3], rtrsen[3];
00091     integer ntests, ktrsyl, ltrsyl, ntrsyl;
00092     real rtrsyl;
00093 
00094     /* Fortran I/O blocks */
00095     static cilist io___4 = { 0, 0, 0, fmt_9989, 0 };
00096     static cilist io___5 = { 0, 0, 0, fmt_9988, 0 };
00097     static cilist io___6 = { 0, 0, 0, fmt_9987, 0 };
00098     static cilist io___12 = { 0, 0, 0, fmt_9999, 0 };
00099     static cilist io___17 = { 0, 0, 0, fmt_9998, 0 };
00100     static cilist io___22 = { 0, 0, 0, fmt_9997, 0 };
00101     static cilist io___27 = { 0, 0, 0, fmt_9996, 0 };
00102     static cilist io___32 = { 0, 0, 0, fmt_9995, 0 };
00103     static cilist io___37 = { 0, 0, 0, fmt_9994, 0 };
00104     static cilist io___42 = { 0, 0, 0, fmt_9993, 0 };
00105     static cilist io___47 = { 0, 0, 0, fmt_9992, 0 };
00106     static cilist io___52 = { 0, 0, 0, fmt_9991, 0 };
00107     static cilist io___54 = { 0, 0, 0, fmt_9990, 0 };
00108 
00109 
00110 
00111 /*  -- LAPACK test routine (version 3.1) -- */
00112 /*     Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd.. */
00113 /*     November 2006 */
00114 
00115 /*     .. Scalar Arguments .. */
00116 /*     .. */
00117 
00118 /*  Purpose */
00119 /*  ======= */
00120 
00121 /*  SCHKEC tests eigen- condition estimation routines */
00122 /*         SLALN2, SLASY2, SLANV2, SLAQTR, SLAEXC, */
00123 /*         STRSYL, STREXC, STRSNA, STRSEN */
00124 
00125 /*  In all cases, the routine runs through a fixed set of numerical */
00126 /*  examples, subjects them to various tests, and compares the test */
00127 /*  results to a threshold THRESH. In addition, STREXC, STRSNA and STRSEN */
00128 /*  are tested by reading in precomputed examples from a file (on input */
00129 /*  unit NIN).  Output is written to output unit NOUT. */
00130 
00131 /*  Arguments */
00132 /*  ========= */
00133 
00134 /*  THRESH  (input) REAL */
00135 /*          Threshold for residual tests.  A computed test ratio passes */
00136 /*          the threshold if it is less than THRESH. */
00137 
00138 /*  TSTERR  (input) LOGICAL */
00139 /*          Flag that indicates whether error exits are to be tested. */
00140 
00141 /*  NIN     (input) INTEGER */
00142 /*          The logical unit number for input. */
00143 
00144 /*  NOUT    (input) INTEGER */
00145 /*          The logical unit number for output. */
00146 
00147 /*  ===================================================================== */
00148 
00149 /*     .. Local Scalars .. */
00150 /*     .. */
00151 /*     .. Local Arrays .. */
00152 /*     .. */
00153 /*     .. External Subroutines .. */
00154 /*     .. */
00155 /*     .. External Functions .. */
00156 /*     .. */
00157 /*     .. Executable Statements .. */
00158 
00159     s_copy(path, "Single precision", (ftnlen)1, (ftnlen)16);
00160     s_copy(path + 1, "EC", (ftnlen)2, (ftnlen)2);
00161     eps = slamch_("P");
00162     sfmin = slamch_("S");
00163 
00164 /*     Print header information */
00165 
00166     io___4.ciunit = *nout;
00167     s_wsfe(&io___4);
00168     e_wsfe();
00169     io___5.ciunit = *nout;
00170     s_wsfe(&io___5);
00171     do_fio(&c__1, (char *)&eps, (ftnlen)sizeof(real));
00172     do_fio(&c__1, (char *)&sfmin, (ftnlen)sizeof(real));
00173     e_wsfe();
00174     io___6.ciunit = *nout;
00175     s_wsfe(&io___6);
00176     do_fio(&c__1, (char *)&(*thresh), (ftnlen)sizeof(real));
00177     e_wsfe();
00178 
00179 /*     Test error exits if TSTERR is .TRUE. */
00180 
00181     if (*tsterr) {
00182         serrec_(path, nout);
00183     }
00184 
00185     ok = TRUE_;
00186     sget31_(&rlaln2, &llaln2, nlaln2, &klaln2);
00187     if (rlaln2 > *thresh || nlaln2[0] != 0) {
00188         ok = FALSE_;
00189         io___12.ciunit = *nout;
00190         s_wsfe(&io___12);
00191         do_fio(&c__1, (char *)&rlaln2, (ftnlen)sizeof(real));
00192         do_fio(&c__1, (char *)&llaln2, (ftnlen)sizeof(integer));
00193         do_fio(&c__2, (char *)&nlaln2[0], (ftnlen)sizeof(integer));
00194         do_fio(&c__1, (char *)&klaln2, (ftnlen)sizeof(integer));
00195         e_wsfe();
00196     }
00197 
00198     sget32_(&rlasy2, &llasy2, &nlasy2, &klasy2);
00199     if (rlasy2 > *thresh) {
00200         ok = FALSE_;
00201         io___17.ciunit = *nout;
00202         s_wsfe(&io___17);
00203         do_fio(&c__1, (char *)&rlasy2, (ftnlen)sizeof(real));
00204         do_fio(&c__1, (char *)&llasy2, (ftnlen)sizeof(integer));
00205         do_fio(&c__1, (char *)&nlasy2, (ftnlen)sizeof(integer));
00206         do_fio(&c__1, (char *)&klasy2, (ftnlen)sizeof(integer));
00207         e_wsfe();
00208     }
00209 
00210     sget33_(&rlanv2, &llanv2, &nlanv2, &klanv2);
00211     if (rlanv2 > *thresh || nlanv2 != 0) {
00212         ok = FALSE_;
00213         io___22.ciunit = *nout;
00214         s_wsfe(&io___22);
00215         do_fio(&c__1, (char *)&rlanv2, (ftnlen)sizeof(real));
00216         do_fio(&c__1, (char *)&llanv2, (ftnlen)sizeof(integer));
00217         do_fio(&c__1, (char *)&nlanv2, (ftnlen)sizeof(integer));
00218         do_fio(&c__1, (char *)&klanv2, (ftnlen)sizeof(integer));
00219         e_wsfe();
00220     }
00221 
00222     sget34_(&rlaexc, &llaexc, nlaexc, &klaexc);
00223     if (rlaexc > *thresh || nlaexc[1] != 0) {
00224         ok = FALSE_;
00225         io___27.ciunit = *nout;
00226         s_wsfe(&io___27);
00227         do_fio(&c__1, (char *)&rlaexc, (ftnlen)sizeof(real));
00228         do_fio(&c__1, (char *)&llaexc, (ftnlen)sizeof(integer));
00229         do_fio(&c__2, (char *)&nlaexc[0], (ftnlen)sizeof(integer));
00230         do_fio(&c__1, (char *)&klaexc, (ftnlen)sizeof(integer));
00231         e_wsfe();
00232     }
00233 
00234     sget35_(&rtrsyl, &ltrsyl, &ntrsyl, &ktrsyl);
00235     if (rtrsyl > *thresh) {
00236         ok = FALSE_;
00237         io___32.ciunit = *nout;
00238         s_wsfe(&io___32);
00239         do_fio(&c__1, (char *)&rtrsyl, (ftnlen)sizeof(real));
00240         do_fio(&c__1, (char *)&ltrsyl, (ftnlen)sizeof(integer));
00241         do_fio(&c__1, (char *)&ntrsyl, (ftnlen)sizeof(integer));
00242         do_fio(&c__1, (char *)&ktrsyl, (ftnlen)sizeof(integer));
00243         e_wsfe();
00244     }
00245 
00246     sget36_(&rtrexc, &ltrexc, ntrexc, &ktrexc, nin);
00247     if (rtrexc > *thresh || ntrexc[2] > 0) {
00248         ok = FALSE_;
00249         io___37.ciunit = *nout;
00250         s_wsfe(&io___37);
00251         do_fio(&c__1, (char *)&rtrexc, (ftnlen)sizeof(real));
00252         do_fio(&c__1, (char *)&ltrexc, (ftnlen)sizeof(integer));
00253         do_fio(&c__3, (char *)&ntrexc[0], (ftnlen)sizeof(integer));
00254         do_fio(&c__1, (char *)&ktrexc, (ftnlen)sizeof(integer));
00255         e_wsfe();
00256     }
00257 
00258     sget37_(rtrsna, ltrsna, ntrsna, &ktrsna, nin);
00259     if (rtrsna[0] > *thresh || rtrsna[1] > *thresh || ntrsna[0] != 0 || 
00260             ntrsna[1] != 0 || ntrsna[2] != 0) {
00261         ok = FALSE_;
00262         io___42.ciunit = *nout;
00263         s_wsfe(&io___42);
00264         do_fio(&c__3, (char *)&rtrsna[0], (ftnlen)sizeof(real));
00265         do_fio(&c__3, (char *)&ltrsna[0], (ftnlen)sizeof(integer));
00266         do_fio(&c__3, (char *)&ntrsna[0], (ftnlen)sizeof(integer));
00267         do_fio(&c__1, (char *)&ktrsna, (ftnlen)sizeof(integer));
00268         e_wsfe();
00269     }
00270 
00271     sget38_(rtrsen, ltrsen, ntrsen, &ktrsen, nin);
00272     if (rtrsen[0] > *thresh || rtrsen[1] > *thresh || ntrsen[0] != 0 || 
00273             ntrsen[1] != 0 || ntrsen[2] != 0) {
00274         ok = FALSE_;
00275         io___47.ciunit = *nout;
00276         s_wsfe(&io___47);
00277         do_fio(&c__3, (char *)&rtrsen[0], (ftnlen)sizeof(real));
00278         do_fio(&c__3, (char *)&ltrsen[0], (ftnlen)sizeof(integer));
00279         do_fio(&c__3, (char *)&ntrsen[0], (ftnlen)sizeof(integer));
00280         do_fio(&c__1, (char *)&ktrsen, (ftnlen)sizeof(integer));
00281         e_wsfe();
00282     }
00283 
00284     sget39_(&rlaqtr, &llaqtr, &nlaqtr, &klaqtr);
00285     if (rlaqtr > *thresh) {
00286         ok = FALSE_;
00287         io___52.ciunit = *nout;
00288         s_wsfe(&io___52);
00289         do_fio(&c__1, (char *)&rlaqtr, (ftnlen)sizeof(real));
00290         do_fio(&c__1, (char *)&llaqtr, (ftnlen)sizeof(integer));
00291         do_fio(&c__1, (char *)&nlaqtr, (ftnlen)sizeof(integer));
00292         do_fio(&c__1, (char *)&klaqtr, (ftnlen)sizeof(integer));
00293         e_wsfe();
00294     }
00295 
00296     ntests = klaln2 + klasy2 + klanv2 + klaexc + ktrsyl + ktrexc + ktrsna + 
00297             ktrsen + klaqtr;
00298     if (ok) {
00299         io___54.ciunit = *nout;
00300         s_wsfe(&io___54);
00301         do_fio(&c__1, path, (ftnlen)3);
00302         do_fio(&c__1, (char *)&ntests, (ftnlen)sizeof(integer));
00303         e_wsfe();
00304     }
00305 
00306     return 0;
00307 
00308 /*     End of SCHKEC */
00309 
00310 } /* schkec_ */


swiftnav
Author(s):
autogenerated on Sat Jun 8 2019 18:55:58