- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello,
I am looking into interfacing between Matlab and MKL for sparse matrices and expecially for OOC direct sparse solving of (large) linear systems with non-symmetric matrices. As far, as I can see, things are pretty straightforward, except for one big inconvinience: Matlab is using column-major format, while MKL DSS is using row-major format. I can easilly rewrite the matrix, but in my case this will require to have two data copies in the memory. It would be nice if I can avoid this. I was looking to find some nice hidden flag indicating that the solution is sought for the transposed matrix, but I can find none.
Any suggestions?
Thanks a lot!
--JS
I am looking into interfacing between Matlab and MKL for sparse matrices and expecially for OOC direct sparse solving of (large) linear systems with non-symmetric matrices. As far, as I can see, things are pretty straightforward, except for one big inconvinience: Matlab is using column-major format, while MKL DSS is using row-major format. I can easilly rewrite the matrix, but in my case this will require to have two data copies in the memory. It would be nice if I can avoid this. I was looking to find some nice hidden flag indicating that the solution is sought for the transposed matrix, but I can find none.
Any suggestions?
Thanks a lot!
--JS
Link Copied
4 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I don't think using C conventions is sufficient in case of sparse matrices. The data order and structure in the memory is really different and Direct Sparse Solver (DSS) functions expect sparse data in row major. The description is in the reference manual appendix A.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I will not (do not want to) access the huge matrix myself, so A[i,j] formula is of no use. I need to use Out Of Core (OOC) Direct Sparce Solvers (DSS), as described in Reference manual 8. They expect the matrix to be ordered in row major form only. But in fact the matrix is ordered in column major form from Matlab. So it is like "transposed". I can reorder the matrix using logic similar to yours, but I will have to double my memory use and in general I will need some resources to do this. The matrix may be huge, close to the system memory, so this is not a good option.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I know I can use BLAS functions to solve system of linear equations. In fact I can use Matlab for the same purpose. Matlab functions are quite optimal for small and medium matrices.
The special reason why I want to use MKL is because I want to use the Direct Sparse Solver library, which is good for solving extremely large systems. Such systems may give LU decomposition larger than the memory available. So DSS is using disk memory to store LU decompositions. This is called Out Of Core (OOC) operation. You can find a description in the Reference manual part 8.
Unfortunately DSS does not have transpose flags, like the BLAS functions. Or at least I don't see them.
The special reason why I want to use MKL is because I want to use the Direct Sparse Solver library, which is good for solving extremely large systems. Such systems may give LU decomposition larger than the memory available. So DSS is using disk memory to store LU decompositions. This is called Out Of Core (OOC) operation. You can find a description in the Reference manual part 8.
Unfortunately DSS does not have transpose flags, like the BLAS functions. Or at least I don't see them.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I don't see any options to make DSS interpret the matrix as the transpose, and it is true that only compressed sparse row is supported. So unless the Matlab functionality has the ability to transpose you may be stuck with two copies. I'll ask the solver developers if they have any suggestions or comments.
-Todd
-Todd
Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page