I'm using cuda's cusolverSpDcsrlsvqr library. It does not return correct values if the matrix is very large

It works well in all situations, but does not return correct values if the matrix is very large. All return values are 0. Why is that for?

The nnA of the csr matrix used nnA is 4257286 and m is 311432.

Correct results were obtained under the following conditions. (nnA=30010, m = 1180)

The problem of tolerance does not seem to be the result of many attempts. And the format I used is CSR format, so it doesn’t require that much memory. I already tried to allocate a large stacksize.

What is the return value of the API call?

Sorry, I’m not a professional programmer. Where can I see the return value of an API call?
Thank you for your help

How much programming experience do you have? Maybe an example will help.

cusolverStatus_t status;
status = cusolverSpScsrlsvqr (handle, n, valCount, aDescr, dev_aValues, dev_aRowPtrs, dev_aColIdxs, dev_b, 0.1f, 0, dev_x, &singularity);

Here, the variable status captures the return value of the API function. The cuSolver documentation enumerates the values that could be returned. If the return value is not CUSOLVER_STATUS_SUCCESS, there is a problem somewhere.

Pretty much all API calls in CUDA-associated libraries return a value (see documentation), and it is a best practice to check these. For example, in this case it is possible that a problem occurred long before the call to cusolverSpScsrlsvqr(), e.g. an allocation function may have failed because the matrix is too large.

Thank you for your help.
I am occasionally in using Fortran77 and MATLAB as numerical analysis tools in graduate school and at work. The error message I received using the method you suggested is “CUSOLVER_STATUS_ALLOC_FAILED.”

After researching, it seems that the matrix I input is too large for the graphics card’s RAM to handle.

I am trying to use cusolverSpDcsrqrBufferInfoBatched, which can adjust the buffer size.
However, I think my graphics card is too small to use cusolversp.

My graphics card is a 1050ti with about only 4GB of memory. 😢