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

Not following the ARPACK guidelines for then generalized problem #354

Closed
andreasnoack opened this issue Aug 6, 2016 · 7 comments
Closed

Comments

@andreasnoack
Copy link
Member

andreasnoack commented Aug 6, 2016

The following problem was provided on julia users

julia> n = 10
10

julia> A = zeros(n,n);

julia> A[1,1] = 100;

julia> A[10,10] = -100;

julia> C = eye(n);

julia> eigs(A,C)
ERROR: Base.LinAlg.ARPACKException("unspecified ARPACK error: -9999")
 in aupd_wrapper(::Type{T}, ::Base.LinAlg.#matvecA!#69{Array{Float64,2}}, ::Base.LinAlg.##66#73{Array{
Float64,2}}, ::Base.LinAlg.##67#74, ::Int64, ::Bool, ::Bool, ::String, ::Int64, ::Int64, ::String, ::F
loat64, ::Int64, ::Int64, ::Array{Float64,1}) at ./linalg/arpack.jl:53
 in #_eigs#62(::Int64, ::Int64, ::Symbol, ::Float64, ::Int64, ::Void, ::Array{Float64,1}, ::Bool, ::Ba
se.LinAlg.#_eigs, ::Array{Float64,2}, ::Array{Float64,2}) at ./linalg/arnoldi.jl:271
 in _eigs(::Array{Float64,2}, ::Array{Float64,2}) at ./linalg/arnoldi.jl:158
 in #eigs#56(::Array{Any,1}, ::Function, ::Array{Float64,2}, ::Array{Float64,2}) at ./linalg/arnoldi.j
l:80
 in eigs(::Array{Float64,2}, ::Array{Float64,2}) at ./linalg/arnoldi.jl:80

Right now, we are using mode 2 when solving symmetric generalized problems but according to the source we shouldn't. In dsaupd.f line 291

c  3. If M can be factored into a Cholesky factorization M = LL`
c     then Mode = 2 should not be selected.  Instead one should use
c     Mode = 1 with  OP = inv(L)*A*inv(L`).  Appropriate triangular
c     linear systems should be solved with L and L` rather
c     than computing inverses.  After convergence, an approximate
c     eigenvector z of the original problem is recovered by solving
c     L`z = x  where x is a Ritz vector of OP.
@ViralBShah
Copy link
Member

Seems like the fix for this would also need to be backported to 0.5.

@rleegates
Copy link

I'm encountering the same problem. If I may ask, what is the status on this issue?

@andreasnoack
Copy link
Member Author

I don't think anybody is currently working on this but eventually, it will get fixed. ARPACK is just a bit of a time sink and right now other tasks have higher priority. However, feel free to work on it if you need this fixed more urgently.

@ViralBShah
Copy link
Member

Is the fix to essentially do what the snippet above says - Mode = 1 with OP = inv(L)*A*inv(L')?

@timholy
Copy link
Member

timholy commented Nov 30, 2017

Cross-linking sbromberger/LightGraphs.jl#736 (comment).
sbromberger/LightGraphs.jl#736 (comment) is a different problem but may be worth mentioning.

@ViralBShah
Copy link
Member

I might be able to take a look at this next week, unless someone beats me to it.

@ViralBShah
Copy link
Member

Closing in favour of #488. Please reopen if the issue is different.

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

No branches or pull requests

4 participants