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
- Pardiso: How to partially solve a real symmetric linear system with memory efficiency?

- 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-16-2021
08:21 AM

176 Views

Pardiso: How to partially solve a real symmetric linear system with memory efficiency?

Dear MKL developers,

I use Intel MKL's Pardiso solver on a medical image processing project based on FEM (Finite Element Method). My problem is to solve a linear equation 'Ax=b' where 'A' is a real symmetric sparse matrix, and 'b' is a vector. The dimension of A is about 700K in my problem. And I am only interested in certain elements in 'x' which indices are known in advance.

MKL's example program 'pardiso_sym_reduced_solve_c.

**PardisoError:** The Pardiso solver failed with error code -2. See Pardiso documentation for details.

Question: Is there an efficient, less memory-consuming way in Pardiso to solve AX=b on only half of the elements in 'x'? In general, how does the consumed memory (in solving Ax=b) scale up with the number of selected elements in x with the 'perm' option enabled?

Many thanks.

Fang

Link Copied

5 Replies

Kirill_V_Intel

Employee

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

02-16-2021
09:45 PM

160 Views

Hello @fangtcao,

As you are solving a system of equations with a direct method, unless it has a special structure, you have to compute all the factors I think.

So, the partial solve feature is targeting reduced memory consumption on the solving phase (and allows exploiting the potentially known sparsity structure of the righthand sides), but not on the factorization and reordering steps.

Hence I assume you actually don't have enough memory for the factorization. But we better check that. For this, please separate the calls to the phases (instead of a single call with phase = 13 do three calls with phase = 11, 22 and 33) and check error-info after each call.

If you get -2 after the call with phase = 22, then I suspect not much can be done. You can potentially use Out-Of-Core mode (iparm[60]=2 or 1) but it will use disc storage and be slower. Or, if the structure is particularly good, try to solve the Schur complement system for the subset of unknowns which you want to find. But in this case a lot of sparsity is likely to get lost.

But if you are getting this error status after factorization completes successfully, at the solving phase (phase = 33), then we can talk more details.

Best,

Kirill

fangtcao

Novice

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

02-17-2021
06:35 AM

145 Views

Thank you for your swift response.

You are right. I am indeed interested in the time performance on the solving phase 33, not on the reordering phase 11 or factorization phase 22. Thus, I use 'perm' to select elements to save computation for the last step, phase 33.

However, the problem is that I always get the error -2 after phase 11. I tried to set iparm[60]=2 and 1 as you mentioned, but still get error -2 with phase 11. As mentioned earlier, the left side stiffness matrix A is a real symmetric sparse matrix of 700K x 700K; the number of selected elements in 'x' is about 350K. Any ideas on why it is in the phase 11 that memory runs out ?

Fang

Kirill_V_Intel

Employee

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

02-19-2021
07:03 PM

125 Views

Hi @fangtcao,

It would be relatively easy to find the reason if you share your data with us (a small reproducer with PARDISO settings and your matrix data + its reader). In general, it is not easy (at least for me) to estimate memory for the reordering step.

A correction to my previous reply: you should have iparm[60] = 0 to be able to use the partial solve feature as the docs say. So, please use the in-core mode.

Also, VBSR feature (see iparm[38]) helps to reduce the memory consumption for the reordering phase. But it has restrictions on when it works and the exact benefit depends on the sparsity pattern.

Best,

Kirill

fangtcao

Novice

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

02-22-2021
05:32 AM

108 Views

Hi Kirill,

Thank you for the help. We will prepare the data and the code and share with you shortly.

Regards,

Fang

fangtcao

Novice

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

03-01-2021
04:36 PM

54 Views

Dear Kirill,

I have uploaded the data and a small reproducer with PARDISO settings to GitHub:

https://github.com/fangcao/intel_mkl_pardiso_error

Please let me know if you have questions. Thank you very much.

Regards,

Fang

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