0

With Julia, I created a sparse matrix with the spzeros() function, initialized the matrix with some sentences, and tried to calculate the eigenvalue of it. However, the function works well only for small sparse matrix(n<800), for a little bit larger matrix, i got some error.

The code:

ns = 400 # 800
H = spzeros(Complex128, ns, ns)
#... initialization 
E, x = eigs(H)

The error message after the last sentence:

LoadError: Base.LinAlg.ARPACKException("unspecified ARPACK error: 1") while loading In[7], in expression starting on line 1

in aupd_wrapper(::Type{T}, ::Base.LinAlg.#matvecA!#69{SparseMatrixCSC{Complex{Float64},Int64}}, ::Base.LinAlg.##63#70, ::Base.LinAlg.##64#71, ::Int64, ::Bool, ::Bool, ::String, ::Int64, ::Int64, ::String, ::Float64, ::Int64, ::Int64, ::Array{Complex{Float64},1}) at .\linalg\arpack.jl:53 in #_eigs#62(::Int64, ::Int64, ::Symbol, ::Float64, ::Int64, ::Void, ::Array{Complex{Float64},1}, ::Bool, ::Base.LinAlg.#_eigs, ::SparseMatrixCSC{Complex{Float64},Int64}, ::UniformScaling{Int64}) at .\linalg\arnoldi.jl:268 in (::Base.LinAlg.#kw##_eigs)(::Array{Any,1}, ::Base.LinAlg.#_eigs, ::SparseMatrixCSC{Complex{Float64},Int64}, ::UniformScaling{Int64}) at .\:0 in #eigs#55(::Array{Any,1}, ::Function, ::SparseMatrixCSC{Complex{Float64},Int64}, ::UniformScaling{Int64}) at .\linalg\arnoldi.jl:78 in (::Base.LinAlg.#kw##eigs)(::Array{Any,1}, ::Base.LinAlg.#eigs, ::SparseMatrixCSC{Complex{Float64},Int64}, ::UniformScaling{Int64}) at .\:0 in #eigs#59(::Array{Any,1}, ::Function, ::SparseMatrixCSC{Complex,Int64}, ::UniformScaling{Int64}) at .\linalg\arnoldi.jl:85 in (::Base.LinAlg.#kw##eigs)(::Array{Any,1}, ::Base.LinAlg.#eigs, ::SparseMatrixCSC{Complex,Int64}, ::UniformScaling{Int64}) at .\:0 in #eigs#54(::Array{Any,1}, ::Function, ::SparseMatrixCSC{Complex,Int64}) at .\linalg\arnoldi.jl:77 in (::Base.LinAlg.#kw##eigs)(::Array{Any,1}, ::Base.LinAlg.#eigs, ::SparseMatrixCSC{Complex,Int64}) at .\:0

honghuzi
  • 1
  • 1
  • 2
    It would be best to give a specific matrix which generates the error. Possibly in a linked snippet (see [pastebin](http://pastebin.com/) for example) – Dan Getz Nov 26 '16 at 11:18

1 Answers1

1

ARPACK error 1, from a quick Google search, seems to be "Maximum number of iterations taken." Hence, your matrix must be such that ARPACK's algorithms cannot find the eigenvalues.

From discussions elsewhere, it seems that the issue can be resolved by deleting vertices with degree zero (or, in general, zero rows), or by splitting the matrix into connected components (i.e. blocks) and finding eigenvalues for each block separately.

Fengyang Wang
  • 11,901
  • 2
  • 38
  • 67