Intel® oneAPI Math Kernel Library
Ask questions and share information with other developers who use Intel® Math Kernel Library.

PARDISO vs. RCI CG

Kyriakos_P_
Beginner
419 Views

Hi, 

I am trying to solve a relatively large system (100.000 equations) using either Pardiso or CG.

The system matrix is sparse, symmetric and converted to CSR format. For the matrix-vector multiplication

I use mkl_dcsrsymv for the RCI requests. My question is why Pardiso is way faster than CG? 

Shouldn't it be the other way around?

on a quad-core intel xeon it takes around 1 sec for pardiso, while CG needs around 30 sec.

These are the parameters i used on pardiso:

    iparm(1) = 1
    iparm(2) = 3
    iparm(4) = 0
    iparm(5) = 0
    iparm(6) = 0
    iparm(8) = 9
    iparm(10) = 13
    iparm(11) = 1
   iparm(13) = 1

    iparm(18) = -1

    iparm(19) = -1
    
    iparm(60) = 1

0 Kudos
3 Replies
Alexander_K_Intel2
419 Views

Hi,

In few words Pardiso is direct solver otherwise CG is iterative. As result time solving of CG depend on executed iteration number that in turn depend on condition number of stiffness matrix. Execution time of MKL pardiso slightly depend on condition number that could be a reason of significant advantage of MKL PARDISO vs CG in term of time on this matrix.

Thanks,

Alex

0 Kudos
Kyriakos_P_
Beginner
419 Views

Alex thank you very much for your answer. Th number of CG iterations is quite large, and this explains the difference in executions. Are there any efficient ways to accelerate CG? Specifically;

1) Is the a routine similar to dcsrilu0 that performs incomplete Cholesky factorization on a sparse (CSR) symmetric matrix, in order to use this as a preconditioner?

2) If not, could I somehow use dcsrilu0 to create a preconditioner for my symmetric problem? (mkl manual states that this should be avoided)

3) Is there a faster implementation of matrix (csr) - vector multiplication than mkl_dcsrsymv that i could use?

4) Anything else? (optimizations etc.)

Thank you

0 Kudos
Alexander_K_Intel2
419 Views

Hi,

I really recommend to use MKL PARDISO to solve your system. However if you want to use iterative solver in your application to recommend best preconditioner I need to have additional information about you problem (differential equation, domain etc). If you can provide such information - could you sent it via private message?

About csrilu0 precondition - you can use sequence of multiplication on L and L^t matrices returned by dcsrilu0 to implement symmetric precondition. However such kind of precondition improve system with guarantee only for matrix with diagonal dominant.

In MKL 11.3 beta new SparseBlas inspector-executor API implemented please see details here (https://software.intel.com/en-us/articles/intel-math-kernel-library-inspector-executor-sparse-blas-routines). For iterative solvers it could significantly improve overall performance.

Thanks,

Alex

 

0 Kudos
Reply