-
Notifications
You must be signed in to change notification settings - Fork 51
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
errors in second call to rocsparse_sps{v,m} #332
Comments
Okay I might have found the issue. In the So I should create a new matrix descriptor for a different operation with the same matrix. So it is not actually a matrix descriptor, but more of a descriptor of the matrix and the operation I am doing with it. Is that right? Is that the cause of my issuses? The errors are occuring in the compute stage, but the docs state that analysis should not be called twice, so I am not sure. If this is really the problem, then this restriction is not mentioned in the documentation of Furthermore, I am now having a very similar problem with |
BTW, the fact that the |
Hello,
I have cholesky factors of a matrix$A=U^\top U$ . Now I want to solve the system $Az=x$ , which is equivalent to first solving $U^\top y = x$ and then solving $Uz=y$ . Implementing this in rocSPARSE, I am getting errors in the compute stage of the second system (for both cases when the right-hand-side is a vector or a matrix, but different errors).
What is the expected behavior
The attached program should not fail.
What actually happens
In the compute stage of the second system, the program segfaults in the case of
rocsparse_spsm
, and in the case ofrocsparse_spsv
,rosparse_status = 3
(probablyrocsparse_status_invalid_pointer
) is returned from the function.How to reproduce
See source.hip.cpp.txt (remove the$U$ and vectors $x$ , $y$ , $z$ . I fill the sparse matrix data such that the matrix represents an identity matrix (for simplicity), and set the vectors to zero. Create the $U^\top$ and $U$ ) and the code are identical except for the transpose parameter and the used buffer. To finally solve the system, I query the buffersize, allocate the buffer, and do the preprocess and compute stages. In the end, I destroy and free everything.
.txt
extension, for some reason.cpp
files are not allowed here). There I allocate device memory for the sparse matrixrocsparse_handle
and matrix descriptor and set the matrix attributes. Then, based on the command-line argument (V
orM
), I perform the solution of the two systems with either a right-hand-side vector or right-hand-side matrix (usingrocsparse_spsv
orrocsparse_spsm
, respectively). These two systems (withIf I use a separate matrix descriptor for the second system, the program works fine. If the transpose parameters in the two systems are the same, the program works fine. Running only the second system (commenting out the first), the program works fine.
Compile using
hipcc -g -O2 --offload-arch=gfx90a:sramecc+:xnack- source.hip.cpp -o program.x -lrocsparse
. Run with./program.x V
forspsv
and./program.x M
forspsm
.Environment
I use the LUMI supercomputer. Accelerated compute node with MI250x gpu (I use 1/8 of the node, that is a single GPU die),
module load LUMI/22.12 rocm/5.2.3
. I also tested with rocm/5.5.1 on MI100, and the problems are there too.Thanks in advance for taking a look at this. From my side it looks like a bug in rocSPARSE. In case I missed an important detail or you need more info, please ask.
Jakub
The text was updated successfully, but these errors were encountered: