UMFPACK, FORTRAN77 programs which illustrate how to solve sparse linear systems by calling the C library UMFPACK, by Timothy Davis.
The UMFPACK library, written by Timothy Davis, is part of the SuiteSparse package, which is available from http://www.cise.ufl.edu/research/sparse/ .
Calling UMFPACK requires linking additional libraries from the SuiteSparse collection. The executable shell scripts given here suggest how this might be done.
UMFPACK requires that the sparse matrix be stored in a common format known as "compressed column storage". UMFPACK uses the C indexing convention, in which the first element of a vector has index 0.
As an example, the matrix whose full representation is:
11 12 0 0 0 21 0 23 0 25 0 32 33 34 0 0 0 43 0 0 0 52 53 0 55would be stored in compressed column storage as:
# R CC X -- - -- -- 0 0 0 11 1 1 21 2 0 2 12 3 2 32 4 4 52 5 1 5 23 6 2 33 7 3 43 8 4 53 9 2 9 34 10 1 10 25 11 4 55 12 - 12and this is the matrix used in the simple example code.
Calling a C library from FORTRAN77 is often difficult, and the details can vary depending on the computer operating system and compilers used. Moreover, calling UMFPACK requires linking additional libraries from the SuiteSparse collection. The executable shell scripts given here suggest how this might be done.
The computer code and data files described and made available on this web page are distributed under the GNU LGPL license.
UMFPACK is available in a C version and a C++ version and a FORTRAN90 version and a FORTRAN77 version and a MATLAB version.
CC, a data directory which contains examples of the compressed column (CC) sparse matrix format;
CG_RC, a FORTRAN77 library which implements the conjugate gradient method for solving a positive definite sparse linear system A*x=b, using reverse communication.
MGMRES, a FORTRAN77 library which applies the restarted Generalized Minimum Residual (GMRES) algorithm to solve a sparse linear system, by Lili Ju.
ST_IO, a FORTRAN77 library which reads and writes sparse linear systems stored in the Sparse Triplet (ST) format.
SUPERLU, FORTRAN77 programs which illustrate the usage of the SUPERLU library, which applies a fast direct solution method to solve sparse linear systems, by James Demmel, John Gilbert, and Xiaoye Li.
UMFPACK_2.0, a FORTRAN77 library which solves unsymmetric sparse linear systems, this is an obsolete FORTRAN77 version of UMFPACK, which has since been rewritten in C, by Timothy Davis, Iain Duff.
The SIMPLE example demonstrates the use of UMFPACK on a 5x5 "sparse" matrix.
The WATHEN example demonstrates the use of UMFPACK on a sparse matrix that is an instance of the Wathen finite element mass matrix. The matrix is created using the sparse triplet (ST) format, and must be converted to the compressed column (CC) format before calling UMFPACK. This demonstrates why the 5x5 SIMPLE example is not representative of the typical use of UMFPACK.
The WEST example demonstrates the use of UMFPACK on a sparse matrix in the compressed column (CC) format, stored in three files. The matrix is read from the files, and then UMFPACK is called to handle an associated linear system.
You can go up one level to the FORTRAN77 source codes.