DGELS and sparse matrix

Open discussion regarding features, bugs, issues, vendors, etc.

DGELS and sparse matrix

Postby Telemachus » Mon Aug 13, 2018 3:31 pm

Hi. I am solving an under-determined system with DGELS. The matrix A has dimensions MxN, with M<N. This matrix is sparse, but is non diagonal, the elements appear at some determined places.

I wanted to know if there is a way to tell lapack that this matrix is sparse, in order to not having to initialize all the entries that are zero, saving memory space, and avoiding trivial computations like a(9,9)*zero. What I would like to do is to entry only the non zero elements, and then lapack do the thing. Is there a way to do this?

Bye there!
Telemachus
 
Posts: 1
Joined: Mon Aug 13, 2018 11:42 am

Re: DGELS and sparse matrix

Postby Julien Langou » Mon Aug 13, 2018 9:06 pm

Hi,

As you noted, LAPACK is about dense matrices.

If you feed a sparse matrix to LAPACK, LAPACK will not take advantage of the sparsity. (As you are correctly stating.)

If your matrix is banded then you can use LAPACK and LAPACK will take advantage of the band structure, but it will assume density in the band.

For sparse matrices and QR factorization, there are currently two nice projects that I know of.
http://faculty.cse.tamu.edu/davis/suitesparse.html
http://buttari.perso.enseeiht.fr/qr_mumps/
The goal for both of these software is to compute QR factorization of sparse matrices (and take advantage of the sparsity).

Cheers,
Julien.
Julien Langou
 
Posts: 828
Joined: Thu Dec 09, 2004 12:32 pm
Location: Denver, CO, USA


Return to User Discussion

Who is online

Users browsing this forum: No registered users and 2 guests

cron