F11 – Large Scale Linear Systems

This chapter provides routines for the solution of large sparse systems of simultaneous linear equations. These include **iterative** methods for real nonsymmetric and symmetric, complex non-Hermitian and Hermitian linear systems and **direct** methods for general real linear systems. Further direct methods are currently available in Chapters F01 and F04.

This section is only a brief introduction to the solution of sparse linear systems. For a more detailed discussion see for example Duff et al. (1986) and Demmel et al. (1999) for direct methods, or Barrett et al. (1994) for iterative methods.

A matrix $A$ may be described as **sparse** if the number of zero elements is sufficiently large that it is worthwhile using algorithms which avoid computations involving zero elements.

If $A$ is sparse, and the chosen algorithm requires the matrix coefficients to be stored, a significant saving in storage can often be made by storing only the nonzero elements. A number of different formats may be used to represent sparse matrices economically. These differ according to the amount of storage required, the amount of indirect addressing required for fundamental operations such as matrix-vector products, and their suitability for vector and/or parallel architectures. For a survey of some of these storage formats see Barrett et al. (1994).

Some of the routines in this chapter have been designed to be independent of the matrix storage format. This allows you to choose your own preferred format, or to avoid storing the matrix altogether. Other routines are the so-called **Black Boxes**, which are easier to use, but are based on fixed storage formats. Three fixed storage formats for sparse matrices are currently used. These are known as coordinate storage (CS) format, symmetric coordinate storage (SCS) format and compressed column storage (CCS) format.

This storage format represents a sparse matrix $A$, with NNZ nonzero elements, in terms of three one-dimensional arrays – a real or
complex
array A and two integer arrays IROW and ICOL. These arrays are all of dimension at least NNZ. A contains the nonzero elements themselves, while IROW and ICOL store the corresponding row and column indices respectively.

For example, the matrix

might be represented in the arrays A, IROW and ICOL as

$$A=\left(\begin{array}{rrrrr}1& \phantom{-}2& -1& -1& -3\\ 0& -1& 0& 0& -4\\ 3& 0& 0& 0& 2\\ 2& 0& 4& 1& 1\\ -2& 0& 0& 0& 1\end{array}\right)$$ |

- $\mathbf{A}=\left(1,2,-1,-1,-3,-1,-4,3,2,2,4,1,1,-2,1\right)$
- $\mathbf{IROW}=\left(1,1,1,1,1,2,2,3,3,4,4,4,4,5,5\right)$
- $\mathbf{ICOL}=\left(1,2,3,4,5,2,5,1,5,1,3,4,5,1,5\right)$.

Notes

(i) | The general format specifies no ordering of the array elements, but some routines may impose a specific ordering. For example, the nonzero elements may be required to be ordered by increasing row index and by increasing column index within each row, as in the example above. Utility routines are provided to order the elements appropriately (see Section 2.2). |

(ii) | With this storage format it is possible to enter duplicate elements. These may be interpreted in various ways (e.g., raising an error, ignoring all but the first entry, all but the last, or summing). |

This storage format is suitable for symmetric and Hermitian matrices, and is identical to the CS format described in Section 2.1.1, except that only the lower triangular nonzero elements are stored. Thus, for example, the matrix

might be represented in the arrays A, IROW and ICOL as

$$A=\left(\begin{array}{rrrrrr}4& \phantom{-}1& \phantom{-}0& \phantom{-}0& -1& 2\\ 1& 5& 0& 2& 0& 0\\ 0& 0& 2& 1& 0& -1\\ 0& 2& 1& 3& 1& 0\\ -1& 0& 0& 1& 4& 0\\ 2& 0& -1& 0& 0& 3\end{array}\right)$$ |

- $\mathbf{A}=\left(4,1,5,2,2,1,3,-1,1,4,2,-1,3\right)$.
- $\mathbf{IROW}=\left(1,2,2,3,4,4,4,5,5,5,6,6,6\right)$,
- $\mathbf{ICOL}=\left(1,1,2,3,2,3,4,1,4,5,1,3,6\right)$.

This storage format also uses three one-dimensional arrays – a real or
complex
array A and two integer arrays IROWIX and ICOLZP. The array A and IROWIX are of dimension at least $\mathit{nnz}$, while ICOLZP is of dimension at least $\mathbf{N}+1$. A contains the nonzero elements, going down the first column, then the second and so on. For example, the matrix in Section 2.1.1 above will be represented by

- $\mathbf{A}=\left(1,3,2,-2,2,-1,-1,4,-1,1,-3,-4,2,1,1\right)$.

- $\mathbf{IROWIX}=\left(1,3,4,5,1,2,1,4,1,4,1,2,3,4,5\right)$.

- $\mathbf{ICOLZP}=\left(1,5,7,9,11,16\right)$

The example in Section 2.1.2 above will be represented by

- $\mathbf{A}=\left(4,1,-1,2,1,5,2,2,1,-1,2,1,3,1,-1,1,4,2,-1,3\right)$
- $\mathbf{IROWIX}=\left(1,2,5,6,1,2,4,3,4,6,2,3,4,5,1,4,5,1,3,6\right)$
- $\mathbf{ICOLZP}=\left(1,5,8,11,15,18,21\right)$

Direct methods for the solution of the linear algebraic system

aim to determine the solution vector $x$ in a fixed number of arithmetic operations, which is determined a priori by the number of unknowns. For example, an $LU$ factorization of $A$ followed by forward and backward substitution is a direct method for (1).

$$Ax=b$$ | (1) |

If the matrix $A$ is sparse it is possible to design **direct** methods which exploit the sparsity pattern and are therefore much more computationally efficient than the algorithms in Chapter F07, which in general take no account of sparsity. However, if the matrix is very large and sparse, then **iterative** methods, with an appropriate preconditioner, (see Section 2.3) may be more efficient still.

This chapter provides a direct $LU$ factorization method for sparse real systems. This method is based on special coding for supernodes, broadly defined as groups of consecutive columns with the same nonzero structure, which enables use of dense BLAS kernels. The algorithms contained here come from the SuperLU software suite (see Demmel et al. (1999)). An important requirement of sparse $LU$ factorization is keeping the factors as sparse as possible. It is well known that certain column orderings can produce much sparser factorizations than the normal left-to-right ordering. It is well worth the effort, then, to find such column orderings since they reduce both storage requirements of the factors, the time taken to compute them and the time taken to solve the linear system. The row reorderings, demanded by partial pivoting in order to keep the factorization stable, can further complicate the choice of the column ordering, but quite good and fast algorithms have been developed to make possible a fairly reliable computation of an appropriate column ordering for any sparsity pattern. We provide one such algorithm (known in the literature as COLAMD) through one routine in the suite. Similar to the case for dense matrices, routines are provided to compute the $LU$ factorization with partial row pivoting for numerical stability, solve (1) by performing the forward and backward substitutions for multiple right hand side vectors, refine the solution, minimize the backward error and estimate the forward error of the solutions, compute norms, estimate condition numbers and perform diagnostics of the factorization. It is also possible to explicitly construct, column by column, the dense inverse of the matrix by solving equation (1) for right hand sides corresponding to columns of the identity matrix. Blocks of dense columns can be handled at one time and then stored in some chosen sparse format, as system memory allows. For more details see Section 3.4.

It is also possible to use iterative method routines in this chapter to compute a direct factorization. Such methods are available for sparse real nonsymmetric, complex non-Hermitian, real symmetric positive definite and complex Hermitian positive definite systems. Further direct methods may be found in Chapters F01, F04 and F07.

In contrast to the direct methods discussed in Section 2.2, **iterative** methods for (1) approach the solution through a sequence of approximations until some user-specified termination criterion is met or until some predefined maximum number of iterations has been reached. The number of iterations required for convergence is not generally known in advance, as it depends on the accuracy required, and on the matrix $A$ – its sparsity pattern, conditioning and eigenvalue spectrum.

Faster convergence can often be achieved using a **preconditioner** (see Golub and Van Loan (1996) and Barrett et al. (1994)). A preconditioner maps the original system of equations onto a different system

which hopefully exhibits better convergence characteristics. For example, the condition number of the matrix $\stackrel{-}{A}$ may be better than that of $A$, or it may have eigenvalues of greater multiplicity.

$$\stackrel{-}{A}\stackrel{-}{x}=\stackrel{-}{b}\text{,}$$ | (2) |

An unsuitable preconditioner or no preconditioning at all may result in a very slow rate or lack of convergence. However, preconditioning involves a trade-off between the reduction in the number of iterations required for convergence and the additional computational costs per iteration. Setting up a preconditioner may also involve non-negligible overheads. The application of preconditioners to real nonsymmetric, complex non-Hermitian, real symmetric and complex Hermitian systems of equations is further considered in Sections 2.4 and 2.5.

Many of the most effective iterative methods for the solution of (1) lie in the class of non-stationary **Krylov subspace methods** (see Barrett et al. (1994)). For real nonsymmetric
and complex non-Hermitian
matrices this class includes:

- the restarted generalized minimum residual (RGMRES) method (see Saad and Schultz (1986));
- the conjugate gradient squared (CGS) method (see Sonneveld (1989));
- the polynomial stabilized bi-conjugate gradient (Bi-CGSTAB$\left(\ell \right)$) method (see Van der Vorst (1989) and Sleijpen and Fokkema (1993));
- the transpose-free quasi-minimal residual method (TFQMR) (see Freund and Nachtigal (1991) and Freund (1993)).

Here we just give a brief overview of these algorithms as implemented in this chapter.
For full details see the routine documents for F11BDF and F11BRF.

RGMRES is based on the Arnoldi method, which explicitly generates an orthogonal basis for the Krylov subspace $\mathrm{span}\left\{{A}^{k}{r}_{0}\right\}$, $k=0,1,2,\dots \text{}$, where ${r}_{0}$ is the initial residual. The solution is then expanded onto the orthogonal basis so as to minimize the residual norm. For real nonsymmetric and complex non-Hermitian matrices the generation of the basis requires a ‘long’ recurrence relation, resulting in prohibitive computational and storage costs. RGMRES limits these costs by restarting the Arnoldi process from the latest available residual every $m$ iterations. The value of $m$ is chosen in advance and is fixed throughout the computation. Unfortunately, an optimum value of $m$ cannot easily be predicted.

CGS is a development of the bi-conjugate gradient method where the nonsymmetric Lanczos method is applied to reduce the coefficient matrix to tridiagonal form: two bi-orthogonal sequences of vectors are generated starting from the initial residual ${r}_{0}$ and from the shadow residual ${\hat{r}}_{0}$ corresponding to the arbitrary problem ${A}^{\mathrm{H}}\hat{x}=\hat{b}$, where $\hat{b}$ is chosen so that ${r}_{0}={\hat{r}}_{0}$. In the course of the iteration, the residual and shadow residual ${r}_{i}={P}_{i}\left(A\right){r}_{0}$ and ${\hat{r}}_{i}={P}_{i}\left({A}^{\mathrm{H}}\right){\hat{r}}_{0}$ are generated, where ${P}_{i}$ is a polynomial of order $i$, and bi-orthogonality is exploited by computing the vector product
${\rho}_{i}=\left({\hat{r}}_{i},{r}_{i}\right)=\left({P}_{i}\left({A}^{\mathrm{H}}\right){\hat{r}}_{0}{P}_{i}\left(A\right){r}_{0}\right)=\left({\hat{r}}_{0},{P}_{i}^{2}\left(A\right){r}_{0}\right)$. Applying the ‘contraction’ operator ${P}_{i}\left(A\right)$ twice, the iteration coefficients can still be recovered without advancing the solution of the shadow problem, which is of no interest. The CGS method often provides fast convergence; however, there is no reason why the contraction operator should also reduce the once reduced vector ${P}_{i}\left(A\right){r}_{0}$: this can lead to a highly irregular convergence.

Bi-CGSTAB$\left(\ell \right)$ is similar to the CGS method. However, instead of generating the sequence $\left\{{P}_{i}^{2}\left(A\right){r}_{0}\right\}$, it generates the sequence $\left\{{Q}_{i}\left(A\right){P}_{i}\left(A\right){r}_{0}\right\}$ where the ${Q}_{i}\left(A\right)$ are polynomials chosen to minimize the residual after the application of the contraction operator ${P}_{i}\left(A\right)$. Two main steps can be identified for each iteration: an OR (Orthogonal Residuals) step where a basis of order $\ell $ is generated by a Bi-CG iteration and an MR (Minimum Residuals) step where the residual is minimized over the basis generated, by a method similar to GMRES. For $\ell =1$, the method corresponds to the Bi-CGSTAB method of Van der Vorst (1989). For $\ell >1$, more information about complex eigenvalues of the iteration matrix can be taken into account, and this may lead to improved convergence and robustness. However, as $\ell $ increases, numerical instabilities may arise.

The transpose-free quasi-minimal residual method (TFQMR) (see Freund and Nachtigal (1991) and Freund (1993)) is conceptually derived from the CGS method. The residual is minimized over the space of the residual vectors generated by the CGS iterations under the simplifying assumption that residuals are almost orthogonal. In practice, this is not the case but theoretical analysis has proved the validity of the method. This has the effect of remedying the rather irregular convergence behaviour with wild oscillations in the residual norm that can degrade the numerical performance and robustness of the CGS method. In general, the TFQMR method can be expected to converge at least as fast as the CGS method, in terms of number of iterations, although each iteration involves a higher operation count. When the CGS method exhibits irregular convergence, the TFQMR method can produce much smoother, almost monotonic convergence curves. However, the close relationship between the CGS and TFQMR method implies that the overall speed of convergence is similar for both methods. In some cases, the TFQMR method may converge faster than the CGS method.

Faster convergence can usually be achieved by using a **preconditioner**. A left preconditioner ${M}^{-1}$ can be used by the RGMRES, CGS and TFQMR methods, such that $\stackrel{-}{A}={M}^{-1}A\sim {I}_{n}$ in (2), where ${I}_{n}$ is the identity matrix of order $n$; a right preconditioner ${M}^{-1}$ can be used by the Bi-CGSTAB$\left(\ell \right)$ method, such that $\stackrel{-}{A}=A{M}^{-1}\sim {I}_{n}$. These are formal definitions, used only in the design of the algorithms; in practice, only the means to compute the matrix-vector products $v=Au$ and $v={A}^{\mathrm{H}}u$ (the latter only being required when an estimate of ${\Vert A\Vert}_{1}$ or ${\Vert A\Vert}_{\infty}$ is computed internally), and to solve the preconditioning equations $Mv=u$ are required, that is, explicit information about $M$, or its inverse is not required at any stage.

Preconditioning matrices $M$ are typically based on incomplete factorizations (see Meijerink and Van der Vorst (1981)), or on the approximate inverses occurring in stationary iterative methods (see Young (1971)). A common example is the **incomplete $LU$ factorization**

where $L$ is lower triangular with unit diagonal elements, $D$ is diagonal, $U$ is upper triangular with unit diagonals, $P$ and $Q$ are permutation matrices, and $R$ is a remainder matrix. A **zero-fill** incomplete $LU$ factorization is one for which the matrix

has the same pattern of nonzero entries as $A$. This is obtained by discarding any **fill** elements (nonzero elements of $S$ arising during the factorization in locations where $A$ has zero elements). Allowing some of these fill elements to be kept rather than discarded generally increases the accuracy of the factorization at the expense of some loss of sparsity. For further details see Barrett et al. (1994).

$$M=PLDUQ=A-R$$ |

$$S=P\left(L+D+U\right)Q$$ |

Three of the best known iterative methods applicable to real symmetric and complex Hermitian linear systems are the conjugate gradient (CG) method (see Hestenes and Stiefel (1952) and Golub and Van Loan (1996)) and Lanczos type methods based on SYMMLQ and MINRES (see Paige and Saunders (1975)).
The description of these methods given below is for the real symmetric cases. The generalization to complex Hermitian matrices is straightforward.

For the CG method the matrix $A$ should ideally be positive definite. The application of CG to indefinite matrices may lead to failure, or to lack of convergence. The SYMMLQ and MINRES methods are suitable for both positive definite and indefinite symmetric matrices. They are more robust than CG, but less efficient when $A$ is positive definite.

The methods start from the residual ${r}_{0}=b-A{x}_{0}$, where ${x}_{0}$ is an initial estimate for the solution (often ${x}_{0}=0$), and generate an orthogonal basis for the Krylov subspace $\mathrm{span}\left\{{A}^{k}{r}_{0}\right\}$, for $\mathit{k}=0,1,\dots $, by means of three-term recurrence relations (see Golub and Van Loan (1996)). A sequence of symmetric tridiagonal matrices $\left\{{T}_{k}\right\}$ is also generated. Here and in the following, the index $k$ denotes the iteration count. The resulting symmetric tridiagonal systems of equations are usually more easily solved than the original problem. A sequence of solution iterates $\left\{{x}_{k}\right\}$ is thus generated such that the sequence of the norms of the residuals $\left\{\Vert {r}_{k}\Vert \right\}$ converges to a required tolerance. Note that, in general, the convergence is not monotonic.

In exact arithmetic, after $n$ iterations, this process is equivalent to an orthogonal reduction of $A$ to symmetric tridiagonal form, ${T}_{n}={Q}^{\mathrm{T}}AQ$; the solution ${x}_{n}$ would thus achieve exact convergence. In finite-precision arithmetic, cancellation and round-off errors accumulate causing loss of orthogonality. These methods must therefore be viewed as genuinely iterative methods, able to converge to a solution **within a prescribed tolerance**.

The orthogonal basis is not formed explicitly in either method. The basic difference between the methods lies in the method of solution of the resulting symmetric tridiagonal systems of equations: the CG method is equivalent to carrying out an $LD{L}^{\mathrm{T}}$ (Cholesky) factorization whereas the Lanczos method (SYMMLQ) uses an $LQ$ factorization. The MINRES method on the other hand minimizes the residual into 2-norm.

A preconditioner for these methods must be **symmetric and positive definite**, i.e., representable by $M=E{E}^{\mathrm{T}}$, where $M$ is nonsingular, and such that $\stackrel{-}{A}={E}^{-1}A{E}^{-\mathrm{T}}\sim {I}_{n}$ in (2), where ${I}_{n}$ is the identity matrix of order $n$. These are formal definitions, used only in the design of the algorithms; in practice, only the means to compute the matrix-vector products $v=Au$ and to solve the preconditioning equations $Mv=u$ are required.

Preconditioning matrices $M$ are typically based on incomplete factorizations (see Meijerink and Van der Vorst (1977)), or on the approximate inverses occurring in stationary iterative methods (see Young (1971)). A common example is the **incomplete Cholesky factorization**

where $P$ is a permutation matrix, $L$ is lower triangular with unit diagonal elements, $D$ is diagonal and $R$ is a remainder matrix. A **zero-fill** incomplete Cholesky factorization is one for which the matrix

has the same pattern of nonzero entries as $A$. This is obtained by discarding any **fill** elements (nonzero elements of $S$ arising during the factorization in locations where $A$ has zero elements). Allowing some of these fill elements to be kept rather than discarded generally increases the accuracy of the factorization at the expense of some loss of sparsity. For further details see Barrett et al. (1994).

$$M=PLD{L}^{\mathrm{T}}{P}^{\mathrm{T}}=A-R$$ |

$$S=P\left(L+D+{L}^{\mathrm{T}}\right){P}^{\mathrm{T}}$$ |

The direct method routines available in this chapter largely follow the LAPACK scheme in that four different routines separately handle the tasks of factorizing, solving, refining and condition number estimating. See Section 3.4.

The iterative method routines available in this chapter divide essentially into three types: basic routines, utility routines and Black Box routines.

(i) | Maximum flexibility in the representation and storage of sparse matrices. All matrix operations are performed outside the solver routine, thereby avoiding the need for a complicated interface with enough flexibility to cope with all types of storage schemes and sparsity patterns. This also applies to preconditioners. |

(ii) | Enhanced user interaction: you can closely monitor the solution and tidy or immediate termination can be requested. This is useful, for example, when alternative termination criteria are to be employed or in case of failure of the external routines used to perform matrix operations. |

At present there are suites of basic routines for real symmetric and nonsymmetric systems, and for complex non-Hermitian systems.

The structure of this chapter has been designed to cater for as many types of application as possible. If a Black Box routine exists which is suitable for a given application you are recommended to use it. If you then decide you need some additional flexibility it is easy to achieve this by using basic and utility routines which reproduce the algorithm used in the Black Box, but allow more access to algorithmic control parameters and monitoring. If you wish to use a preconditioner or storage format for which no utility routines are provided, you must call basic routines, and provide your own utility routines.

The suite of basic routines F11BDF, F11BEF and F11BFF implements either RGMRES, CGS, Bi-CGSTAB$\left(\ell \right)$, or TFQMR, for the iterative solution of the real sparse nonsymmetric linear system $Ax=b$. These routines allow a choice of termination criteria and the norms used in them, allow monitoring of the approximate solution, and can return estimates of the norm of $A$ and the largest singular value of the preconditioned matrix $\stackrel{-}{A}$.

In general, it is not possible to recommend one of these methods in preference to another. RGMRES is popular, but requires the most storage, and can easily stagnate when the size $m$ of the orthogonal basis is too small, or the preconditioner is not good enough. CGS can be the fastest method, but the computed residuals can exhibit instability which may greatly affect the convergence and quality of the solution. Bi-CGSTAB$\left(\ell \right)$ seems robust and reliable, but it can be slower than the other methods. TFQMR can be viewed as a more robust variant of the CGS method: it shares the CGS method speed but avoids the CGS fluctuations in the residual, which may give, rise to instability. Some further discussion of the relative merits of these methods can be found in Barrett et al. (1994).

The utility routines provided for real nonsymmetric matrices use the coordinate storage (CS) format described in Section 2.1.1. F11DAF computes a preconditioning matrix based on incomplete $LU$ factorization, and F11DBF solves linear systems involving the preconditioner generated by F11DAF. The amount of fill-in occurring in the incomplete factorization can be controlled by specifying either the level of fill, or the drop tolerance. Partial or complete pivoting may optionally be employed, and the factorization can be modified to preserve row-sums.

F11DFF is a generalization of F11DAF. It computes incomplete $LU$ factorizations on a set of (possibly overlapping) block diagonal matrices, using a prescribed block structure, to provide a block Jacobi or additive Schwartz preconditioner. To solve the linear system defined by the preconditioner generated by F11DFF, a sequence of calls to F11DBF (one for each block) would be required.

F11DDF is similar to F11DBF, but solves linear systems involving the preconditioner corresponding to symmetric successive-over-relaxation (SSOR). The value of the relaxation parameter $\omega $ must currently be supplied by you. Automatic procedures for choosing $\omega $ will be included in the chapter at a future mark.

F11DKF applies the iterated Jacobi method to a system of linear equations and can be used as a preconditioner. However, the domain of validity of the Jacobi method is rather restricted; you should read the routine document for F11DKF before using it.

F11XAF computes matrix-vector products for real nonsymmetric matrices stored in ordered CS format. An additional utility routine F11ZAF orders the nonzero elements of a real sparse nonsymmetric matrix stored in general CS format.

The Black Box routine F11DCF makes calls to F11BDF, F11BEF, F11BFF, F11DBF and F11XAF, to solve a real sparse nonsymmetric linear system, represented in CS format, using RGMRES, CGS, Bi-CGSTAB$\left(\ell \right)$, or TFQMR, with incomplete $LU$ preconditioning. F11DEF is similar, but has options for no preconditioning, Jacobi preconditioning or SSOR preconditioning. F11DGF is also similar to F11DCF, but uses block Jacobi or additive Schwartz preconditioning.

For complex non-Hermitian sparse matrices there is an equivalent suite of routines. F11BRF, F11BSF and F11BTF are the basic routines which implement the same methods used for real nonsymmetric systems, namely RGMRES, CGS, Bi-CGSTAB$\left(\ell \right)$ and TFQMR, for the solution of complex sparse non-Hermitian linear systems. F11DNF and F11DPF are the complex equivalents of F11DAF and F11DBF, respectively, providing facilities for implementing ILU preconditioning. F11DRF and F11DTF implement complex versions of the SSOR and block Jacobi (or additive Schwartz) preconditioners, respectively. F11DXF implements a complex version of the iterated Jacobi preconditioner. Utility routines F11XNF and F11ZNF are provided for computing matrix-vector products and sorting the elements of complex sparse non-Hermitian matrices, respectively. Finally, the Black Box routines F11DQF, F11DSF and F11DUF are complex equivalents of F11DCF, F11DEF and F11DFF, respectively.

The suite of basic routines F11GDF, F11GEF and F11GFF implement either the conjugate gradient (CG) method, or a Lanczos method based on SYMMLQ, for the iterative solution of the real sparse symmetric linear system $Ax=b$. If $A$ is known to be positive definite the CG method should be chosen; the Lanczos method is more robust but less efficient for positive definite matrices. These routines allow a choice of termination criteria and the norms used in them, allow monitoring of the approximate solution, and can return estimates of the norm of $A$ and the largest singular value of the preconditioned matrix $\stackrel{-}{A}$.

The utility routines provided for real symmetric matrices use the symmetric coordinate storage (SCS) format described in Section 2.1.2. F11JAF computes a preconditioning matrix based on incomplete Cholesky factorization, and F11JBF solves linear systems involving the preconditioner generated by F11JAF. The amount of fill-in occurring in the incomplete factorization can be controlled by specifying either the level of fill, or the drop tolerance. Diagonal Markowitz pivoting may optionally be employed, and the factorization can be modified to preserve row-sums.

F11JDF is similar to F11JBF, but solves linear systems involving the preconditioner corresponding to symmetric successive-over-relaxation (SSOR). The value of the relaxation parameter $\omega $ must currently be supplied by you. Automatic procedures for choosing $\omega $ will be included in the chapter at a future mark.

F11DKF applies the iterated Jacobi method to a system of linear equations and can be used as a preconditioner. However, the domain of validity of the Jacobi method is rather restricted; you should read the routine document for F11DKF before using it.

F11XEF computes matrix-vector products for real symmetric matrices stored in ordered SCS format. An additional utility routine F11ZBF orders the nonzero elements of a real sparse symmetric matrix stored in general SCS format.

The Black Box routine F11JCF makes calls to F11GDF, F11GEF, F11GFF, F11JBF and F11XEF, to solve a real sparse symmetric linear system, represented in SCS format, using a conjugate gradient or Lanczos method, with incomplete Cholesky preconditioning. F11JEF is similar, but has options for no preconditioning, Jacobi preconditioning or SSOR preconditioning.

For complex Hermitian sparse matrices there is an equivalent suite of routines. F11GRF, F11GSF and F11GTF are the basic routines which implement the same methods used for real symmetric systems, namely CG and SYMMLQ, for the solution of complex sparse Hermitian linear systems. F11JNF and F11JPF are the complex equivalents of F11JAF and F11JBF, respectively, providing facilities for implementing incomplete Cholesky preconditioning. F11JRF implements a complex version of the SSOR preconditioner. F11DXF implements a complex version of the iterated Jacobi preconditioner. Utility routines F11XSF and F11ZPF are provided for computing matrix-vector products and sorting the elements of complex sparse Hermitian matrices, respectively. Finally, the Black Box routines F11JQF and F11JSF provide easy-to-use implementations of the CG and SYMMLQ methods for complex Hermitian linear systems.

The suite of routines F11MDF, F11MEF, F11MFF, F11MGF, F11MHF, F11MKF, F11MLF and F11MMF implement the COLAMD/SuperLU direct real sparse solver and associated utilities. You are expected to first call F11MDF to compute a suitable column permutation for the subsequent factorization by F11MEF. F11MFF then solves the system of equations. A solution can be further refined by F11MHF, which also minimizes the backward error and estimates a bound for the forward error in the solution. Diagnostics are provided by F11MGF which computes an estimate of the condition number of the matrix using the factorization output by F11MEF, and F11MMF which computes the reciprocal pivot growth (a numerical stability measure) of the factorization. The two utility routines, F11MKF, which computes matrix-matrix products in the particular storage scheme demanded by the suite, and F11MLF which computes quantities relating to norms of a matrix in that particular storage scheme, complete the suite.

Another way of computing a direct solution is to choose specific parameters for the indirect solvers. For example, routine F11DBF solves a linear system involving the incomplete $LU$ preconditioning matrix

generated by F11DAF, where $P$ and $Q$ are permutation matrices, $L$ is lower triangular with unit diagonal elements, $U$ is upper triangular with unit diagonal elements, $D$ is diagonal and $R$ is a remainder matrix.

$$M=PLDUQ=A-R$$ |

If $A$ is nonsingular, a call to F11DAF with $\mathbf{LFILL}<0$ and $\mathbf{DTOL}=0.0$ results in a zero remainder matrix $R$ and a **complete** factorization. A subsequent call to F11DBF will therefore result in a direct method for real sparse nonsymmetric systems.

If $A$ is known to be symmetric positive definite, F11JAF and F11JBF may similarly be used to give a direct solution. For further details see Section 8.4 in F11JAF.

Complex non-Hermitian systems can be solved directly in the same way using F11DNF and F11DPF, while for complex Hermitian systems F11JNF and F11JPF may be used.

Some other routines specifically designed for direct solution of sparse linear systems can currently be found in Chapters F01, F04 and F07. In particular, the following routines allow the direct solution of nonsymmetric systems:
and the following routines allow the direct solution of symmetric positive definite systems:

Routines for the solution of band and tridiagonal systems can be found in Chapters F04 and F07.

Do you have a real system and want to use a direct method? | _ yes |
F11MDF, F11MEF and F11MFF | ||||

no | |
||||||

Do you want to use your own storage scheme or preconditioner? | _ yes |
complex system? | _ yes |
Hermitian? | _ yes |
F11GRF, F11GSF and F11GTF |

| | | | no | |
||||

| | | | F11BRF, F11BSF and F11BTF | ||||

| | no | |
|||||

| | symmetric? | _ yes |
F11GDF, F11GEF and F11GFF | |||

| | no | |
|||||

| | F11BDF, F11BEF and F11BFF | |||||

no | |
||||||

complex system? | _ yes |
Hermitian positive definite? | _ yes |
Incomplete Cholesky preconditioner? | _ yes |
F11JNF and F11JPF |

| | | | no | |
||||

| | | | F11JSF | ||||

| | no | |
|||||

| | Incomplete $LU$ preconditioner? | _ yes |
Using (possibly overlapping) diagonal blocks? | _ yes |
F11DTF and F11DUF | |

| | | | no | |
||||

| | | | F11DNF and F11DQF | ||||

| | no | |
|||||

| | F11DSF | |||||

no | |
||||||

symmetric positive definite? | _ yes |
Incomplete Cholesky preconditioner? | _ yes |
F11JAF and F11JCF | ||

| | no | |
|||||

| | F11JEF | |||||

no | |
||||||

Incomplete $LU$ preconditioner? | _ yes |
Using (possibly overlapping) diagonal blocks? | _ yes |
F11DFF and F11DGF | ||

| | no | |
|||||

| | F11DAF and F11DCF | |||||

no | |
||||||

F11DEF |

ℓ) or TFQMR solver routine |

ℓ) or TFQMR solver routine |

ℓ) or TFQMR solver, |

LU preconditioning |

ℓ) or TFQMR solver, |

LU preconditioning |

LU factorization, |

LU factorization |

LU factorization of local or overlapping diagonal blocks |

LU factorization |

LU factorization of local or overlapping diagonal blocks |

None.

The following lists all those routines that have been withdrawn since Mark 17 of the Library or are scheduled for withdrawal at one of the next two marks.

WithdrawnRoutine | Mark ofWithdrawal | Replacement Routine(s) |

F11BAF | 21 | F11BDF |

F11BBF | 21 | F11BEF |

F11BCF | 21 | F11BFF |

F11GAF | 22 | F11GDF |

F11GBF | 22 | F11GEF |

F11GCF | 22 | F11GFF |

Barrett R, Berry M, Chan T F, Demmel J, Donato J, Dongarra J, Eijkhout V, Pozo R, Romine C and Van der Vorst H (1994) *Templates for the Solution of Linear Systems: Building Blocks for Iterative Methods* SIAM, Philadelphia

Demmel J W, Eisenstat S C, Gilbert J R, Li X S and Li J W H (1999) A supernodal approach to sparse partial pivoting *SIAM J. Matrix Anal. Appl. * **20** 720–755

Duff I S, Erisman A M and Reid J K (1986) *Direct Methods for Sparse Matrices* Oxford University Press, London

Freund R W (1993) A transpose-free quasi-minimal residual algorithm for non-Hermitian linear systems *SIAM J. Sci. Comput.* **14** 470–482

Freund R W and Nachtigal N (1991) QMR: a Quasi-Minimal Residual Method for Non-Hermitian Linear Systems *Numer. Math.* **60** 315–339

Golub G H and Van Loan C F (1996) *Matrix Computations* (3rd Edition) Johns Hopkins University Press, Baltimore

Hestenes M and Stiefel E (1952) Methods of conjugate gradients for solving linear systems *J. Res. Nat. Bur. Stand.* **49** 409–436

Meijerink J and Van der Vorst H (1977) An iterative solution method for linear systems of which the coefficient matrix is a symmetric M-matrix *Math. Comput.* **31** 148–162

Meijerink J and Van der Vorst H (1981) Guidelines for the usage of incomplete decompositions in solving sets of linear equations as they occur in practical problems *J. Comput. Phys.* **44** 134–155

Paige C C and Saunders M A (1975) Solution of sparse indefinite systems of linear equations *SIAM J. Numer. Anal.* **12** 617–629

Saad Y and Schultz M (1986) GMRES: a generalized minimal residual algorithm for solving nonsymmetric linear systems *SIAM J. Sci. Statist. Comput.* **7** 856–869

Sleijpen G L G and Fokkema D R (1993) BiCGSTAB$\left(\ell \right)$ for linear equations involving matrices with complex spectrum *ETNA* **1** 11–32

Sonneveld P (1989) CGS, a fast Lanczos-type solver for nonsymmetric linear systems *SIAM J. Sci. Statist. Comput.* **10** 36–52

Van der Vorst H (1989) Bi-CGSTAB, a fast and smoothly converging variant of Bi-CG for the solution of nonsymmetric linear systems *SIAM J. Sci. Statist. Comput.* **13** 631–644

Young D (1971) *Iterative Solution of Large Linear Systems* Academic Press, New York