umfpack_test


umfpack_test, a C++ code which calls umfpack(), which solves sparse linear systems.

The UMFPACK library, written by Timothy Davis, is part of the SuiteSparse package, which is available from https://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.

The code requires that the sparse matrix be stored in a common format known as compressed column storage (CCS).

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 55
      
would 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  -   12
      
and this is the matrix used in the simple example code.

Licensing:

The information on this web page is distributed under the MIT license.

Languages:

umfpack_test is available in a C version and a C++ version and a Fortran90 version and a MATLAB version.

Related Data and Programs:

ccs, a data directory which contains examples of the compressed column storage (CCS) sparse matrix format;

cg_rc, a C++ code which implements the conjugate gradient method for solving a positive definite sparse linear system A*x=b, using reverse communication.

mgmres, a C++ code which applies the restarted Generalized Minimum Residual (GMRES) algorithm to solve a sparse linear system, by Lili Ju.

st_io, a C++ code which reads and writes sparse linear systems stored in the Sparse Triplet (ST) format.

superlu, a C++ code which illustrates 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.

Reference:

  1. Timothy Davis,
    Algorithm 832: UMFPACK, an unsymmetric-pattern multifrontal method,
    ACM Transactions on Mathematical Software,
    Volume 30, Number 2, June 2004, pages 196-199.
  2. Timothy Davis,
    Direct Methods for Sparse Linear Systems,
    SIAM, 2006,
    ISBN: 0898716136,
    LC: QA188.D386.

Examples and Tests:

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 storage (CCS) 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 storage (CCS) format, stored in three files. The matrix is read from the files, and then UMFPACK is called to handle an associated linear system.


Last revised on 20 July 2014.