Solving a sequence of systems with identical sparsity patterns ?

Solving a sequence of systems with identical sparsity patterns ?


I have to solve a sequence (iteration) of systems AX = B with multiple RHS.
At each iteration, X and B do not change and A changes but retains its sparsity patterns.

So I think I can use iparm[3]=62 but I know exactly how to use it.

Below is a summary of what I do :

Itration 1 :

Itration 2 :

Itration 3 :

I never release memory (phase=0 or -1) between iterations.

Is it the correct way to solve my problem ?


7 posts / 0 new
Last post
For more complete information about compiler optimizations, see our Optimization Notice.

Thierry, please see this topic.

Thank you
I read the topic and I found a start of answer but I found nothing about iparm[3]

In my case, I have one matrix and therefore one memory address pointer PT.

I made a search with Google on this forum and I found my answer

What I do is correct but with iparm[3]=62 i see no speed up
I set iparm[3]=32 and now the speed up is there.

What matrix type do you use?
If A changes and scaling and matching are used (iparm(11) and iparm(13)), so you should rerun phase 11.

Currently I use :

mtype = -2;
iparm[0] = 1;
iparm[1] = 2;
iparm[2] = 4;
iparm[3] = 32; //0 for the first iteration
iparm[59] = 1;

iparm[10] and iparm[12] are set to 0

It works fine with that

Hi, Thierry!

In the MKL documentation the description of the corresponding iparm(4) parameter contains the following lines:

" ... iparm(4) has the form iparm(4)= 10*L+K. ... The value L controls the stopping criterion of the Krylow-Subspace iteration: epsCGS = 10^-L is used in the stopping criterion...".
So for iparm[3] = 32 the value 10^-3 is used in the stopping criterion, while for iparm[3] = 62 the value 10^-6 is used which requires (significantly) more iterations than for stopping criterion 10^-3. I think that the reason ofthe described problem is in more strict conditions for iparm[3]=62 than for iparm[3]=32.


Leave a Comment

Please sign in to add a comment. Not a member? Join today