Problem using cusparseScsric0 function

I just look on the matrix, on the file ex5.mtx (I don’t have matlab). Is it this one ?
Correct me if I’m wrong.
What I understand from the file is:

  • This matrix is 27x27 with 153 non zeros values.
  • The matrix is base 1 and not base 0.
  • All 3 vectors have 153 values
  • The matrix is upper side already.
  • The first column is d_cooColIndA.
  • The second column is d_csrRowPtrA
  • The last column is d_ValAICP

As the matrix is symmetric, you can inverse the first column and second column to get the lower side of the matrix.
Another point, the d_csrRowPtrA has 153 values and should have 28 (N+1) values, as said in the documentation of cusparse.
I’ve followed this website to construct my CSR (or CRS) Compressed Row Storage (CRS)

Did you make all these changes on the matrix ?

The specification are:

This matrix is 27x27 with 153 non zeros values. (OK)

The matrix is base 1 and not base 0. (Ok) I converted to zero base.

All 3 vectors have 153 values. (OK)

The matrix is upper side already. (NO). The matrix is assumed to be stored in column-major format. For obtain Upper side I inverted the first column and second column.

1 1 1037038.99259265
2 1 259259.059259265
10 1 -1185186.25185187

The first column is d_cooColIndA. (OK)

The second column is d_csrRowPtrA. (OK)

The last column is d_ValAICP (OK)

After, I convert to CSR format and used Cholesky function.

I make theses changes and nevertheless I obtain some wrong values in Cholesky.

Thanks.

I have wrong values (-1#IND) in d_ValAICP from 140 to 152 after using cusparseDcsric0 (I used double). But I feel that I don’t read correctly the file. It seems that some values are round which can lead to errors.
For example 24 22 -18518.5518518739 is round. Be sure that you have exactly the same values.
Sorry, I don’t really have time to go deeper at the moment, I will try to check that when I have time.