- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
So, I was wondering what the best way to solve a sparse least squares problem (Ax=b) with the MKL is.
The two ways that I can see are:
1 - use LAPACK (which I don't believe is sparse, so probably not usable)
2 - compute ATAx=ATb sparsely (perhaps using sparse BLAS?) and then use one of the sparse solvers, like PARDISO or dss.
I don't have a lot of applied math experience, so if there's some better way, I would love to hear it. Right now I'm using CSparse's qr solver, looking to see if there's a simple way to get better performance.
Thanks
The two ways that I can see are:
1 - use LAPACK (which I don't believe is sparse, so probably not usable)
2 - compute ATAx=ATb sparsely (perhaps using sparse BLAS?) and then use one of the sparse solvers, like PARDISO or dss.
I don't have a lot of applied math experience, so if there's some better way, I would love to hear it. Right now I'm using CSparse's qr solver, looking to see if there's a simple way to get better performance.
Thanks
Link Copied
1 Reply
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi!
You can use MKL LAPACK to solve a least squares problem, but in this case you should convert your data from sparse format into dense one. This approach leads to extensive usage of memory, so it is limited by the size of physical memory and size of solved task.
To solve this problem in sparse format, you can use SpaseBLAS functions to compute A^T A and A^T b. For example you can use mkl_?csrmm function to compute matrix-matrix product in the CSR format and mkl_?csrgemv to compute matrix-vector product (also in CSR format, see MKL manual). Then MKL PARDISO (or DSS simplified interface to PARDISO) could be used to solve obtained system of equations. Note that PARDISO demonstrated good scalability on shared memory systems.
- Best regards, Sergey
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