derrec.c
Go to the documentation of this file.
00001 /* derrec.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 /* Common Block Declarations */
00017 
00018 struct {
00019     integer infot, nout;
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 /* Table of constant values */
00032 
00033 static integer c__1 = 1;
00034 static integer c__0 = 0;
00035 static integer c_n1 = -1;
00036 static integer c__2 = 2;
00037 static integer c__3 = 3;
00038 static integer c__4 = 4;
00039 
00040 /* Subroutine */ int derrec_(char *path, integer *nunit)
00041 {
00042     /* Format strings */
00043     static char fmt_9999[] = "(1x,a3,\002 routines passed the tests of the e"
00044             "rror exits (\002,i3,\002 tests done)\002)";
00045     static char fmt_9998[] = "(\002 *** \002,a3,\002 routines failed the tes"
00046             "ts of the error ex\002,\002its ***\002)";
00047 
00048     /* Builtin functions */
00049     /* Subroutine */ int s_copy(char *, char *, ftnlen, ftnlen);
00050     integer s_wsfe(cilist *), do_fio(integer *, char *, ftnlen), e_wsfe(void);
00051 
00052     /* Local variables */
00053     doublereal a[16]    /* was [4][4] */, b[16] /* was [4][4] */, c__[16]       
00054             /* was [4][4] */;
00055     integer i__, j, m;
00056     doublereal s[4], wi[4];
00057     integer nt;
00058     doublereal wr[4];
00059     logical sel[4];
00060     doublereal sep[4];
00061     integer info, ifst, ilst;
00062     doublereal work[4], scale;
00063     integer iwork[4];
00064     extern /* Subroutine */ int chkxer_(char *, integer *, integer *, logical 
00065             *, logical *), dtrexc_(char *, integer *, doublereal *, 
00066             integer *, doublereal *, integer *, integer *, integer *, 
00067             doublereal *, integer *), dtrsna_(char *, char *, logical 
00068             *, integer *, doublereal *, integer *, doublereal *, integer *, 
00069             doublereal *, integer *, doublereal *, doublereal *, integer *, 
00070             integer *, doublereal *, integer *, integer *, integer *), dtrsen_(char *, char *, logical *, integer *, doublereal 
00071             *, integer *, doublereal *, integer *, doublereal *, doublereal *, 
00072              integer *, doublereal *, doublereal *, doublereal *, integer *, 
00073             integer *, integer *, integer *), dtrsyl_(char *, 
00074             char *, integer *, integer *, integer *, doublereal *, integer *, 
00075             doublereal *, integer *, doublereal *, integer *, doublereal *, 
00076             integer *);
00077 
00078     /* Fortran I/O blocks */
00079     static cilist io___19 = { 0, 0, 0, fmt_9999, 0 };
00080     static cilist io___20 = { 0, 0, 0, fmt_9998, 0 };
00081 
00082 
00083 
00084 /*  -- LAPACK test routine (version 3.1) -- */
00085 /*     Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd.. */
00086 /*     November 2006 */
00087 
00088 /*     .. Scalar Arguments .. */
00089 /*     .. */
00090 
00091 /*  Purpose */
00092 /*  ======= */
00093 
00094 /*  DERREC tests the error exits for the routines for eigen- condition */
00095 /*  estimation for DOUBLE PRECISION matrices: */
00096 /*     DTRSYL, STREXC, STRSNA and STRSEN. */
00097 
00098 /*  Arguments */
00099 /*  ========= */
00100 
00101 /*  PATH    (input) CHARACTER*3 */
00102 /*          The LAPACK path name for the routines to be tested. */
00103 
00104 /*  NUNIT   (input) INTEGER */
00105 /*          The unit number for output. */
00106 
00107 /*  ===================================================================== */
00108 
00109 /*     .. Parameters .. */
00110 /*     .. */
00111 /*     .. Local Scalars .. */
00112 /*     .. */
00113 /*     .. Local Arrays .. */
00114 /*     .. */
00115 /*     .. External Subroutines .. */
00116 /*     .. */
00117 /*     .. Scalars in Common .. */
00118 /*     .. */
00119 /*     .. Common blocks .. */
00120 /*     .. */
00121 /*     .. Executable Statements .. */
00122 
00123     infoc_1.nout = *nunit;
00124     infoc_1.ok = TRUE_;
00125     nt = 0;
00126 
00127 /*     Initialize A, B and SEL */
00128 
00129     for (j = 1; j <= 4; ++j) {
00130         for (i__ = 1; i__ <= 4; ++i__) {
00131             a[i__ + (j << 2) - 5] = 0.;
00132             b[i__ + (j << 2) - 5] = 0.;
00133 /* L10: */
00134         }
00135 /* L20: */
00136     }
00137     for (i__ = 1; i__ <= 4; ++i__) {
00138         a[i__ + (i__ << 2) - 5] = 1.;
00139         sel[i__ - 1] = TRUE_;
00140 /* L30: */
00141     }
00142 
00143 /*     Test DTRSYL */
00144 
00145     s_copy(srnamc_1.srnamt, "DTRSYL", (ftnlen)32, (ftnlen)6);
00146     infoc_1.infot = 1;
00147     dtrsyl_("X", "N", &c__1, &c__0, &c__0, a, &c__1, b, &c__1, c__, &c__1, &
00148             scale, &info);
00149     chkxer_("DTRSYL", &infoc_1.infot, &infoc_1.nout, &infoc_1.lerr, &
00150             infoc_1.ok);
00151     infoc_1.infot = 2;
00152     dtrsyl_("N", "X", &c__1, &c__0, &c__0, a, &c__1, b, &c__1, c__, &c__1, &
00153             scale, &info);
00154     chkxer_("DTRSYL", &infoc_1.infot, &infoc_1.nout, &infoc_1.lerr, &
00155             infoc_1.ok);
00156     infoc_1.infot = 3;
00157     dtrsyl_("N", "N", &c__0, &c__0, &c__0, a, &c__1, b, &c__1, c__, &c__1, &
00158             scale, &info);
00159     chkxer_("DTRSYL", &infoc_1.infot, &infoc_1.nout, &infoc_1.lerr, &
00160             infoc_1.ok);
00161     infoc_1.infot = 4;
00162     dtrsyl_("N", "N", &c__1, &c_n1, &c__0, a, &c__1, b, &c__1, c__, &c__1, &
00163             scale, &info);
00164     chkxer_("DTRSYL", &infoc_1.infot, &infoc_1.nout, &infoc_1.lerr, &
00165             infoc_1.ok);
00166     infoc_1.infot = 5;
00167     dtrsyl_("N", "N", &c__1, &c__0, &c_n1, a, &c__1, b, &c__1, c__, &c__1, &
00168             scale, &info);
00169     chkxer_("DTRSYL", &infoc_1.infot, &infoc_1.nout, &infoc_1.lerr, &
00170             infoc_1.ok);
00171     infoc_1.infot = 7;
00172     dtrsyl_("N", "N", &c__1, &c__2, &c__0, a, &c__1, b, &c__1, c__, &c__2, &
00173             scale, &info);
00174     chkxer_("DTRSYL", &infoc_1.infot, &infoc_1.nout, &infoc_1.lerr, &
00175             infoc_1.ok);
00176     infoc_1.infot = 9;
00177     dtrsyl_("N", "N", &c__1, &c__0, &c__2, a, &c__1, b, &c__1, c__, &c__1, &
00178             scale, &info);
00179     chkxer_("DTRSYL", &infoc_1.infot, &infoc_1.nout, &infoc_1.lerr, &
00180             infoc_1.ok);
00181     infoc_1.infot = 11;
00182     dtrsyl_("N", "N", &c__1, &c__2, &c__0, a, &c__2, b, &c__1, c__, &c__1, &
00183             scale, &info);
00184     chkxer_("DTRSYL", &infoc_1.infot, &infoc_1.nout, &infoc_1.lerr, &
00185             infoc_1.ok);
00186     nt += 8;
00187 
00188 /*     Test DTREXC */
00189 
00190     s_copy(srnamc_1.srnamt, "DTREXC", (ftnlen)32, (ftnlen)6);
00191     ifst = 1;
00192     ilst = 1;
00193     infoc_1.infot = 1;
00194     dtrexc_("X", &c__1, a, &c__1, b, &c__1, &ifst, &ilst, work, &info);
00195     chkxer_("DTREXC", &infoc_1.infot, &infoc_1.nout, &infoc_1.lerr, &
00196             infoc_1.ok);
00197     infoc_1.infot = 7;
00198     dtrexc_("N", &c__0, a, &c__1, b, &c__1, &ifst, &ilst, work, &info);
00199     chkxer_("DTREXC", &infoc_1.infot, &infoc_1.nout, &infoc_1.lerr, &
00200             infoc_1.ok);
00201     infoc_1.infot = 4;
00202     ilst = 2;
00203     dtrexc_("N", &c__2, a, &c__1, b, &c__1, &ifst, &ilst, work, &info);
00204     chkxer_("DTREXC", &infoc_1.infot, &infoc_1.nout, &infoc_1.lerr, &
00205             infoc_1.ok);
00206     infoc_1.infot = 6;
00207     dtrexc_("V", &c__2, a, &c__2, b, &c__1, &ifst, &ilst, work, &info);
00208     chkxer_("DTREXC", &infoc_1.infot, &infoc_1.nout, &infoc_1.lerr, &
00209             infoc_1.ok);
00210     infoc_1.infot = 7;
00211     ifst = 0;
00212     ilst = 1;
00213     dtrexc_("V", &c__1, a, &c__1, b, &c__1, &ifst, &ilst, work, &info);
00214     chkxer_("DTREXC", &infoc_1.infot, &infoc_1.nout, &infoc_1.lerr, &
00215             infoc_1.ok);
00216     infoc_1.infot = 7;
00217     ifst = 2;
00218     dtrexc_("V", &c__1, a, &c__1, b, &c__1, &ifst, &ilst, work, &info);
00219     chkxer_("DTREXC", &infoc_1.infot, &infoc_1.nout, &infoc_1.lerr, &
00220             infoc_1.ok);
00221     infoc_1.infot = 8;
00222     ifst = 1;
00223     ilst = 0;
00224     dtrexc_("V", &c__1, a, &c__1, b, &c__1, &ifst, &ilst, work, &info);
00225     chkxer_("DTREXC", &infoc_1.infot, &infoc_1.nout, &infoc_1.lerr, &
00226             infoc_1.ok);
00227     infoc_1.infot = 8;
00228     ilst = 2;
00229     dtrexc_("V", &c__1, a, &c__1, b, &c__1, &ifst, &ilst, work, &info);
00230     chkxer_("DTREXC", &infoc_1.infot, &infoc_1.nout, &infoc_1.lerr, &
00231             infoc_1.ok);
00232     nt += 8;
00233 
00234 /*     Test DTRSNA */
00235 
00236     s_copy(srnamc_1.srnamt, "DTRSNA", (ftnlen)32, (ftnlen)6);
00237     infoc_1.infot = 1;
00238     dtrsna_("X", "A", sel, &c__0, a, &c__1, b, &c__1, c__, &c__1, s, sep, &
00239             c__1, &m, work, &c__1, iwork, &info);
00240     chkxer_("DTRSNA", &infoc_1.infot, &infoc_1.nout, &infoc_1.lerr, &
00241             infoc_1.ok);
00242     infoc_1.infot = 2;
00243     dtrsna_("B", "X", sel, &c__0, a, &c__1, b, &c__1, c__, &c__1, s, sep, &
00244             c__1, &m, work, &c__1, iwork, &info);
00245     chkxer_("DTRSNA", &infoc_1.infot, &infoc_1.nout, &infoc_1.lerr, &
00246             infoc_1.ok);
00247     infoc_1.infot = 4;
00248     dtrsna_("B", "A", sel, &c_n1, a, &c__1, b, &c__1, c__, &c__1, s, sep, &
00249             c__1, &m, work, &c__1, iwork, &info);
00250     chkxer_("DTRSNA", &infoc_1.infot, &infoc_1.nout, &infoc_1.lerr, &
00251             infoc_1.ok);
00252     infoc_1.infot = 6;
00253     dtrsna_("V", "A", sel, &c__2, a, &c__1, b, &c__1, c__, &c__1, s, sep, &
00254             c__2, &m, work, &c__2, iwork, &info);
00255     chkxer_("DTRSNA", &infoc_1.infot, &infoc_1.nout, &infoc_1.lerr, &
00256             infoc_1.ok);
00257     infoc_1.infot = 8;
00258     dtrsna_("B", "A", sel, &c__2, a, &c__2, b, &c__1, c__, &c__2, s, sep, &
00259             c__2, &m, work, &c__2, iwork, &info);
00260     chkxer_("DTRSNA", &infoc_1.infot, &infoc_1.nout, &infoc_1.lerr, &
00261             infoc_1.ok);
00262     infoc_1.infot = 10;
00263     dtrsna_("B", "A", sel, &c__2, a, &c__2, b, &c__2, c__, &c__1, s, sep, &
00264             c__2, &m, work, &c__2, iwork, &info);
00265     chkxer_("DTRSNA", &infoc_1.infot, &infoc_1.nout, &infoc_1.lerr, &
00266             infoc_1.ok);
00267     infoc_1.infot = 13;
00268     dtrsna_("B", "A", sel, &c__1, a, &c__1, b, &c__1, c__, &c__1, s, sep, &
00269             c__0, &m, work, &c__1, iwork, &info);
00270     chkxer_("DTRSNA", &infoc_1.infot, &infoc_1.nout, &infoc_1.lerr, &
00271             infoc_1.ok);
00272     infoc_1.infot = 13;
00273     dtrsna_("B", "S", sel, &c__2, a, &c__2, b, &c__2, c__, &c__2, s, sep, &
00274             c__1, &m, work, &c__2, iwork, &info);
00275     chkxer_("DTRSNA", &infoc_1.infot, &infoc_1.nout, &infoc_1.lerr, &
00276             infoc_1.ok);
00277     infoc_1.infot = 16;
00278     dtrsna_("B", "A", sel, &c__2, a, &c__2, b, &c__2, c__, &c__2, s, sep, &
00279             c__2, &m, work, &c__1, iwork, &info);
00280     chkxer_("DTRSNA", &infoc_1.infot, &infoc_1.nout, &infoc_1.lerr, &
00281             infoc_1.ok);
00282     nt += 9;
00283 
00284 /*     Test DTRSEN */
00285 
00286     sel[0] = FALSE_;
00287     s_copy(srnamc_1.srnamt, "DTRSEN", (ftnlen)32, (ftnlen)6);
00288     infoc_1.infot = 1;
00289     dtrsen_("X", "N", sel, &c__0, a, &c__1, b, &c__1, wr, wi, &m, s, sep, 
00290             work, &c__1, iwork, &c__1, &info);
00291     chkxer_("DTRSEN", &infoc_1.infot, &infoc_1.nout, &infoc_1.lerr, &
00292             infoc_1.ok);
00293     infoc_1.infot = 2;
00294     dtrsen_("N", "X", sel, &c__0, a, &c__1, b, &c__1, wr, wi, &m, s, sep, 
00295             work, &c__1, iwork, &c__1, &info);
00296     chkxer_("DTRSEN", &infoc_1.infot, &infoc_1.nout, &infoc_1.lerr, &
00297             infoc_1.ok);
00298     infoc_1.infot = 4;
00299     dtrsen_("N", "N", sel, &c_n1, a, &c__1, b, &c__1, wr, wi, &m, s, sep, 
00300             work, &c__1, iwork, &c__1, &info);
00301     chkxer_("DTRSEN", &infoc_1.infot, &infoc_1.nout, &infoc_1.lerr, &
00302             infoc_1.ok);
00303     infoc_1.infot = 6;
00304     dtrsen_("N", "N", sel, &c__2, a, &c__1, b, &c__1, wr, wi, &m, s, sep, 
00305             work, &c__2, iwork, &c__1, &info);
00306     chkxer_("DTRSEN", &infoc_1.infot, &infoc_1.nout, &infoc_1.lerr, &
00307             infoc_1.ok);
00308     infoc_1.infot = 8;
00309     dtrsen_("N", "V", sel, &c__2, a, &c__2, b, &c__1, wr, wi, &m, s, sep, 
00310             work, &c__1, iwork, &c__1, &info);
00311     chkxer_("DTRSEN", &infoc_1.infot, &infoc_1.nout, &infoc_1.lerr, &
00312             infoc_1.ok);
00313     infoc_1.infot = 15;
00314     dtrsen_("N", "V", sel, &c__2, a, &c__2, b, &c__2, wr, wi, &m, s, sep, 
00315             work, &c__0, iwork, &c__1, &info);
00316     chkxer_("DTRSEN", &infoc_1.infot, &infoc_1.nout, &infoc_1.lerr, &
00317             infoc_1.ok);
00318     infoc_1.infot = 15;
00319     dtrsen_("E", "V", sel, &c__3, a, &c__3, b, &c__3, wr, wi, &m, s, sep, 
00320             work, &c__1, iwork, &c__1, &info);
00321     chkxer_("DTRSEN", &infoc_1.infot, &infoc_1.nout, &infoc_1.lerr, &
00322             infoc_1.ok);
00323     infoc_1.infot = 15;
00324     dtrsen_("V", "V", sel, &c__3, a, &c__3, b, &c__3, wr, wi, &m, s, sep, 
00325             work, &c__3, iwork, &c__2, &info);
00326     chkxer_("DTRSEN", &infoc_1.infot, &infoc_1.nout, &infoc_1.lerr, &
00327             infoc_1.ok);
00328     infoc_1.infot = 17;
00329     dtrsen_("E", "V", sel, &c__2, a, &c__2, b, &c__2, wr, wi, &m, s, sep, 
00330             work, &c__1, iwork, &c__0, &info);
00331     chkxer_("DTRSEN", &infoc_1.infot, &infoc_1.nout, &infoc_1.lerr, &
00332             infoc_1.ok);
00333     infoc_1.infot = 17;
00334     dtrsen_("V", "V", sel, &c__3, a, &c__3, b, &c__3, wr, wi, &m, s, sep, 
00335             work, &c__4, iwork, &c__1, &info);
00336     chkxer_("DTRSEN", &infoc_1.infot, &infoc_1.nout, &infoc_1.lerr, &
00337             infoc_1.ok);
00338     nt += 10;
00339 
00340 /*     Print a summary line. */
00341 
00342     if (infoc_1.ok) {
00343         io___19.ciunit = infoc_1.nout;
00344         s_wsfe(&io___19);
00345         do_fio(&c__1, path, (ftnlen)3);
00346         do_fio(&c__1, (char *)&nt, (ftnlen)sizeof(integer));
00347         e_wsfe();
00348     } else {
00349         io___20.ciunit = infoc_1.nout;
00350         s_wsfe(&io___20);
00351         do_fio(&c__1, path, (ftnlen)3);
00352         e_wsfe();
00353     }
00354 
00355     return 0;
00356 
00357 /*     End of DERREC */
00358 
00359 } /* derrec_ */


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