# Cusparse cholesky & structural zeros - preconditioned conjugate gradient

Hi, I am trying to perform incomplete cholesky with cusparse.

I have followed the code in the sample and it reports a structural zero in the analysis and a numerical zero in the upper factorisation. Expectantly, calling triangular solve with this factorisation returns an error.

I have got the factorisation working with the cusolver factorisation (in the low level preview) using cusolverSpScsrcholFactor. This does reduce the number of interations to convergence from 23 for the CG optimiser to 3 with preconditioning. However the performance of the cusolver factorisation and solve functions is far slower than not using it, despite taking far fewer iterations.

As far as I can tell there is no singularity in the matrix and I can not understand why the cusparse cholesky factorisation doesn’t work. As mentioned, cusolver can factorise the matrix - as can Eigen.

Please, if anyone can explain where I might be going wrong with the cusparse factorisation or how I can implement a fast cholesky preconditioner with cuda it would be greatly appreciated.

Same question.
I’m work on a least square problem by linear solver method (LU, QR, chol).
A 3000*3000 spd sparse matrix with 150000 nonzero around is going to be solved.
Here is my test:

• 1: on xavier, cusolver with cholesky is the fastest, 70ms, (by the way, cuSpsolver is faster than cuDnsolver)

• 2: on xavier, Eigen with SimplicialLLT, 80ms (cpu with one-thread of course)

• 3: on Intel® Core™ i5-5300U CPU @ 2.30GHz × 4, 64-bit, Eigen with SimplicialLLT, 40ms(one-thread)

Maybe, 3000*3000 is small or something else I don’t know.
I’m still looking for a high performance linear solver on xavier.

1 Like

I have met similar problems

Please file a bug at How to report a bug and update the matrix you’re using for investigation.