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

Eigsolve and extended precision #51

Open
zmoitier opened this issue Sep 14, 2021 · 2 comments
Open

Eigsolve and extended precision #51

zmoitier opened this issue Sep 14, 2021 · 2 comments

Comments

@zmoitier
Copy link

I am trying to compute eigenvalues of matrices with extended precision but the function eigsolve return an error. For example with the following matrix

using LinearAlgebra, LinearMaps, Quadmath, KrylovKit

T = Complex{Float128}
N = 32
A = Tridiagonal(rand(T, N - 1), rand(T, N), rand(T, N - 1))

the matrix version give

julia> vals, vecs, info = eigsolve(A, 3, :LM)
ERROR: LoadError: MethodError: no method matching hschur!(::SubArray{Complex{Float128}, 2, Matrix{Complex{Float128}}, Tuple{UnitRange{Int64}, UnitRange{Int64}}, false}, ::SubArray{Complex{Float128}, 2, Matrix{Complex{Float128}}, Tuple{UnitRange{Int64}, UnitRange{Int64}}, false})

and the matrix-free version give the same error

julia> A_map = LinearMap{T}(x -> A * x, N);
julia> vals, vecs, info = eigsolve(A_map, N, 3, :LM)
ERROR: MethodError: no method matching hschur!(::SubArray{Complex{Float128}, 2, Matrix{Complex{Float128}}, Tuple{UnitRange{Int64}, UnitRange{Int64}}, false}, ::SubArray{Complex{Float128}, 2, Matrix{Complex{Float128}}, Tuple{UnitRange{Int64}, UnitRange{Int64}}, false})

From this discussion on julialang, I have been advise to open this issue.


Additional information:

  • I get similar errors if I replace Float128 by Double64 from the DoubleFloats.jl package or Float64x2 from MultiFloats.jl package.
  • Adding using GenericLinearAlgebra, GenericSchur still yield the error.
  • I use julia Version 1.6.2 and KrylovKit v0.5.3.
@Jutho
Copy link
Owner

Jutho commented Sep 14, 2021

Yes, KrylovKit currently uses the Schur decomposition algorithm from BLAS, and thus only works with BLAS numbers. With GenericSchur.jl that could be circumvented, and I welcome PR requests to do that, but I am afraid I won't have time for this myself in the near future.

@zmoitier
Copy link
Author

Ha ok, I note for the PR but I also do not have the time right now to immerse myself in how that works.

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

2 participants