cerrgt.c
Go to the documentation of this file.
00001 /* cerrgt.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__2 = 2;
00034 static integer c_n1 = -1;
00035 static integer c__0 = 0;
00036 static integer c__1 = 1;
00037 
00038 /* Subroutine */ int cerrgt_(char *path, integer *nunit)
00039 {
00040     /* System generated locals */
00041     integer i__1;
00042     real r__1;
00043 
00044     /* Builtin functions */
00045     integer s_wsle(cilist *), e_wsle(void);
00046     /* Subroutine */ int s_copy(char *, char *, ftnlen, ftnlen);
00047 
00048     /* Local variables */
00049     complex b[2];
00050     real d__[2];
00051     complex e[2];
00052     integer i__;
00053     complex w[2], x[2];
00054     char c2[2];
00055     real r1[2], r2[2], df[2];
00056     complex ef[2], dl[2];
00057     integer ip[2];
00058     complex du[2];
00059     real rw[2];
00060     complex du2[2], dlf[2], duf[2];
00061     integer info;
00062     real rcond, anorm;
00063     extern /* Subroutine */ int alaesm_(char *, logical *, integer *),
00064              cgtcon_(char *, integer *, complex *, complex *, complex *, 
00065             complex *, integer *, real *, real *, complex *, integer *);
00066     extern logical lsamen_(integer *, char *, char *);
00067     extern /* Subroutine */ int chkxer_(char *, integer *, integer *, logical 
00068             *, logical *), cptcon_(integer *, real *, complex *, real 
00069             *, real *, real *, integer *), cgtrfs_(char *, integer *, integer 
00070             *, complex *, complex *, complex *, complex *, complex *, complex 
00071             *, complex *, integer *, complex *, integer *, complex *, integer 
00072             *, real *, real *, complex *, real *, integer *), cgttrf_(
00073             integer *, complex *, complex *, complex *, complex *, integer *, 
00074             integer *), cptrfs_(char *, integer *, integer *, real *, complex 
00075             *, real *, complex *, complex *, integer *, complex *, integer *, 
00076             real *, real *, complex *, real *, integer *), cpttrf_(
00077             integer *, real *, complex *, integer *), cgttrs_(char *, integer 
00078             *, integer *, complex *, complex *, complex *, complex *, integer 
00079             *, complex *, integer *, integer *), cpttrs_(char *, 
00080             integer *, integer *, real *, complex *, complex *, integer *, 
00081             integer *);
00082 
00083     /* Fortran I/O blocks */
00084     static cilist io___1 = { 0, 0, 0, 0, 0 };
00085 
00086 
00087 
00088 /*  -- LAPACK test routine (version 3.1) -- */
00089 /*     Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd.. */
00090 /*     November 2006 */
00091 
00092 /*     .. Scalar Arguments .. */
00093 /*     .. */
00094 
00095 /*  Purpose */
00096 /*  ======= */
00097 
00098 /*  CERRGT tests the error exits for the COMPLEX tridiagonal */
00099 /*  routines. */
00100 
00101 /*  Arguments */
00102 /*  ========= */
00103 
00104 /*  PATH    (input) CHARACTER*3 */
00105 /*          The LAPACK path name for the routines to be tested. */
00106 
00107 /*  NUNIT   (input) INTEGER */
00108 /*          The unit number for output. */
00109 
00110 /*  ===================================================================== */
00111 
00112 /*     .. Parameters .. */
00113 /*     .. */
00114 /*     .. Local Scalars .. */
00115 /*     .. */
00116 /*     .. Local Arrays .. */
00117 /*     .. */
00118 /*     .. External Functions .. */
00119 /*     .. */
00120 /*     .. External Subroutines .. */
00121 /*     .. */
00122 /*     .. Scalars in Common .. */
00123 /*     .. */
00124 /*     .. Common blocks .. */
00125 /*     .. */
00126 /*     .. Executable Statements .. */
00127 
00128     infoc_1.nout = *nunit;
00129     io___1.ciunit = infoc_1.nout;
00130     s_wsle(&io___1);
00131     e_wsle();
00132     s_copy(c2, path + 1, (ftnlen)2, (ftnlen)2);
00133     for (i__ = 1; i__ <= 2; ++i__) {
00134         d__[i__ - 1] = 1.f;
00135         i__1 = i__ - 1;
00136         e[i__1].r = 2.f, e[i__1].i = 0.f;
00137         i__1 = i__ - 1;
00138         dl[i__1].r = 3.f, dl[i__1].i = 0.f;
00139         i__1 = i__ - 1;
00140         du[i__1].r = 4.f, du[i__1].i = 0.f;
00141 /* L10: */
00142     }
00143     anorm = 1.f;
00144     infoc_1.ok = TRUE_;
00145 
00146     if (lsamen_(&c__2, c2, "GT")) {
00147 
00148 /*        Test error exits for the general tridiagonal routines. */
00149 
00150 /*        CGTTRF */
00151 
00152         s_copy(srnamc_1.srnamt, "CGTTRF", (ftnlen)32, (ftnlen)6);
00153         infoc_1.infot = 1;
00154         cgttrf_(&c_n1, dl, e, du, du2, ip, &info);
00155         chkxer_("CGTTRF", &infoc_1.infot, &infoc_1.nout, &infoc_1.lerr, &
00156                 infoc_1.ok);
00157 
00158 /*        CGTTRS */
00159 
00160         s_copy(srnamc_1.srnamt, "CGTTRS", (ftnlen)32, (ftnlen)6);
00161         infoc_1.infot = 1;
00162         cgttrs_("/", &c__0, &c__0, dl, e, du, du2, ip, x, &c__1, &info);
00163         chkxer_("CGTTRS", &infoc_1.infot, &infoc_1.nout, &infoc_1.lerr, &
00164                 infoc_1.ok);
00165         infoc_1.infot = 2;
00166         cgttrs_("N", &c_n1, &c__0, dl, e, du, du2, ip, x, &c__1, &info);
00167         chkxer_("CGTTRS", &infoc_1.infot, &infoc_1.nout, &infoc_1.lerr, &
00168                 infoc_1.ok);
00169         infoc_1.infot = 3;
00170         cgttrs_("N", &c__0, &c_n1, dl, e, du, du2, ip, x, &c__1, &info);
00171         chkxer_("CGTTRS", &infoc_1.infot, &infoc_1.nout, &infoc_1.lerr, &
00172                 infoc_1.ok);
00173         infoc_1.infot = 10;
00174         cgttrs_("N", &c__2, &c__1, dl, e, du, du2, ip, x, &c__1, &info);
00175         chkxer_("CGTTRS", &infoc_1.infot, &infoc_1.nout, &infoc_1.lerr, &
00176                 infoc_1.ok);
00177 
00178 /*        CGTRFS */
00179 
00180         s_copy(srnamc_1.srnamt, "CGTRFS", (ftnlen)32, (ftnlen)6);
00181         infoc_1.infot = 1;
00182         cgtrfs_("/", &c__0, &c__0, dl, e, du, dlf, ef, duf, du2, ip, b, &c__1, 
00183                  x, &c__1, r1, r2, w, rw, &info);
00184         chkxer_("CGTRFS", &infoc_1.infot, &infoc_1.nout, &infoc_1.lerr, &
00185                 infoc_1.ok);
00186         infoc_1.infot = 2;
00187         cgtrfs_("N", &c_n1, &c__0, dl, e, du, dlf, ef, duf, du2, ip, b, &c__1, 
00188                  x, &c__1, r1, r2, w, rw, &info);
00189         chkxer_("CGTRFS", &infoc_1.infot, &infoc_1.nout, &infoc_1.lerr, &
00190                 infoc_1.ok);
00191         infoc_1.infot = 3;
00192         cgtrfs_("N", &c__0, &c_n1, dl, e, du, dlf, ef, duf, du2, ip, b, &c__1, 
00193                  x, &c__1, r1, r2, w, rw, &info);
00194         chkxer_("CGTRFS", &infoc_1.infot, &infoc_1.nout, &infoc_1.lerr, &
00195                 infoc_1.ok);
00196         infoc_1.infot = 13;
00197         cgtrfs_("N", &c__2, &c__1, dl, e, du, dlf, ef, duf, du2, ip, b, &c__1, 
00198                  x, &c__2, r1, r2, w, rw, &info);
00199         chkxer_("CGTRFS", &infoc_1.infot, &infoc_1.nout, &infoc_1.lerr, &
00200                 infoc_1.ok);
00201         infoc_1.infot = 15;
00202         cgtrfs_("N", &c__2, &c__1, dl, e, du, dlf, ef, duf, du2, ip, b, &c__2, 
00203                  x, &c__1, r1, r2, w, rw, &info);
00204         chkxer_("CGTRFS", &infoc_1.infot, &infoc_1.nout, &infoc_1.lerr, &
00205                 infoc_1.ok);
00206 
00207 /*        CGTCON */
00208 
00209         s_copy(srnamc_1.srnamt, "CGTCON", (ftnlen)32, (ftnlen)6);
00210         infoc_1.infot = 1;
00211         cgtcon_("/", &c__0, dl, e, du, du2, ip, &anorm, &rcond, w, &info);
00212         chkxer_("CGTCON", &infoc_1.infot, &infoc_1.nout, &infoc_1.lerr, &
00213                 infoc_1.ok);
00214         infoc_1.infot = 2;
00215         cgtcon_("I", &c_n1, dl, e, du, du2, ip, &anorm, &rcond, w, &info);
00216         chkxer_("CGTCON", &infoc_1.infot, &infoc_1.nout, &infoc_1.lerr, &
00217                 infoc_1.ok);
00218         infoc_1.infot = 8;
00219         r__1 = -anorm;
00220         cgtcon_("I", &c__0, dl, e, du, du2, ip, &r__1, &rcond, w, &info);
00221         chkxer_("CGTCON", &infoc_1.infot, &infoc_1.nout, &infoc_1.lerr, &
00222                 infoc_1.ok);
00223 
00224     } else if (lsamen_(&c__2, c2, "PT")) {
00225 
00226 /*        Test error exits for the positive definite tridiagonal */
00227 /*        routines. */
00228 
00229 /*        CPTTRF */
00230 
00231         s_copy(srnamc_1.srnamt, "CPTTRF", (ftnlen)32, (ftnlen)6);
00232         infoc_1.infot = 1;
00233         cpttrf_(&c_n1, d__, e, &info);
00234         chkxer_("CPTTRF", &infoc_1.infot, &infoc_1.nout, &infoc_1.lerr, &
00235                 infoc_1.ok);
00236 
00237 /*        CPTTRS */
00238 
00239         s_copy(srnamc_1.srnamt, "CPTTRS", (ftnlen)32, (ftnlen)6);
00240         infoc_1.infot = 1;
00241         cpttrs_("/", &c__1, &c__0, d__, e, x, &c__1, &info);
00242         chkxer_("CPTTRS", &infoc_1.infot, &infoc_1.nout, &infoc_1.lerr, &
00243                 infoc_1.ok);
00244         infoc_1.infot = 2;
00245         cpttrs_("U", &c_n1, &c__0, d__, e, x, &c__1, &info);
00246         chkxer_("CPTTRS", &infoc_1.infot, &infoc_1.nout, &infoc_1.lerr, &
00247                 infoc_1.ok);
00248         infoc_1.infot = 3;
00249         cpttrs_("U", &c__0, &c_n1, d__, e, x, &c__1, &info);
00250         chkxer_("CPTTRS", &infoc_1.infot, &infoc_1.nout, &infoc_1.lerr, &
00251                 infoc_1.ok);
00252         infoc_1.infot = 7;
00253         cpttrs_("U", &c__2, &c__1, d__, e, x, &c__1, &info);
00254         chkxer_("CPTTRS", &infoc_1.infot, &infoc_1.nout, &infoc_1.lerr, &
00255                 infoc_1.ok);
00256 
00257 /*        CPTRFS */
00258 
00259         s_copy(srnamc_1.srnamt, "CPTRFS", (ftnlen)32, (ftnlen)6);
00260         infoc_1.infot = 1;
00261         cptrfs_("/", &c__1, &c__0, d__, e, df, ef, b, &c__1, x, &c__1, r1, r2, 
00262                  w, rw, &info);
00263         chkxer_("CPTRFS", &infoc_1.infot, &infoc_1.nout, &infoc_1.lerr, &
00264                 infoc_1.ok);
00265         infoc_1.infot = 2;
00266         cptrfs_("U", &c_n1, &c__0, d__, e, df, ef, b, &c__1, x, &c__1, r1, r2, 
00267                  w, rw, &info);
00268         chkxer_("CPTRFS", &infoc_1.infot, &infoc_1.nout, &infoc_1.lerr, &
00269                 infoc_1.ok);
00270         infoc_1.infot = 3;
00271         cptrfs_("U", &c__0, &c_n1, d__, e, df, ef, b, &c__1, x, &c__1, r1, r2, 
00272                  w, rw, &info);
00273         chkxer_("CPTRFS", &infoc_1.infot, &infoc_1.nout, &infoc_1.lerr, &
00274                 infoc_1.ok);
00275         infoc_1.infot = 9;
00276         cptrfs_("U", &c__2, &c__1, d__, e, df, ef, b, &c__1, x, &c__2, r1, r2, 
00277                  w, rw, &info);
00278         chkxer_("CPTRFS", &infoc_1.infot, &infoc_1.nout, &infoc_1.lerr, &
00279                 infoc_1.ok);
00280         infoc_1.infot = 11;
00281         cptrfs_("U", &c__2, &c__1, d__, e, df, ef, b, &c__2, x, &c__1, r1, r2, 
00282                  w, rw, &info);
00283         chkxer_("CPTRFS", &infoc_1.infot, &infoc_1.nout, &infoc_1.lerr, &
00284                 infoc_1.ok);
00285 
00286 /*        CPTCON */
00287 
00288         s_copy(srnamc_1.srnamt, "CPTCON", (ftnlen)32, (ftnlen)6);
00289         infoc_1.infot = 1;
00290         cptcon_(&c_n1, d__, e, &anorm, &rcond, rw, &info);
00291         chkxer_("CPTCON", &infoc_1.infot, &infoc_1.nout, &infoc_1.lerr, &
00292                 infoc_1.ok);
00293         infoc_1.infot = 4;
00294         r__1 = -anorm;
00295         cptcon_(&c__0, d__, e, &r__1, &rcond, rw, &info);
00296         chkxer_("CPTCON", &infoc_1.infot, &infoc_1.nout, &infoc_1.lerr, &
00297                 infoc_1.ok);
00298     }
00299 
00300 /*     Print a summary line. */
00301 
00302     alaesm_(path, &infoc_1.ok, &infoc_1.nout);
00303 
00304     return 0;
00305 
00306 /*     End of CERRGT */
00307 
00308 } /* cerrgt_ */


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