Dear All.

Currently, I am solving linear equations Ax=b where A includes 1000 matrix size 100x100 and about 500 none zero elements for each matrix, and I want to solve it with sparse matrix and I follow the below example

viewtopic.php?f=2&t=1512

The problem is this using a triangular matrix but my matrix is stored like the tridiagonal matrix. Is there have any solution to my problem. I want to solve each matrix for each stream using sparse matrix solver.

Thank you in advance.

DaoThanh

## Magma sparse matrix with non triangular solver

### Re: Magma sparse matrix with non triangular solver

I'm a bit confused — you say you have a 100x100 matrix with 500 non-zeros, but store it as tridiagonal? Shouldn't a 100x100 tridiagonal matrix have at most 298 non-zeros for the main, sub, and super diagonals?

If your matrix is tridiagonal, I suggest using the tridiagonal solver available in LAPACK, either [sdcz]gtsv for non-symmetric, or [sdcz]ptsv for symmetric positive definite. For symmetric indefinite, you would have to use the non-symmetric solver. These routines aren't GPU-accelerated, but tridiagonal matrices are generally very fast to solve.

-mark

If your matrix is tridiagonal, I suggest using the tridiagonal solver available in LAPACK, either [sdcz]gtsv for non-symmetric, or [sdcz]ptsv for symmetric positive definite. For symmetric indefinite, you would have to use the non-symmetric solver. These routines aren't GPU-accelerated, but tridiagonal matrices are generally very fast to solve.

-mark