sdrvbd.c
Go to the documentation of this file.
00001 /* sdrvbd.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, nunit;
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 real c_b13 = 0.f;
00034 static real c_b17 = 1.f;
00035 static integer c__4 = 4;
00036 static integer c__1 = 1;
00037 static integer c__0 = 0;
00038 
00039 /* Subroutine */ int sdrvbd_(integer *nsizes, integer *mm, integer *nn, 
00040         integer *ntypes, logical *dotype, integer *iseed, real *thresh, real *
00041         a, integer *lda, real *u, integer *ldu, real *vt, integer *ldvt, real 
00042         *asav, real *usav, real *vtsav, real *s, real *ssav, real *e, real *
00043         work, integer *lwork, integer *iwork, integer *nout, integer *info)
00044 {
00045     /* Initialized data */
00046 
00047     static char cjob[1*4] = "N" "O" "S" "A";
00048 
00049     /* Format strings */
00050     static char fmt_9996[] = "(\002 SDRVBD: \002,a,\002 returned INFO=\002,i"
00051             "6,\002.\002,/9x,\002M=\002,i6,\002, N=\002,i6,\002, JTYPE=\002,i"
00052             "6,\002, ISEED=(\002,3(i5,\002,\002),i5,\002)\002)";
00053     static char fmt_9995[] = "(\002 SDRVBD: \002,a,\002 returned INFO=\002,i"
00054             "6,\002.\002,/9x,\002M=\002,i6,\002, N=\002,i6,\002, JTYPE=\002,i"
00055             "6,\002, LSWORK=\002,i6,/9x,\002ISEED=(\002,3(i5,\002,\002),i5"
00056             ",\002)\002)";
00057     static char fmt_9999[] = "(\002 SVD -- Real Singular Value Decomposition"
00058             " Driver \002,/\002 Matrix types (see SDRVBD for details):\002,/"
00059             "/\002 1 = Zero matrix\002,/\002 2 = Identity matrix\002,/\002 3 "
00060             "= Evenly spaced singular values near 1\002,/\002 4 = Evenly spac"
00061             "ed singular values near underflow\002,/\002 5 = Evenly spaced si"
00062             "ngular values near overflow\002,//\002 Tests performed: ( A is d"
00063             "ense, U and V are orthogonal,\002,/19x,\002 S is an array, and U"
00064             "partial, VTpartial, and\002,/19x,\002 Spartial are partially com"
00065             "puted U, VT and S),\002,/)";
00066     static char fmt_9998[] = "(\002 1 = | A - U diag(S) VT | / ( |A| max(M,N"
00067             ") ulp ) \002,/\002 2 = | I - U**T U | / ( M ulp ) \002,/\002 3 ="
00068             " | I - VT VT**T | / ( N ulp ) \002,/\002 4 = 0 if S contains min"
00069             "(M,N) nonnegative values in\002,\002 decreasing order, else 1/ulp"
00070             "\002,/\002 5 = | U - Upartial | / ( M ulp )\002,/\002 6 = | VT -"
00071             " VTpartial | / ( N ulp )\002,/\002 7 = | S - Spartial | / ( min("
00072             "M,N) ulp |S| )\002,/\002 8 = | A - U diag(S) VT | / ( |A| max(M,"
00073             "N) ulp ) \002,/\002 9 = | I - U**T U | / ( M ulp ) \002,/\00210 "
00074             "= | I - VT VT**T | / ( N ulp ) \002,/\00211 = 0 if S contains mi"
00075             "n(M,N) nonnegative values in\002,\002 decreasing order, else 1/u"
00076             "lp\002,/\00212 = | U - Upartial | / ( M ulp )\002,/\00213 = | VT"
00077             " - VTpartial | / ( N ulp )\002,/\00214 = | S - Spartial | / ( mi"
00078             "n(M,N) ulp |S| )\002,/\00215 = | A - U diag(S) VT | / ( |A| max("
00079             "M,N) ulp ) \002,/\00216 = | I - U**T U | / ( M ulp ) \002,/\0021"
00080             "7 = | I - VT VT**T | / ( N ulp ) \002,/\00218 = 0 if S contains "
00081             "min(M,N) nonnegative values in\002,\002 decreasing order, else 1"
00082             "/ulp\002,/\00219 = | U - Upartial | / ( M ulp )\002,/\00220 = | "
00083             "VT - VTpartial | / ( N ulp )\002,/\00221 = | S - Spartial | / ( "
00084             "min(M,N) ulp |S| )\002,//)";
00085     static char fmt_9997[] = "(\002 M=\002,i5,\002, N=\002,i5,\002, type "
00086             "\002,i1,\002, IWS=\002,i1,\002, seed=\002,4(i4,\002,\002),\002 t"
00087             "est(\002,i2,\002)=\002,g11.4)";
00088 
00089     /* System generated locals */
00090     integer a_dim1, a_offset, asav_dim1, asav_offset, u_dim1, u_offset, 
00091             usav_dim1, usav_offset, vt_dim1, vt_offset, vtsav_dim1, 
00092             vtsav_offset, i__1, i__2, i__3, i__4, i__5, i__6, i__7, i__8, 
00093             i__9, i__10, i__11, i__12, i__13, i__14;
00094     real r__1, r__2, r__3;
00095 
00096     /* Builtin functions */
00097     /* Subroutine */ int s_copy(char *, char *, ftnlen, ftnlen);
00098     integer s_wsfe(cilist *), do_fio(integer *, char *, ftnlen), e_wsfe(void);
00099 
00100     /* Local variables */
00101     integer i__, j, m, n;
00102     real dif, div;
00103     integer ijq, iju;
00104     real ulp;
00105     integer iws;
00106     char jobq[1], path[3], jobu[1];
00107     integer mmax, nmax;
00108     real unfl, ovfl;
00109     integer ijvt;
00110     logical badmm, badnn;
00111     integer nfail;
00112     extern /* Subroutine */ int sbdt01_(integer *, integer *, integer *, real 
00113             *, integer *, real *, integer *, real *, real *, real *, integer *
00114 , real *, real *);
00115     integer iinfo;
00116     real anorm;
00117     integer mnmin, mnmax;
00118     char jobvt[1];
00119     integer jsize;
00120     extern /* Subroutine */ int sort01_(char *, integer *, integer *, real *, 
00121             integer *, real *, integer *, real *), sort03_(char *, 
00122             integer *, integer *, integer *, integer *, real *, integer *, 
00123             real *, integer *, real *, integer *, real *, integer *);
00124     integer jtype, ntest, iwtmp;
00125     extern /* Subroutine */ int slabad_(real *, real *);
00126     extern doublereal slamch_(char *);
00127     extern /* Subroutine */ int sgesdd_(char *, integer *, integer *, real *, 
00128             integer *, real *, real *, integer *, real *, integer *, real *, 
00129             integer *, integer *, integer *), xerbla_(char *, integer 
00130             *);
00131     integer ioldsd[4];
00132     extern /* Subroutine */ int alasvm_(char *, integer *, integer *, integer 
00133             *, integer *), sgesvd_(char *, char *, integer *, integer 
00134             *, real *, integer *, real *, real *, integer *, real *, integer *
00135 , real *, integer *, integer *), slacpy_(char *, 
00136             integer *, integer *, real *, integer *, real *, integer *), slaset_(char *, integer *, integer *, real *, real *, 
00137             real *, integer *), sgesvj_(char *, char *, char *, 
00138             integer *, integer *, real *, integer *, real *, integer *, real *
00139 , integer *, real *, integer *, integer *)
00140             , sgejsv_(char *, char *, char *, char *, char *, char *, integer 
00141             *, integer *, real *, integer *, real *, real *, integer *, real *
00142 , integer *, real *, integer *, integer *, integer *), slatms_(integer *, 
00143             integer *, char *, integer *, char *, real *, integer *, real *, 
00144             real *, integer *, integer *, char *, real *, integer *, real *, 
00145             integer *);
00146     integer minwrk;
00147     real ulpinv, result[22];
00148     integer lswork, mtypes;
00149 
00150     /* Fortran I/O blocks */
00151     static cilist io___25 = { 0, 0, 0, fmt_9996, 0 };
00152     static cilist io___30 = { 0, 0, 0, fmt_9995, 0 };
00153     static cilist io___38 = { 0, 0, 0, fmt_9995, 0 };
00154     static cilist io___41 = { 0, 0, 0, fmt_9995, 0 };
00155     static cilist io___42 = { 0, 0, 0, fmt_9995, 0 };
00156     static cilist io___43 = { 0, 0, 0, fmt_9999, 0 };
00157     static cilist io___44 = { 0, 0, 0, fmt_9998, 0 };
00158     static cilist io___45 = { 0, 0, 0, fmt_9997, 0 };
00159 
00160 
00161 
00162 /*  -- LAPACK test routine (version 3.1) -- */
00163 /*     Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd.. */
00164 /*     November 2006 */
00165 
00166 /*     .. Scalar Arguments .. */
00167 /*     .. */
00168 /*     .. Array Arguments .. */
00169 /*     .. */
00170 
00171 /*  Purpose */
00172 /*  ======= */
00173 
00174 /*  SDRVBD checks the singular value decomposition (SVD) drivers */
00175 /*  SGESVD, SGESDD, SGESVJ, and SGEJSV. */
00176 
00177 /*  Both SGESVD and SGESDD factor A = U diag(S) VT, where U and VT are */
00178 /*  orthogonal and diag(S) is diagonal with the entries of the array S */
00179 /*  on its diagonal. The entries of S are the singular values, */
00180 /*  nonnegative and stored in decreasing order.  U and VT can be */
00181 /*  optionally not computed, overwritten on A, or computed partially. */
00182 
00183 /*  A is M by N. Let MNMIN = min( M, N ). S has dimension MNMIN. */
00184 /*  U can be M by M or M by MNMIN. VT can be N by N or MNMIN by N. */
00185 
00186 /*  When SDRVBD is called, a number of matrix "sizes" (M's and N's) */
00187 /*  and a number of matrix "types" are specified.  For each size (M,N) */
00188 /*  and each type of matrix, and for the minimal workspace as well as */
00189 /*  workspace adequate to permit blocking, an  M x N  matrix "A" will be */
00190 /*  generated and used to test the SVD routines.  For each matrix, A will */
00191 /*  be factored as A = U diag(S) VT and the following 12 tests computed: */
00192 
00193 /*  Test for SGESVD: */
00194 
00195 /*  (1)    | A - U diag(S) VT | / ( |A| max(M,N) ulp ) */
00196 
00197 /*  (2)    | I - U'U | / ( M ulp ) */
00198 
00199 /*  (3)    | I - VT VT' | / ( N ulp ) */
00200 
00201 /*  (4)    S contains MNMIN nonnegative values in decreasing order. */
00202 /*         (Return 0 if true, 1/ULP if false.) */
00203 
00204 /*  (5)    | U - Upartial | / ( M ulp ) where Upartial is a partially */
00205 /*         computed U. */
00206 
00207 /*  (6)    | VT - VTpartial | / ( N ulp ) where VTpartial is a partially */
00208 /*         computed VT. */
00209 
00210 /*  (7)    | S - Spartial | / ( MNMIN ulp |S| ) where Spartial is the */
00211 /*         vector of singular values from the partial SVD */
00212 
00213 /*  Test for SGESDD: */
00214 
00215 /*  (8)    | A - U diag(S) VT | / ( |A| max(M,N) ulp ) */
00216 
00217 /*  (9)    | I - U'U | / ( M ulp ) */
00218 
00219 /*  (10)   | I - VT VT' | / ( N ulp ) */
00220 
00221 /*  (11)   S contains MNMIN nonnegative values in decreasing order. */
00222 /*         (Return 0 if true, 1/ULP if false.) */
00223 
00224 /*  (12)   | U - Upartial | / ( M ulp ) where Upartial is a partially */
00225 /*         computed U. */
00226 
00227 /*  (13)   | VT - VTpartial | / ( N ulp ) where VTpartial is a partially */
00228 /*         computed VT. */
00229 
00230 /*  (14)   | S - Spartial | / ( MNMIN ulp |S| ) where Spartial is the */
00231 /*         vector of singular values from the partial SVD */
00232 
00233 /*  Test for SGESVJ: */
00234 
00235 /*  (15)    | A - U diag(S) VT | / ( |A| max(M,N) ulp ) */
00236 
00237 /*  (16)    | I - U'U | / ( M ulp ) */
00238 
00239 /*  (17)   | I - VT VT' | / ( N ulp ) */
00240 
00241 /*  (18)   S contains MNMIN nonnegative values in decreasing order. */
00242 /*         (Return 0 if true, 1/ULP if false.) */
00243 
00244 /*  Test for SGEJSV: */
00245 
00246 /*  (19)    | A - U diag(S) VT | / ( |A| max(M,N) ulp ) */
00247 
00248 /*  (20)    | I - U'U | / ( M ulp ) */
00249 
00250 /*  (21)   | I - VT VT' | / ( N ulp ) */
00251 
00252 /*  (22)   S contains MNMIN nonnegative values in decreasing order. */
00253 /*         (Return 0 if true, 1/ULP if false.) */
00254 
00255 /*  The "sizes" are specified by the arrays MM(1:NSIZES) and */
00256 /*  NN(1:NSIZES); the value of each element pair (MM(j),NN(j)) */
00257 /*  specifies one size.  The "types" are specified by a logical array */
00258 /*  DOTYPE( 1:NTYPES ); if DOTYPE(j) is .TRUE., then matrix type "j" */
00259 /*  will be generated. */
00260 /*  Currently, the list of possible types is: */
00261 
00262 /*  (1)  The zero matrix. */
00263 /*  (2)  The identity matrix. */
00264 /*  (3)  A matrix of the form  U D V, where U and V are orthogonal and */
00265 /*       D has evenly spaced entries 1, ..., ULP with random signs */
00266 /*       on the diagonal. */
00267 /*  (4)  Same as (3), but multiplied by the underflow-threshold / ULP. */
00268 /*  (5)  Same as (3), but multiplied by the overflow-threshold * ULP. */
00269 
00270 /*  Arguments */
00271 /*  ========== */
00272 
00273 /*  NSIZES  (input) INTEGER */
00274 /*          The number of matrix sizes (M,N) contained in the vectors */
00275 /*          MM and NN. */
00276 
00277 /*  MM      (input) INTEGER array, dimension (NSIZES) */
00278 /*          The values of the matrix row dimension M. */
00279 
00280 /*  NN      (input) INTEGER array, dimension (NSIZES) */
00281 /*          The values of the matrix column dimension N. */
00282 
00283 /*  NTYPES  (input) INTEGER */
00284 /*          The number of elements in DOTYPE.   If it is zero, SDRVBD */
00285 /*          does nothing.  It must be at least zero.  If it is MAXTYP+1 */
00286 /*          and NSIZES is 1, then an additional type, MAXTYP+1 is */
00287 /*          defined, which is to use whatever matrices are in A and B. */
00288 /*          This is only useful if DOTYPE(1:MAXTYP) is .FALSE. and */
00289 /*          DOTYPE(MAXTYP+1) is .TRUE. . */
00290 
00291 /*  DOTYPE  (input) LOGICAL array, dimension (NTYPES) */
00292 /*          If DOTYPE(j) is .TRUE., then for each size (m,n), a matrix */
00293 /*          of type j will be generated.  If NTYPES is smaller than the */
00294 /*          maximum number of types defined (PARAMETER MAXTYP), then */
00295 /*          types NTYPES+1 through MAXTYP will not be generated.  If */
00296 /*          NTYPES is larger than MAXTYP, DOTYPE(MAXTYP+1) through */
00297 /*          DOTYPE(NTYPES) will be ignored. */
00298 
00299 /*  ISEED   (input/output) INTEGER array, dimension (4) */
00300 /*          On entry, the seed of the random number generator.  The array */
00301 /*          elements should be between 0 and 4095; if not they will be */
00302 /*          reduced mod 4096.  Also, ISEED(4) must be odd. */
00303 /*          On exit, ISEED is changed and can be used in the next call to */
00304 /*          SDRVBD to continue the same random number sequence. */
00305 
00306 /*  THRESH  (input) REAL */
00307 /*          The threshold value for the test ratios.  A result is */
00308 /*          included in the output file if RESULT >= THRESH.  The test */
00309 /*          ratios are scaled to be O(1), so THRESH should be a small */
00310 /*          multiple of 1, e.g., 10 or 100.  To have every test ratio */
00311 /*          printed, use THRESH = 0. */
00312 
00313 /*  A       (workspace) REAL array, dimension (LDA,NMAX) */
00314 /*          where NMAX is the maximum value of N in NN. */
00315 
00316 /*  LDA     (input) INTEGER */
00317 /*          The leading dimension of the array A.  LDA >= max(1,MMAX), */
00318 /*          where MMAX is the maximum value of M in MM. */
00319 
00320 /*  U       (workspace) REAL array, dimension (LDU,MMAX) */
00321 
00322 /*  LDU     (input) INTEGER */
00323 /*          The leading dimension of the array U.  LDU >= max(1,MMAX). */
00324 
00325 /*  VT      (workspace) REAL array, dimension (LDVT,NMAX) */
00326 
00327 /*  LDVT    (input) INTEGER */
00328 /*          The leading dimension of the array VT.  LDVT >= max(1,NMAX). */
00329 
00330 /*  ASAV    (workspace) REAL array, dimension (LDA,NMAX) */
00331 
00332 /*  USAV    (workspace) REAL array, dimension (LDU,MMAX) */
00333 
00334 /*  VTSAV   (workspace) REAL array, dimension (LDVT,NMAX) */
00335 
00336 /*  S       (workspace) REAL array, dimension */
00337 /*                      (max(min(MM,NN))) */
00338 
00339 /*  SSAV    (workspace) REAL array, dimension */
00340 /*                      (max(min(MM,NN))) */
00341 
00342 /*  E       (workspace) REAL array, dimension */
00343 /*                      (max(min(MM,NN))) */
00344 
00345 /*  WORK    (workspace) REAL array, dimension (LWORK) */
00346 
00347 /*  LWORK   (input) INTEGER */
00348 /*          The number of entries in WORK.  This must be at least */
00349 /*          max(3*MN+MX,5*MN-4)+2*MN**2 for all pairs */
00350 /*          pairs  (MN,MX)=( min(MM(j),NN(j), max(MM(j),NN(j)) ) */
00351 
00352 /*  IWORK   (workspace) INTEGER array, dimension at least 8*min(M,N) */
00353 
00354 /*  NOUT    (input) INTEGER */
00355 /*          The FORTRAN unit number for printing out error messages */
00356 /*          (e.g., if a routine returns IINFO not equal to 0.) */
00357 
00358 /*  INFO    (output) INTEGER */
00359 /*          If 0, then everything ran OK. */
00360 /*           -1: NSIZES < 0 */
00361 /*           -2: Some MM(j) < 0 */
00362 /*           -3: Some NN(j) < 0 */
00363 /*           -4: NTYPES < 0 */
00364 /*           -7: THRESH < 0 */
00365 /*          -10: LDA < 1 or LDA < MMAX, where MMAX is max( MM(j) ). */
00366 /*          -12: LDU < 1 or LDU < MMAX. */
00367 /*          -14: LDVT < 1 or LDVT < NMAX, where NMAX is max( NN(j) ). */
00368 /*          -21: LWORK too small. */
00369 /*          If  SLATMS, or SGESVD returns an error code, the */
00370 /*              absolute value of it is returned. */
00371 
00372 /*  ===================================================================== */
00373 
00374 /*     .. Parameters .. */
00375 /*     .. */
00376 /*     .. Local Scalars .. */
00377 /*     .. */
00378 /*     .. Local Arrays .. */
00379 /*     .. */
00380 /*     .. External Functions .. */
00381 /*     .. */
00382 /*     .. External Subroutines .. */
00383 /*     .. */
00384 /*     .. Intrinsic Functions .. */
00385 /*     .. */
00386 /*     .. Scalars in Common .. */
00387 /*     .. */
00388 /*     .. Common blocks .. */
00389 /*     .. */
00390 /*     .. Data statements .. */
00391     /* Parameter adjustments */
00392     --mm;
00393     --nn;
00394     --dotype;
00395     --iseed;
00396     asav_dim1 = *lda;
00397     asav_offset = 1 + asav_dim1;
00398     asav -= asav_offset;
00399     a_dim1 = *lda;
00400     a_offset = 1 + a_dim1;
00401     a -= a_offset;
00402     usav_dim1 = *ldu;
00403     usav_offset = 1 + usav_dim1;
00404     usav -= usav_offset;
00405     u_dim1 = *ldu;
00406     u_offset = 1 + u_dim1;
00407     u -= u_offset;
00408     vtsav_dim1 = *ldvt;
00409     vtsav_offset = 1 + vtsav_dim1;
00410     vtsav -= vtsav_offset;
00411     vt_dim1 = *ldvt;
00412     vt_offset = 1 + vt_dim1;
00413     vt -= vt_offset;
00414     --s;
00415     --ssav;
00416     --e;
00417     --work;
00418     --iwork;
00419 
00420     /* Function Body */
00421 /*     .. */
00422 /*     .. Executable Statements .. */
00423 
00424 /*     Check for errors */
00425 
00426     *info = 0;
00427     badmm = FALSE_;
00428     badnn = FALSE_;
00429     mmax = 1;
00430     nmax = 1;
00431     mnmax = 1;
00432     minwrk = 1;
00433     i__1 = *nsizes;
00434     for (j = 1; j <= i__1; ++j) {
00435 /* Computing MAX */
00436         i__2 = mmax, i__3 = mm[j];
00437         mmax = max(i__2,i__3);
00438         if (mm[j] < 0) {
00439             badmm = TRUE_;
00440         }
00441 /* Computing MAX */
00442         i__2 = nmax, i__3 = nn[j];
00443         nmax = max(i__2,i__3);
00444         if (nn[j] < 0) {
00445             badnn = TRUE_;
00446         }
00447 /* Computing MAX */
00448 /* Computing MIN */
00449         i__4 = mm[j], i__5 = nn[j];
00450         i__2 = mnmax, i__3 = min(i__4,i__5);
00451         mnmax = max(i__2,i__3);
00452 /* Computing MAX */
00453 /* Computing MAX */
00454 /* Computing MIN */
00455         i__6 = mm[j], i__7 = nn[j];
00456 /* Computing MAX */
00457         i__8 = mm[j], i__9 = nn[j];
00458 /* Computing MIN */
00459         i__10 = mm[j], i__11 = nn[j] - 4;
00460         i__4 = min(i__6,i__7) * 3 + max(i__8,i__9), i__5 = min(i__10,i__11) * 
00461                 5;
00462 /* Computing MIN */
00463         i__13 = mm[j], i__14 = nn[j];
00464 /* Computing 2nd power */
00465         i__12 = min(i__13,i__14);
00466         i__2 = minwrk, i__3 = max(i__4,i__5) + (i__12 * i__12 << 1);
00467         minwrk = max(i__2,i__3);
00468 /* L10: */
00469     }
00470 
00471 /*     Check for errors */
00472 
00473     if (*nsizes < 0) {
00474         *info = -1;
00475     } else if (badmm) {
00476         *info = -2;
00477     } else if (badnn) {
00478         *info = -3;
00479     } else if (*ntypes < 0) {
00480         *info = -4;
00481     } else if (*lda < max(1,mmax)) {
00482         *info = -10;
00483     } else if (*ldu < max(1,mmax)) {
00484         *info = -12;
00485     } else if (*ldvt < max(1,nmax)) {
00486         *info = -14;
00487     } else if (minwrk > *lwork) {
00488         *info = -21;
00489     }
00490 
00491     if (*info != 0) {
00492         i__1 = -(*info);
00493         xerbla_("SDRVBD", &i__1);
00494         return 0;
00495     }
00496 
00497 /*     Initialize constants */
00498 
00499     s_copy(path, "Single precision", (ftnlen)1, (ftnlen)16);
00500     s_copy(path + 1, "BD", (ftnlen)2, (ftnlen)2);
00501     nfail = 0;
00502     ntest = 0;
00503     unfl = slamch_("Safe minimum");
00504     ovfl = 1.f / unfl;
00505     slabad_(&unfl, &ovfl);
00506     ulp = slamch_("Precision");
00507     ulpinv = 1.f / ulp;
00508     infoc_1.infot = 0;
00509 
00510 /*     Loop over sizes, types */
00511 
00512     i__1 = *nsizes;
00513     for (jsize = 1; jsize <= i__1; ++jsize) {
00514         m = mm[jsize];
00515         n = nn[jsize];
00516         mnmin = min(m,n);
00517 
00518         if (*nsizes != 1) {
00519             mtypes = min(5,*ntypes);
00520         } else {
00521             mtypes = min(6,*ntypes);
00522         }
00523 
00524         i__2 = mtypes;
00525         for (jtype = 1; jtype <= i__2; ++jtype) {
00526             if (! dotype[jtype]) {
00527                 goto L140;
00528             }
00529 
00530             for (j = 1; j <= 4; ++j) {
00531                 ioldsd[j - 1] = iseed[j];
00532 /* L20: */
00533             }
00534 
00535 /*           Compute "A" */
00536 
00537             if (mtypes > 5) {
00538                 goto L30;
00539             }
00540 
00541             if (jtype == 1) {
00542 
00543 /*              Zero matrix */
00544 
00545                 slaset_("Full", &m, &n, &c_b13, &c_b13, &a[a_offset], lda);
00546 
00547             } else if (jtype == 2) {
00548 
00549 /*              Identity matrix */
00550 
00551                 slaset_("Full", &m, &n, &c_b13, &c_b17, &a[a_offset], lda);
00552 
00553             } else {
00554 
00555 /*              (Scaled) random matrix */
00556 
00557                 if (jtype == 3) {
00558                     anorm = 1.f;
00559                 }
00560                 if (jtype == 4) {
00561                     anorm = unfl / ulp;
00562                 }
00563                 if (jtype == 5) {
00564                     anorm = ovfl * ulp;
00565                 }
00566                 r__1 = (real) mnmin;
00567                 i__3 = m - 1;
00568                 i__4 = n - 1;
00569                 slatms_(&m, &n, "U", &iseed[1], "N", &s[1], &c__4, &r__1, &
00570                         anorm, &i__3, &i__4, "N", &a[a_offset], lda, &work[1], 
00571                          &iinfo);
00572                 if (iinfo != 0) {
00573                     io___25.ciunit = *nout;
00574                     s_wsfe(&io___25);
00575                     do_fio(&c__1, "Generator", (ftnlen)9);
00576                     do_fio(&c__1, (char *)&iinfo, (ftnlen)sizeof(integer));
00577                     do_fio(&c__1, (char *)&m, (ftnlen)sizeof(integer));
00578                     do_fio(&c__1, (char *)&n, (ftnlen)sizeof(integer));
00579                     do_fio(&c__1, (char *)&jtype, (ftnlen)sizeof(integer));
00580                     do_fio(&c__4, (char *)&ioldsd[0], (ftnlen)sizeof(integer))
00581                             ;
00582                     e_wsfe();
00583                     *info = abs(iinfo);
00584                     return 0;
00585                 }
00586             }
00587 
00588 L30:
00589             slacpy_("F", &m, &n, &a[a_offset], lda, &asav[asav_offset], lda);
00590 
00591 /*           Do for minimal and adequate (for blocking) workspace */
00592 
00593             for (iws = 1; iws <= 4; ++iws) {
00594 
00595                 for (j = 1; j <= 14; ++j) {
00596                     result[j - 1] = -1.f;
00597 /* L40: */
00598                 }
00599 
00600 /*              Test SGESVD: Factorize A */
00601 
00602 /* Computing MAX */
00603                 i__3 = min(m,n) * 3 + max(m,n), i__4 = min(m,n) * 5;
00604                 iwtmp = max(i__3,i__4);
00605                 lswork = iwtmp + (iws - 1) * (*lwork - iwtmp) / 3;
00606                 lswork = min(lswork,*lwork);
00607                 lswork = max(lswork,1);
00608                 if (iws == 4) {
00609                     lswork = *lwork;
00610                 }
00611 
00612                 if (iws > 1) {
00613                     slacpy_("F", &m, &n, &asav[asav_offset], lda, &a[a_offset]
00614 , lda);
00615                 }
00616                 s_copy(srnamc_1.srnamt, "SGESVD", (ftnlen)32, (ftnlen)6);
00617                 sgesvd_("A", "A", &m, &n, &a[a_offset], lda, &ssav[1], &usav[
00618                         usav_offset], ldu, &vtsav[vtsav_offset], ldvt, &work[
00619                         1], &lswork, &iinfo);
00620                 if (iinfo != 0) {
00621                     io___30.ciunit = *nout;
00622                     s_wsfe(&io___30);
00623                     do_fio(&c__1, "GESVD", (ftnlen)5);
00624                     do_fio(&c__1, (char *)&iinfo, (ftnlen)sizeof(integer));
00625                     do_fio(&c__1, (char *)&m, (ftnlen)sizeof(integer));
00626                     do_fio(&c__1, (char *)&n, (ftnlen)sizeof(integer));
00627                     do_fio(&c__1, (char *)&jtype, (ftnlen)sizeof(integer));
00628                     do_fio(&c__1, (char *)&lswork, (ftnlen)sizeof(integer));
00629                     do_fio(&c__4, (char *)&ioldsd[0], (ftnlen)sizeof(integer))
00630                             ;
00631                     e_wsfe();
00632                     *info = abs(iinfo);
00633                     return 0;
00634                 }
00635 
00636 /*              Do tests 1--4 */
00637 
00638                 sbdt01_(&m, &n, &c__0, &asav[asav_offset], lda, &usav[
00639                         usav_offset], ldu, &ssav[1], &e[1], &vtsav[
00640                         vtsav_offset], ldvt, &work[1], result);
00641                 if (m != 0 && n != 0) {
00642                     sort01_("Columns", &m, &m, &usav[usav_offset], ldu, &work[
00643                             1], lwork, &result[1]);
00644                     sort01_("Rows", &n, &n, &vtsav[vtsav_offset], ldvt, &work[
00645                             1], lwork, &result[2]);
00646                 }
00647                 result[3] = 0.f;
00648                 i__3 = mnmin - 1;
00649                 for (i__ = 1; i__ <= i__3; ++i__) {
00650                     if (ssav[i__] < ssav[i__ + 1]) {
00651                         result[3] = ulpinv;
00652                     }
00653                     if (ssav[i__] < 0.f) {
00654                         result[3] = ulpinv;
00655                     }
00656 /* L50: */
00657                 }
00658                 if (mnmin >= 1) {
00659                     if (ssav[mnmin] < 0.f) {
00660                         result[3] = ulpinv;
00661                     }
00662                 }
00663 
00664 /*              Do partial SVDs, comparing to SSAV, USAV, and VTSAV */
00665 
00666                 result[4] = 0.f;
00667                 result[5] = 0.f;
00668                 result[6] = 0.f;
00669                 for (iju = 0; iju <= 3; ++iju) {
00670                     for (ijvt = 0; ijvt <= 3; ++ijvt) {
00671                         if (iju == 3 && ijvt == 3 || iju == 1 && ijvt == 1) {
00672                             goto L70;
00673                         }
00674                         *(unsigned char *)jobu = *(unsigned char *)&cjob[iju];
00675                         *(unsigned char *)jobvt = *(unsigned char *)&cjob[
00676                                 ijvt];
00677                         slacpy_("F", &m, &n, &asav[asav_offset], lda, &a[
00678                                 a_offset], lda);
00679                         s_copy(srnamc_1.srnamt, "SGESVD", (ftnlen)32, (ftnlen)
00680                                 6);
00681                         sgesvd_(jobu, jobvt, &m, &n, &a[a_offset], lda, &s[1], 
00682                                  &u[u_offset], ldu, &vt[vt_offset], ldvt, &
00683                                 work[1], &lswork, &iinfo);
00684 
00685 /*                    Compare U */
00686 
00687                         dif = 0.f;
00688                         if (m > 0 && n > 0) {
00689                             if (iju == 1) {
00690                                 sort03_("C", &m, &mnmin, &m, &mnmin, &usav[
00691                                         usav_offset], ldu, &a[a_offset], lda, 
00692                                         &work[1], lwork, &dif, &iinfo);
00693                             } else if (iju == 2) {
00694                                 sort03_("C", &m, &mnmin, &m, &mnmin, &usav[
00695                                         usav_offset], ldu, &u[u_offset], ldu, 
00696                                         &work[1], lwork, &dif, &iinfo);
00697                             } else if (iju == 3) {
00698                                 sort03_("C", &m, &m, &m, &mnmin, &usav[
00699                                         usav_offset], ldu, &u[u_offset], ldu, 
00700                                         &work[1], lwork, &dif, &iinfo);
00701                             }
00702                         }
00703                         result[4] = dmax(result[4],dif);
00704 
00705 /*                    Compare VT */
00706 
00707                         dif = 0.f;
00708                         if (m > 0 && n > 0) {
00709                             if (ijvt == 1) {
00710                                 sort03_("R", &n, &mnmin, &n, &mnmin, &vtsav[
00711                                         vtsav_offset], ldvt, &a[a_offset], 
00712                                         lda, &work[1], lwork, &dif, &iinfo);
00713                             } else if (ijvt == 2) {
00714                                 sort03_("R", &n, &mnmin, &n, &mnmin, &vtsav[
00715                                         vtsav_offset], ldvt, &vt[vt_offset], 
00716                                         ldvt, &work[1], lwork, &dif, &iinfo);
00717                             } else if (ijvt == 3) {
00718                                 sort03_("R", &n, &n, &n, &mnmin, &vtsav[
00719                                         vtsav_offset], ldvt, &vt[vt_offset], 
00720                                         ldvt, &work[1], lwork, &dif, &iinfo);
00721                             }
00722                         }
00723                         result[5] = dmax(result[5],dif);
00724 
00725 /*                    Compare S */
00726 
00727                         dif = 0.f;
00728 /* Computing MAX */
00729                         r__1 = (real) mnmin * ulp * s[1];
00730                         div = dmax(r__1,unfl);
00731                         i__3 = mnmin - 1;
00732                         for (i__ = 1; i__ <= i__3; ++i__) {
00733                             if (ssav[i__] < ssav[i__ + 1]) {
00734                                 dif = ulpinv;
00735                             }
00736                             if (ssav[i__] < 0.f) {
00737                                 dif = ulpinv;
00738                             }
00739 /* Computing MAX */
00740                             r__2 = dif, r__3 = (r__1 = ssav[i__] - s[i__], 
00741                                     dabs(r__1)) / div;
00742                             dif = dmax(r__2,r__3);
00743 /* L60: */
00744                         }
00745                         result[6] = dmax(result[6],dif);
00746 L70:
00747                         ;
00748                     }
00749 /* L80: */
00750                 }
00751 
00752 /*              Test SGESDD: Factorize A */
00753 
00754                 iwtmp = mnmin * 5 * mnmin + mnmin * 9 + max(m,n);
00755                 lswork = iwtmp + (iws - 1) * (*lwork - iwtmp) / 3;
00756                 lswork = min(lswork,*lwork);
00757                 lswork = max(lswork,1);
00758                 if (iws == 4) {
00759                     lswork = *lwork;
00760                 }
00761 
00762                 slacpy_("F", &m, &n, &asav[asav_offset], lda, &a[a_offset], 
00763                         lda);
00764                 s_copy(srnamc_1.srnamt, "SGESDD", (ftnlen)32, (ftnlen)6);
00765                 sgesdd_("A", &m, &n, &a[a_offset], lda, &ssav[1], &usav[
00766                         usav_offset], ldu, &vtsav[vtsav_offset], ldvt, &work[
00767                         1], &lswork, &iwork[1], &iinfo);
00768                 if (iinfo != 0) {
00769                     io___38.ciunit = *nout;
00770                     s_wsfe(&io___38);
00771                     do_fio(&c__1, "GESDD", (ftnlen)5);
00772                     do_fio(&c__1, (char *)&iinfo, (ftnlen)sizeof(integer));
00773                     do_fio(&c__1, (char *)&m, (ftnlen)sizeof(integer));
00774                     do_fio(&c__1, (char *)&n, (ftnlen)sizeof(integer));
00775                     do_fio(&c__1, (char *)&jtype, (ftnlen)sizeof(integer));
00776                     do_fio(&c__1, (char *)&lswork, (ftnlen)sizeof(integer));
00777                     do_fio(&c__4, (char *)&ioldsd[0], (ftnlen)sizeof(integer))
00778                             ;
00779                     e_wsfe();
00780                     *info = abs(iinfo);
00781                     return 0;
00782                 }
00783 
00784 /*              Do tests 8--11 */
00785 
00786                 sbdt01_(&m, &n, &c__0, &asav[asav_offset], lda, &usav[
00787                         usav_offset], ldu, &ssav[1], &e[1], &vtsav[
00788                         vtsav_offset], ldvt, &work[1], &result[7]);
00789                 if (m != 0 && n != 0) {
00790                     sort01_("Columns", &m, &m, &usav[usav_offset], ldu, &work[
00791                             1], lwork, &result[8]);
00792                     sort01_("Rows", &n, &n, &vtsav[vtsav_offset], ldvt, &work[
00793                             1], lwork, &result[9]);
00794                 }
00795                 result[10] = 0.f;
00796                 i__3 = mnmin - 1;
00797                 for (i__ = 1; i__ <= i__3; ++i__) {
00798                     if (ssav[i__] < ssav[i__ + 1]) {
00799                         result[10] = ulpinv;
00800                     }
00801                     if (ssav[i__] < 0.f) {
00802                         result[10] = ulpinv;
00803                     }
00804 /* L90: */
00805                 }
00806                 if (mnmin >= 1) {
00807                     if (ssav[mnmin] < 0.f) {
00808                         result[10] = ulpinv;
00809                     }
00810                 }
00811 
00812 /*              Do partial SVDs, comparing to SSAV, USAV, and VTSAV */
00813 
00814                 result[11] = 0.f;
00815                 result[12] = 0.f;
00816                 result[13] = 0.f;
00817                 for (ijq = 0; ijq <= 2; ++ijq) {
00818                     *(unsigned char *)jobq = *(unsigned char *)&cjob[ijq];
00819                     slacpy_("F", &m, &n, &asav[asav_offset], lda, &a[a_offset]
00820 , lda);
00821                     s_copy(srnamc_1.srnamt, "SGESDD", (ftnlen)32, (ftnlen)6);
00822                     sgesdd_(jobq, &m, &n, &a[a_offset], lda, &s[1], &u[
00823                             u_offset], ldu, &vt[vt_offset], ldvt, &work[1], &
00824                             lswork, &iwork[1], &iinfo);
00825 
00826 /*                 Compare U */
00827 
00828                     dif = 0.f;
00829                     if (m > 0 && n > 0) {
00830                         if (ijq == 1) {
00831                             if (m >= n) {
00832                                 sort03_("C", &m, &mnmin, &m, &mnmin, &usav[
00833                                         usav_offset], ldu, &a[a_offset], lda, 
00834                                         &work[1], lwork, &dif, info);
00835                             } else {
00836                                 sort03_("C", &m, &mnmin, &m, &mnmin, &usav[
00837                                         usav_offset], ldu, &u[u_offset], ldu, 
00838                                         &work[1], lwork, &dif, info);
00839                             }
00840                         } else if (ijq == 2) {
00841                             sort03_("C", &m, &mnmin, &m, &mnmin, &usav[
00842                                     usav_offset], ldu, &u[u_offset], ldu, &
00843                                     work[1], lwork, &dif, info);
00844                         }
00845                     }
00846                     result[11] = dmax(result[11],dif);
00847 
00848 /*                 Compare VT */
00849 
00850                     dif = 0.f;
00851                     if (m > 0 && n > 0) {
00852                         if (ijq == 1) {
00853                             if (m >= n) {
00854                                 sort03_("R", &n, &mnmin, &n, &mnmin, &vtsav[
00855                                         vtsav_offset], ldvt, &vt[vt_offset], 
00856                                         ldvt, &work[1], lwork, &dif, info);
00857                             } else {
00858                                 sort03_("R", &n, &mnmin, &n, &mnmin, &vtsav[
00859                                         vtsav_offset], ldvt, &a[a_offset], 
00860                                         lda, &work[1], lwork, &dif, info);
00861                             }
00862                         } else if (ijq == 2) {
00863                             sort03_("R", &n, &mnmin, &n, &mnmin, &vtsav[
00864                                     vtsav_offset], ldvt, &vt[vt_offset], ldvt, 
00865                                      &work[1], lwork, &dif, info);
00866                         }
00867                     }
00868                     result[12] = dmax(result[12],dif);
00869 
00870 /*                 Compare S */
00871 
00872                     dif = 0.f;
00873 /* Computing MAX */
00874                     r__1 = (real) mnmin * ulp * s[1];
00875                     div = dmax(r__1,unfl);
00876                     i__3 = mnmin - 1;
00877                     for (i__ = 1; i__ <= i__3; ++i__) {
00878                         if (ssav[i__] < ssav[i__ + 1]) {
00879                             dif = ulpinv;
00880                         }
00881                         if (ssav[i__] < 0.f) {
00882                             dif = ulpinv;
00883                         }
00884 /* Computing MAX */
00885                         r__2 = dif, r__3 = (r__1 = ssav[i__] - s[i__], dabs(
00886                                 r__1)) / div;
00887                         dif = dmax(r__2,r__3);
00888 /* L100: */
00889                     }
00890                     result[13] = dmax(result[13],dif);
00891 /* L110: */
00892                 }
00893 
00894 /*              Test SGESVJ: Factorize A */
00895 /*              Note: SGESVJ does not work for M < N */
00896 
00897                 result[14] = 0.f;
00898                 result[15] = 0.f;
00899                 result[16] = 0.f;
00900                 result[17] = 0.f;
00901 
00902                 if (m >= n) {
00903                     iwtmp = mnmin * 5 * mnmin + mnmin * 9 + max(m,n);
00904                     lswork = iwtmp + (iws - 1) * (*lwork - iwtmp) / 3;
00905                     lswork = min(lswork,*lwork);
00906                     lswork = max(lswork,1);
00907                     if (iws == 4) {
00908                         lswork = *lwork;
00909                     }
00910 
00911                     slacpy_("F", &m, &n, &asav[asav_offset], lda, &usav[
00912                             usav_offset], lda);
00913                     s_copy(srnamc_1.srnamt, "SGESVJ", (ftnlen)32, (ftnlen)6);
00914                     sgesvj_("G", "U", "V", &m, &n, &usav[usav_offset], lda, &
00915                             ssav[1], &c__0, &a[a_offset], ldvt, &work[1], 
00916                             lwork, info);
00917 
00918 /*                 SGESVJ retuns V not VT, so we transpose to use the same */
00919 /*                 test suite. */
00920 
00921                     i__3 = n;
00922                     for (j = 1; j <= i__3; ++j) {
00923                         i__4 = n;
00924                         for (i__ = 1; i__ <= i__4; ++i__) {
00925                             vtsav[j + i__ * vtsav_dim1] = a[i__ + j * a_dim1];
00926                         }
00927                     }
00928 
00929                     if (iinfo != 0) {
00930                         io___41.ciunit = *nout;
00931                         s_wsfe(&io___41);
00932                         do_fio(&c__1, "GESVJ", (ftnlen)5);
00933                         do_fio(&c__1, (char *)&iinfo, (ftnlen)sizeof(integer))
00934                                 ;
00935                         do_fio(&c__1, (char *)&m, (ftnlen)sizeof(integer));
00936                         do_fio(&c__1, (char *)&n, (ftnlen)sizeof(integer));
00937                         do_fio(&c__1, (char *)&jtype, (ftnlen)sizeof(integer))
00938                                 ;
00939                         do_fio(&c__1, (char *)&lswork, (ftnlen)sizeof(integer)
00940                                 );
00941                         do_fio(&c__4, (char *)&ioldsd[0], (ftnlen)sizeof(
00942                                 integer));
00943                         e_wsfe();
00944                         *info = abs(iinfo);
00945                         return 0;
00946                     }
00947 
00948 /*                 Do tests 15--18 */
00949 
00950                     sbdt01_(&m, &n, &c__0, &asav[asav_offset], lda, &usav[
00951                             usav_offset], ldu, &ssav[1], &e[1], &vtsav[
00952                             vtsav_offset], ldvt, &work[1], &result[14]);
00953                     if (m != 0 && n != 0) {
00954                         sort01_("Columns", &m, &m, &usav[usav_offset], ldu, &
00955                                 work[1], lwork, &result[15]);
00956                         sort01_("Rows", &n, &n, &vtsav[vtsav_offset], ldvt, &
00957                                 work[1], lwork, &result[16]);
00958                     }
00959                     result[17] = 0.f;
00960                     i__3 = mnmin - 1;
00961                     for (i__ = 1; i__ <= i__3; ++i__) {
00962                         if (ssav[i__] < ssav[i__ + 1]) {
00963                             result[17] = ulpinv;
00964                         }
00965                         if (ssav[i__] < 0.f) {
00966                             result[17] = ulpinv;
00967                         }
00968 /* L200: */
00969                     }
00970                     if (mnmin >= 1) {
00971                         if (ssav[mnmin] < 0.f) {
00972                             result[17] = ulpinv;
00973                         }
00974                     }
00975                 }
00976 
00977 /*              Test SGEJSV: Factorize A */
00978 /*              Note: SGEJSV does not work for M < N */
00979 
00980                 result[18] = 0.f;
00981                 result[19] = 0.f;
00982                 result[20] = 0.f;
00983                 result[21] = 0.f;
00984                 if (m >= n) {
00985                     iwtmp = mnmin * 5 * mnmin + mnmin * 9 + max(m,n);
00986                     lswork = iwtmp + (iws - 1) * (*lwork - iwtmp) / 3;
00987                     lswork = min(lswork,*lwork);
00988                     lswork = max(lswork,1);
00989                     if (iws == 4) {
00990                         lswork = *lwork;
00991                     }
00992 
00993                     slacpy_("F", &m, &n, &asav[asav_offset], lda, &vtsav[
00994                             vtsav_offset], lda);
00995                     s_copy(srnamc_1.srnamt, "SGEJSV", (ftnlen)32, (ftnlen)6);
00996                     sgejsv_("G", "U", "V", "R", "N", "N", &m, &n, &vtsav[
00997                             vtsav_offset], lda, &ssav[1], &usav[usav_offset], 
00998                             ldu, &a[a_offset], ldvt, &work[1], lwork, &iwork[
00999                             1], info);
01000 
01001 /*                 SGEJSV retuns V not VT, so we transpose to use the same */
01002 /*                 test suite. */
01003 
01004                     i__3 = n;
01005                     for (j = 1; j <= i__3; ++j) {
01006                         i__4 = n;
01007                         for (i__ = 1; i__ <= i__4; ++i__) {
01008                             vtsav[j + i__ * vtsav_dim1] = a[i__ + j * a_dim1];
01009                         }
01010                     }
01011 
01012                     if (iinfo != 0) {
01013                         io___42.ciunit = *nout;
01014                         s_wsfe(&io___42);
01015                         do_fio(&c__1, "GESVJ", (ftnlen)5);
01016                         do_fio(&c__1, (char *)&iinfo, (ftnlen)sizeof(integer))
01017                                 ;
01018                         do_fio(&c__1, (char *)&m, (ftnlen)sizeof(integer));
01019                         do_fio(&c__1, (char *)&n, (ftnlen)sizeof(integer));
01020                         do_fio(&c__1, (char *)&jtype, (ftnlen)sizeof(integer))
01021                                 ;
01022                         do_fio(&c__1, (char *)&lswork, (ftnlen)sizeof(integer)
01023                                 );
01024                         do_fio(&c__4, (char *)&ioldsd[0], (ftnlen)sizeof(
01025                                 integer));
01026                         e_wsfe();
01027                         *info = abs(iinfo);
01028                         return 0;
01029                     }
01030 
01031 /*                 Do tests 19--22 */
01032 
01033                     sbdt01_(&m, &n, &c__0, &asav[asav_offset], lda, &usav[
01034                             usav_offset], ldu, &ssav[1], &e[1], &vtsav[
01035                             vtsav_offset], ldvt, &work[1], &result[18]);
01036                     if (m != 0 && n != 0) {
01037                         sort01_("Columns", &m, &m, &usav[usav_offset], ldu, &
01038                                 work[1], lwork, &result[19]);
01039                         sort01_("Rows", &n, &n, &vtsav[vtsav_offset], ldvt, &
01040                                 work[1], lwork, &result[20]);
01041                     }
01042                     result[21] = 0.f;
01043                     i__3 = mnmin - 1;
01044                     for (i__ = 1; i__ <= i__3; ++i__) {
01045                         if (ssav[i__] < ssav[i__ + 1]) {
01046                             result[21] = ulpinv;
01047                         }
01048                         if (ssav[i__] < 0.f) {
01049                             result[21] = ulpinv;
01050                         }
01051 /* L300: */
01052                     }
01053                     if (mnmin >= 1) {
01054                         if (ssav[mnmin] < 0.f) {
01055                             result[21] = ulpinv;
01056                         }
01057                     }
01058                 }
01059 
01060 /*              End of Loop -- Check for RESULT(j) > THRESH */
01061 
01062                 for (j = 1; j <= 22; ++j) {
01063                     if (result[j - 1] >= *thresh) {
01064                         if (nfail == 0) {
01065                             io___43.ciunit = *nout;
01066                             s_wsfe(&io___43);
01067                             e_wsfe();
01068                             io___44.ciunit = *nout;
01069                             s_wsfe(&io___44);
01070                             e_wsfe();
01071                         }
01072                         io___45.ciunit = *nout;
01073                         s_wsfe(&io___45);
01074                         do_fio(&c__1, (char *)&m, (ftnlen)sizeof(integer));
01075                         do_fio(&c__1, (char *)&n, (ftnlen)sizeof(integer));
01076                         do_fio(&c__1, (char *)&jtype, (ftnlen)sizeof(integer))
01077                                 ;
01078                         do_fio(&c__1, (char *)&iws, (ftnlen)sizeof(integer));
01079                         do_fio(&c__4, (char *)&ioldsd[0], (ftnlen)sizeof(
01080                                 integer));
01081                         do_fio(&c__1, (char *)&j, (ftnlen)sizeof(integer));
01082                         do_fio(&c__1, (char *)&result[j - 1], (ftnlen)sizeof(
01083                                 real));
01084                         e_wsfe();
01085                         ++nfail;
01086                     }
01087 /* L120: */
01088                 }
01089                 ntest += 22;
01090 
01091 /* L130: */
01092             }
01093 L140:
01094             ;
01095         }
01096 /* L150: */
01097     }
01098 
01099 /*     Summary */
01100 
01101     alasvm_(path, nout, &nfail, &ntest, &c__0);
01102 
01103 
01104     return 0;
01105 
01106 /*     End of SDRVBD */
01107 
01108 } /* sdrvbd_ */


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