Solving a sequence of systems with identical sparsity patterns ?

Solving a sequence of systems with identical sparsity patterns ?

Thierry LE SOMMER [Eurodecision]'s picture

Hello,

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 :
iparm[3]=0;
phase=13;
pardiso(...);

Itration 2 :
iparm[3]=62;
phase=23;
pardiso(...);

Itration 3 :
iparm[3]=62;
phase=23;
pardiso(...);

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

Is it the correct way to solve my problem ?

Thierry

--------------------------------- Consultant EURODECISION http://www.eurodecision.com
7 posts / 0 new
Last post
For more complete information about compiler optimizations, see our Optimization Notice.
Gennady Fedorov (Intel)'s picture

Thierry, please see this topic.

Thierry LE SOMMER [Eurodecision]'s picture

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.

--------------------------------- Consultant EURODECISION http://www.eurodecision.com
Thierry LE SOMMER [Eurodecision]'s picture

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.

--------------------------------- Consultant EURODECISION http://www.eurodecision.com
Sergey Solovev (Intel)'s picture

Hello!
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.

Thierry LE SOMMER [Eurodecision]'s picture

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

--------------------------------- Consultant EURODECISION http://www.eurodecision.com
Sergey Pudov (Intel)'s picture

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.

Regards,
Sergey

Login to leave a comment.