How to use parallel Pardiso solver for your example

From KratosWiki
Revision as of 18:35, 10 March 2009 by Amirbcn (Talk | contribs)
Jump to: navigation, search

The package PARDISO is a thread-safe, high-performance, robust, memory efficient and easy to use software for solving large sparse symmetric and unsymmetric linear systems of equations on shared memory multiprocessors. The solver has has been licensed to thousands of researchers at international scientific laboratories and universities since its first release in 2004 [1]. You can use this parallel solver to solve the system of equations and matrices in Kratos. For this purpose, we present some modifications in your Python interface files which help you to solve your problems faster. The important thing is that you should have the new version of Kratos, which includes the folder of mkl_solvers_application in the applications. This folder contains Pardiso solver interface and if you activate it in the main Jamroot of Kratos, it will be automatically compiled and linked to Kratos. We mention the activation lines in the Jamfile and the command to compile Kratos. It is important that you should install intel MKL library on your computer and compile Kratos with Intel compiler, otherwise you can not use this solver. The first step is to introduce the path of installed intel MKL library on your computer :


Jamroot:

##path to the mkl library (STRICTLY OPTIONAL)
path-constant MKL_INCLUDE_DIR : /opt/intel/mkl/10.0.3.020/include/ ;
path-constant MKL_LIB_DIR : /opt/intel/mkl/10.0.3.020/lib ;

The next step is to activate two lines in Jamroot file to include the mkl_solvers_application in the list of applications for compilation and linking to Kratos. The following bold lines should be activated (removing #):


Jamroot:

## MKL solvers: will not be compiled by default ###################################
## this requires intel MKL library installed properly on your system ##############

use-project /kratos-prj/mkl_solvers_application : $(TOP)/applications/mkl_solvers_application ;


# installation
alias install :
 /kratos-prj/mkl_solvers_application//install


After modifing Jamroot, we should specify the type of RHS matrix which we use it in our solution. This can be done by refering to the following file in mkl_solvers_application folder and change the following flag:

in mkl_solvers_application\external_includes\mkl_pardiso_solver.h

Setting a value in this line

MKL_INT mtype = 1; /* real and structurally symmetric*/

This flag can be assigned according to different matrix structures:

TYPE Matrix
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
Personal tools
Categories