Eingereicht von Konstantin Arturov (Intel) am
The parallel direct sparse solver in Intel MKL called PARDISO has many parameters that must be understood and properly set to get the expected results. The two tables in this article are simply a restructuring of the data that is in the Intel® MKL reference manual (available on the documentation page). I hope that in this form it may be somewhat easier to find the relevant information.
Table 1: Description of PARDISO Parameters
- Table 1 is a reference to all the parameters of the pardiso() function
- Table 2 is a reference to the iparm() array parameter: both input and output values
Table 1: Description of PARDISO Parameters
Parameter | Type | Description | Values | Comments | IN/OUT |
pt(64) | INTEGER (for 32-bit) | Solver internal data address pointer | 0 | Must be initialized by 0 Never modify pt! |
IN/OUT |
INTEGER*8 (for 64-bit) | |||||
maxfct | INTEGER | Maximal number of factors in memory | * | Generally used value is 1 | IN |
mnum | INTEGER | The number of matrix (from 1 to maxfct) to solve | * | Generally used value is 1 1 ≤ mnum ≤ maxfct |
IN |
type | INTEGER | Matrix type | 1 | Real and structurally symmetric | IN |
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 matrix | ||||
11 | Real and unsymmetric matrix | ||||
13 | Complex and unsymmetric matrix | ||||
phase | INTEGER | Controls the execution of the solver | 11 | Analysis | IN |
12 | Analysis, numerical factorization | ||||
13 | Analysis, numerical factorization, solve | ||||
22 | Numerical factorization | ||||
23 | Numerical factorization, solve | ||||
33 | Solve, iterative refinement | ||||
331 | Phase=33, but only forward substitution | ||||
332 | Phase=33, but only diagonal substitution | ||||
333 | Phase=33, but only backward substitution | ||||
0 | Release internal memory for L and U of the matrix number mnum | ||||
-1 | Release all internal memory for all matrices | ||||
n | INTEGER | Number of equations in the sparse linear system A*X = B |
* | n > 0 | IN |
a(*) | PARDISO_DATA_TYPE | Contains the non-zero elements of the coefficient matrix A | * | The size of a is the same as that of ja and the coefficient matrix can be either real or complex. The matrix must be stored in CSR format with increasing values of ja for each row. | IN |
ia(n+1) | INTEGER | rowIndex array in CSR format | * | 0 < ia(i) <= ia(i+1) ia(i) gives the index of the element in array a that contains the first non-zero element from row i of A. The last element ia(n+1) is taken to be equal to the number of non-zero elements in A, plus one. Note: iparm(35) indicates whether row/column indexing starts from 1 or 0. |
IN |
ja(*) | INTEGER | columns array in CSR format | * | The indices in each row must be sorted in increasing order. For symmetric and structurally symmetric matrices zero diagonal elements are also stored in a and ja. For symmetric matrices, the solver needs only the upper triangular part of the system. Note: iparm(35) indicates whether row/column indexing starts from 1 or 0. |
IN |
perm(n) | INTEGER | Holds the permutation vector of size n | > 0 | Let B = P*A*PT be the permuted matrix. Row (column) i of A is the perm(i) row (column) of B. The numbering of the array must start with 1 and must describe a permutation. You can apply your own fill-in reducing ordering (iparm(5)=1) or return the permutation from the solver (iparm(5)=2). |
IN/OUT |
nrhs | INTEGER | Number of right-hand sides that need to be solved for | >=1 | Generally used value is 1 | IN |
iparm(64) | INTEGER | This array is used to pass various parameters to PARDISO and to return some useful information after execution of the solver (See Table 2) |
* | If iparm(1)=0, PARDISO fills iparm(1), and iparm(4) through iparm(64)with default values and uses them. | IN/OUT |
msglvl | INTEGER | Message level information | 0 | PARDISO generates no output | IN |
1 | PARDISO prints statistical information | ||||
b(n*nrhs) | PARDISO_DATA_TYPE | Right hand side vectors | * | On entry, contains the right hand side vector/matrix B which is placed contiguously in memory, namely b(i+(k-1)×nrhs) must hold the i-th component of kth right-hand side vector. Note that b is only accessed in the solution phase. On output, the array is replaced with the solution if iparm(6) = 1. |
IN/OUT |
x(n*nrhs) | PARDISO_DATA_TYPE | Solution vectors | * | On output, if iparm(6)=0, contains solution vector/matrix X which is placed contiguously in memory , namely x(i+(k-1)×nrhs) must hold the i-th component of k-th solution vector. Note that x is only accessed in the solution phase. | OUT |
error | INTEGER | Error indicator | 0 | no error | OUT |
-1 | input inconsistent | ||||
-2 | not enough memory | ||||
-3 | reordering problem | ||||
-4 | zero pivot, numerical factorization or iterative refinement problem | ||||
-5 | unclassified (internal) error | ||||
-6 | pre-ordering failed (matrix types 11, 13 only) | ||||
-7 | diagonal matrix is singular | ||||
-8 | 32-bit integer overflow problem | ||||
-9 | not enough memory for OOC | ||||
-10 | problems with opening OOC temporary files | ||||
-11 | read/write problems with the OOC data file |
Table 2: PARDISO iparm() description
IN & IN/OUT parameters | ||||
Description | Values | Comments | IN/OUT | |
iparm(1) | Use default values | 0 | Items iparm(2)-iparm(64) are filled with default values. | IN |
!= 0 | The user has to supply all values in iparm from iparm(2) to iparm(64). | |||
iparm(2) | Fill-in reducing ordering for the input matrix | 0 | The minimum degree algorithm. | IN |
2* | The nested dissection algorithm from the METIS package ( the default value) | |||
3 | The parallel (OpenMP) version of the nested dissection algorithm. |
|||
iparm(4) | Preconditioned CGS/CG | 0* | Do not perform preconditioned Krylow-Subspace iterations (the default value). | IN |
10*L + 1 | CGS iteration replaces the computation of LU. The pre-conditioner is LU that was computed at a previous step (the first step or last step with a failure) in a sequence of solutions needed for identical sparsity patterns. L controls the stopping criterion of the Krylow-Subspace iteration: epsCGS = 10^(-L) is used in the stopping criterion ||dxi|| / ||dx0|| < epsCGS, with ||dxi|| = ||inv(L*U)*ri|| and ri is the residuum at iteration i of the preconditioned Krylow-Subspace iteration. |
|||
10*L + 2 | Same as above, but CG iteration replaces the computation of LU. Designed for symmetric positive definite matrices. | |||
iparm(5) | User permutation | 0* | User permutation in perm array is ignored (the default value). | IN |
1 | PARDISO uses the user supplied fill-in reducing permutation from perm array. iparm(2) is ignored. |
|||
2 | PARDISO returns the permutation vector computed at Phase 1 into perm array. | |||
iparm(6) | Write solution on x | 0* | The array x contains the solution; right hand side vector b is kept unchanged (the default value). | IN |
1 | The solver will store the solution on the right hand side b. Note that the array x is always used. |
|||
iparm(8) | Iterative refinement step | 0* | The solver automatically performs two steps of iterative refinements when perturbed pivots are obtained during the numerical factorization (the default value). | IN |
> 0 | Maximum number of iterative refinement steps that the solver will perform. The solver will perform not more than the absolute value of iparm(8) steps of iterative refinement and will stop the process if a satisfactory level of accuracy of the solution in terms of backward error has been achieved. The iteration number executed is reported on iparm(7). |
|||
< 0 | Same as above, but the accumulation of the residuum is using extended precision real and complex data types. | |||
iparm(10) | Pivoting perturbation | * | This parameter instructs PARDISO how to handle small pivots or zero pivots for unsymmetric matrices (mtype =11 or mtype =13) and symmetric matrices (mtype =-2, mtype =-4, or mtype =6). Small pivots are perturbed with eps = 10^(-iparm(10)). |
IN |
13* | The default value for unsymmetric matrices(mtype =11 or mtype=13), eps = 10^(-13). | |||
8* | The default value for symmetric indefinite matrices(mtype =-2, mtype=-4 or mtype=6), eps = 10^(-8). | |||
iparm(11) | Scaling | 0* | Disable scaling. Default for symmetric indefinite matrices. | IN |
1* | Enable scaling. Default for unsymmetric matrices. Scale the matrix so that the diagonal elements are equal to 1 and the absolute values of the off-diagonal entries are less or equal to 1. This scaling method is applied to unsymmetric matrices (mtype =11 or mtype =13). The scaling can also be used for symmetric indefinite matrices (mtype =-2, mtype =-4, or mtype =6) when the symmetric weighted matchings are applied (iparm(13)= 1). Note that in the analysis phase (phase=11) you must provide the numerical values of the matrix A in case of scaling. |
|||
iparm(13) | Improved accuracy using (non-) symmetric weighted matching | 0* | Disable matching. Default for symmetric indefinite matrices. | IN |
1* | Enable matching. Default for symmetric indefinite matrices. Maximum weighted matching algorithm to permute large elements close to the diagonal. It is recommended to use iparm(11)=1 (scaling) and iparm(13)=1 (matching) for highly indefinite symmetric matrices, for example from interior point optimizations or saddle point problems. Note that in the analysis phase (phase=11) you must provide the numerical values of the matrix A in case of symmetric weighted matching. |
|||
iparm(18) | Report the number of non-zero elements in the factors | < 0* | Enable report if iparm(18)< 0 on entry. -1 is the default value. | IN/OUT |
>=0 | Disable report. | |||
iparm(19) | Report Mflops that are necessary to factor the matrix A. | < 0 | Enable report if iparm(19)< 0 on entry. This will increase the reordering time. |
IN/OUT |
>=0* | Disable report. 0 is the default value. | |||
iparm(21) | Pivoting for symmetric indefinite matrices | 0 | Apply 1x1 diagonal pivoting during the factorization process. | IN |
1* | Apply 1x1 and 2x2 Bunch and Kaufman pivoting during the factorization process. The default value = 1 | |||
iparm(27) | Matrix checker | 0* | PARDISO doesn't check the sparse matrix representation. 0 is the default value. | IN |
1 | PARDISO checks integer arrays ia and ja. In particular, PARDISO checks whether column indices are sorted in increasing order within each row. |
|||
iparm(28) | Single or double precision of PARDISO | 0* | Input arrays (a, x and b) as well as all internal arrays are supposed to be in double precision. 0 is the default value. | IN |
1 | Input arrays are supposed to be in single precision. In this case all internal computations are made in single precision. |
|||
iparm(35) | 1-based/0-based input data indexing | 0* | Fortran-style indexing. Default. Columns/rows indexing in input arrays ia, ja starts from 1. |
IN |
1 | C-style indexing. Columns/rows indexing in input arrays ia, ja starts from 0. |
|||
iparm(60) | PARDISO mode | 0* | In-core PARDISO | IN |
2 | Out-of-core PARDISO The OOC PARDISO can solve very large problems by holding the matrix factors in files on the disk. Hence the amount of RAM required by OOC PARDISO is significantly reduced. |
|||
OUT parameters | ||||
Description | Values | Comments | IN/OUT | |
iparm(7) | Number of performed iterative refinement steps | >= 0 | Report the number of iterative refinement steps that were actually performed during the solve step. | OUT |
iparm(14) | Number of perturbed pivots | >= 0 | After factorization, contains the number of perturbed pivots for the matrix types: 11, 13, -2, -4 and -6. | OUT |
iparm(15) | Peak memory on symbolic factorization | >0 Kb | The total peak memory in Kb that the solver needed during the analysis and symbolic factorization phase. This value is only computed in phase 1. |
OUT |
iparm(16) | Permanent memory on symbolic factorization | >0 Kb | Permanent memory from the analysis and symbolic factorization phase in Kb that the solver will need in the factorization and solve phases. This value is only computed in phase 1. |
OUT |
iparm(17) | Peak memory on numerical factorization and solution | >0 Kb | The total peak memory of type PARDISO_DATA_TYPE in Kb that PARDISO need for the factorization and solve phases. This value is only computed in phase 2. Note that the total peak memory consumed by PARDISO is max(iparm(15), iparm(16)+iparm(17)) |
OUT |
iparm(20) | CG/CGS diagnostics | > 0 | CGS succeeded, and the number of completed iterations reported via iparm(20). | OUT |
< 0 | CG/CGS failed (check when error=-4 after the solution phase) iparm(20) = - it_cgs*10 - cgs_error. Possible values of cgs_error: 1 --- fluctuations of the residuum are too large 2 --- ||dx at max_it_cgs/2|| too large (slow convergence) 3 --- stopping criterion not reached at max_it_cgs 4 --- perturbed pivots caused iterative refinement |
OUT | ||
iparm(22) | Inertia: number of positive eigenvalues | >= 0 | PARDISO reports the number of positive eigenvalues for symmetric indefinite matrices. | OUT |
iparm(23) | Inertia: number of negative eigenvalues | >= 0 | PARDISO reports the number of negative eigenvalues for symmetric indefinite matrices. | OUT |
iparm(30) | Number of zero or negative pivots | >= 0 | If PARDISO detects zero or negative pivot for mtype=2 or mtype=4 types, the factorization is stopped, PARDISO returns immediately with an error = -4 and iparm(30) contains the number of the equation where the first zero or negative pivot was detected. | OUT |
Note 1: iparm items not listed in this table must be initialized with 0. | ||||
Note 2: X* in value column means that X is default value for respective iparm() item. |