Comments (5)
It seems you were entering geneigsolve((A, I), ...)
with A
some Tridiagonal
matrix and I
the LinearAlgebra.UniformScaling
object. The problem is that the latter is not recognized as a matrix (literally, because UniformScaling <: AbstractMatrix
is false), but I can fix that. However, alternatively, if you would want to use the identity matrix in geneigsolve
(you are better of using eigsolve
in that case, but anyway, for testing purposes), you could also do so by using geneigsolve((A, identity), ...)
. Here, identity
is a standard Julia function which just returns its argument.
from krylovkit.jl.
Thank you for your reply, I wanted to test geneigsolve in the most simplest case (with B = I) in order to understand it before really using it. That being said, I think that there are an issue with Tridiagonal matrix. When I define A and M by:
julia> diagM = [1.0 for 1 in 1:100];
julia> diagM = [1.0 for i in 1:100];
julia> M = SymTridiagonal(diagM, subdiagM);
julia> subdiagA = [-0.5 for i in 1:99];
julia> A = SymTridiagonal(diagM, subdiagA);
and when I try geneigsolve((A,M), 3, :SR), I get:
ERROR: MethodError: no method matching cholesky(::Hermitian{Float64,SymTridiagonal{Float64,Array{Float64,1}}}; check=false)
Closest candidates are:
cholesky(::Union{Hermitian{Complex{T},SparseArrays.SparseMatrixCSC{Complex{T},Int64}}, Hermitian{T,SparseArrays.SparseMatrixCSC{T,Int64}}, Symmetric{T,SparseArrays.SparseMatrixCSC{T,Int64}}, SparseArrays.SparseMatrixCSC{T,Ti} where Ti<:Integer, SparseArrays.SparseMatrixCSC{Complex{T},Ti} where Ti<:Integer}; kws...) where T<:Real at /Users/julia/buildbot/worker/package_macos64/build/usr/share/julia/stdlib/v1.5/SuiteSparse/src/cholmod.jl:1458
cholesky(::Union{StridedArray{T, 2} where T, Union{Hermitian{var"#s823",var"#s822"}, Hermitian{Complex{var"#s823"},var"#s822"}, Symmetric{var"#s823",var"#s822"}} where var"#s822"<:(StridedArray{T, 2} where T) where var"#s823"<:Real}) at /Users/julia/buildbot/worker/package_macos64/build/usr/share/julia/stdlib/v1.5/LinearAlgebra/src/cholesky.jl:344 got unsupported keyword argument "check"
cholesky(::Union{StridedArray{T, 2} where T, Union{Hermitian{var"#s821",var"#s820"}, Hermitian{Complex{var"#s821"},var"#s820"}, Symmetric{var"#s821",var"#s820"}} where var"#s820"<:(StridedArray{T, 2} where T) where var"#s821"<:Real}, ::Val{false}; check) at /Users/julia/buildbot/worker/package_macos64/build/usr/share/julia/stdlib/v1.5/LinearAlgebra/src/cholesky.jl:344
...
Stacktrace:
[1] isposdef(::SymTridiagonal{Float64,Array{Float64,1}}) at /Users/julia/buildbot/worker/package_macos64/build/usr/share/julia/stdlib/v1.5/LinearAlgebra/src/dense.jl:91
[2] geneigselector(::Tuple{SymTridiagonal{Float64,Array{Float64,1}},SymTridiagonal{Float64,Array{Float64,1}}}, ::Type{T} where T) at /Users/etiennebernard/.julia/packages/KrylovKit/OLgKs/src/eigsolve/geneigsolve.jl:164
[3] #geneigsolve#64 at /Users/etiennebernard/.julia/packages/KrylovKit/OLgKs/src/eigsolve/geneigsolve.jl:153 [inlined]
[4] geneigsolve at /Users/etiennebernard/.julia/packages/KrylovKit/OLgKs/src/eigsolve/geneigsolve.jl:146 [inlined]
[5] #geneigsolve#60 at /Users/etiennebernard/.julia/packages/KrylovKit/OLgKs/src/eigsolve/geneigsolve.jl:133 [inlined]
[6] geneigsolve at /Users/etiennebernard/.julia/packages/KrylovKit/OLgKs/src/eigsolve/geneigsolve.jl:130 [inlined] (repeats 2 times)
[7] top-level scope at REPL[29]:1
Thank you in advance.
from krylovkit.jl.
I have found out ! With convert(Array, A), the bug is fixed....
from krylovkit.jl.
This seems to be a bug in Julia, namely isposdef
does not seem to be working on SymTridiagonal
matrices. I would advise to report this as a bug/issue on Julia's github page.
That being said, if you are confident that the M
matrix is positive definite, you can bypass this check with geneigsolve((A,M), ...; isposdef = true)
from krylovkit.jl.
I think this is solved; feel free to reopen if not.
from krylovkit.jl.
Related Issues (20)
- please tag a release (at least a bugfix one) HOT 6
- Occasional `LAPACKException(22)` in `eigsolve` HOT 4
- feature request: LOBPCG HOT 1
- Consider scale-invariant convergence criterion for eigenproblems? HOT 7
- eigsolve not working with howmany option HOT 8
- "Access to undefined reference" when using a `Vector` in exponentiate HOT 5
- Free vibration problem fails to converge HOT 1
- [Question] Eigenvalue from eigsolve by Lanczos is not correct HOT 2
- geneigsolve not correctly identifying positive definite and hermitian matrices HOT 1
- `DomainError` in `svdsolve` when running multithreaded code
- Access to undefined reference when using KrylovKit on a non-concrete vector HOT 4
- GMRES Fails Silently From Stagnation HOT 4
- Feature request: Multiple timesteps in Exponentiate HOT 1
- Convergence issue of `exponentiate` function HOT 1
- GEP of free vibration still fails; different error
- Multithreaded GPU Thread Errors
- Standard evp (non-symm, real matrix): too many iterations HOT 2
- eigsolve fails to converge at times HOT 11
- citation HOT 2
- Feature request: Support multiple input vectors for `eigsolve`
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from krylovkit.jl.