Intel® oneAPI Math Kernel Library
Ask questions and share information with other developers who use Intel® Math Kernel Library.

how to set the number of right hand side in phase 12 and -1 when I use different number of rhs in phase 33 in pardiso

Chaowen_G_
Beginner
355 Views

Hi:

I need to use pardiso to solve a big matrix with big right hand side and the physical memory is not big enough to store the matrix and right hand side at the same time. So I split the right hand side into two parts, the first part has 10000 columns and the second part has 10001 columns. And then call pardiso with phase=33 to solve the first part and call phase=33 again to solve the second part. The problem is how to set nrhs in phase 12 and phase -1, 10000 or 10001 or just 0. Because all the examples in solverc and solverf all set nrhs=1 in phase 11, 22,33 and -1. I can not find an useful example.

0 Kudos
6 Replies
mecej4
Honored Contributor III
355 Views

Phases 11 and 22 appear to relegate the nrhs argument to just a placeholder status. I think that the value of the argument is used only if phase is 13, 23 or 33. To test this, I ran the pardiso_sym_f.f example provided with MKL after setting nrhs = -1 for phase = 11 and 22. The only change in the output was in the timings.

I think that you should do fine by setting nrhs to a zero or negative value for phase = 12, as you guessed. However, please do not consider this comment to be an official approval.

0 Kudos
Ying_H_Intel
Employee
355 Views

Hi, 

Right, as Mecej4 said, the nrhs was required only in phase *3.  So you can set/change it before phase33. It is not a problem in latest version (MKL 11. x at least.  by the way, MKL 11.3 release recently) . 

Best Regards

Ying

0 Kudos
Alexander_K_Intel2
355 Views

Hi,

nrhs on phase 11 and 22 could be set by any number in case of in-core version of pardiso. For ooc version it is better to set maximal potential value because it is used in memory estimation.

Thanks,

Alex 

0 Kudos
mecej4
Honored Contributor III
355 Views

Alexander Kalinkin (Intel) wrote:

nrhs on phase 11 and 22 could be set by any number in case of in-core version of pardiso. For ooc version it is better to set maximal potential value because it is used in memory estimation.

Thanks for that insight. Perhaps this information should be put into the documentation for Pardiso.

0 Kudos
Chaowen_G_
Beginner
355 Views

Thank you. How about in phase=-1, it releases all internal memory for all matrices. I use in-core version, just set nrhs=0, and do the same calculation for 100 times, and I do not see any memory leaking. As a result, I think nrhs is not really matter in phase=-1, but I do not know whether it is correct. What is the official answer?

Moreover, as Alexander Kalinkin said:

For ooc version it is better to set maximal potential value because it is used in memory estimation.

So for ooc version in phase=-1, I should set nrhs=0 or the maximal potential value?

0 Kudos
Alexander_K_Intel2
355 Views

Hi,

>  As a result, I think nrhs is not really matter in phase=-1, but I do not know whether it is correct. 

Correct

> So for ooc version in phase=-1, I should set nrhs=0 or the maximal potential value?

maximal because you can switch to ooc version and pardiso need to take it int account. 

Thanks,

Alex

0 Kudos
Reply