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


swiftnav
Author(s):
autogenerated on Sat Jun 8 2019 18:56:03