Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.

Showing results for

- Intel Community
- Software Development SDKs and Libraries
- Intel® oneAPI Math Kernel Library & Intel® Math Kernel Library
- inversion of sparse complex matrix

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Mute
- Printer Friendly Page

Highlighted
##

Is it possible to invert a** sparse complex** matrix with MKL using C?

Vahid_Jalili

Beginner

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

01-31-2011
10:23 AM

74 Views

inversion of sparse complex matrix

I have foundcsytri( uplo, n, a, lda, ipiv, work, info ) in LAPACK, but I guess it is not supposed toworkwith sparse matrices and also in C.

Thanks for your help

9 Replies

Highlighted
##

Hi,

Alexander_K_Intel2

Employee

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

01-31-2011
10:47 AM

74 Views

You can use PARDISO with n rhs, where n is size of matrix. If you set rhs in next way:

rhs_i*=1;*

rhs_i=0 i<>j;

then solution vector will store inverse matrix.

With best regards,

Alexander Kalinkin

Highlighted
##

Needless to say, the inverse is no longer sparse, so inverting a sparse matrix is expensive in storage and time, and very inefficient if the aim is to solve a system of equations.

TimP

Black Belt

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

01-31-2011
12:16 PM

74 Views

Highlighted
##

I want to have the result of multiplication of 3 complex matrices as: Y1*inv(Y2)*Y3

Vahid_Jalili

Beginner

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

01-31-2011
12:59 PM

74 Views

So, I don't want to solve a system. Y1 (mxn), Y2 (nxn) and Y3 (nxm) are very large and heavily sparse. Do you have any suggestion for me how to make it with MKL routines?

Highlighted
##

Alexander, thanks for your help.

Vahid_Jalili

Beginner

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

01-31-2011
01:17 PM

74 Views

Do you know if I can do this with DSS routines instead of PARDISO? Is it possible to define rhs as an I matrix in DSS routines?!

Highlighted
##

Alexander_K_Intel2

Employee

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

01-31-2011
08:11 PM

74 Views

Hi,

You can define many rhs in the same way that I described upper and use dss function dss_solve_complex. By the way Y=Y1*inv(Y2)*Y3 seems like Schur complimented. Are you really need to have this matrix or you need to multiply it on some vector only? Ive asked it because inverse of sparse matrix is dense and will calculate really long time. But if you need to multiply matrix Y on some vector only you can do it in next way:

x=Yr=Y1*inv(Y2)*Y3*r;

x1=Y3*r; //calculated by mkl_ccsrgemv

x2= inv(Y2)*x1; //x2 is solution of system Y2*x2=x1, calculated by PARDISO/DSS

x = Y1*x3 // calculated by mkl_ccsrgemv

With best regards,

Alexander Kalinkin

Highlighted
##

Not necessarily! Of course solving an equation using inverting the coefficient matrix is not a good idea in general, no matter the matrix is sparse or dense or what format has been used, but inversion is really needed in for example electromagnetic analysis and/or graphical calculations. Besides, in many cases, the inversion of a non-singular sparse matrix will still be sparse. Using PARDISO seems to be the only reasonable way, but if the storage of your sparse matrix won't exceed the peak usage of the memory, so it may be better to simply store the data in dense format and invert it.

Good luck,

D.

Dan4

Beginner

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

02-24-2011
06:19 AM

74 Views

Needless to say, the inverse is no longer sparse, so inverting a sparse matrix is expensive in storage and time, and very inefficient if the aim is to solve a system of equations.

Not necessarily! Of course solving an equation using inverting the coefficient matrix is not a good idea in general, no matter the matrix is sparse or dense or what format has been used, but inversion is really needed in for example electromagnetic analysis and/or graphical calculations. Besides, in many cases, the inversion of a non-singular sparse matrix will still be sparse. Using PARDISO seems to be the only reasonable way, but if the storage of your sparse matrix won't exceed the peak usage of the memory, so it may be better to simply store the data in dense format and invert it.

Good luck,

D.

Highlighted
##

Alexander_K_Intel2

Employee

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

02-24-2011
09:51 AM

74 Views

HI,

I agree that inverse of sparse matrix could be sparse but PARDISO package doesnt take it into account. Briefly, PARDISO calculate each column of inverse matrix by setting rhs as correspondent column of unit matrix. So size of each column of inverse matrix is N and size of inverse matrix is NxN, where N is size of initial matrix. Hence the size of the matrix is equal to the size of a dense one even though the inverse matrix contains a lot of zeros.

With best regards,

Alexander Kalinkin

Highlighted
##

That's true! That's why the output matrix has always been assumed to be dense. However, there are algorithms tailored for inverting sparse matrices that I didn't find in MKL, like Fast Inverse using Nested Dissection (FIND).

Regards,

Dan

Dan4

Beginner

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

02-25-2011
06:30 AM

74 Views

That's true! That's why the output matrix has always been assumed to be dense. However, there are algorithms tailored for inverting sparse matrices that I didn't find in MKL, like Fast Inverse using Nested Dissection (FIND).

Regards,

Dan

Highlighted
##

Gennady_F_Intel

Moderator

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

02-25-2011
09:44 PM

74 Views

that's also true. -:). there is no similar functionality into the current version.

For more complete information about compiler optimizations, see our Optimization Notice.