topic Re: how to choose a solver for symmetric positive definite linear problem? in IntelĀ® oneAPI Math Kernel Library
https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/how-to-choose-a-solver-for-symmetric-positive-definite-linear/m-p/1253975#M30858
<P>Hi <SPAN>Kirill,</SPAN></P>
<P>Thank you very much for the explanations. Suppose the multiple rhs has `M` columns, is it faster than running single rhs `M` times, using an intel CPU, for example, an intel CORE i7 8th generation? </P>
<P>Regards,</P>
<P>Fang</P>Mon, 08 Feb 2021 10:18:01 GMTfangtcao2021-02-08T10:18:01Zhow to choose a solver for symmetric positive definite linear problem?
https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/how-to-choose-a-solver-for-symmetric-positive-definite-linear/m-p/1253524#M30844
<P>Hello,</P>
<P>I am working on a project using Finite Element Method and want to use intel MKL to boost the performance of solving a linear problem `A*x = b`.</P>
<P>- `A` is a real symmetric positive definite matrix, highly sparse, and with NxN dimensions. N is ~4M.</P>
<P>- `b` is a Nx1 vector.</P>
<P>- `x` is the unknown.</P>
<P>In my case, `A` is fixed, and I only need to do factorization once. And `b` changes every time when I call the solver.</P>
<P>I have found that in MKL, the pardiso solver can be used to solve symmetric positive definite matrix (if you set mtype = 2), but there is no C examples about it. Moreover, I have found examples for solving symmetric positive definite system using RCI solver. </P>
<P>Why is there no example for solving symmetric positive definite matrix using Pardiso? </P>
<P>If I use RCI, is it possible to separate the factorization part and the solving part, as in my case `A` is always fixed and only b keeps changing?</P>
<P>If yes, will I expect big performance difference between using pardiso and RCI?</P>
<P>Thank you in advance.</P>
<P>Regards,</P>
<P>Fang</P>
<P> </P>Fri, 05 Feb 2021 15:58:38 GMThttps://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/how-to-choose-a-solver-for-symmetric-positive-definite-linear/m-p/1253524#M30844fangtcao2021-02-05T15:58:38ZRe: how to choose a solver for symmetric positive definite linear problem?
https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/how-to-choose-a-solver-for-symmetric-positive-definite-linear/m-p/1253633#M30847
<P>Hello Fang,</P>
<P>1) Please have a look at the example pardiso_sym_c.c. It has mtype = -2 but you can easily change it to mtype = 2 and it will work.</P>
<P>2) RCI interface is available for iterative methods while PARDISO is a direct sparse solver. In your case, unless you know a great preconditioner for your problem (possibly, if you know weel your application) or you don't need to solve your systems with low accuracy and since you have many rhs, then it makes more sense to use the direct sparse solver (PARDISO).<BR />So, in general you need to decide whether you want to solve your system with an iterative or a direct method (but I suggest PARDISO). These are two fundamentally different approaches and performance comparison is tricky as it depends on the details. </P>
<P>3) Note (in case you haven't), that using phase parameter you can exactly do what you need with PARDISO API. Do the reordering, symbolic and numerical factorizaton once (phases 12) and then for each new rhs do only phase = 33. Also note, that f you know your rhs all in advance, you can call PARDISO with multiple rhs at once.</P>
<P>Best,<BR />Kirill</P>Fri, 05 Feb 2021 23:46:33 GMThttps://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/how-to-choose-a-solver-for-symmetric-positive-definite-linear/m-p/1253633#M30847Kirill_V_Intel2021-02-05T23:46:33ZRe: how to choose a solver for symmetric positive definite linear problem?
https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/how-to-choose-a-solver-for-symmetric-positive-definite-linear/m-p/1253975#M30858
<P>Hi <SPAN>Kirill,</SPAN></P>
<P>Thank you very much for the explanations. Suppose the multiple rhs has `M` columns, is it faster than running single rhs `M` times, using an intel CPU, for example, an intel CORE i7 8th generation? </P>
<P>Regards,</P>
<P>Fang</P>Mon, 08 Feb 2021 10:18:01 GMThttps://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/how-to-choose-a-solver-for-symmetric-positive-definite-linear/m-p/1253975#M30858fangtcao2021-02-08T10:18:01ZRe:how to choose a solver for symmetric positive definite linear problem?
https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/how-to-choose-a-solver-for-symmetric-positive-definite-linear/m-p/1254460#M30868
<P><SPAN style="font-family: Arial, sans-serif; font-size: 10pt;">Yes, it would be faster, but the level of solution stage scalability depends on a number of factors. You may try and get us know the results.</SPAN></P><BR />Tue, 09 Feb 2021 13:56:51 GMThttps://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/how-to-choose-a-solver-for-symmetric-positive-definite-linear/m-p/1254460#M30868Gennady_F_Intel2021-02-09T13:56:51ZRe:how to choose a solver for symmetric positive definite linear problem?
https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/how-to-choose-a-solver-for-symmetric-positive-definite-linear/m-p/1267643#M31079
<P>The issue is closing and we will no longer respond to this thread. If you require additional assistance from Intel, please start a new thread. Any further interaction in this thread will be considered community only.</P><BR />Thu, 25 Mar 2021 04:45:06 GMThttps://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/how-to-choose-a-solver-for-symmetric-positive-definite-linear/m-p/1267643#M31079Gennady_F_Intel2021-03-25T04:45:06Z