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


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