LAPACK 3.3.0
|
00001 SUBROUTINE CPOSVXX( FACT, UPLO, N, NRHS, A, LDA, AF, LDAF, EQUED, 00002 $ S, B, LDB, X, LDX, RCOND, RPVGRW, BERR, 00003 $ N_ERR_BNDS, ERR_BNDS_NORM, ERR_BNDS_COMP, 00004 $ NPARAMS, PARAMS, WORK, RWORK, INFO ) 00005 * 00006 * -- LAPACK driver routine (version 3.2.2) -- 00007 * -- Contributed by James Demmel, Deaglan Halligan, Yozo Hida and -- 00008 * -- Jason Riedy of Univ. of California Berkeley. -- 00009 * -- June 2010 -- 00010 * 00011 * -- LAPACK is a software package provided by Univ. of Tennessee, -- 00012 * -- Univ. of California Berkeley and NAG Ltd. -- 00013 * 00014 IMPLICIT NONE 00015 * .. 00016 * .. Scalar Arguments .. 00017 CHARACTER EQUED, FACT, UPLO 00018 INTEGER INFO, LDA, LDAF, LDB, LDX, N, NRHS, NPARAMS, 00019 $ N_ERR_BNDS 00020 REAL RCOND, RPVGRW 00021 * .. 00022 * .. Array Arguments .. 00023 COMPLEX A( LDA, * ), AF( LDAF, * ), B( LDB, * ), 00024 $ WORK( * ), X( LDX, * ) 00025 REAL S( * ), PARAMS( * ), BERR( * ), RWORK( * ), 00026 $ ERR_BNDS_NORM( NRHS, * ), 00027 $ ERR_BNDS_COMP( NRHS, * ) 00028 * .. 00029 * 00030 * Purpose 00031 * ======= 00032 * 00033 * CPOSVXX uses the Cholesky factorization A = U**T*U or A = L*L**T 00034 * to compute the solution to a complex system of linear equations 00035 * A * X = B, where A is an N-by-N symmetric positive definite matrix 00036 * and X and B are N-by-NRHS matrices. 00037 * 00038 * If requested, both normwise and maximum componentwise error bounds 00039 * are returned. CPOSVXX will return a solution with a tiny 00040 * guaranteed error (O(eps) where eps is the working machine 00041 * precision) unless the matrix is very ill-conditioned, in which 00042 * case a warning is returned. Relevant condition numbers also are 00043 * calculated and returned. 00044 * 00045 * CPOSVXX accepts user-provided factorizations and equilibration 00046 * factors; see the definitions of the FACT and EQUED options. 00047 * Solving with refinement and using a factorization from a previous 00048 * CPOSVXX call will also produce a solution with either O(eps) 00049 * errors or warnings, but we cannot make that claim for general 00050 * user-provided factorizations and equilibration factors if they 00051 * differ from what CPOSVXX would itself produce. 00052 * 00053 * Description 00054 * =========== 00055 * 00056 * The following steps are performed: 00057 * 00058 * 1. If FACT = 'E', real scaling factors are computed to equilibrate 00059 * the system: 00060 * 00061 * diag(S)*A*diag(S) *inv(diag(S))*X = diag(S)*B 00062 * 00063 * Whether or not the system will be equilibrated depends on the 00064 * scaling of the matrix A, but if equilibration is used, A is 00065 * overwritten by diag(S)*A*diag(S) and B by diag(S)*B. 00066 * 00067 * 2. If FACT = 'N' or 'E', the Cholesky decomposition is used to 00068 * factor the matrix A (after equilibration if FACT = 'E') as 00069 * A = U**T* U, if UPLO = 'U', or 00070 * A = L * L**T, if UPLO = 'L', 00071 * where U is an upper triangular matrix and L is a lower triangular 00072 * matrix. 00073 * 00074 * 3. If the leading i-by-i principal minor is not positive definite, 00075 * then the routine returns with INFO = i. Otherwise, the factored 00076 * form of A is used to estimate the condition number of the matrix 00077 * A (see argument RCOND). If the reciprocal of the condition number 00078 * is less than machine precision, the routine still goes on to solve 00079 * for X and compute error bounds as described below. 00080 * 00081 * 4. The system of equations is solved for X using the factored form 00082 * of A. 00083 * 00084 * 5. By default (unless PARAMS(LA_LINRX_ITREF_I) is set to zero), 00085 * the routine will use iterative refinement to try to get a small 00086 * error and error bounds. Refinement calculates the residual to at 00087 * least twice the working precision. 00088 * 00089 * 6. If equilibration was used, the matrix X is premultiplied by 00090 * diag(S) so that it solves the original system before 00091 * equilibration. 00092 * 00093 * Arguments 00094 * ========= 00095 * 00096 * Some optional parameters are bundled in the PARAMS array. These 00097 * settings determine how refinement is performed, but often the 00098 * defaults are acceptable. If the defaults are acceptable, users 00099 * can pass NPARAMS = 0 which prevents the source code from accessing 00100 * the PARAMS argument. 00101 * 00102 * FACT (input) CHARACTER*1 00103 * Specifies whether or not the factored form of the matrix A is 00104 * supplied on entry, and if not, whether the matrix A should be 00105 * equilibrated before it is factored. 00106 * = 'F': On entry, AF contains the factored form of A. 00107 * If EQUED is not 'N', the matrix A has been 00108 * equilibrated with scaling factors given by S. 00109 * A and AF are not modified. 00110 * = 'N': The matrix A will be copied to AF and factored. 00111 * = 'E': The matrix A will be equilibrated if necessary, then 00112 * copied to AF and factored. 00113 * 00114 * UPLO (input) CHARACTER*1 00115 * = 'U': Upper triangle of A is stored; 00116 * = 'L': Lower triangle of A is stored. 00117 * 00118 * N (input) INTEGER 00119 * The number of linear equations, i.e., the order of the 00120 * matrix A. N >= 0. 00121 * 00122 * NRHS (input) INTEGER 00123 * The number of right hand sides, i.e., the number of columns 00124 * of the matrices B and X. NRHS >= 0. 00125 * 00126 * A (input/output) COMPLEX array, dimension (LDA,N) 00127 * On entry, the symmetric matrix A, except if FACT = 'F' and EQUED = 00128 * 'Y', then A must contain the equilibrated matrix 00129 * diag(S)*A*diag(S). If UPLO = 'U', the leading N-by-N upper 00130 * triangular part of A contains the upper triangular part of the 00131 * matrix A, and the strictly lower triangular part of A is not 00132 * referenced. If UPLO = 'L', the leading N-by-N lower triangular 00133 * part of A contains the lower triangular part of the matrix A, and 00134 * the strictly upper triangular part of A is not referenced. A is 00135 * not modified if FACT = 'F' or 'N', or if FACT = 'E' and EQUED = 00136 * 'N' on exit. 00137 * 00138 * On exit, if FACT = 'E' and EQUED = 'Y', A is overwritten by 00139 * diag(S)*A*diag(S). 00140 * 00141 * LDA (input) INTEGER 00142 * The leading dimension of the array A. LDA >= max(1,N). 00143 * 00144 * AF (input or output) COMPLEX array, dimension (LDAF,N) 00145 * If FACT = 'F', then AF is an input argument and on entry 00146 * contains the triangular factor U or L from the Cholesky 00147 * factorization A = U**T*U or A = L*L**T, in the same storage 00148 * format as A. If EQUED .ne. 'N', then AF is the factored 00149 * form of the equilibrated matrix diag(S)*A*diag(S). 00150 * 00151 * If FACT = 'N', then AF is an output argument and on exit 00152 * returns the triangular factor U or L from the Cholesky 00153 * factorization A = U**T*U or A = L*L**T of the original 00154 * matrix A. 00155 * 00156 * If FACT = 'E', then AF is an output argument and on exit 00157 * returns the triangular factor U or L from the Cholesky 00158 * factorization A = U**T*U or A = L*L**T of the equilibrated 00159 * matrix A (see the description of A for the form of the 00160 * equilibrated matrix). 00161 * 00162 * LDAF (input) INTEGER 00163 * The leading dimension of the array AF. LDAF >= max(1,N). 00164 * 00165 * EQUED (input or output) CHARACTER*1 00166 * Specifies the form of equilibration that was done. 00167 * = 'N': No equilibration (always true if FACT = 'N'). 00168 * = 'Y': Both row and column equilibration, i.e., A has been 00169 * replaced by diag(S) * A * diag(S). 00170 * EQUED is an input argument if FACT = 'F'; otherwise, it is an 00171 * output argument. 00172 * 00173 * S (input or output) REAL array, dimension (N) 00174 * The row scale factors for A. If EQUED = 'Y', A is multiplied on 00175 * the left and right by diag(S). S is an input argument if FACT = 00176 * 'F'; otherwise, S is an output argument. If FACT = 'F' and EQUED 00177 * = 'Y', each element of S must be positive. If S is output, each 00178 * element of S is a power of the radix. If S is input, each element 00179 * of S should be a power of the radix to ensure a reliable solution 00180 * and error estimates. Scaling by powers of the radix does not cause 00181 * rounding errors unless the result underflows or overflows. 00182 * Rounding errors during scaling lead to refining with a matrix that 00183 * is not equivalent to the input matrix, producing error estimates 00184 * that may not be reliable. 00185 * 00186 * B (input/output) COMPLEX array, dimension (LDB,NRHS) 00187 * On entry, the N-by-NRHS right hand side matrix B. 00188 * On exit, 00189 * if EQUED = 'N', B is not modified; 00190 * if EQUED = 'Y', B is overwritten by diag(S)*B; 00191 * 00192 * LDB (input) INTEGER 00193 * The leading dimension of the array B. LDB >= max(1,N). 00194 * 00195 * X (output) COMPLEX array, dimension (LDX,NRHS) 00196 * If INFO = 0, the N-by-NRHS solution matrix X to the original 00197 * system of equations. Note that A and B are modified on exit if 00198 * EQUED .ne. 'N', and the solution to the equilibrated system is 00199 * inv(diag(S))*X. 00200 * 00201 * LDX (input) INTEGER 00202 * The leading dimension of the array X. LDX >= max(1,N). 00203 * 00204 * RCOND (output) REAL 00205 * Reciprocal scaled condition number. This is an estimate of the 00206 * reciprocal Skeel condition number of the matrix A after 00207 * equilibration (if done). If this is less than the machine 00208 * precision (in particular, if it is zero), the matrix is singular 00209 * to working precision. Note that the error may still be small even 00210 * if this number is very small and the matrix appears ill- 00211 * conditioned. 00212 * 00213 * RPVGRW (output) REAL 00214 * Reciprocal pivot growth. On exit, this contains the reciprocal 00215 * pivot growth factor norm(A)/norm(U). The "max absolute element" 00216 * norm is used. If this is much less than 1, then the stability of 00217 * the LU factorization of the (equilibrated) matrix A could be poor. 00218 * This also means that the solution X, estimated condition numbers, 00219 * and error bounds could be unreliable. If factorization fails with 00220 * 0<INFO<=N, then this contains the reciprocal pivot growth factor 00221 * for the leading INFO columns of A. 00222 * 00223 * BERR (output) REAL array, dimension (NRHS) 00224 * Componentwise relative backward error. This is the 00225 * componentwise relative backward error of each solution vector X(j) 00226 * (i.e., the smallest relative change in any element of A or B that 00227 * makes X(j) an exact solution). 00228 * 00229 * N_ERR_BNDS (input) INTEGER 00230 * Number of error bounds to return for each right hand side 00231 * and each type (normwise or componentwise). See ERR_BNDS_NORM and 00232 * ERR_BNDS_COMP below. 00233 * 00234 * ERR_BNDS_NORM (output) REAL array, dimension (NRHS, N_ERR_BNDS) 00235 * For each right-hand side, this array contains information about 00236 * various error bounds and condition numbers corresponding to the 00237 * normwise relative error, which is defined as follows: 00238 * 00239 * Normwise relative error in the ith solution vector: 00240 * max_j (abs(XTRUE(j,i) - X(j,i))) 00241 * ------------------------------ 00242 * max_j abs(X(j,i)) 00243 * 00244 * The array is indexed by the type of error information as described 00245 * below. There currently are up to three pieces of information 00246 * returned. 00247 * 00248 * The first index in ERR_BNDS_NORM(i,:) corresponds to the ith 00249 * right-hand side. 00250 * 00251 * The second index in ERR_BNDS_NORM(:,err) contains the following 00252 * three fields: 00253 * err = 1 "Trust/don't trust" boolean. Trust the answer if the 00254 * reciprocal condition number is less than the threshold 00255 * sqrt(n) * slamch('Epsilon'). 00256 * 00257 * err = 2 "Guaranteed" error bound: The estimated forward error, 00258 * almost certainly within a factor of 10 of the true error 00259 * so long as the next entry is greater than the threshold 00260 * sqrt(n) * slamch('Epsilon'). This error bound should only 00261 * be trusted if the previous boolean is true. 00262 * 00263 * err = 3 Reciprocal condition number: Estimated normwise 00264 * reciprocal condition number. Compared with the threshold 00265 * sqrt(n) * slamch('Epsilon') to determine if the error 00266 * estimate is "guaranteed". These reciprocal condition 00267 * numbers are 1 / (norm(Z^{-1},inf) * norm(Z,inf)) for some 00268 * appropriately scaled matrix Z. 00269 * Let Z = S*A, where S scales each row by a power of the 00270 * radix so all absolute row sums of Z are approximately 1. 00271 * 00272 * See Lapack Working Note 165 for further details and extra 00273 * cautions. 00274 * 00275 * ERR_BNDS_COMP (output) REAL array, dimension (NRHS, N_ERR_BNDS) 00276 * For each right-hand side, this array contains information about 00277 * various error bounds and condition numbers corresponding to the 00278 * componentwise relative error, which is defined as follows: 00279 * 00280 * Componentwise relative error in the ith solution vector: 00281 * abs(XTRUE(j,i) - X(j,i)) 00282 * max_j ---------------------- 00283 * abs(X(j,i)) 00284 * 00285 * The array is indexed by the right-hand side i (on which the 00286 * componentwise relative error depends), and the type of error 00287 * information as described below. There currently are up to three 00288 * pieces of information returned for each right-hand side. If 00289 * componentwise accuracy is not requested (PARAMS(3) = 0.0), then 00290 * ERR_BNDS_COMP is not accessed. If N_ERR_BNDS .LT. 3, then at most 00291 * the first (:,N_ERR_BNDS) entries are returned. 00292 * 00293 * The first index in ERR_BNDS_COMP(i,:) corresponds to the ith 00294 * right-hand side. 00295 * 00296 * The second index in ERR_BNDS_COMP(:,err) contains the following 00297 * three fields: 00298 * err = 1 "Trust/don't trust" boolean. Trust the answer if the 00299 * reciprocal condition number is less than the threshold 00300 * sqrt(n) * slamch('Epsilon'). 00301 * 00302 * err = 2 "Guaranteed" error bound: The estimated forward error, 00303 * almost certainly within a factor of 10 of the true error 00304 * so long as the next entry is greater than the threshold 00305 * sqrt(n) * slamch('Epsilon'). This error bound should only 00306 * be trusted if the previous boolean is true. 00307 * 00308 * err = 3 Reciprocal condition number: Estimated componentwise 00309 * reciprocal condition number. Compared with the threshold 00310 * sqrt(n) * slamch('Epsilon') to determine if the error 00311 * estimate is "guaranteed". These reciprocal condition 00312 * numbers are 1 / (norm(Z^{-1},inf) * norm(Z,inf)) for some 00313 * appropriately scaled matrix Z. 00314 * Let Z = S*(A*diag(x)), where x is the solution for the 00315 * current right-hand side and S scales each row of 00316 * A*diag(x) by a power of the radix so all absolute row 00317 * sums of Z are approximately 1. 00318 * 00319 * See Lapack Working Note 165 for further details and extra 00320 * cautions. 00321 * 00322 * NPARAMS (input) INTEGER 00323 * Specifies the number of parameters set in PARAMS. If .LE. 0, the 00324 * PARAMS array is never referenced and default values are used. 00325 * 00326 * PARAMS (input / output) REAL array, dimension NPARAMS 00327 * Specifies algorithm parameters. If an entry is .LT. 0.0, then 00328 * that entry will be filled with default value used for that 00329 * parameter. Only positions up to NPARAMS are accessed; defaults 00330 * are used for higher-numbered parameters. 00331 * 00332 * PARAMS(LA_LINRX_ITREF_I = 1) : Whether to perform iterative 00333 * refinement or not. 00334 * Default: 1.0 00335 * = 0.0 : No refinement is performed, and no error bounds are 00336 * computed. 00337 * = 1.0 : Use the double-precision refinement algorithm, 00338 * possibly with doubled-single computations if the 00339 * compilation environment does not support DOUBLE 00340 * PRECISION. 00341 * (other values are reserved for future use) 00342 * 00343 * PARAMS(LA_LINRX_ITHRESH_I = 2) : Maximum number of residual 00344 * computations allowed for refinement. 00345 * Default: 10 00346 * Aggressive: Set to 100 to permit convergence using approximate 00347 * factorizations or factorizations other than LU. If 00348 * the factorization uses a technique other than 00349 * Gaussian elimination, the guarantees in 00350 * err_bnds_norm and err_bnds_comp may no longer be 00351 * trustworthy. 00352 * 00353 * PARAMS(LA_LINRX_CWISE_I = 3) : Flag determining if the code 00354 * will attempt to find a solution with small componentwise 00355 * relative error in the double-precision algorithm. Positive 00356 * is true, 0.0 is false. 00357 * Default: 1.0 (attempt componentwise convergence) 00358 * 00359 * WORK (workspace) COMPLEX array, dimension (2*N) 00360 * 00361 * RWORK (workspace) REAL array, dimension (2*N) 00362 * 00363 * INFO (output) INTEGER 00364 * = 0: Successful exit. The solution to every right-hand side is 00365 * guaranteed. 00366 * < 0: If INFO = -i, the i-th argument had an illegal value 00367 * > 0 and <= N: U(INFO,INFO) is exactly zero. The factorization 00368 * has been completed, but the factor U is exactly singular, so 00369 * the solution and error bounds could not be computed. RCOND = 0 00370 * is returned. 00371 * = N+J: The solution corresponding to the Jth right-hand side is 00372 * not guaranteed. The solutions corresponding to other right- 00373 * hand sides K with K > J may not be guaranteed as well, but 00374 * only the first such right-hand side is reported. If a small 00375 * componentwise error is not requested (PARAMS(3) = 0.0) then 00376 * the Jth right-hand side is the first with a normwise error 00377 * bound that is not guaranteed (the smallest J such 00378 * that ERR_BNDS_NORM(J,1) = 0.0). By default (PARAMS(3) = 1.0) 00379 * the Jth right-hand side is the first with either a normwise or 00380 * componentwise error bound that is not guaranteed (the smallest 00381 * J such that either ERR_BNDS_NORM(J,1) = 0.0 or 00382 * ERR_BNDS_COMP(J,1) = 0.0). See the definition of 00383 * ERR_BNDS_NORM(:,1) and ERR_BNDS_COMP(:,1). To get information 00384 * about all of the right-hand sides check ERR_BNDS_NORM or 00385 * ERR_BNDS_COMP. 00386 * 00387 * ================================================================== 00388 * 00389 * .. Parameters .. 00390 REAL ZERO, ONE 00391 PARAMETER ( ZERO = 0.0E+0, ONE = 1.0E+0 ) 00392 INTEGER FINAL_NRM_ERR_I, FINAL_CMP_ERR_I, BERR_I 00393 INTEGER RCOND_I, NRM_RCOND_I, NRM_ERR_I, CMP_RCOND_I 00394 INTEGER CMP_ERR_I, PIV_GROWTH_I 00395 PARAMETER ( FINAL_NRM_ERR_I = 1, FINAL_CMP_ERR_I = 2, 00396 $ BERR_I = 3 ) 00397 PARAMETER ( RCOND_I = 4, NRM_RCOND_I = 5, NRM_ERR_I = 6 ) 00398 PARAMETER ( CMP_RCOND_I = 7, CMP_ERR_I = 8, 00399 $ PIV_GROWTH_I = 9 ) 00400 * .. 00401 * .. Local Scalars .. 00402 LOGICAL EQUIL, NOFACT, RCEQU 00403 INTEGER INFEQU, J 00404 REAL AMAX, BIGNUM, SMIN, SMAX, SCOND, SMLNUM 00405 * .. 00406 * .. External Functions .. 00407 EXTERNAL LSAME, SLAMCH, CLA_PORPVGRW 00408 LOGICAL LSAME 00409 REAL SLAMCH, CLA_PORPVGRW 00410 * .. 00411 * .. External Subroutines .. 00412 EXTERNAL CPOCON, CPOEQUB, CPOTRF, CPOTRS, CLACPY, 00413 $ CLAQHE, XERBLA, CLASCL2, CPORFSX 00414 * .. 00415 * .. Intrinsic Functions .. 00416 INTRINSIC MAX, MIN 00417 * .. 00418 * .. Executable Statements .. 00419 * 00420 INFO = 0 00421 NOFACT = LSAME( FACT, 'N' ) 00422 EQUIL = LSAME( FACT, 'E' ) 00423 SMLNUM = SLAMCH( 'Safe minimum' ) 00424 BIGNUM = ONE / SMLNUM 00425 IF( NOFACT .OR. EQUIL ) THEN 00426 EQUED = 'N' 00427 RCEQU = .FALSE. 00428 ELSE 00429 RCEQU = LSAME( EQUED, 'Y' ) 00430 ENDIF 00431 * 00432 * Default is failure. If an input parameter is wrong or 00433 * factorization fails, make everything look horrible. Only the 00434 * pivot growth is set here, the rest is initialized in CPORFSX. 00435 * 00436 RPVGRW = ZERO 00437 * 00438 * Test the input parameters. PARAMS is not tested until CPORFSX. 00439 * 00440 IF( .NOT.NOFACT .AND. .NOT.EQUIL .AND. .NOT. 00441 $ LSAME( FACT, 'F' ) ) THEN 00442 INFO = -1 00443 ELSE IF( .NOT.LSAME( UPLO, 'U' ) .AND. 00444 $ .NOT.LSAME( UPLO, 'L' ) ) THEN 00445 INFO = -2 00446 ELSE IF( N.LT.0 ) THEN 00447 INFO = -3 00448 ELSE IF( NRHS.LT.0 ) THEN 00449 INFO = -4 00450 ELSE IF( LDA.LT.MAX( 1, N ) ) THEN 00451 INFO = -6 00452 ELSE IF( LDAF.LT.MAX( 1, N ) ) THEN 00453 INFO = -8 00454 ELSE IF( LSAME( FACT, 'F' ) .AND. .NOT. 00455 $ ( RCEQU .OR. LSAME( EQUED, 'N' ) ) ) THEN 00456 INFO = -9 00457 ELSE 00458 IF ( RCEQU ) THEN 00459 SMIN = BIGNUM 00460 SMAX = ZERO 00461 DO 10 J = 1, N 00462 SMIN = MIN( SMIN, S( J ) ) 00463 SMAX = MAX( SMAX, S( J ) ) 00464 10 CONTINUE 00465 IF( SMIN.LE.ZERO ) THEN 00466 INFO = -10 00467 ELSE IF( N.GT.0 ) THEN 00468 SCOND = MAX( SMIN, SMLNUM ) / MIN( SMAX, BIGNUM ) 00469 ELSE 00470 SCOND = ONE 00471 END IF 00472 END IF 00473 IF( INFO.EQ.0 ) THEN 00474 IF( LDB.LT.MAX( 1, N ) ) THEN 00475 INFO = -12 00476 ELSE IF( LDX.LT.MAX( 1, N ) ) THEN 00477 INFO = -14 00478 END IF 00479 END IF 00480 END IF 00481 * 00482 IF( INFO.NE.0 ) THEN 00483 CALL XERBLA( 'CPOSVXX', -INFO ) 00484 RETURN 00485 END IF 00486 * 00487 IF( EQUIL ) THEN 00488 * 00489 * Compute row and column scalings to equilibrate the matrix A. 00490 * 00491 CALL CPOEQUB( N, A, LDA, S, SCOND, AMAX, INFEQU ) 00492 IF( INFEQU.EQ.0 ) THEN 00493 * 00494 * Equilibrate the matrix. 00495 * 00496 CALL CLAQHE( UPLO, N, A, LDA, S, SCOND, AMAX, EQUED ) 00497 RCEQU = LSAME( EQUED, 'Y' ) 00498 END IF 00499 END IF 00500 * 00501 * Scale the right-hand side. 00502 * 00503 IF( RCEQU ) CALL CLASCL2( N, NRHS, S, B, LDB ) 00504 * 00505 IF( NOFACT .OR. EQUIL ) THEN 00506 * 00507 * Compute the Cholesky factorization of A. 00508 * 00509 CALL CLACPY( UPLO, N, N, A, LDA, AF, LDAF ) 00510 CALL CPOTRF( UPLO, N, AF, LDAF, INFO ) 00511 * 00512 * Return if INFO is non-zero. 00513 * 00514 IF( INFO.GT.0 ) THEN 00515 * 00516 * Pivot in column INFO is exactly 0 00517 * Compute the reciprocal pivot growth factor of the 00518 * leading rank-deficient INFO columns of A. 00519 * 00520 RPVGRW = CLA_PORPVGRW( UPLO, N, A, LDA, AF, LDAF, RWORK ) 00521 RETURN 00522 END IF 00523 END IF 00524 * 00525 * Compute the reciprocal pivot growth factor RPVGRW. 00526 * 00527 RPVGRW = CLA_PORPVGRW( UPLO, N, A, LDA, AF, LDAF, RWORK ) 00528 * 00529 * Compute the solution matrix X. 00530 * 00531 CALL CLACPY( 'Full', N, NRHS, B, LDB, X, LDX ) 00532 CALL CPOTRS( UPLO, N, NRHS, AF, LDAF, X, LDX, INFO ) 00533 * 00534 * Use iterative refinement to improve the computed solution and 00535 * compute error bounds and backward error estimates for it. 00536 * 00537 CALL CPORFSX( UPLO, EQUED, N, NRHS, A, LDA, AF, LDAF, 00538 $ S, B, LDB, X, LDX, RCOND, BERR, N_ERR_BNDS, ERR_BNDS_NORM, 00539 $ ERR_BNDS_COMP, NPARAMS, PARAMS, WORK, RWORK, INFO ) 00540 00541 * 00542 * Scale solutions. 00543 * 00544 IF ( RCEQU ) THEN 00545 CALL CLASCL2( N, NRHS, S, X, LDX ) 00546 END IF 00547 * 00548 RETURN 00549 * 00550 * End of CPOSVXX 00551 * 00552 END