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

Incomplete LU Factorization - how to extract L and U ?

sps4
Beginner
929 Views
Dear MKL-experts,

I'd like to use the ilu0 factorization as a preconditioner for a GPU based solver. In order to do so I have to explicitly get the L and the U matrix from the B matrix that is returned by dcsrilu0.

Can you think of a simple way to do this or is there even a tool in the MKL for this?

Thanks in advance!

Cheers,

Stefan
0 Kudos
3 Replies
Alexander_K_Intel2
929 Views
Hi,
In example nameddcsrilu0_exampl1.c you can find way how to use matrix obtained by ILU0 as preconditioner. There is no way to get the L and U matrix from matrix B but you can multiply them on vector using SparseBlas functionality.
With best regards,
Alexander Kalinkin
0 Kudos
sps4
Beginner
929 Views
Hi Alexander,

thank you very much for your very fast answer. I have to extract L and U as I'm using a GPU based backsolve method (not the MKL mkl_cspblas_dcsrtrsv).

There have to be a way to do this. Maybe I can perform a matrix-matrix multiplication with the identity matrix, but use only the lower or upper part in the multiplication? For that I need to routines:
1. Initilialize a sparse identitiy matrix. Is that possible with MKL?
2. Perform a matrix-matrix multiplication, but only use the L or U part (like mkl_cspblas_dcsrtrsv does it). Is there a suitable routine in the MKL?

Thanks in advance!

Cheers,

Stefan
0 Kudos
Alexander_K_Intel2
929 Views

Hi,

From my point of view you can malloc 2 set of 3 arrays (ia,ja, a) for matrices L and U correspondently and convert data from matrix B to these matrices using simple loop. Lower part of matrix B correspond to matrix L and upper correspond to matrix U.

With best regards,

Alexander Kalinkin


0 Kudos
Reply