F11 Chapter Contents
F11 Chapter Introduction
NAG Library Manual

# NAG Library Routine DocumentF11MMF

Note:  before using this routine, please read the Users' Note for your implementation to check the interpretation of bold italicised terms and other implementation-dependent details.

## 1  Purpose

F11MMF computes the reciprocal pivot growth factor of an $LU$ factorization of a real sparse matrix in compressed column (Harwell–Boeing) format.

## 2  Specification

 SUBROUTINE F11MMF ( N, ICOLZP, A, IPRM, IL, LVAL, IU, UVAL, RPG, IFAIL)
 INTEGER N, ICOLZP(*), IPRM(7*N), IL(*), IU(*), IFAIL REAL (KIND=nag_wp) A(*), LVAL(*), UVAL(*), RPG

## 3  Description

F11MMF computes the reciprocal pivot growth factor ${\mathrm{max}}_{j}\left({‖{A}_{j}‖}_{\infty }/{‖{U}_{j}‖}_{\infty }\right)$ from the columns ${A}_{j}$ and ${U}_{j}$ of an $LU$ factorization of the matrix $A$, ${P}_{r}A{P}_{c}=LU$ where ${P}_{r}$ is a row permutation matrix, ${P}_{c}$ is a column permutation matrix, $L$ is unit lower triangular and $U$ is upper triangular as computed by F11MEF.

None.

## 5  Parameters

1:     N – INTEGERInput
On entry: $n$, the order of the matrix $A$.
Constraint: ${\mathbf{N}}\ge 0$.
2:     ICOLZP($*$) – INTEGER arrayInput
Note: the dimension of the array ICOLZP must be at least ${\mathbf{N}}+1$.
On entry: ${\mathbf{ICOLZP}}\left(i\right)$ contains the index in $A$ of the start of a new column. See Section 2.1.3 in the F11 Chapter Introduction.
3:     A($*$) – REAL (KIND=nag_wp) arrayInput
Note: the dimension of the array A must be at least ${\mathbf{ICOLZP}}\left({\mathbf{N}}+1\right)-1$, the number of nonzeros of the sparse matrix $A$.
On entry: the array of nonzero values in the sparse matrix $A$.
4:     IPRM($7×{\mathbf{N}}$) – INTEGER arrayInput
On entry: the column permutation which defines ${P}_{c}$, the row permutation which defines ${P}_{r}$, plus associated data structures as computed by F11MEF.
5:     IL($*$) – INTEGER arrayInput
Note: the dimension of the array IL must be at least as large as the dimension of the array of the same name in F11MEF.
On entry: records the sparsity pattern of matrix $L$ as computed by F11MEF.
6:     LVAL($*$) – REAL (KIND=nag_wp) arrayInput
Note: the dimension of the array LVAL must be at least as large as the dimension of the array of the same name in F11MEF.
On entry: records the nonzero values of matrix $L$ and some nonzero values of matrix $U$ as computed by F11MEF.
7:     IU($*$) – INTEGER arrayInput
Note: the dimension of the array IU must be at least as large as the dimension of the array of the same name in F11MEF.
On entry: records the sparsity pattern of matrix $U$ as computed by F11MEF.
8:     UVAL($*$) – REAL (KIND=nag_wp) arrayInput
Note: the dimension of the array UVAL must be at least as large as the dimension of the array of the same name in F11MEF.
On entry: records some nonzero values of matrix $U$ as computed by F11MEF.
9:     RPG – REAL (KIND=nag_wp)Output
On exit: the reciprocal pivot growth factor ${\mathrm{max}}_{j}\left({‖{A}_{j}‖}_{\infty }/{‖{U}_{j}‖}_{\infty }\right)$. If the reciprocal pivot growth factor is much less than $1$, the stability of the $LU$ factorization may be poor.
10:   IFAIL – INTEGERInput/Output
On entry: IFAIL must be set to $0$, $-1\text{​ or ​}1$. If you are unfamiliar with this parameter you should refer to Section 3.3 in the Essential Introduction for details.
For environments where it might be inappropriate to halt program execution when an error is detected, the value $-1\text{​ or ​}1$ is recommended. If the output of error messages is undesirable, then the value $1$ is recommended. Otherwise, if you are not familiar with this parameter, the recommended value is $0$. When the value $-\mathbf{1}\text{​ or ​}\mathbf{1}$ is used it is essential to test the value of IFAIL on exit.
On exit: ${\mathbf{IFAIL}}={\mathbf{0}}$ unless the routine detects an error or a warning has been flagged (see Section 6).

## 6  Error Indicators and Warnings

If on entry ${\mathbf{IFAIL}}={\mathbf{0}}$ or $-{\mathbf{1}}$, explanatory error messages are output on the current error message unit (as defined by X04AAF).
Errors or warnings detected by the routine:
${\mathbf{IFAIL}}=1$
 On entry, ${\mathbf{N}}<0$.
${\mathbf{IFAIL}}=2$
Ill-defined column permutations in array ${\mathbf{IPRM}}$. Internal checks have revealed that the ${\mathbf{IPRM}}$ array is corrupted.
${\mathbf{IFAIL}}=301$
Unable to allocate required internal workspace.

## 7  Accuracy

Not applicable.

If the reciprocal pivot growth factor, RPG, is much less than $1$, then the factorization of the matrix $A$ could be poor. This means that using the factorization to obtain solutions to a linear system, forward error bounds and estimates of the condition number could be unreliable. Consider increasing the THRESH parameter in the call to F11MEF.

## 9  Example

To compute the reciprocal pivot growth for the factorization of the matrix $A$, where
 $A= 2.00 1.00 0 0 0 0 0 1.00 -1.00 0 4.00 0 1.00 0 1.00 0 0 0 1.00 2.00 0 -2.00 0 0 3.00 .$
In this case, it should be equal to $1.0$.

### 9.1  Program Text

Program Text (f11mmfe.f90)

### 9.2  Program Data

Program Data (f11mmfe.d)

### 9.3  Program Results

Program Results (f11mmfe.r)