serrps.c
Go to the documentation of this file.
00001 /* serrps.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__0 = 0;
00034 static integer c__1 = 1;
00035 static real c_b9 = -1.f;
00036 static integer c_n1 = -1;
00037 static integer c__2 = 2;
00038 
00039 /* Subroutine */ int serrps_(char *path, integer *nunit)
00040 {
00041     /* Builtin functions */
00042     integer s_wsle(cilist *), e_wsle(void);
00043     /* Subroutine */ int s_copy(char *, char *, ftnlen, ftnlen);
00044 
00045     /* Local variables */
00046     real a[16]  /* was [4][4] */;
00047     integer i__, j, piv[4], info;
00048     real work[8];
00049     extern /* Subroutine */ int spstf2_(char *, integer *, real *, integer *, 
00050             integer *, integer *, real *, real *, integer *), alaesm_(
00051             char *, logical *, integer *), chkxer_(char *, integer *, 
00052             integer *, logical *, logical *), spstrf_(char *, integer 
00053             *, real *, integer *, integer *, integer *, real *, real *, 
00054             integer *);
00055 
00056     /* Fortran I/O blocks */
00057     static cilist io___1 = { 0, 0, 0, 0, 0 };
00058 
00059 
00060 
00061 /*  -- LAPACK test routine (version 3.1) -- */
00062 /*     Craig Lucas, University of Manchester / NAG Ltd. */
00063 /*     October, 2008 */
00064 
00065 /*     .. Scalar Arguments .. */
00066 /*     .. */
00067 
00068 /*  Purpose */
00069 /*  ======= */
00070 
00071 /*  SERRPS tests the error exits for the REAL routines */
00072 /*  for SPSTRF.. */
00073 
00074 /*  Arguments */
00075 /*  ========= */
00076 
00077 /*  PATH    (input) CHARACTER*3 */
00078 /*          The LAPACK path name for the routines to be tested. */
00079 
00080 /*  NUNIT   (input) INTEGER */
00081 /*          The unit number for output. */
00082 
00083 /*  ===================================================================== */
00084 
00085 /*     .. Parameters .. */
00086 /*     .. */
00087 /*     .. Local Scalars .. */
00088 /*     .. */
00089 /*     .. Local Arrays .. */
00090 /*     .. */
00091 /*     .. External Subroutines .. */
00092 /*     .. */
00093 /*     .. Scalars in Common .. */
00094 /*     .. */
00095 /*     .. Common blocks .. */
00096 /*     .. */
00097 /*     .. Intrinsic Functions .. */
00098 /*     .. */
00099 /*     .. Executable Statements .. */
00100 
00101     infoc_1.nout = *nunit;
00102     io___1.ciunit = infoc_1.nout;
00103     s_wsle(&io___1);
00104     e_wsle();
00105 
00106 /*     Set the variables to innocuous values. */
00107 
00108     for (j = 1; j <= 4; ++j) {
00109         for (i__ = 1; i__ <= 4; ++i__) {
00110             a[i__ + (j << 2) - 5] = 1.f / (real) (i__ + j);
00111 
00112 /* L100: */
00113         }
00114         piv[j - 1] = j;
00115         work[j - 1] = 0.f;
00116         work[j + 3] = 0.f;
00117 
00118 /* L110: */
00119     }
00120     infoc_1.ok = TRUE_;
00121 
00122 
00123 /*        Test error exits of the routines that use the Cholesky */
00124 /*        decomposition of a symmetric positive semidefinite matrix. */
00125 
00126 /*        SPSTRF */
00127 
00128     s_copy(srnamc_1.srnamt, "SPSTRF", (ftnlen)32, (ftnlen)6);
00129     infoc_1.infot = 1;
00130     spstrf_("/", &c__0, a, &c__1, piv, &c__1, &c_b9, work, &info);
00131     chkxer_("SPSTRF", &infoc_1.infot, &infoc_1.nout, &infoc_1.lerr, &
00132             infoc_1.ok);
00133     infoc_1.infot = 2;
00134     spstrf_("U", &c_n1, a, &c__1, piv, &c__1, &c_b9, work, &info);
00135     chkxer_("SPSTRF", &infoc_1.infot, &infoc_1.nout, &infoc_1.lerr, &
00136             infoc_1.ok);
00137     infoc_1.infot = 4;
00138     spstrf_("U", &c__2, a, &c__1, piv, &c__1, &c_b9, work, &info);
00139     chkxer_("SPSTRF", &infoc_1.infot, &infoc_1.nout, &infoc_1.lerr, &
00140             infoc_1.ok);
00141 
00142 /*        SPSTF2 */
00143 
00144     s_copy(srnamc_1.srnamt, "SPSTF2", (ftnlen)32, (ftnlen)6);
00145     infoc_1.infot = 1;
00146     spstf2_("/", &c__0, a, &c__1, piv, &c__1, &c_b9, work, &info);
00147     chkxer_("SPSTF2", &infoc_1.infot, &infoc_1.nout, &infoc_1.lerr, &
00148             infoc_1.ok);
00149     infoc_1.infot = 2;
00150     spstf2_("U", &c_n1, a, &c__1, piv, &c__1, &c_b9, work, &info);
00151     chkxer_("SPSTF2", &infoc_1.infot, &infoc_1.nout, &infoc_1.lerr, &
00152             infoc_1.ok);
00153     infoc_1.infot = 4;
00154     spstf2_("U", &c__2, a, &c__1, piv, &c__1, &c_b9, work, &info);
00155     chkxer_("SPSTF2", &infoc_1.infot, &infoc_1.nout, &infoc_1.lerr, &
00156             infoc_1.ok);
00157 
00158 
00159 /*     Print a summary line. */
00160 
00161     alaesm_(path, &infoc_1.ok, &infoc_1.nout);
00162 
00163     return 0;
00164 
00165 /*     End of SERRPS */
00166 
00167 } /* serrps_ */


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