Can anyone point me to an example using the sparse double cholesky solver on gpu using C++ and CUDA.

I can get dense solver to give correct answers but the sparse solver does not so I must be doing something wrong.

Cheers

Terry

Hi @terryhendicott, can you share more details of your problem? What are you trying to compute?

Also, you can check out cuDSS, which is a Direct Sparse Solver on GPU. It may be suitable solution to your problem.

I will check out cuDSS thsnk you for the hint.

Trying to solve a simple matrix first before launching into large sparse matrices

const int N = 3; // Matrix size

const int nnz = 5; // Number of non-zero elements

const int csrRowPtrA[N + 1] = { 0, 2, 4, 5 }; // Row pointers

const int csrColIndA[nnz] = { 0, 1, 0, 1, 2 }; // Column indices

const double csrValA[nnz] = { 4.0, 1.0, 1.0, 3.0, 1.0 }; // Non-zero values of A

```
// Right-hand side vector b
const double b[N] = { 1.0, 2.0, 3.0 };
double x[N]; // Solution vector
```

No matter what I try get wrong numeric solution?

HI terryhendicott, I am the developer of cuDSS, could you please share the whole example code?

Have resolved what the problem is and it was on my side.

kernel.zip (3.4 KB)

Have been trying for years to get a command line fast sparse solver that I can call from other software. Just need to add saving x to a binary file to be complete. This means an awful lot to me thank you.

Challenge.zip (729 Bytes)

Here is my data files for the small matrix check but I have got the correct answer with 46328x46328 matrix.

Thank you so much.

I run you kernel.cu for both matrices from message above and from your attachments and I see the correct solution.

Thanks Antonia appreciate your work thank you greatly