Turn on suggestions

Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.

Showing results for

- Intel Community
- Software Development SDKs and Libraries
- Intel® oneAPI Math Kernel Library & Intel® Math Kernel Library
- how to choose a solver for symmetric positive definite linear problem?

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Mute
- Printer Friendly Page

fangtcao

Novice

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

02-05-2021
07:58 AM

140 Views

Hello,

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`.

- `A` is a real symmetric positive definite matrix, highly sparse, and with NxN dimensions. N is ~4M.

- `b` is a Nx1 vector.

- `x` is the unknown.

In my case, `A` is fixed, and I only need to do factorization once. And `b` changes every time when I call the solver.

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.

Why is there no example for solving symmetric positive definite matrix using Pardiso?

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?

If yes, will I expect big performance difference between using pardiso and RCI?

Thank you in advance.

Regards,

Fang

Link Copied

Accepted Solutions

Kirill_V_Intel

Employee

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

02-05-2021
03:46 PM

128 Views

Hello Fang,

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.

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).

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.

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.

Best,

Kirill

3 Replies

Kirill_V_Intel

Employee

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

02-05-2021
03:46 PM

129 Views

Hello Fang,

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.

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).

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.

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.

Best,

Kirill

fangtcao

Novice

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

02-08-2021
02:18 AM

112 Views

Hi Kirill,

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?

Regards,

Fang

Gennady_F_Intel

Moderator

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

02-09-2021
05:56 AM

87 Views

For more complete information about compiler optimizations, see our Optimization Notice.