cusparseSpSM_solve returning INF value for matrices of 641x641 or larger

I’m using the cusparseSpSM_solve function to solve a problem in the form of the system A * b = c for some given triangular Matrix A and right-hand side c. I’ve uploaded an image of the very beginning on my matrix and vectors that I am using for testing.

Unfortunately, while this should be very simple, this returns a value of INF for the very first value in vector b. The cusparseSpSM_solve function is opaque, and I can’t diagnose the problem. I don’t have this problem with smaller datasets, only large ones. And the issue is only with the very first value in the solution vector, every other value is properly calculated. Given the simple nature of the triangular matrix problem, b[0] = c[0] / A[0][0] = 1 / 0.000338 = 2958.579882 should be the solution.

Does anyone know why the cusparseSpSM_solve is having issues with the very first value, and only with large datasets? I have confirmed that all vectors and matrices store their values correctly and are properly initialized before the function call.

Edit: After creating code to test matrix sizes, I have determined that this is only a problem for matrices of 641x641 or larger. Anything of 640x640 or smaller is not a problem. I have absolutely no clue what could be happening. Can someone please explain this behaviour to me? I know it is not a number I have defined somewhere in my code.

Hi @bennersebastiana,
Can you please share a reproducer code and matrix? What cuSPARSE version are you using?

Thanks

It seems that the problem has advanced to the point where the fault lies elsewhere and is not related to cusparse:

Yes, can you please tell me how to close this post? It was my mistake, as I misdiagnosed the problem.

You can select one of the posts in this thread as the solution, or I can close it for you.