sdrvvx.c
Go to the documentation of this file.
00001 /* sdrvvx.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 /* Table of constant values */
00017 
00018 static real c_b18 = 0.f;
00019 static integer c__0 = 0;
00020 static real c_b32 = 1.f;
00021 static integer c__4 = 4;
00022 static integer c__6 = 6;
00023 static integer c__1 = 1;
00024 static integer c__2 = 2;
00025 static logical c_false = FALSE_;
00026 static integer c__3 = 3;
00027 static logical c_true = TRUE_;
00028 static integer c__22 = 22;
00029 
00030 /* Subroutine */ int sdrvvx_(integer *nsizes, integer *nn, integer *ntypes, 
00031         logical *dotype, integer *iseed, real *thresh, integer *niunit, 
00032         integer *nounit, real *a, integer *lda, real *h__, real *wr, real *wi, 
00033          real *wr1, real *wi1, real *vl, integer *ldvl, real *vr, integer *
00034         ldvr, real *lre, integer *ldlre, real *rcondv, real *rcndv1, real *
00035         rcdvin, real *rconde, real *rcnde1, real *rcdein, real *scale, real *
00036         scale1, real *result, real *work, integer *nwork, integer *iwork, 
00037         integer *info)
00038 {
00039     /* Initialized data */
00040 
00041     static integer ktype[21] = { 1,2,3,4,4,4,4,4,6,6,6,6,6,6,6,6,6,6,9,9,9 };
00042     static integer kmagn[21] = { 1,1,1,1,1,1,2,3,1,1,1,1,1,1,1,1,2,3,1,2,3 };
00043     static integer kmode[21] = { 0,0,0,4,3,1,4,4,4,3,1,5,4,3,1,5,5,5,4,3,1 };
00044     static integer kconds[21] = { 0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,2,2,0,0,0 };
00045     static char bal[1*4] = "N" "P" "S" "B";
00046 
00047     /* Format strings */
00048     static char fmt_9992[] = "(\002 SDRVVX: \002,a,\002 returned INFO=\002,i"
00049             "6,\002.\002,/9x,\002N=\002,i6,\002, JTYPE=\002,i6,\002, ISEED="
00050             "(\002,3(i5,\002,\002),i5,\002)\002)";
00051     static char fmt_9999[] = "(/1x,a3,\002 -- Real Eigenvalue-Eigenvector De"
00052             "composition\002,\002 Expert Driver\002,/\002 Matrix types (see S"
00053             "DRVVX for details): \002)";
00054     static char fmt_9998[] = "(/\002 Special Matrices:\002,/\002  1=Zero mat"
00055             "rix.             \002,\002           \002,\002  5=Diagonal: geom"
00056             "etr. spaced entries.\002,/\002  2=Identity matrix.              "
00057             "      \002,\002  6=Diagona\002,\002l: clustered entries.\002,"
00058             "/\002  3=Transposed Jordan block.  \002,\002          \002,\002 "
00059             " 7=Diagonal: large, evenly spaced.\002,/\002  \002,\0024=Diagona"
00060             "l: evenly spaced entries.    \002,\002  8=Diagonal: s\002,\002ma"
00061             "ll, evenly spaced.\002)";
00062     static char fmt_9997[] = "(\002 Dense, Non-Symmetric Matrices:\002,/\002"
00063             "  9=Well-cond., ev\002,\002enly spaced eigenvals.\002,\002 14=Il"
00064             "l-cond., geomet. spaced e\002,\002igenals.\002,/\002 10=Well-con"
00065             "d., geom. spaced eigenvals. \002,\002 15=Ill-conditioned, cluste"
00066             "red e.vals.\002,/\002 11=Well-cond\002,\002itioned, clustered e."
00067             "vals. \002,\002 16=Ill-cond., random comp\002,\002lex \002,/\002"
00068             " 12=Well-cond., random complex \002,\002         \002,\002 17=Il"
00069             "l-cond., large rand. complx \002,/\002 13=Ill-condi\002,\002tion"
00070             "ed, evenly spaced.     \002,\002 18=Ill-cond., small rand.\002"
00071             ",\002 complx \002)";
00072     static char fmt_9996[] = "(\002 19=Matrix with random O(1) entries.   "
00073             " \002,\002 21=Matrix \002,\002with small random entries.\002,"
00074             "/\002 20=Matrix with large ran\002,\002dom entries.   \002,\002 "
00075             "22=Matrix read from input file\002,/)";
00076     static char fmt_9995[] = "(\002 Tests performed with test threshold ="
00077             "\002,f8.2,//\002 1 = | A VR - VR W | / ( n |A| ulp ) \002,/\002 "
00078             "2 = | transpose(A) VL - VL W | / ( n |A| ulp ) \002,/\002 3 = | "
00079             "|VR(i)| - 1 | / ulp \002,/\002 4 = | |VL(i)| - 1 | / ulp \002,"
00080             "/\002 5 = 0 if W same no matter if VR or VL computed,\002,\002 1"
00081             "/ulp otherwise\002,/\002 6 = 0 if VR same no matter what else co"
00082             "mputed,\002,\002  1/ulp otherwise\002,/\002 7 = 0 if VL same no "
00083             "matter what else computed,\002,\002  1/ulp otherwise\002,/\002 8"
00084             " = 0 if RCONDV same no matter what else computed,\002,\002  1/ul"
00085             "p otherwise\002,/\002 9 = 0 if SCALE, ILO, IHI, ABNRM same no ma"
00086             "tter what else\002,\002 computed,  1/ulp otherwise\002,/\002 10 "
00087             "= | RCONDV - RCONDV(precomputed) | / cond(RCONDV),\002,/\002 11 "
00088             "= | RCONDE - RCONDE(precomputed) | / cond(RCONDE),\002)";
00089     static char fmt_9994[] = "(\002 BALANC='\002,a1,\002',N=\002,i4,\002,I"
00090             "WK=\002,i1,\002, seed=\002,4(i4,\002,\002),\002 type \002,i2,"
00091             "\002, test(\002,i2,\002)=\002,g10.3)";
00092     static char fmt_9993[] = "(\002 N=\002,i5,\002, input example =\002,i3"
00093             ",\002,  test(\002,i2,\002)=\002,g10.3)";
00094 
00095     /* System generated locals */
00096     integer a_dim1, a_offset, h_dim1, h_offset, lre_dim1, lre_offset, vl_dim1,
00097              vl_offset, vr_dim1, vr_offset, i__1, i__2, i__3;
00098 
00099     /* Builtin functions */
00100     /* Subroutine */ int s_copy(char *, char *, ftnlen, ftnlen);
00101     double sqrt(doublereal);
00102     integer s_wsfe(cilist *), do_fio(integer *, char *, ftnlen), e_wsfe(void),
00103              s_rsle(cilist *), do_lio(integer *, integer *, char *, ftnlen), 
00104             e_rsle(void);
00105 
00106     /* Local variables */
00107     integer i__, j, n, iwk;
00108     real ulp;
00109     integer ibal;
00110     real cond;
00111     integer jcol;
00112     char path[3];
00113     integer nmax;
00114     real unfl, ovfl;
00115     logical badnn;
00116     integer nfail, imode, iinfo;
00117     real conds;
00118     extern /* Subroutine */ int sget23_(logical *, char *, integer *, real *, 
00119             integer *, integer *, integer *, real *, integer *, real *, real *
00120 , real *, real *, real *, real *, integer *, real *, integer *, 
00121             real *, integer *, real *, real *, real *, real *, real *, real *, 
00122              real *, real *, real *, real *, integer *, integer *, integer *);
00123     real anorm;
00124     integer jsize, nerrs, itype, jtype, ntest;
00125     real rtulp;
00126     char balanc[1];
00127     extern /* Subroutine */ int slabad_(real *, real *);
00128     char adumma[1*1];
00129     extern doublereal slamch_(char *);
00130     integer idumma[1];
00131     extern /* Subroutine */ int xerbla_(char *, integer *);
00132     integer ioldsd[4];
00133     extern /* Subroutine */ int slatme_(integer *, char *, integer *, real *, 
00134             integer *, real *, real *, char *, char *, char *, char *, real *, 
00135              integer *, real *, integer *, integer *, real *, real *, integer 
00136             *, real *, integer *), 
00137             slaset_(char *, integer *, integer *, real *, real *, real *, 
00138             integer *), slatmr_(integer *, integer *, char *, integer 
00139             *, char *, real *, integer *, real *, real *, char *, char *, 
00140             real *, integer *, real *, real *, integer *, real *, char *, 
00141             integer *, integer *, integer *, real *, real *, char *, real *, 
00142             integer *, integer *, integer *);
00143     integer ntestf;
00144     extern /* Subroutine */ int slasum_(char *, integer *, integer *, integer 
00145             *), slatms_(integer *, integer *, char *, integer *, char 
00146             *, real *, integer *, real *, real *, integer *, integer *, char *
00147 , real *, integer *, real *, integer *);
00148     real ulpinv;
00149     integer nnwork;
00150     real rtulpi;
00151     integer mtypes, ntestt;
00152 
00153     /* Fortran I/O blocks */
00154     static cilist io___33 = { 0, 0, 0, fmt_9992, 0 };
00155     static cilist io___40 = { 0, 0, 0, fmt_9999, 0 };
00156     static cilist io___41 = { 0, 0, 0, fmt_9998, 0 };
00157     static cilist io___42 = { 0, 0, 0, fmt_9997, 0 };
00158     static cilist io___43 = { 0, 0, 0, fmt_9996, 0 };
00159     static cilist io___44 = { 0, 0, 0, fmt_9995, 0 };
00160     static cilist io___45 = { 0, 0, 0, fmt_9994, 0 };
00161     static cilist io___46 = { 0, 0, 1, 0, 0 };
00162     static cilist io___48 = { 0, 0, 0, 0, 0 };
00163     static cilist io___49 = { 0, 0, 0, 0, 0 };
00164     static cilist io___50 = { 0, 0, 0, fmt_9999, 0 };
00165     static cilist io___51 = { 0, 0, 0, fmt_9998, 0 };
00166     static cilist io___52 = { 0, 0, 0, fmt_9997, 0 };
00167     static cilist io___53 = { 0, 0, 0, fmt_9996, 0 };
00168     static cilist io___54 = { 0, 0, 0, fmt_9995, 0 };
00169     static cilist io___55 = { 0, 0, 0, fmt_9993, 0 };
00170 
00171 
00172 
00173 /*  -- LAPACK test routine (version 3.1) -- */
00174 /*     Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd.. */
00175 /*     November 2006 */
00176 
00177 /*     .. Scalar Arguments .. */
00178 /*     .. */
00179 /*     .. Array Arguments .. */
00180 /*     .. */
00181 
00182 /*  Purpose */
00183 /*  ======= */
00184 
00185 /*     SDRVVX  checks the nonsymmetric eigenvalue problem expert driver */
00186 /*     SGEEVX. */
00187 
00188 /*     SDRVVX uses both test matrices generated randomly depending on */
00189 /*     data supplied in the calling sequence, as well as on data */
00190 /*     read from an input file and including precomputed condition */
00191 /*     numbers to which it compares the ones it computes. */
00192 
00193 /*     When SDRVVX is called, a number of matrix "sizes" ("n's") and a */
00194 /*     number of matrix "types" are specified in the calling sequence. */
00195 /*     For each size ("n") and each type of matrix, one matrix will be */
00196 /*     generated and used to test the nonsymmetric eigenroutines.  For */
00197 /*     each matrix, 9 tests will be performed: */
00198 
00199 /*     (1)     | A * VR - VR * W | / ( n |A| ulp ) */
00200 
00201 /*       Here VR is the matrix of unit right eigenvectors. */
00202 /*       W is a block diagonal matrix, with a 1x1 block for each */
00203 /*       real eigenvalue and a 2x2 block for each complex conjugate */
00204 /*       pair.  If eigenvalues j and j+1 are a complex conjugate pair, */
00205 /*       so WR(j) = WR(j+1) = wr and WI(j) = - WI(j+1) = wi, then the */
00206 /*       2 x 2 block corresponding to the pair will be: */
00207 
00208 /*               (  wr  wi  ) */
00209 /*               ( -wi  wr  ) */
00210 
00211 /*       Such a block multiplying an n x 2 matrix  ( ur ui ) on the */
00212 /*       right will be the same as multiplying  ur + i*ui  by  wr + i*wi. */
00213 
00214 /*     (2)     | A**H * VL - VL * W**H | / ( n |A| ulp ) */
00215 
00216 /*       Here VL is the matrix of unit left eigenvectors, A**H is the */
00217 /*       conjugate transpose of A, and W is as above. */
00218 
00219 /*     (3)     | |VR(i)| - 1 | / ulp and largest component real */
00220 
00221 /*       VR(i) denotes the i-th column of VR. */
00222 
00223 /*     (4)     | |VL(i)| - 1 | / ulp and largest component real */
00224 
00225 /*       VL(i) denotes the i-th column of VL. */
00226 
00227 /*     (5)     W(full) = W(partial) */
00228 
00229 /*       W(full) denotes the eigenvalues computed when VR, VL, RCONDV */
00230 /*       and RCONDE are also computed, and W(partial) denotes the */
00231 /*       eigenvalues computed when only some of VR, VL, RCONDV, and */
00232 /*       RCONDE are computed. */
00233 
00234 /*     (6)     VR(full) = VR(partial) */
00235 
00236 /*       VR(full) denotes the right eigenvectors computed when VL, RCONDV */
00237 /*       and RCONDE are computed, and VR(partial) denotes the result */
00238 /*       when only some of VL and RCONDV are computed. */
00239 
00240 /*     (7)     VL(full) = VL(partial) */
00241 
00242 /*       VL(full) denotes the left eigenvectors computed when VR, RCONDV */
00243 /*       and RCONDE are computed, and VL(partial) denotes the result */
00244 /*       when only some of VR and RCONDV are computed. */
00245 
00246 /*     (8)     0 if SCALE, ILO, IHI, ABNRM (full) = */
00247 /*                  SCALE, ILO, IHI, ABNRM (partial) */
00248 /*             1/ulp otherwise */
00249 
00250 /*       SCALE, ILO, IHI and ABNRM describe how the matrix is balanced. */
00251 /*       (full) is when VR, VL, RCONDE and RCONDV are also computed, and */
00252 /*       (partial) is when some are not computed. */
00253 
00254 /*     (9)     RCONDV(full) = RCONDV(partial) */
00255 
00256 /*       RCONDV(full) denotes the reciprocal condition numbers of the */
00257 /*       right eigenvectors computed when VR, VL and RCONDE are also */
00258 /*       computed. RCONDV(partial) denotes the reciprocal condition */
00259 /*       numbers when only some of VR, VL and RCONDE are computed. */
00260 
00261 /*     The "sizes" are specified by an array NN(1:NSIZES); the value of */
00262 /*     each element NN(j) specifies one size. */
00263 /*     The "types" are specified by a logical array DOTYPE( 1:NTYPES ); */
00264 /*     if DOTYPE(j) is .TRUE., then matrix type "j" will be generated. */
00265 /*     Currently, the list of possible types is: */
00266 
00267 /*     (1)  The zero matrix. */
00268 /*     (2)  The identity matrix. */
00269 /*     (3)  A (transposed) Jordan block, with 1's on the diagonal. */
00270 
00271 /*     (4)  A diagonal matrix with evenly spaced entries */
00272 /*          1, ..., ULP  and random signs. */
00273 /*          (ULP = (first number larger than 1) - 1 ) */
00274 /*     (5)  A diagonal matrix with geometrically spaced entries */
00275 /*          1, ..., ULP  and random signs. */
00276 /*     (6)  A diagonal matrix with "clustered" entries 1, ULP, ..., ULP */
00277 /*          and random signs. */
00278 
00279 /*     (7)  Same as (4), but multiplied by a constant near */
00280 /*          the overflow threshold */
00281 /*     (8)  Same as (4), but multiplied by a constant near */
00282 /*          the underflow threshold */
00283 
00284 /*     (9)  A matrix of the form  U' T U, where U is orthogonal and */
00285 /*          T has evenly spaced entries 1, ..., ULP with random signs */
00286 /*          on the diagonal and random O(1) entries in the upper */
00287 /*          triangle. */
00288 
00289 /*     (10) A matrix of the form  U' T U, where U is orthogonal and */
00290 /*          T has geometrically spaced entries 1, ..., ULP with random */
00291 /*          signs on the diagonal and random O(1) entries in the upper */
00292 /*          triangle. */
00293 
00294 /*     (11) A matrix of the form  U' T U, where U is orthogonal and */
00295 /*          T has "clustered" entries 1, ULP,..., ULP with random */
00296 /*          signs on the diagonal and random O(1) entries in the upper */
00297 /*          triangle. */
00298 
00299 /*     (12) A matrix of the form  U' T U, where U is orthogonal and */
00300 /*          T has real or complex conjugate paired eigenvalues randomly */
00301 /*          chosen from ( ULP, 1 ) and random O(1) entries in the upper */
00302 /*          triangle. */
00303 
00304 /*     (13) A matrix of the form  X' T X, where X has condition */
00305 /*          SQRT( ULP ) and T has evenly spaced entries 1, ..., ULP */
00306 /*          with random signs on the diagonal and random O(1) entries */
00307 /*          in the upper triangle. */
00308 
00309 /*     (14) A matrix of the form  X' T X, where X has condition */
00310 /*          SQRT( ULP ) and T has geometrically spaced entries */
00311 /*          1, ..., ULP with random signs on the diagonal and random */
00312 /*          O(1) entries in the upper triangle. */
00313 
00314 /*     (15) A matrix of the form  X' T X, where X has condition */
00315 /*          SQRT( ULP ) and T has "clustered" entries 1, ULP,..., ULP */
00316 /*          with random signs on the diagonal and random O(1) entries */
00317 /*          in the upper triangle. */
00318 
00319 /*     (16) A matrix of the form  X' T X, where X has condition */
00320 /*          SQRT( ULP ) and T has real or complex conjugate paired */
00321 /*          eigenvalues randomly chosen from ( ULP, 1 ) and random */
00322 /*          O(1) entries in the upper triangle. */
00323 
00324 /*     (17) Same as (16), but multiplied by a constant */
00325 /*          near the overflow threshold */
00326 /*     (18) Same as (16), but multiplied by a constant */
00327 /*          near the underflow threshold */
00328 
00329 /*     (19) Nonsymmetric matrix with random entries chosen from (-1,1). */
00330 /*          If N is at least 4, all entries in first two rows and last */
00331 /*          row, and first column and last two columns are zero. */
00332 /*     (20) Same as (19), but multiplied by a constant */
00333 /*          near the overflow threshold */
00334 /*     (21) Same as (19), but multiplied by a constant */
00335 /*          near the underflow threshold */
00336 
00337 /*     In addition, an input file will be read from logical unit number */
00338 /*     NIUNIT. The file contains matrices along with precomputed */
00339 /*     eigenvalues and reciprocal condition numbers for the eigenvalues */
00340 /*     and right eigenvectors. For these matrices, in addition to tests */
00341 /*     (1) to (9) we will compute the following two tests: */
00342 
00343 /*    (10)  |RCONDV - RCDVIN| / cond(RCONDV) */
00344 
00345 /*       RCONDV is the reciprocal right eigenvector condition number */
00346 /*       computed by SGEEVX and RCDVIN (the precomputed true value) */
00347 /*       is supplied as input. cond(RCONDV) is the condition number of */
00348 /*       RCONDV, and takes errors in computing RCONDV into account, so */
00349 /*       that the resulting quantity should be O(ULP). cond(RCONDV) is */
00350 /*       essentially given by norm(A)/RCONDE. */
00351 
00352 /*    (11)  |RCONDE - RCDEIN| / cond(RCONDE) */
00353 
00354 /*       RCONDE is the reciprocal eigenvalue condition number */
00355 /*       computed by SGEEVX and RCDEIN (the precomputed true value) */
00356 /*       is supplied as input.  cond(RCONDE) is the condition number */
00357 /*       of RCONDE, and takes errors in computing RCONDE into account, */
00358 /*       so that the resulting quantity should be O(ULP). cond(RCONDE) */
00359 /*       is essentially given by norm(A)/RCONDV. */
00360 
00361 /*  Arguments */
00362 /*  ========== */
00363 
00364 /*  NSIZES  (input) INTEGER */
00365 /*          The number of sizes of matrices to use.  NSIZES must be at */
00366 /*          least zero. If it is zero, no randomly generated matrices */
00367 /*          are tested, but any test matrices read from NIUNIT will be */
00368 /*          tested. */
00369 
00370 /*  NN      (input) INTEGER array, dimension (NSIZES) */
00371 /*          An array containing the sizes to be used for the matrices. */
00372 /*          Zero values will be skipped.  The values must be at least */
00373 /*          zero. */
00374 
00375 /*  NTYPES  (input) INTEGER */
00376 /*          The number of elements in DOTYPE. NTYPES must be at least */
00377 /*          zero. If it is zero, no randomly generated test matrices */
00378 /*          are tested, but and test matrices read from NIUNIT will be */
00379 /*          tested. If it is MAXTYP+1 and NSIZES is 1, then an */
00380 /*          additional type, MAXTYP+1 is defined, which is to use */
00381 /*          whatever matrix is in A.  This is only useful if */
00382 /*          DOTYPE(1:MAXTYP) is .FALSE. and DOTYPE(MAXTYP+1) is .TRUE. . */
00383 
00384 /*  DOTYPE  (input) LOGICAL array, dimension (NTYPES) */
00385 /*          If DOTYPE(j) is .TRUE., then for each size in NN a */
00386 /*          matrix of that size and of type j will be generated. */
00387 /*          If NTYPES is smaller than the maximum number of types */
00388 /*          defined (PARAMETER MAXTYP), then types NTYPES+1 through */
00389 /*          MAXTYP will not be generated.  If NTYPES is larger */
00390 /*          than MAXTYP, DOTYPE(MAXTYP+1) through DOTYPE(NTYPES) */
00391 /*          will be ignored. */
00392 
00393 /*  ISEED   (input/output) INTEGER array, dimension (4) */
00394 /*          On entry ISEED specifies the seed of the random number */
00395 /*          generator. The array elements should be between 0 and 4095; */
00396 /*          if not they will be reduced mod 4096.  Also, ISEED(4) must */
00397 /*          be odd.  The random number generator uses a linear */
00398 /*          congruential sequence limited to small integers, and so */
00399 /*          should produce machine independent random numbers. The */
00400 /*          values of ISEED are changed on exit, and can be used in the */
00401 /*          next call to SDRVVX to continue the same random number */
00402 /*          sequence. */
00403 
00404 /*  THRESH  (input) REAL */
00405 /*          A test will count as "failed" if the "error", computed as */
00406 /*          described above, exceeds THRESH.  Note that the error */
00407 /*          is scaled to be O(1), so THRESH should be a reasonably */
00408 /*          small multiple of 1, e.g., 10 or 100.  In particular, */
00409 /*          it should not depend on the precision (single vs. double) */
00410 /*          or the size of the matrix.  It must be at least zero. */
00411 
00412 /*  NIUNIT  (input) INTEGER */
00413 /*          The FORTRAN unit number for reading in the data file of */
00414 /*          problems to solve. */
00415 
00416 /*  NOUNIT  (input) INTEGER */
00417 /*          The FORTRAN unit number for printing out error messages */
00418 /*          (e.g., if a routine returns INFO not equal to 0.) */
00419 
00420 /*  A       (workspace) REAL array, dimension */
00421 /*                      (LDA, max(NN,12)) */
00422 /*          Used to hold the matrix whose eigenvalues are to be */
00423 /*          computed.  On exit, A contains the last matrix actually used. */
00424 
00425 /*  LDA     (input) INTEGER */
00426 /*          The leading dimension of the arrays A and H. */
00427 /*          LDA >= max(NN,12), since 12 is the dimension of the largest */
00428 /*          matrix in the precomputed input file. */
00429 
00430 /*  H       (workspace) REAL array, dimension */
00431 /*                      (LDA, max(NN,12)) */
00432 /*          Another copy of the test matrix A, modified by SGEEVX. */
00433 
00434 /*  WR      (workspace) REAL array, dimension (max(NN)) */
00435 /*  WI      (workspace) REAL array, dimension (max(NN)) */
00436 /*          The real and imaginary parts of the eigenvalues of A. */
00437 /*          On exit, WR + WI*i are the eigenvalues of the matrix in A. */
00438 
00439 /*  WR1     (workspace) REAL array, dimension (max(NN,12)) */
00440 /*  WI1     (workspace) REAL array, dimension (max(NN,12)) */
00441 /*          Like WR, WI, these arrays contain the eigenvalues of A, */
00442 /*          but those computed when SGEEVX only computes a partial */
00443 /*          eigendecomposition, i.e. not the eigenvalues and left */
00444 /*          and right eigenvectors. */
00445 
00446 /*  VL      (workspace) REAL array, dimension */
00447 /*                      (LDVL, max(NN,12)) */
00448 /*          VL holds the computed left eigenvectors. */
00449 
00450 /*  LDVL    (input) INTEGER */
00451 /*          Leading dimension of VL. Must be at least max(1,max(NN,12)). */
00452 
00453 /*  VR      (workspace) REAL array, dimension */
00454 /*                      (LDVR, max(NN,12)) */
00455 /*          VR holds the computed right eigenvectors. */
00456 
00457 /*  LDVR    (input) INTEGER */
00458 /*          Leading dimension of VR. Must be at least max(1,max(NN,12)). */
00459 
00460 /*  LRE     (workspace) REAL array, dimension */
00461 /*                      (LDLRE, max(NN,12)) */
00462 /*          LRE holds the computed right or left eigenvectors. */
00463 
00464 /*  LDLRE   (input) INTEGER */
00465 /*          Leading dimension of LRE. Must be at least max(1,max(NN,12)) */
00466 
00467 /*  RCONDV  (workspace) REAL array, dimension (N) */
00468 /*          RCONDV holds the computed reciprocal condition numbers */
00469 /*          for eigenvectors. */
00470 
00471 /*  RCNDV1  (workspace) REAL array, dimension (N) */
00472 /*          RCNDV1 holds more computed reciprocal condition numbers */
00473 /*          for eigenvectors. */
00474 
00475 /*  RCDVIN  (workspace) REAL array, dimension (N) */
00476 /*          When COMP = .TRUE. RCDVIN holds the precomputed reciprocal */
00477 /*          condition numbers for eigenvectors to be compared with */
00478 /*          RCONDV. */
00479 
00480 /*  RCONDE  (workspace) REAL array, dimension (N) */
00481 /*          RCONDE holds the computed reciprocal condition numbers */
00482 /*          for eigenvalues. */
00483 
00484 /*  RCNDE1  (workspace) REAL array, dimension (N) */
00485 /*          RCNDE1 holds more computed reciprocal condition numbers */
00486 /*          for eigenvalues. */
00487 
00488 /*  RCDEIN  (workspace) REAL array, dimension (N) */
00489 /*          When COMP = .TRUE. RCDEIN holds the precomputed reciprocal */
00490 /*          condition numbers for eigenvalues to be compared with */
00491 /*          RCONDE. */
00492 
00493 /*  RESULT  (output) REAL array, dimension (11) */
00494 /*          The values computed by the seven tests described above. */
00495 /*          The values are currently limited to 1/ulp, to avoid overflow. */
00496 
00497 /*  WORK    (workspace) REAL array, dimension (NWORK) */
00498 
00499 /*  NWORK   (input) INTEGER */
00500 /*          The number of entries in WORK.  This must be at least */
00501 /*          max(6*12+2*12**2,6*NN(j)+2*NN(j)**2) = */
00502 /*          max(    360     ,6*NN(j)+2*NN(j)**2)    for all j. */
00503 
00504 /*  IWORK   (workspace) INTEGER array, dimension (2*max(NN,12)) */
00505 
00506 /*  INFO    (output) INTEGER */
00507 /*          If 0,  then successful exit. */
00508 /*          If <0, then input paramter -INFO is incorrect. */
00509 /*          If >0, SLATMR, SLATMS, SLATME or SGET23 returned an error */
00510 /*                 code, and INFO is its absolute value. */
00511 
00512 /* ----------------------------------------------------------------------- */
00513 
00514 /*     Some Local Variables and Parameters: */
00515 /*     ---- ----- --------- --- ---------- */
00516 
00517 /*     ZERO, ONE       Real 0 and 1. */
00518 /*     MAXTYP          The number of types defined. */
00519 /*     NMAX            Largest value in NN or 12. */
00520 /*     NERRS           The number of tests which have exceeded THRESH */
00521 /*     COND, CONDS, */
00522 /*     IMODE           Values to be passed to the matrix generators. */
00523 /*     ANORM           Norm of A; passed to matrix generators. */
00524 
00525 /*     OVFL, UNFL      Overflow and underflow thresholds. */
00526 /*     ULP, ULPINV     Finest relative precision and its inverse. */
00527 /*     RTULP, RTULPI   Square roots of the previous 4 values. */
00528 
00529 /*             The following four arrays decode JTYPE: */
00530 /*     KTYPE(j)        The general type (1-10) for type "j". */
00531 /*     KMODE(j)        The MODE value to be passed to the matrix */
00532 /*                     generator for type "j". */
00533 /*     KMAGN(j)        The order of magnitude ( O(1), */
00534 /*                     O(overflow^(1/2) ), O(underflow^(1/2) ) */
00535 /*     KCONDS(j)       Selectw whether CONDS is to be 1 or */
00536 /*                     1/sqrt(ulp).  (0 means irrelevant.) */
00537 
00538 /*  ===================================================================== */
00539 
00540 /*     .. Parameters .. */
00541 /*     .. */
00542 /*     .. Local Scalars .. */
00543 /*     .. */
00544 /*     .. Local Arrays .. */
00545 /*     .. */
00546 /*     .. External Functions .. */
00547 /*     .. */
00548 /*     .. External Subroutines .. */
00549 /*     .. */
00550 /*     .. Intrinsic Functions .. */
00551 /*     .. */
00552 /*     .. Data statements .. */
00553     /* Parameter adjustments */
00554     --nn;
00555     --dotype;
00556     --iseed;
00557     h_dim1 = *lda;
00558     h_offset = 1 + h_dim1;
00559     h__ -= h_offset;
00560     a_dim1 = *lda;
00561     a_offset = 1 + a_dim1;
00562     a -= a_offset;
00563     --wr;
00564     --wi;
00565     --wr1;
00566     --wi1;
00567     vl_dim1 = *ldvl;
00568     vl_offset = 1 + vl_dim1;
00569     vl -= vl_offset;
00570     vr_dim1 = *ldvr;
00571     vr_offset = 1 + vr_dim1;
00572     vr -= vr_offset;
00573     lre_dim1 = *ldlre;
00574     lre_offset = 1 + lre_dim1;
00575     lre -= lre_offset;
00576     --rcondv;
00577     --rcndv1;
00578     --rcdvin;
00579     --rconde;
00580     --rcnde1;
00581     --rcdein;
00582     --scale;
00583     --scale1;
00584     --result;
00585     --work;
00586     --iwork;
00587 
00588     /* Function Body */
00589 /*     .. */
00590 /*     .. Executable Statements .. */
00591 
00592     s_copy(path, "Single precision", (ftnlen)1, (ftnlen)16);
00593     s_copy(path + 1, "VX", (ftnlen)2, (ftnlen)2);
00594 
00595 /*     Check for errors */
00596 
00597     ntestt = 0;
00598     ntestf = 0;
00599     *info = 0;
00600 
00601 /*     Important constants */
00602 
00603     badnn = FALSE_;
00604 
00605 /*     12 is the largest dimension in the input file of precomputed */
00606 /*     problems */
00607 
00608     nmax = 12;
00609     i__1 = *nsizes;
00610     for (j = 1; j <= i__1; ++j) {
00611 /* Computing MAX */
00612         i__2 = nmax, i__3 = nn[j];
00613         nmax = max(i__2,i__3);
00614         if (nn[j] < 0) {
00615             badnn = TRUE_;
00616         }
00617 /* L10: */
00618     }
00619 
00620 /*     Check for errors */
00621 
00622     if (*nsizes < 0) {
00623         *info = -1;
00624     } else if (badnn) {
00625         *info = -2;
00626     } else if (*ntypes < 0) {
00627         *info = -3;
00628     } else if (*thresh < 0.f) {
00629         *info = -6;
00630     } else if (*lda < 1 || *lda < nmax) {
00631         *info = -10;
00632     } else if (*ldvl < 1 || *ldvl < nmax) {
00633         *info = -17;
00634     } else if (*ldvr < 1 || *ldvr < nmax) {
00635         *info = -19;
00636     } else if (*ldlre < 1 || *ldlre < nmax) {
00637         *info = -21;
00638     } else /* if(complicated condition) */ {
00639 /* Computing 2nd power */
00640         i__1 = nmax;
00641         if (nmax * 6 + (i__1 * i__1 << 1) > *nwork) {
00642             *info = -32;
00643         }
00644     }
00645 
00646     if (*info != 0) {
00647         i__1 = -(*info);
00648         xerbla_("SDRVVX", &i__1);
00649         return 0;
00650     }
00651 
00652 /*     If nothing to do check on NIUNIT */
00653 
00654     if (*nsizes == 0 || *ntypes == 0) {
00655         goto L160;
00656     }
00657 
00658 /*     More Important constants */
00659 
00660     unfl = slamch_("Safe minimum");
00661     ovfl = 1.f / unfl;
00662     slabad_(&unfl, &ovfl);
00663     ulp = slamch_("Precision");
00664     ulpinv = 1.f / ulp;
00665     rtulp = sqrt(ulp);
00666     rtulpi = 1.f / rtulp;
00667 
00668 /*     Loop over sizes, types */
00669 
00670     nerrs = 0;
00671 
00672     i__1 = *nsizes;
00673     for (jsize = 1; jsize <= i__1; ++jsize) {
00674         n = nn[jsize];
00675         if (*nsizes != 1) {
00676             mtypes = min(21,*ntypes);
00677         } else {
00678             mtypes = min(22,*ntypes);
00679         }
00680 
00681         i__2 = mtypes;
00682         for (jtype = 1; jtype <= i__2; ++jtype) {
00683             if (! dotype[jtype]) {
00684                 goto L140;
00685             }
00686 
00687 /*           Save ISEED in case of an error. */
00688 
00689             for (j = 1; j <= 4; ++j) {
00690                 ioldsd[j - 1] = iseed[j];
00691 /* L20: */
00692             }
00693 
00694 /*           Compute "A" */
00695 
00696 /*           Control parameters: */
00697 
00698 /*           KMAGN  KCONDS  KMODE        KTYPE */
00699 /*       =1  O(1)   1       clustered 1  zero */
00700 /*       =2  large  large   clustered 2  identity */
00701 /*       =3  small          exponential  Jordan */
00702 /*       =4                 arithmetic   diagonal, (w/ eigenvalues) */
00703 /*       =5                 random log   symmetric, w/ eigenvalues */
00704 /*       =6                 random       general, w/ eigenvalues */
00705 /*       =7                              random diagonal */
00706 /*       =8                              random symmetric */
00707 /*       =9                              random general */
00708 /*       =10                             random triangular */
00709 
00710             if (mtypes > 21) {
00711                 goto L90;
00712             }
00713 
00714             itype = ktype[jtype - 1];
00715             imode = kmode[jtype - 1];
00716 
00717 /*           Compute norm */
00718 
00719             switch (kmagn[jtype - 1]) {
00720                 case 1:  goto L30;
00721                 case 2:  goto L40;
00722                 case 3:  goto L50;
00723             }
00724 
00725 L30:
00726             anorm = 1.f;
00727             goto L60;
00728 
00729 L40:
00730             anorm = ovfl * ulp;
00731             goto L60;
00732 
00733 L50:
00734             anorm = unfl * ulpinv;
00735             goto L60;
00736 
00737 L60:
00738 
00739             slaset_("Full", lda, &n, &c_b18, &c_b18, &a[a_offset], lda);
00740             iinfo = 0;
00741             cond = ulpinv;
00742 
00743 /*           Special Matrices -- Identity & Jordan block */
00744 
00745 /*              Zero */
00746 
00747             if (itype == 1) {
00748                 iinfo = 0;
00749 
00750             } else if (itype == 2) {
00751 
00752 /*              Identity */
00753 
00754                 i__3 = n;
00755                 for (jcol = 1; jcol <= i__3; ++jcol) {
00756                     a[jcol + jcol * a_dim1] = anorm;
00757 /* L70: */
00758                 }
00759 
00760             } else if (itype == 3) {
00761 
00762 /*              Jordan Block */
00763 
00764                 i__3 = n;
00765                 for (jcol = 1; jcol <= i__3; ++jcol) {
00766                     a[jcol + jcol * a_dim1] = anorm;
00767                     if (jcol > 1) {
00768                         a[jcol + (jcol - 1) * a_dim1] = 1.f;
00769                     }
00770 /* L80: */
00771                 }
00772 
00773             } else if (itype == 4) {
00774 
00775 /*              Diagonal Matrix, [Eigen]values Specified */
00776 
00777                 slatms_(&n, &n, "S", &iseed[1], "S", &work[1], &imode, &cond, 
00778                         &anorm, &c__0, &c__0, "N", &a[a_offset], lda, &work[n 
00779                         + 1], &iinfo);
00780 
00781             } else if (itype == 5) {
00782 
00783 /*              Symmetric, eigenvalues specified */
00784 
00785                 slatms_(&n, &n, "S", &iseed[1], "S", &work[1], &imode, &cond, 
00786                         &anorm, &n, &n, "N", &a[a_offset], lda, &work[n + 1], 
00787                         &iinfo);
00788 
00789             } else if (itype == 6) {
00790 
00791 /*              General, eigenvalues specified */
00792 
00793                 if (kconds[jtype - 1] == 1) {
00794                     conds = 1.f;
00795                 } else if (kconds[jtype - 1] == 2) {
00796                     conds = rtulpi;
00797                 } else {
00798                     conds = 0.f;
00799                 }
00800 
00801                 *(unsigned char *)&adumma[0] = ' ';
00802                 slatme_(&n, "S", &iseed[1], &work[1], &imode, &cond, &c_b32, 
00803                         adumma, "T", "T", "T", &work[n + 1], &c__4, &conds, &
00804                         n, &n, &anorm, &a[a_offset], lda, &work[(n << 1) + 1], 
00805                          &iinfo);
00806 
00807             } else if (itype == 7) {
00808 
00809 /*              Diagonal, random eigenvalues */
00810 
00811                 slatmr_(&n, &n, "S", &iseed[1], "S", &work[1], &c__6, &c_b32, 
00812                         &c_b32, "T", "N", &work[n + 1], &c__1, &c_b32, &work[(
00813                         n << 1) + 1], &c__1, &c_b32, "N", idumma, &c__0, &
00814                         c__0, &c_b18, &anorm, "NO", &a[a_offset], lda, &iwork[
00815                         1], &iinfo);
00816 
00817             } else if (itype == 8) {
00818 
00819 /*              Symmetric, random eigenvalues */
00820 
00821                 slatmr_(&n, &n, "S", &iseed[1], "S", &work[1], &c__6, &c_b32, 
00822                         &c_b32, "T", "N", &work[n + 1], &c__1, &c_b32, &work[(
00823                         n << 1) + 1], &c__1, &c_b32, "N", idumma, &n, &n, &
00824                         c_b18, &anorm, "NO", &a[a_offset], lda, &iwork[1], &
00825                         iinfo);
00826 
00827             } else if (itype == 9) {
00828 
00829 /*              General, random eigenvalues */
00830 
00831                 slatmr_(&n, &n, "S", &iseed[1], "N", &work[1], &c__6, &c_b32, 
00832                         &c_b32, "T", "N", &work[n + 1], &c__1, &c_b32, &work[(
00833                         n << 1) + 1], &c__1, &c_b32, "N", idumma, &n, &n, &
00834                         c_b18, &anorm, "NO", &a[a_offset], lda, &iwork[1], &
00835                         iinfo);
00836                 if (n >= 4) {
00837                     slaset_("Full", &c__2, &n, &c_b18, &c_b18, &a[a_offset], 
00838                             lda);
00839                     i__3 = n - 3;
00840                     slaset_("Full", &i__3, &c__1, &c_b18, &c_b18, &a[a_dim1 + 
00841                             3], lda);
00842                     i__3 = n - 3;
00843                     slaset_("Full", &i__3, &c__2, &c_b18, &c_b18, &a[(n - 1) *
00844                              a_dim1 + 3], lda);
00845                     slaset_("Full", &c__1, &n, &c_b18, &c_b18, &a[n + a_dim1], 
00846                              lda);
00847                 }
00848 
00849             } else if (itype == 10) {
00850 
00851 /*              Triangular, random eigenvalues */
00852 
00853                 slatmr_(&n, &n, "S", &iseed[1], "N", &work[1], &c__6, &c_b32, 
00854                         &c_b32, "T", "N", &work[n + 1], &c__1, &c_b32, &work[(
00855                         n << 1) + 1], &c__1, &c_b32, "N", idumma, &n, &c__0, &
00856                         c_b18, &anorm, "NO", &a[a_offset], lda, &iwork[1], &
00857                         iinfo);
00858 
00859             } else {
00860 
00861                 iinfo = 1;
00862             }
00863 
00864             if (iinfo != 0) {
00865                 io___33.ciunit = *nounit;
00866                 s_wsfe(&io___33);
00867                 do_fio(&c__1, "Generator", (ftnlen)9);
00868                 do_fio(&c__1, (char *)&iinfo, (ftnlen)sizeof(integer));
00869                 do_fio(&c__1, (char *)&n, (ftnlen)sizeof(integer));
00870                 do_fio(&c__1, (char *)&jtype, (ftnlen)sizeof(integer));
00871                 do_fio(&c__4, (char *)&ioldsd[0], (ftnlen)sizeof(integer));
00872                 e_wsfe();
00873                 *info = abs(iinfo);
00874                 return 0;
00875             }
00876 
00877 L90:
00878 
00879 /*           Test for minimal and generous workspace */
00880 
00881             for (iwk = 1; iwk <= 3; ++iwk) {
00882                 if (iwk == 1) {
00883                     nnwork = n * 3;
00884                 } else if (iwk == 2) {
00885 /* Computing 2nd power */
00886                     i__3 = n;
00887                     nnwork = n * 6 + i__3 * i__3;
00888                 } else {
00889 /* Computing 2nd power */
00890                     i__3 = n;
00891                     nnwork = n * 6 + (i__3 * i__3 << 1);
00892                 }
00893                 nnwork = max(nnwork,1);
00894 
00895 /*              Test for all balancing options */
00896 
00897                 for (ibal = 1; ibal <= 4; ++ibal) {
00898                     *(unsigned char *)balanc = *(unsigned char *)&bal[ibal - 
00899                             1];
00900 
00901 /*                 Perform tests */
00902 
00903                     sget23_(&c_false, balanc, &jtype, thresh, ioldsd, nounit, 
00904                             &n, &a[a_offset], lda, &h__[h_offset], &wr[1], &
00905                             wi[1], &wr1[1], &wi1[1], &vl[vl_offset], ldvl, &
00906                             vr[vr_offset], ldvr, &lre[lre_offset], ldlre, &
00907                             rcondv[1], &rcndv1[1], &rcdvin[1], &rconde[1], &
00908                             rcnde1[1], &rcdein[1], &scale[1], &scale1[1], &
00909                             result[1], &work[1], &nnwork, &iwork[1], info);
00910 
00911 /*                 Check for RESULT(j) > THRESH */
00912 
00913                     ntest = 0;
00914                     nfail = 0;
00915                     for (j = 1; j <= 9; ++j) {
00916                         if (result[j] >= 0.f) {
00917                             ++ntest;
00918                         }
00919                         if (result[j] >= *thresh) {
00920                             ++nfail;
00921                         }
00922 /* L100: */
00923                     }
00924 
00925                     if (nfail > 0) {
00926                         ++ntestf;
00927                     }
00928                     if (ntestf == 1) {
00929                         io___40.ciunit = *nounit;
00930                         s_wsfe(&io___40);
00931                         do_fio(&c__1, path, (ftnlen)3);
00932                         e_wsfe();
00933                         io___41.ciunit = *nounit;
00934                         s_wsfe(&io___41);
00935                         e_wsfe();
00936                         io___42.ciunit = *nounit;
00937                         s_wsfe(&io___42);
00938                         e_wsfe();
00939                         io___43.ciunit = *nounit;
00940                         s_wsfe(&io___43);
00941                         e_wsfe();
00942                         io___44.ciunit = *nounit;
00943                         s_wsfe(&io___44);
00944                         do_fio(&c__1, (char *)&(*thresh), (ftnlen)sizeof(real)
00945                                 );
00946                         e_wsfe();
00947                         ntestf = 2;
00948                     }
00949 
00950                     for (j = 1; j <= 9; ++j) {
00951                         if (result[j] >= *thresh) {
00952                             io___45.ciunit = *nounit;
00953                             s_wsfe(&io___45);
00954                             do_fio(&c__1, balanc, (ftnlen)1);
00955                             do_fio(&c__1, (char *)&n, (ftnlen)sizeof(integer))
00956                                     ;
00957                             do_fio(&c__1, (char *)&iwk, (ftnlen)sizeof(
00958                                     integer));
00959                             do_fio(&c__4, (char *)&ioldsd[0], (ftnlen)sizeof(
00960                                     integer));
00961                             do_fio(&c__1, (char *)&jtype, (ftnlen)sizeof(
00962                                     integer));
00963                             do_fio(&c__1, (char *)&j, (ftnlen)sizeof(integer))
00964                                     ;
00965                             do_fio(&c__1, (char *)&result[j], (ftnlen)sizeof(
00966                                     real));
00967                             e_wsfe();
00968                         }
00969 /* L110: */
00970                     }
00971 
00972                     nerrs += nfail;
00973                     ntestt += ntest;
00974 
00975 /* L120: */
00976                 }
00977 /* L130: */
00978             }
00979 L140:
00980             ;
00981         }
00982 /* L150: */
00983     }
00984 
00985 L160:
00986 
00987 /*     Read in data from file to check accuracy of condition estimation. */
00988 /*     Assume input eigenvalues are sorted lexicographically (increasing */
00989 /*     by real part, then decreasing by imaginary part) */
00990 
00991     jtype = 0;
00992 L170:
00993     io___46.ciunit = *niunit;
00994     i__1 = s_rsle(&io___46);
00995     if (i__1 != 0) {
00996         goto L220;
00997     }
00998     i__1 = do_lio(&c__3, &c__1, (char *)&n, (ftnlen)sizeof(integer));
00999     if (i__1 != 0) {
01000         goto L220;
01001     }
01002     i__1 = e_rsle();
01003     if (i__1 != 0) {
01004         goto L220;
01005     }
01006 
01007 /*     Read input data until N=0 */
01008 
01009     if (n == 0) {
01010         goto L220;
01011     }
01012     ++jtype;
01013     iseed[1] = jtype;
01014     i__1 = n;
01015     for (i__ = 1; i__ <= i__1; ++i__) {
01016         io___48.ciunit = *niunit;
01017         s_rsle(&io___48);
01018         i__2 = n;
01019         for (j = 1; j <= i__2; ++j) {
01020             do_lio(&c__4, &c__1, (char *)&a[i__ + j * a_dim1], (ftnlen)sizeof(
01021                     real));
01022         }
01023         e_rsle();
01024 /* L180: */
01025     }
01026     i__1 = n;
01027     for (i__ = 1; i__ <= i__1; ++i__) {
01028         io___49.ciunit = *niunit;
01029         s_rsle(&io___49);
01030         do_lio(&c__4, &c__1, (char *)&wr1[i__], (ftnlen)sizeof(real));
01031         do_lio(&c__4, &c__1, (char *)&wi1[i__], (ftnlen)sizeof(real));
01032         do_lio(&c__4, &c__1, (char *)&rcdein[i__], (ftnlen)sizeof(real));
01033         do_lio(&c__4, &c__1, (char *)&rcdvin[i__], (ftnlen)sizeof(real));
01034         e_rsle();
01035 /* L190: */
01036     }
01037 /* Computing 2nd power */
01038     i__2 = n;
01039     i__1 = n * 6 + (i__2 * i__2 << 1);
01040     sget23_(&c_true, "N", &c__22, thresh, &iseed[1], nounit, &n, &a[a_offset], 
01041              lda, &h__[h_offset], &wr[1], &wi[1], &wr1[1], &wi1[1], &vl[
01042             vl_offset], ldvl, &vr[vr_offset], ldvr, &lre[lre_offset], ldlre, &
01043             rcondv[1], &rcndv1[1], &rcdvin[1], &rconde[1], &rcnde1[1], &
01044             rcdein[1], &scale[1], &scale1[1], &result[1], &work[1], &i__1, &
01045             iwork[1], info);
01046 
01047 /*     Check for RESULT(j) > THRESH */
01048 
01049     ntest = 0;
01050     nfail = 0;
01051     for (j = 1; j <= 11; ++j) {
01052         if (result[j] >= 0.f) {
01053             ++ntest;
01054         }
01055         if (result[j] >= *thresh) {
01056             ++nfail;
01057         }
01058 /* L200: */
01059     }
01060 
01061     if (nfail > 0) {
01062         ++ntestf;
01063     }
01064     if (ntestf == 1) {
01065         io___50.ciunit = *nounit;
01066         s_wsfe(&io___50);
01067         do_fio(&c__1, path, (ftnlen)3);
01068         e_wsfe();
01069         io___51.ciunit = *nounit;
01070         s_wsfe(&io___51);
01071         e_wsfe();
01072         io___52.ciunit = *nounit;
01073         s_wsfe(&io___52);
01074         e_wsfe();
01075         io___53.ciunit = *nounit;
01076         s_wsfe(&io___53);
01077         e_wsfe();
01078         io___54.ciunit = *nounit;
01079         s_wsfe(&io___54);
01080         do_fio(&c__1, (char *)&(*thresh), (ftnlen)sizeof(real));
01081         e_wsfe();
01082         ntestf = 2;
01083     }
01084 
01085     for (j = 1; j <= 11; ++j) {
01086         if (result[j] >= *thresh) {
01087             io___55.ciunit = *nounit;
01088             s_wsfe(&io___55);
01089             do_fio(&c__1, (char *)&n, (ftnlen)sizeof(integer));
01090             do_fio(&c__1, (char *)&jtype, (ftnlen)sizeof(integer));
01091             do_fio(&c__1, (char *)&j, (ftnlen)sizeof(integer));
01092             do_fio(&c__1, (char *)&result[j], (ftnlen)sizeof(real));
01093             e_wsfe();
01094         }
01095 /* L210: */
01096     }
01097 
01098     nerrs += nfail;
01099     ntestt += ntest;
01100     goto L170;
01101 L220:
01102 
01103 /*     Summary */
01104 
01105     slasum_(path, nounit, &nerrs, &ntestt);
01106 
01107 
01108 
01109     return 0;
01110 
01111 /*     End of SDRVVX */
01112 
01113 } /* sdrvvx_ */


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