Skip to content
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

Conversion from Symmetric/Hermitian to sparse uses abstract fallback #29353

Closed
KristofferC opened this issue Sep 24, 2018 · 1 comment
Closed
Labels

Comments

@KristofferC
Copy link
Sponsor Member

KristofferC commented Sep 24, 2018

The way to hit this in real code is to do Symmetric(A) \ B, have the Cholesky factorization fail, and then get hit by the conversion just before the lu fallback at:

return \(lu(SparseMatrixCSC{eltype(A), SuiteSparse_long}(A)), B)

which will never finish for real problems, leaving you wonder why the factorization is so slow.

julia> using SparseArrays

julia> using LinearAlgebra

julia> s = Symmetric(sprand(10^4, 10^4, 1/10^4));

julia> @time sparse(s);
  1.156863 seconds (10.03 k allocations: 1.188 MiB)

julia> nnz(s.data)
10089
@KristofferC
Copy link
Sponsor Member Author

Seems fixed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants