Skip to content

Not following the ARPACK guidelines for then generalized problem #354

Closed
@andreasnoack

Description

@andreasnoack

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions