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

PARDISO: Transposed solution after normal factorization and solution

ju_kreber
Beginner
214 Views

Hi, I have the following setup:

First, I want to solve a system A x = b with sparse A, which I do with PARDISO.

Later, I want to compute a term y = p A^-1, which can be written as the solution of the transposed system, p^T = A^T y^T.

I figured since PARDISO does a LU decomposition and A^T = (L U)^T = U^T L^T is just another LU decomposition, it should be very easy to do this calculation without doing a factorization of the transposed matrix again.

Is this possible somehow? I tried simply setting IPARM(12) to 1 for phase 3, but this yields incorrect results. Unfortunately, it does not look like the L and U factors PARDISO computes can be accessed and modified...

I'd be very happy if anyone could point me in the right direction to approach this!

0 Kudos
1 Solution
c_sim
Employee
139 Views

Hi,

 

Thank you for posting. It seems your approach is right. You can use iparm(12) to solve the transposed system.

As a reference you can look into the pardiso_unsym.c example provided with oneMKL (in share/doc/mkl/examples/examples_core_c.tgz), which demonstrates how you can solve using a transposed matrix. Maybe you can double check with the example.

If you still observe incorrect results, feel free to post a reproducer, and we will take a look.

 

Kind Regards,

Chris

View solution in original post

0 Kudos
2 Replies
c_sim
Employee
140 Views

Hi,

 

Thank you for posting. It seems your approach is right. You can use iparm(12) to solve the transposed system.

As a reference you can look into the pardiso_unsym.c example provided with oneMKL (in share/doc/mkl/examples/examples_core_c.tgz), which demonstrates how you can solve using a transposed matrix. Maybe you can double check with the example.

If you still observe incorrect results, feel free to post a reproducer, and we will take a look.

 

Kind Regards,

Chris

0 Kudos
ju_kreber
Beginner
90 Views

Dear Chris,

 

thank you very much for your reply and the link to the example.

Indeed, it looks like the discrepancies I observed came from bad conditioning in the matrix.

Thanks for confirming that this is the right way to do it though!

Best,
Jens

0 Kudos
Reply