cudacusolver

CuSolverRf sample sorting error


I'm having trouble with the CUSolverRf sample to solve a sparse 196530 x 196530 with 2530239 nnz matrix.

I've not tried with B vector values yet (a problem for another time) and I already have an error:

Error (sorting of the column indecis check failed): (csrColInd1=2)>= (csrColInd[2]=2)

Error (sorting of the column indecis check failed): (csrColInd[3]=3) = (csrColInd[4]=3)

Error (sorting of the column indecis check failed): (csrColInd[5]=2251) >= (csrColInd[6]=2251)

Error (sorting of the column indecis check failed): (csrColInd[7]=2252) >= (csrColInd[8]=2252)

Error (sorting of the column indecis check failed): (csrColInd[9]=4501) >= (csrColInd[10]=4501)

I have attempted to Isolate the problem and to my analysis have narrowed down the error source to "qsort.c" routine which sorts the symmetrized pattern.

Would anyone please advise on what can I do to overcome the error?

And side note: can I and how do I add in the B values later? Thank you.

Raw data:

196530 196530 2530239
1 1 -26860.49266
2 1 11773.49315
3 1 557.7137436
2251 1 11734.57775
2252 1 2237.629363
4501 1 557.0786545
1 2 11714.30627
2 2 -37958.69476
....

Solution

  • Analysed the program line by line and found that the cause of the error was due to the first line of the data file:

    %%MatrixMarket matrix coordinate real symmetric
    

    I had assumed the "%%" in front of the statement was for the computer to ignore the line.

    The matrix that I provided was not symmetric which caused the above error. Program works when the the word "symmetric" was replaced with "general"

    Hope this lesson helps others if they meet the same problem.