Efficient computation (solve) of Ax = b when A is symmetric

Open discussion for MAGMA library (Matrix Algebra on GPU and Multicore Architectures)
Klausb
Posts: 21
Joined: Thu Oct 05, 2017 3:04 pm

Efficient computation (solve) of Ax = b when A is symmetric

Hello,

I want to solve a SPARSE linear system Ax = b and I know, A is always a symmetric matrix (structure & values). The size of the matrix is n = 40800, it's a sparse matrix of size n x n. (containing real, double values).

As the matrix is symmetric with respect to structure and values, there might be quite some efficiency gain (up to 50%) if:

I would only copy and transfer the upper or lower triangle to Magma (Note: A single simulation I do, requires 8000-10000 matrix transfers!)
AND
Apply magmablas_dsymmetrize() ... if it's applicable to sparse matrices in CSR format and fast?
OR
Set a "symmetry" marker if it's available in Magma and if Magma would solve a linear system based on that? (another library offers such an option)

How to solve a linear system with sparse symmetric matrices efficiently?

Klaus

hartwig anzt
Posts: 90
Joined: Tue Sep 02, 2014 5:44 pm

Re: Efficient computation (solve) of Ax = b when A is symme

Dear Klaus,

MAGMA-sparse contains iterative Krylov solvers that exploit symmetry information, i.e. the CG method (potentially preconditioned with Jacobi or Incomplete Cholesky). This combination should be able to solve your problem with satisfying efficiency.

Most iterative solvers are based on sparse matrix vector products (SpMV), e.g. for generating the Krylov subspace. Your question hence boils down to whether there is an SpMV routine exploiting the symmetry information. The answer is no, and I am not aware of any GPU-implementation of the SpMV that does. (If there is, please point me to it).

My guess is that other libraries exploiting the symmetry information use direct solvers, and move to a Cholesky factorization if appropriate.

Please let me know whether this helps.

Thanks, Hartwig

Klausb
Posts: 21
Joined: Thu Oct 05, 2017 3:04 pm

Re: Efficient computation (solve) of Ax = b when A is symme

Dear Hartwig,

based on your insights, I assume it's only a wrapper that hides an efficient copy process (lower<>upper) so I'll try the same - we'll whether there's a benefit.

Do you know how to apply (syntax) of magmablas_dsymmetrize()?

Code: Select all

``````void magmablas_dsymmetrize 	( magma_uplo_t  	uplo,
magma_int_t  	m,
magma_int_t  	ldda,
magma_queue_t  	queue
) 	``````

Klausb
Posts: 21
Joined: Thu Oct 05, 2017 3:04 pm

Re: Efficient computation (solve) of Ax = b when A is symme

Dear Hartwig,

based on your insights, I assume it's only a wrapper that hides an efficient copy process (lower<>upper) so I'll try the same - we'll see whether there's a benefit.

Klaus