-
Notifications
You must be signed in to change notification settings - Fork 6
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
Corrupted unsorted chunks on sparse array #101
Comments
I can reproduce the error: using QRMumps, DelimitedFiles
m = 361
n = 802
rows = readdlm("rows.txt",Int32)[:]
cols = readdlm("cols.txt",Int32)[:]
vals = readdlm("vals.txt")[:]
spmat = qrm_spmat_init(m,n,rows,cols,vals; sym=false)
spfct = qrm_spfct_init(spmat)
qrm_analyse!(spmat, spfct; transp='t') I don't have any error with a using QRMumps, DelimitedFiles
m = 361
n = 802
rows = readdlm("rows.txt",Int32)[:]
cols = readdlm("cols.txt",Int32)[:]
vals = readdlm("vals.txt")[:]
A = sparse(rows, cols, vals)
spmat = qrm_spmat_init(A; sym=false)
spfct = qrm_spfct_init(spmat)
qrm_analyse!(spmat, spfct; transp='t') If we drop the zeros it works: using QRMumps, DelimitedFiles
m = 361
n = 802
rows = readdlm("rows.txt",Int32)[:]
cols = readdlm("cols.txt",Int32)[:]
vals = readdlm("vals.txt")[:]
A = sparse(rows, cols, vals)
rows, cols, vals = findnz(A)
spmat = qrm_spmat_init(m,n,rows,cols,vals; sym=false)
spfct = qrm_spfct_init(spmat)
qrm_analyse!(spmat, spfct; transp='t') |
Ok, I found the culprit. julia> t = Tuple{Int32, Int32, Float64}[]
Tuple{Int32, Int32, Float64}[]
julia> for i = 1 : 11252
push!(t, (rows[i], cols[i], vals[i]))
end
julia> t
11252-element Vector{Tuple{Int32, Int32, Float64}}:
...
julia> unique(t)
6274-element Vector{Tuple{Int32, Int32, Float64}}:
... |
Many thanks !! |
@abuttari This is the discussion where it appears QRMumps does not support duplicate entries in COO format, which I found quite surprising. |
cols.txt
rows.txt
vals.txt
In a problem, I had the following representation of some matrix$A \in \mathbb{R}^{ 361\times 802}$ . I have an issue which I think comes from
QRMumps
. Here is a minimal working example (the .txt files are attached):returns the error message
I have tried this on both Julia 1.10.3 and 1.10.2. I get similar errors on both Linux and Windows, here is my
versioninfo()
on Ubuntu:Have you ever seen similar errors ?$A$ back to a dense array and then back again to a sparse one I no longer have the error:
I don't know if this is useful but if I cast my sparse array
The text was updated successfully, but these errors were encountered: