Tips for using PARDISO

Introduction

The interface to the PARDISO solver has many parameters and learning to use it for the first time can take a lot of time. The DSS interface for PARDISO was created to provide a simpler interface to the functionality, but often users still want to use the PARDISO interface. This article provides some tips for getting started and corrects some of the mistakes made by first-time users and even occasionally by experienced users.


General tips

Explore the examples in the examples/solver directory of MKL. By choosing an example program that solves a problem that is close to the sort of problem you will be solving you can get to know some of the most helpful and relevant parameter settings for your case.

Use the matrix checker: The iparm(27) parameter of PARDISO controls the input checker. By default it is turned off (iparm(27)=0), so you'll need to turn it on by setting iparm(27)=1. PARDISO will run some checks on your data structure and return an error message if it finds that something was wrong. This can help you find simple errors in your indexing as well as correct misunderstandings about how PARDISO expects your matrix to be represented and stored (e.g., a symmetric matrix should be stored in upper triangular form).

Check your link line: Sometimes a program linked against Intel MKL can misbehave (crash, hang, etc.) because the program was linked against the wrong threading layer (which assumes a specific threading runtime) or wrong interface (e.g., ILP64 v. LP64; cdecl v. stdcall). The link line advisor may be helpful if you're using the latest version of Intel MKL. For earlier versions you should consult the Intel MKL User's Guide chapter 5 on linking your application.


Important settings

The full list of parameters are documented in the reference manual or available as a table in the PARDISO parameters table article. The following settings may be particularly helpful to know about when getting started or trying to understand unexpected results.

Use message level information: The solver prints statistical information to the screen if the input parameter msglvl = 1 and generates no output if msglvl = 0. There is no default value for this option.

Single and double precision: Starting version 10.2 Intel® Math Kernel Library supports computations in single precision as well as double precision. To switch between single and double precision modes you should use iparm(28). The default mode of iparm(28) is 0, which corresponds to the double precision. If iparm(28) = 1 all internal computations are made in single precision.

Use default values: To get started quickly with PARDISO you can use the default values for each of the elements in the iparm array. Setting iparm(1) = 0 will cause PARDISO to use the default values for the rest of the array: iparm(2) and iparm(4) through iparm(64). Otherwise, you must supply all the values in the iparm array.

Rewrite the solution: if you need to store the output solution on the right hand side of array b, choose iparm(6) = 1.
The default value of iparm(6)=0, which corresponds array x contains the solution.

Choose in-core or out-of-core versions: if you need to solve very large problems ( doesn't fit with the RAM size ) iparm(60) is set to 2, then the out-of-core PARDISO is used. Please refer to this article for more information on this option.


Performance recommendations

To achieve the best performance, we do not recommend the use of the out-of-core (OOC) PARDISO for small matrices. We recommend using the in-core PARDISO for all cases where the memory required for storing PARDISO factors exceeds the RAM by less than 30%. The size of the factors in kbytes can be obtained with the help of  iparm(17) after phase 11 (see Intel MKL reference manual).


Other sources of information

If you're still having trouble and/or you suspect you've found a problem in Intel MKL, you might check the known issues article in the Intel MKL knowledgebase. Another option is to search the Intel MKL forum for other reports of a similar problem or post a question of your own. For more details please refer to the Sparse Solvers Training Material.
For more complete information about compiler optimizations, see our Optimization Notice.