Developer Reference for Intel® oneAPI Math Kernel Library for Fortran
mkl_?getrfnpi
Performs LU factorization (complete or incomplete) of a general matrix without pivoting.
Syntax
call mkl_sgetrfnpi ( m , n , nfact , a , lda , info )
call mkl_dgetrfnpi ( m , n , nfact , a , lda , info )
call mkl_cgetrfnpi ( m , n , nfact , a , lda , info )
call mkl_zgetrfnpi ( m , n , nfact , a , lda , info )
call mkl_getrfnpi ( a [ , nfact ] [ , info ] )
Include Files
mkl.fi, mkl_lapack.f90
Description
The routine computes the LU factorization of a general m -by- n matrix A without using pivoting. It supports incomplete factorization. The factorization has the form:
\(A = LU\) ,
where \(L\) is lower triangular with unit diagonal elements (lower trapezoidal if m > n ) and \(U\) is upper triangular (upper trapezoidal if m < n ).
Incomplete factorization has the form:
\(A = LU + \tilde{A}\) ,
where L is lower trapezoidal with unit diagonal elements, U is upper trapezoidal, and \(\tilde{A}\) is the unfactored part of matrix \(A\) . See the application notes section for further details.
Input Parameters
The data types are given for the Fortran interface.
m
INTEGER.
The number of rows in matrix A ; m ≥ 0.
n
INTEGER.
The number of columns in matrix A ; n ≥ 0.
nfact
INTEGER.
The number of rows and columns to factor; 0 ≤ nfact ≤ min( m , n ). Note that if nfact < min( m , n ), incomplete factorization is performed.
a
REAL for mkl_sgetrfnpi
DOUBLE PRECISION for mkl_dgetrfnpi
COMPLEX for mkl_cgetrfnpi
DOUBLE COMPLEX for mkl_zgetrfnpi
Array of size (lda,*) . Contains the matrix A . The second dimension of a must be at least :code:max(1, n ).
lda
INTEGER.
The leading dimension of array a . lda ≥ max(1, m ) .
Output Parameters
a
Overwritten by L and U . The unit diagonal elements of L are not stored. When incomplete factorization is specified by setting nfact < min(m,n), a also contains the unfactored submatrix \(\tilde{A}_{22}\). See the application notes section for further details.
info
INTEGER.
If info =0, the execution is successful.
If info = - i , the i -th parameter had an illegal value.
If info = i , uii is 0. The requested factorization has been completed, but U is exactly singular. Division by 0 will occur if factorization is completed and factor U is used for solving a system of linear equations.
Return Values
No return value, info is an Output Parameter.
Fortran 95 Interface Notes
Routines in Fortran 95 interface have fewer arguments in the calling sequence than their FORTRAN 77 counterparts. For general conventions applied to skip redundant or reconstructible arguments, see Fortran 95 Interface Conventions .
Specific details for the routine getrf interface are as follows:
- a
-
Holds the matrix A of size ( m,n ).
Application Notes
The computed \(L\) and \(U\) are the exact factors of a perturbed matrix \(A\) + \(E\) , with
\[|E| \leq c(min(m, n))\varepsilon |L||U|\]
where c(n) is a modest linear function of n , and \(\varepsilon\) is the machine precision.
The approximate number of floating-point operations for real flavors is
\((2/3) n^3\), If m = n = nfact
\((1/3) n^2 (3m - n)\), if m > n = nfact
\((1/3) m^2 (3n - m)\), if m = nfact < n
\((2/3) n^3 - ( n - nfact)^3\), if m = n, nfact < min(m, n)
\((1/3)( n^2 (3m - n) - ( n - nfact )^{2}(3m - 2 nfact - n) )\), if m > n > nfact
\((1/3)( m^2 (3n - m) - ( m - nfact)^{2}(3n - 2 nfact - m ) )\), if nfact < m < n.
The number of operations for complex flavors is four times greater.
When incomplete factorization is specified, the first nfact rows and columns are factored, with the update of the remaining rows and columns of \(A\) as follows:
If matrix \(A\) is represented as a block 2-by-2 matrix:
\[A = \left [ \begin{matrix} A_{11} & A_{12} \\ A_{21} & A_{22} \end{matrix} \right ]\]
where
\(A_{11}\) is a square matrix of order nfact ,
\(A_{21}\) is an ( m - nfact )-by- nfact matrix,
\(A_{12}\) is an nfact -by-( n - nfact ) matrix, and
\(A_{22}\) is an ( m - nfact )-by-( n - nfact ) matrix.
The result is
\[A = \left [ \begin{matrix} A_{11} & A_{12} \\ A_{21} & A_{22} \\ \end{matrix} \right ] = \left [ \begin{matrix} L_1 \\ L_2 \\ \end{matrix} \right ] \left [ \begin{matrix} U_1 & U_2 \\ \end{matrix} \right ] + \left [ \begin{matrix} 0 & 0 \\ 0 & \tilde{A}_{22} \\ \end{matrix} \right ]\]
\(L_1\) is a lower triangular square matrix of order nfact with unit diagonal and \(U_1\) is an upper triangular square matrix of order nfact . \(L_1\) and \(U_1\) result from LU factorization of matrix \(A_{11}\) : \(A_{11}\) = \(L_1\)\(U_1\) .
\(L_2\) is an ( m - nfact )-by- nfact matrix and \(L_2 = A_{21} U_1^{-1}\) . \(U_2\) is an nfact -by-( n - nfact ) matrix and \(U_2 = L_1^{-1} A_{12}\) .
\(\tilde{A}_{22}\) is an ( m - nfact )-by-( n - nfact ) matrix and \(\tilde{A}_{22}\) = \(A_{22}\) - \(L_2\)\(U_2\) .
On exit, elements of the upper triangle \(U_1\) are stored in place of the upper triangle of block \(A_{11}\) in array A ; elements of the lower triangle \(L_1\) are stored in the lower triangle of block \(A_{11}\) in array A (unit diagonal elements are not stored). Elements of \(L_2\) replace elements of \(A_{21}\) ; \(U_2\) replaces elements of \(A_{12}\) and \(\tilde{A}_{22}\) replaces elements of \(A_{22}\) .