pardiso
pardiso
Calculates the solution of a set of sparse linear equations with single or multiple right-hand sides.
Syntax
void
pardiso
(
_MKL_DSS_HANDLE_t
pt
,
const
MKL_INT
*
maxfct
,
const
MKL_INT
*
mnum
,
const
MKL_INT
*
mtype
,
const
MKL_INT
*
phase
,
const
MKL_INT
*
n
,
const
void
*
a
,
const
MKL_INT
*
ia
,
const
MKL_INT
*
ja
,
MKL_INT
*
perm
,
const
MKL_INT
*
nrhs
,
MKL_INT
*
iparm
,
const
MKL_INT
*
msglvl
,
void
*
b
,
void
*
x
,
MKL_INT
*
error
);
Include Files
- mkl.h
Description
The routine factorization, where
pardiso
calculates the solution of a set of sparse linear equations with single or multiple right-hand sides, using a parallelA*X = B
LU
, LDL
, or LL
T
A
is an n
-by-n
matrix, and X
and B
are n
-by-nrhs
vectors or matrices.This routine supports the Progress Routine feature. See Progress Function for details. The case of =10 does not support this feature.
iparm
[23]Optimization Notice
|
---|
Intel's compilers may or may not optimize to the same degree for non-Intel microprocessors for optimizations that are not unique to Intel microprocessors. These optimizations include SSE2, SSE3, and SSSE3 instruction sets and other optimizations. Intel does not guarantee the availability, functionality, or effectiveness of any optimization on microprocessors not manufactured by Intel. Microprocessor-dependent optimizations in this product are intended for use with Intel microprocessors. Certain optimizations not specific to Intel microarchitecture are reserved for Intel microprocessors. Please refer to the applicable product User and Reference Guides for more information regarding the specific instruction sets covered by this notice.
Notice revision #20110804
|
This notice covers the following instruction sets: SSE2, SSE4.2, AVX2, AVX-512.
Input Parameters
- pt
- Array with size of 64.Handle to internal data structure. The entries must be set to zero prior to the first call topardiso. Unique for factorization.After the first call topardisodo not directly modifypt, as that could cause a serious memory leak.Use the pardiso_handle_store orpardiso_handle_store_64routine to store the content ofptto a file. Restore the contents ofptfrom the file using pardiso_handle_restore orpardiso_handle_restore_64. Usepardiso_handle_storeandpardiso_handle_restorewithpardiso, andpardiso_handle_store_64andpardiso_handle_restore_64withpardiso_64.
- maxfct
- Maximum number of factors with identical sparsity structure that must be kept in memory at the same time. In most applications this value is equal to 1. It is possible to store several different factorizations with the same nonzero structure at the same time in the internal data structure management of the solver.pardisocan process several matrices with an identical matrix sparsity pattern and it can store the factors of these matrices at the same time. Matrices with a different sparsity structure can be kept in memory with different memory address pointerspt.
- mnum
- Indicates the actual matrix for the solution phase. With this scalar you can define which matrix to factorize. The value must be:1.≤mnum≤maxfctIn most applications this value is 1.
- mtype
- Defines the matrix type, which influences the pivoting method. ThePARDISO solver supports the following matrices:Intel® oneAPI Math Kernel Library
- 1
- real and structurally symmetric
- 2
- real and symmetric positive definite
- -2
- real and symmetric indefinite
- 3
- complex and structurally symmetric
- 4
- complex and Hermitian positive definite
- -4
- complex and Hermitian indefinite
- 6
- complex and symmetric
- 11
- real and nonsymmetric
- 13
- complex and nonsymmetric
- phase
- Controls the execution of the solver. Usually it is a two- or three-digit integer. The first digit indicates the starting phase of execution and the second digit indicates the ending phase.PARDISO has the following phases of execution:Intel® oneAPI Math Kernel Library
- Phase 1: Fill-reduction analysis and symbolic factorization
- Phase 2: Numerical factorization
- Phase 3: Forward and Backward solve including optional iterative refinementThis phase can be divided into two or three separate substitutions: forward, backward, and diagonal (see Separate Forward and Backward Substitution).
- Memory release phase (phase= 0 orphase= -1)
If a previous call to the routine has computed information from previous phases, execution may start at any phase. Thephaseparameter can have the following values:- phase
- Solver Execution Steps
- 11
- Analysis
- 12
- Analysis, numerical factorization
- 13
- Analysis, numerical factorization, solve, iterative refinement
- 22
- Numerical factorization
- 23
- Numerical factorization, solve, iterative refinement
- 33
- Solve, iterative refinement
- 331
- likephase=33, but only forward substitution
- 332
- likephase=33, but only diagonal substitution (if available)
- 333
- likephase=33, but only backward substitution
- 0
- Release internal memory forLandUmatrix numbermnum
- -1
- Release all internal memory for all matrices
Ifiparm[35]= 0, phases 331, 332, and 333 perform this decomposition:Ifiparm[35]= 2, phases 331, 332, and 333 perform a different decomposition:You can supply a custom implementation for phase 332 instead of callingpardiso. For example, it can be implemented with dense LAPACK functionality. Custom implementation also allows you to substitute the matrixSwith your own.For very large Schur complement matrices use LAPACK functionality to compute the Schur complement vector instead of thePARDISO phase 332 implementation.Intel® oneAPI Math Kernel Library - n
- Number of equations in the sparse linear systems of equations. Constraint:A*X=B.n> 0
- a
- Array. Contains the non-zero elements of the coefficient matrixAcorresponding to the indices inja. The coefficient matrix can be either real or complex. The matrix must be stored in the three-array variant of the compressed sparse row (CSR3) or in the three-array variant of the block compressed sparse row (BSR3) format, and the matrix must be stored with increasing values ofjafor each row.For CSR3 format, the size ofais the same as that ofja. Refer to thevaluesarray description in Three Array Variation of CSR Format for more details.For BSR3 format the size ofais the size ofjamultiplied by the square of the block size. Refer to thevaluesarray description in Three Array Variation of BSR Format for more details.If you setto a negative value,iparm[36]PARDISO converts the data from CSR3 format to an internal variable BSR (VBSR) format. SeeSparse Data Storage.Intel® oneAPI Math Kernel Library
- ia
- Array, size(.n+1)For CSR3 format,(ia[i]) points to the first column index of rowi<niin the arrayja. That is,gives the index of the element in arrayia[i]athat contains the first non-zero element from rowiofA. The last elementia[is taken to be equal to the number of non-zero elements inn]A, plus one. Refer torowIndexarray description in Three Array Variation of CSR Format for more details.For BSR3 format,(ia[i]) points to the first column index of rowi<niin the arrayja. That is,gives the index of the element in arrayia[i]athat contains the first non-zero block from rowiofA. The last elementia[is taken to be equal to the number of non-zero blcoks inn]A, plus one. Refer torowIndexarray description in Three Array Variation of BSR Format for more details.The arrayiais accessed in all phases of the solution process.Indexing ofiais one-based by default, but it can be changed to zero-based by setting the appropriate value to the parameter.iparm[34]
- ja
- For CSR3 format, arraycontains column indices of the sparse matrixjaA. It is important that the indices are in increasing order per row. For structurally symmetric matrices it is assumed that all diagonal elements are stored (even if they are zeros) in the list of non-zero elements inaandja. For symmetric matrices, the solver needs only the upper triangular part of the system as is shown forcolumnsarray in Three Array Variation of CSR Format.For BSR3 format, arraycontains column indices of the sparse matrixjaA. It is important that the indices are in increasing order per row. For structurally symmetric matrices it is assumed that all diagonal blocks are stored (even if they are zeros) in the list of non-zero blocks inaandja. For symmetric matrices, the solver needs only the upper triangular part of the system as is shown forcolumnsarray in Three Array Variation of BSR Format.The arrayjais accessed in all phases of the solution process.Indexing ofjais one-based by default, but it can be changed to zero-based by setting the appropriate value to the parameter.iparm[34]
- perm
- Array, size (n). Depending on the value of, holds the permutation vector of sizeandiparm[4]iparm[30]n, specifies elements used for computing a partial solution, or specifies differing values of the input matrices for low rank update.
- If,= 1,iparm[4]= 0, andiparm[30]= 0iparm[35]permspecifies the fill-in reducing ordering to the solver. LetAbe the original matrix andbe the permuted matrix. Row (column)C=P*A*PTofiCis therow (column) ofperm[i]A. The arraypermis also used to return the permutation vector calculated during fill-in reducing ordering stage.Be aware that setting= 1 prevents use of a parallel algorithm for the solve step.iparm[4]
- If= 2,iparm[4]= 0, andiparm[30]= 0, the permutation vector computed in phase 11 is returned in theiparm[35]permarray.
- If= 0,iparm[4]> 0, andiparm[30]= 0,iparm[35]permspecifies elements of the right-hand side to use or of the solution to compute for a partial solution.
- If= 0,iparm[4]= 0, andiparm[30]> 0,iparm[35]permspecifies elements for a Schur complement.
- If= 1,iparm[38]permspecifies values that differ inAfor low rank update (see Low Rank Update). The size of the array must be at least 2*ndiff+ 1, wherendiffis the number of values ofAthat are different. The values ofpermshould be:perm= {ndiff,row_index1,column_index1,row_index2,column_index2, ....,row_index_ndiff,column_index_ndiff}whererow_index_mandcolumn_index_mare the row and column indices of them-th differing non-zero value in matrixA. The row and column index pairs can be in any order, but must use zero-based indexing regardless of the value of.iparm[34]
Indexing ofpermis one-based by default, but unless= 1 it can be changed to zero-based by setting the appropriate value to the parameteriparm[38].iparm[34] - nrhs
- Number of right-hand sides that need to be solved for.
- iparm
- Array, size (64). This array is used to pass various parameters toPARDISO and to return some useful information after execution of the solver.Intel® oneAPI Math Kernel LibrarySee pardiso iparm Parameter for more details about theiparmparameters.
- msglvl
- Message level information. Ifthenmsglvl= 0generates no output, ifpardisothe solver prints statistical information to the screen.msglvl= 1
- b
- Array, size (n*nrhs). On entry, contains the right-hand side vector/matrixB, which is placed in memory contiguously. Theelement must hold theb[+k*nrhs]i-th component ofk-th right-hand side vector. Note thatbis only accessed in the solution phase.
Output Parameters
- (See also Intel MKL PARDISO Parameters in Tabular Form.)
- pt
- Handle to internal data structure.
- perm
- See the Input Parameter description of thepermarray.
- iparm
- On output, someiparmvalues report information such as the numbers of non-zero elements in the factors.See pardiso iparm Parameter for more details about theiparmparameters.
- b
- On output, the array is replaced with the solution if= 1.iparm[5]
- x
- Array, size (n*nrhs). If=0 it contains solution vector/matrixiparm[5]X, which is placed contiguously in memory. Theelement must hold thex[i+k*n]i-th component of thek-th solution vector. Note thatxis only accessed in the solution phase.
- error
- The error indicator according to the below table:
- error
- Information
- 0
- no error
- -1
- input inconsistent
- -2
- not enough memory
- -3
- reordering problem
- -4
- Zero pivot, numerical factorization or iterative refinement problem. If the error appears during the solution phase, try to change the pivoting perturbation () and also increase the number of iterative refinement steps. If it does not help, consider changing the scaling, matching and pivoting options (iparm[9]),iparm[10],iparm[12]iparm[20]
- -5