Turn on suggestions

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
- mkl_zcsrsm -> General 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
##

karthiksrao

Beginner

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

09-05-2012
01:45 PM

34 Views

mkl_zcsrsm -> General matrix ?

Hello, It looks like to use mkl_zcsrsm, the sparse matrix A should be a sparse upper or lower triangular matrix with unit or non-unit main diagonal.

Since any general sparse matrix can be divided into Upper + Lower + Diagonal, I'm surprised that the general sparse matrices are not supported for this routine.

Could you please advice what we should do when we have to deal with a general unsymmetric sparse matrix ?

Thanks

4 Replies

Highlighted
##

Dear karthiksrao,
It is a good question. Let me say more before answer it :).
MKL provide BLAS and LAPACK., where BLAS for general vector and matrix operation and LAPACK is for solving systems of linear equations and performing a number of related computational tasks.
The function mkl_zcsrsm is for solves a system of linear matrix equations for a sparse matrix in the CSR format,
and it is corresponding function ?trsm, Solves a matrix equation (one matrix operand is triangular).
Both are for solve a system of linear matrix, you may ask why they are not in LAPACK, but in BLAS domain and sparse BLAS Level 2 and Level 3 Routines (matrix-vector and matrix-matrix operations)
You may figure out the answer yourself: only special linear system which have matrix like upper triangle or upper or lower triangular matrix, you can use simple operation like marix to vector or marix to matrix to solve it.
Otherwise, you need to use the driver routine or computation routines like LU descompose etc to solve the linear system.
So as you see, it is impossible to extend it directly. You may look for the domain like the sparse solver Routines or convert the Sparse matrix to General matrix, then use Lapack function to solve a linear equation with a general unsymmetric sparse matrix.
You may reference some docs like Appendix A: Linear Solvers Basics in MKL reference manual and c/fortran code example in there or in MKL install directory.
Best Regards,
Ying

Ying_H_Intel

Employee

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

09-06-2012
01:48 AM

34 Views

Highlighted
##

Dear Kathirksrao,
Input matrix for mkl_zcsrsm can be general. The value of matdescra(1)-matdescra(3) indicates which triangle should be used and MKL Sparse BLAS triangular solvers automatically exctract the needed triangle.. Please look art the section "Interface consideration" in chapter "Sparse BLAS level 2 and level 3" in the MKL Reference Manual. The Table "Possible Combinations of Element Values of the Parameter matdescra" lists all possible combinations of element values for of matdescra both multiplication routines and triangular solvers.
Sergey

Sergey_K_Intel1

Employee

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

09-06-2012
02:29 AM

34 Views

Highlighted
##

Thank you for your replies. I actually had referred to those pages suggested to write the code. The problem I was having was : when I call the routine mkl_zcsrsm giving matdescra option as 'glnf' I used to get an error "Parameter 5 in ZCSRSM is wrong". I could not understand what was wrong until I referred to the main page for mkl_zcsrsm solver :
http://software.intel.com/sites/products/documentation/hpc/mkl/mklman/GUID-4DF7C6FD-660F-4EF8-9CAA-B...
where it says : A is a sparse upper or lower triangular matrix with unit or non-unit main diagonal,
So I changed matdescra option to 'tlnf' and it works fine, without any error!
So while doing it for a general matrix, should we run zcsrsm twice, once for lower triangular matrix and then upper triangular matrix and then add the two results ? What happens to the diagonal terms ? Wont' they get repeated twice ?
Thanks

karthiksrao

Beginner

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

09-06-2012
05:06 AM

34 Views

Highlighted
##

Actually,, Just realized the method I suggested above would not work.. I probably need to look into sparse solver routines
Thanks

karthiksrao

Beginner

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

09-06-2012
06:03 AM

34 Views

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