June 24 2002 1:04:57.114 PM LINPACKS_PRB Tests for LINPACKS. TEST01 SGEFA/SGESL General storage, factor/solve The matrix order is N = 3 The matrix A is 1.00000 2.00000 3.00000 4.00000 5.00000 6.00000 7.00000 8.00000 0.00000 The right hand side B is 6.00000 15.0000 15.0000 SGESL returns the solution: (Should be (1,1,1)) 0.999999 1.00000 1.00000 TEST02 SGEFA/SGESL General storage factor/solve. The matrix order is N = 100 Call SGEFA to factor the matrix. Call SGESL to solve the factored system. The first five entries of the solution: (All of them should be 1.) 0.999992 0.999991 0.999991 0.999990 0.999992 TEST03 SPOFA/SPODI, factor/inverse for positive definite matrices. The matrix order is N = 5 Calling SPODI for determinant and inverse. Determinant = 6.00000 * 10 ** 0.00000 First row of inverse: 0.833333 0.666667 0.500000 0.333333 0.166667 TEST04 SPBFA and SPBSL, Factor/solve for positive definite band matrices. The matrix order is N = 10 Call SPBFA to factor the matrix. Call SPBSL to solve the system. The first 5 entries of the solution: (All should be 1): 1.00000 1.00000 1.00000 1.00000 0.999999 TEST05 SGBFA factors a general band matrix. SGBSL solves a linear system associated with a factored general band matrix. The matrix order is N = 10 The bandwidth of the matrix is 3 Calling SGBFA to factor the matrix. Calling SGBSL to solve the linear system. The first 5 entries of the solution: (All should be 1): 1.00000 1.00000 1.00000 1.00000 1.00000 TEST06 SGBFA and SGBSL, general band matrix factor/linear solve. The matrix order is N = 100 The bandwidth of the matrix is 51 Call SGBFA to factor the matrix. Call SGBSL to solve the linear system. The first 5 entries of the solution: (All should be 1): 0.999999 0.999999 0.999999 0.999999 0.999999 TEST07 SSIFA factors a symmetric indefinite matrix, SSISL solves a linear system associated with a factored symmetric indefinite matrix. SSIDI computes the determinant of a factored symmetric indefinite matrix. The matrix order is N = 100 Call SSIFA to factor the matrix. Call SSISL to solve the linear system. The first 5 entries of the solution: (Should be (1,2,3,4,5)) 1.00000 2.00000 3.00001 4.00001 5.00001 Call SSISL for the determinant. The determinant is 1.01000 * 10** 2.00000 TEST08 SQRDC computes the QR decomposition of a matrix, but does not return Q and R explicitly. Show how Q and R can be recovered using SQRSL. The matrix dimensions are N = 3 P = 3 The original matrix A: 1.00000 1.00000 0.00000 1.00000 0.00000 1.00000 0.00000 1.00000 1.00000 Call SQRDC to compute the QR factors. The packed matrix A which describes Q and R: -1.41421 -0.707107 -0.707107 0.707107 1.22474 0.408248 0.00000 -0.816497 1.15470 The QRAUX vector, containing some additional information defining Q: 1.70711 1.57735 0.00000 The R factor: -1.41421 -0.707107 -0.707107 0.00000 1.22474 0.408248 0.00000 0.00000 1.15470 The Q factor: -0.707107 0.408248 -0.577350 -0.707107 -0.408248 0.577350 0.00000 0.816497 0.577350 The product, Q*R, = 1.00000 1.00000 -0.596046E-07 1.00000 -0.596046E-07 1.00000 0.00000 1.00000 1.00000 TEST09 SGTSL, general tridiagonal factor/solve routine. The matrix order is N = 100 First 5 entries of solution: (Should be (1,2,3,4,5)) 1.00000 2.00000 3.00001 4.00001 5.00001 TEST10 Demonstrate the use of LINPACKS routines SGECO, SGEFA, SGESL and SGEDI. The matrix order is N = 3 Call SGECO to factor the matrix, and compute its condition number. The reciprocal matrix condition number = 0.246445E-01 Call SGESL to solve a linear system. Solution returned by SGESL (Should be (1,1,1)) 0.999999 1.00000 1.00000 Call SGESL for a new right hand side for the same, factored matrix. Call SGESL to solve a linear system. Solution returned by SGESL (should be (1,0,0)) 1.00000 0.00000 0.00000 Call SGESL for transposed problem. Call SGESL to solve a transposed linear system. Solution returned by SGESL (should be (-1,0,1)) -1.00000 0.105964E-06 1.00000 Call SGEDI to get inverse and determinant The determinant = 2.70000 * 10 ** 1.00000 The inverse matrix: -1.77778 0.888889 -0.111111 1.55556 -0.777778 0.222222 -0.111111 0.222222 -0.111111 TEST11 SCHDC computes the Cholesky decomposition of a general storage positive definite symmetric matrix: A = U' * U where U is an upper triangular matrix. The matrix order is N = 4 The desired Cholesky factor U: 0.717691 0.434456 0.524238 0.974783 0.00000 0.600560 0.291704 0.431356 0.00000 0.00000 0.131327 0.137883E-02 0.00000 0.00000 0.00000 0.523467 The matrix A: 0.515080 0.311805 0.376241 0.699593 0.311805 0.549424 0.402944 0.682555 0.376241 0.402944 0.377164 0.637028 0.699593 0.682555 0.637028 1.41029 The computed Cholesky factor U: 0.717691 0.434456 0.524238 0.974783 0.00000 0.600560 0.291704 0.431356 0.00000 0.00000 0.131327 0.137872E-02 0.00000 0.00000 0.00000 0.523467 The product U'*U: 0.515080 0.311805 0.376241 0.699593 0.311805 0.549424 0.402944 0.682555 0.376241 0.402944 0.377164 0.637028 0.699593 0.682555 0.637028 1.41029 LINPACKS_PRB Normal end of execution.