0

I'm using eigs, in order to solve a generalized eigenvalue problem of sparse matrices that comes from the companion linearization of a quadratic eigenvalue problem.

In short, the process to compute the eigenvalue is as follows: Having the matrices M,C,K (that are sparse and come from a finite element code for the wave equation), I do the following:

qep = PEP([K,C,M]);
E,A = companion(qep);
lambda,vevs = eigs(A,E);

println(maximum(real(lambda)))

This works as intended and, as the last line suggests, I'm interested in the eigenvalue with the maximum real value.

It has also been suggested to me that having the code compute only a part of the number of eigenvalues, will be much faster. Therefore, I've tried the following:

lambda,vevs = eigs(A,E, nev=10, which=:LR)

but when I do this I get the error message:

ERROR: LoadError: ARPACKException: unspecified ARPACK error: 1
Stacktrace:
 [1] aupd_wrapper(::Type, ::getfield(Arpack, Symbol("#matvecA!#24")){SparseMatrixCSC{Float64,Int64}}, ::getfield(Arpack, Symbol("##21#28")){SparseMatrixCSC{Float64,Int64}}, ::getfield(Arpack, Symbol("##22#29")),     ::Int64, ::Bool, ::Bool, ::String, ::Int64, ::Int64, ::String,     ::Float64, ::Int64, ::Int64, ::Array{Float64,1}) at     /home/symeon/.julia/packages/Arpack/UiiMc/src/libarpack.jl:49
 [2] #_eigs#17(::Int64, ::Int64, ::Symbol, ::Float64, ::Int64, ::Nothing, ::Array{Float64,1}, ::Bool, ::typeof(Arpack._eigs), ::SparseMatrixCSC{Float64,Int64}, ::SparseMatrixCSC{Float64,Int64}) at /home/symeon/.julia/packages/Arpack/UiiMc/src/Arpack.jl:198
 [3] (::getfield(Arpack, Symbol("#kw##eigs")))(::NamedTuple{(:nev, :which),Tuple{Int64,Symbol}}, ::typeof(eigs), ::SparseMatrixCSC{Float64,Int64}, ::SparseMatrixCSC{Float64,Int64}) at ./none:0
 [4] top-level scope at none:0
 [5] include at ./boot.jl:326 [inlined]
 [6] include_relative(::Module, ::String) at ./loading.jl:1038
 [7] include(::Module, ::String) at ./sysimg.jl:29
 [8] exec_options(::Base.JLOptions) at ./client.jl:267
 [9] _start() at ./client.jl:436

Let me note here that I've tried the other options as well, in an attempt to locate the problem, but the :SR (minimum real part), :SI (smallest imaginary) ,:LI, :LM, :SM work as intended, but of course are not what needed in order to recover the desired output.

Any insight as to what's going on and what is possibly causing this would be greatly appreciated.

Thanks :)

  • I am not sure if you've seen [this](https://stackoverflow.com/a/40854063/7288706), but in case you have, can you provide more info on the version of julia/what package you are using `eigs` from? – stillearningsomething Jun 15 '19 at 04:56
  • Hello, I checked the question you linked, but it still doesn't seem to explain why only one of the options is not working. Is there a reason as to why the max iterations would be reached only for the ':LR' option? As to my Julia version, I'm using v.1.1.0 and eigs is used from Arpack in combination with SparseArrays. – Simos Papadimitropoulos Jun 16 '19 at 09:01

0 Answers0