Closed jamblejoe closed 1 year ago
Hi, this seems to be a type error.
When I do this, it works:
L = convert(LinearSubspace{ComplexF64}, rand_subspace(6; dim = 2, real = true))
solve(
F,
start_sols;
start_subspace = L₀,
target_subspaces = [L],
)
I'll look into the code to find the origin of this problem and fix it in the next release.
Hi, this seems to be a type error.
When I do this, it works:
L = convert(LinearSubspace{ComplexF64}, rand_subspace(6; dim = 2, real = true)) solve( F, start_sols; start_subspace = L₀, target_subspaces = [L], )
I'll look into the code to find the origin of this problem and fix it in the next release.
It works for me as well.
I realized something weird. After this
solve(
F,
start_sols;
start_subspace = L₀,
target_subspaces = [rand_subspace(6; dim = 2, real=true)],
)
throwing the above error once, calling solve
on F
again never finishes. E.g. running the same code again and interrupting the process after a while I get
ERROR: InterruptException:
Stacktrace:
[1] lock(l::Base.Threads.SpinLock)
@ Base.Threads ./locks-mt.jl:46
[2] get!(default::HomotopyContinuation.var"#96#98"{LinearSubspace{ComplexF64}, LinearSubspace{ComplexF64}}, lru::LRUCache.LRU{Tuple{LinearSubspace{ComplexF64}, LinearSubspace{ComplexF64}}, HomotopyContinuation.LinearSubspaceGeodesicInfo}, key::Tuple{LinearSubspace{ComplexF64}, LinearSubspace{ComplexF64}})
@ LRUCache ~/.julia/packages/LRUCache/44dJX/src/LRUCache.jl:98
[3] IntrinsicSubspaceHomotopy(system::MixedSystem{Int32, (0x84ec11465e833cef, 1)}, start::LinearSubspace{ComplexF64}, target::LinearSubspace{ComplexF64})
@ HomotopyContinuation ~/.julia/packages/HomotopyContinuation/I1faM/src/homotopies/intrinsic_subspace_homotopy.jl:97
[4] IntrinsicSubspaceHomotopy(system::MixedSystem{Int32, (0x84ec11465e833cef, 1)}, start::LinearSubspace{ComplexF64}, target::LinearSubspace{Float64}; compile::Symbol)
@ HomotopyContinuation ~/.julia/packages/HomotopyContinuation/I1faM/src/homotopies/intrinsic_subspace_homotopy.jl:85
[5] IntrinsicSubspaceHomotopy(system::MixedSystem{Int32, (0x84ec11465e833cef, 1)}, start::LinearSubspace{ComplexF64}, target::LinearSubspace{Float64})
@ HomotopyContinuation ~/.julia/packages/HomotopyContinuation/I1faM/src/homotopies/intrinsic_subspace_homotopy.jl:79
[6] IntrinsicSubspaceHomotopy(F::System, start::LinearSubspace{ComplexF64}, target::LinearSubspace{Float64}; compile::Symbol)
@ HomotopyContinuation ~/.julia/packages/HomotopyContinuation/I1faM/src/homotopies/intrinsic_subspace_homotopy.jl:76
[7] linear_subspace_homotopy(F::System, V::LinearSubspace{ComplexF64}, W::LinearSubspace{Float64}; compile::Symbol, intrinsic::Nothing)
@ HomotopyContinuation ~/.julia/packages/HomotopyContinuation/I1faM/src/solve.jl:277
[8] solver_startsolutions(F::System, starts::Vector{Vector{ComplexF64}}; seed::UInt32, start_system::Symbol, generic_parameters::Nothing, p₁::Nothing, start_parameters::Nothing, p₀::Nothing, target_parameters::Nothing, compile::Symbol, start_subspace::LinearSubspace{ComplexF64}, target_subspace::LinearSubspace{Float64}, intrinsic::Nothing, kwargs::Base.Pairs{Symbol, Union{}, Tuple{}, NamedTuple{(), Tuple{}}})
@ HomotopyContinuation ~/.julia/packages/HomotopyContinuation/I1faM/src/solve.jl:138
[9] #solver_startsolutions#267
@ ~/.julia/packages/HomotopyContinuation/I1faM/src/solve.jl:84 [inlined]
[10] solve(::Vector{Expression}, ::Vararg{Any}; show_progress::Bool, threading::Bool, catch_interrupt::Bool, target_parameters::Nothing, stop_early_cb::Function, transform_result::Nothing, transform_parameters::typeof(identity), flatten::Nothing, target_subspaces::Vector{LinearSubspace{Float64}}, kwargs::Base.Pairs{Symbol, LinearSubspace{ComplexF64}, Tuple{Symbol}, NamedTuple{(:start_subspace,), Tuple{LinearSubspace{ComplexF64}}}})
@ HomotopyContinuation ~/.julia/packages/HomotopyContinuation/I1faM/src/solve.jl:449
[11] top-level scope
@ REPL[19]:1
I also observed this, and I don't know yet the reason for this.
Thanks for finding all these bugs, btw 👍
Sure! I like your work and would like to use this package for sampling points from manifolds defined by ${H(x) = constant}$ for Hamiltonians $H$. So thanks for putting together this package!
This looks like that the method error doesn't play well with the multi-threading. If I remember correctly (and this is a while) we only have proper error catching inside the path tracking but not in the "assemble the necessary pieces for tracking" part. I would expect that solving the type error in #513 should fix the problem.
The fix is now on the master.
Consider
All fine, then trying to target a real subspace
I get the following error