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

installation issue -- precompilation error #10

Closed
rseydam opened this issue Nov 18, 2024 · 10 comments
Closed

installation issue -- precompilation error #10

rseydam opened this issue Nov 18, 2024 · 10 comments

Comments

@rseydam
Copy link

rseydam commented Nov 18, 2024

Hey,

I currently installed the latest julia and BifucationKit.jl. When installing HclinicBifurcaitonKit.jl i get some complaint about compatibility:

⌅ [0f109fa4] BifurcationKit v0.3.6
Info Packages marked with ⌅ have new versions available but compatibility constraints restrict them from upgrading. To see why use status --outdated
⌅ [0f109fa4] BifurcationKit v0.3.6 (<v0.4.4): HclinicBifurcationKit

Installation of the HclinicBifurcationKit.jl gives the following error and i don't know how i can fix this

Precompiling project...
✗ BifurcationKit
✗ HclinicBifurcationKit
0 dependencies successfully precompiled in 9 seconds. 298 already precompiled.

ERROR: The following 2 direct dependencies failed to precompile:

BifurcationKit

Failed to precompile BifurcationKit [0f109fa4-8a5d-4b75-95aa-f515264e7665] to "C:\Users\RichardEydam\.julia\compiled\v1.11\BifurcationKit\jl_B690.tmp".
ERROR: LoadError: ArgumentError: invalid type for argument A in method definition for rmul! at C:\Users\RichardEydam.julia\packages\BifurcationKit\2LYxR\src\BorderedArrays.jl:69
Stacktrace:
[1] top-level scope
@ C:\Users\RichardEydam.julia\packages\BifurcationKit\2LYxR\src\BorderedArrays.jl:69
[2] include(mod::Module, _path::String)
@ Base .\Base.jl:557
[3] include(x::String)
@ BifurcationKit C:\Users\RichardEydam.julia\packages\BifurcationKit\2LYxR\src\BifurcationKit.jl:1
[4] top-level scope
@ C:\Users\RichardEydam.julia\packages\BifurcationKit\2LYxR\src\BifurcationKit.jl:24
[5] include
@ .\Base.jl:557 [inlined]
[6] include_package_for_output(pkg::Base.PkgId, input::String, depot_path::Vector{String}, dl_load_path::Vector{String}, load_path::Vector{String}, concrete_deps::Vector{Pair{Base.PkgId, UInt128}}, source::Nothing)
@ Base .\loading.jl:2790
[7] top-level scope
@ stdin:5
in expression starting at C:\Users\RichardEydam.julia\packages\BifurcationKit\2LYxR\src\BorderedArrays.jl:69
in expression starting at C:\Users\RichardEydam.julia\packages\BifurcationKit\2LYxR\src\BifurcationKit.jl:1
in expression starting at stdin:5
HclinicBifurcationKit

Failed to precompile HclinicBifurcationKit [0e751702-a6d5-4e4e-bf0f-194619fbec56] to "C:\Users\RichardEydam\.julia\compiled\v1.11\HclinicBifurcationKit\jl_C307.tmp".
ERROR: LoadError: ArgumentError: invalid type for argument A in method definition for rmul! at C:\Users\RichardEydam.julia\packages\BifurcationKit\2LYxR\src\BorderedArrays.jl:69
Stacktrace:
[1] top-level scope
@ C:\Users\RichardEydam.julia\packages\BifurcationKit\2LYxR\src\BorderedArrays.jl:69
[2] include(mod::Module, _path::String)
@ Base .\Base.jl:557
[3] include(x::String)
@ BifurcationKit C:\Users\RichardEydam.julia\packages\BifurcationKit\2LYxR\src\BifurcationKit.jl:1
[4] top-level scope
@ C:\Users\RichardEydam.julia\packages\BifurcationKit\2LYxR\src\BifurcationKit.jl:24
[5] include
@ .\Base.jl:557 [inlined]
[6] include_package_for_output(pkg::Base.PkgId, input::String, depot_path::Vector{String}, dl_load_path::Vector{String}, load_path::Vector{String}, concrete_deps::Vector{Pair{Base.PkgId, UInt128}}, source::String)
@ Base .\loading.jl:2790
[7] top-level scope
@ stdin:5
in expression starting at C:\Users\RichardEydam.julia\packages\BifurcationKit\2LYxR\src\BorderedArrays.jl:69
in expression starting at C:\Users\RichardEydam.julia\packages\BifurcationKit\2LYxR\src\BifurcationKit.jl:1
in expression starting at stdin:5
ERROR: LoadError: Failed to precompile BifurcationKit [0f109fa4-8a5d-4b75-95aa-f515264e7665] to "C:\Users\RichardEydam\.julia\compiled\v1.11\BifurcationKit\jl_C440.tmp".
Stacktrace:
[1] error(s::String)
@ Base .\error.jl:35
[2] compilecache(pkg::Base.PkgId, path::String, internal_stderr::IO, internal_stdout::IO, keep_loaded_modules::Bool; flags::Cmd, cacheflags::Base.CacheFlags, reasons::Dict{String, Int64}, isext::Bool)
@ Base .\loading.jl:3085
[3] (::Base.var"#1082#1083"{Base.PkgId})()
@ Base .\loading.jl:2492
[4] mkpidlock(f::Base.var"#1082#1083"{Base.PkgId}, at::String, pid::Int32; kwopts::@kwargs{stale_age::Int64, wait::Bool})
@ FileWatching.Pidfile C:\Users\RichardEydam.julia\juliaup\julia-1.11.1+0.x64.w64.mingw32\share\julia\stdlib\v1.11\FileWatching\src\pidfile.jl:95
[5] #mkpidlock#6
@ C:\Users\RichardEydam.julia\juliaup\julia-1.11.1+0.x64.w64.mingw32\share\julia\stdlib\v1.11\FileWatching\src\pidfile.jl:90 [inlined]
[6] trymkpidlock(::Function, ::Vararg{Any}; kwargs::@kwargs{stale_age::Int64})
@ FileWatching.Pidfile C:\Users\RichardEydam.julia\juliaup\julia-1.11.1+0.x64.w64.mingw32\share\julia\stdlib\v1.11\FileWatching\src\pidfile.jl:116
[7] #invokelatest#2
@ .\essentials.jl:1057 [inlined]
[8] invokelatest
@ .\essentials.jl:1052 [inlined]
[9] maybe_cachefile_lock(f::Base.var"#1082#1083"{Base.PkgId}, pkg::Base.PkgId, srcpath::String; stale_age::Int64)
@ Base .\loading.jl:3609
[10] maybe_cachefile_lock
@ .\loading.jl:3606 [inlined]
[11] _require(pkg::Base.PkgId, env::String)
@ Base .\loading.jl:2488
[12] __require_prelocked(uuidkey::Base.PkgId, env::String)
@ Base .\loading.jl:2315
[13] #invoke_in_world#3
@ .\essentials.jl:1089 [inlined]
[14] invoke_in_world
@ .\essentials.jl:1086 [inlined]
[15] _require_prelocked(uuidkey::Base.PkgId, env::String)
@ Base .\loading.jl:2302
[16] macro expansion
@ .\loading.jl:2241 [inlined]
[17] macro expansion
@ .\lock.jl:273 [inlined]
[18] __require(into::Module, mod::Symbol)
@ Base .\loading.jl:2198
[19] #invoke_in_world#3
@ .\essentials.jl:1089 [inlined]
[20] invoke_in_world
@ .\essentials.jl:1086 [inlined]
[21] require(into::Module, mod::Symbol)
@ Base .\loading.jl:2191
[22] include
@ .\Base.jl:557 [inlined]
[23] include_package_for_output(pkg::Base.PkgId, input::String, depot_path::Vector{String}, dl_load_path::Vector{String}, load_path::Vector{String}, concrete_deps::Vector{Pair{Base.PkgId, UInt128}}, source::Nothing)
@ Base .\loading.jl:2790
[24] top-level scope
@ stdin:5
in expression starting at C:\Users\RichardEydam.julia\packages\HclinicBifurcationKit\hOVPL\src\HclinicBifurcationKit.jl:1
in expression starting at stdin:5

@rveltz
Copy link
Member

rveltz commented Nov 18, 2024

Hi,

That is because https://github.com/bifurcationkit/HclinicBifurcationKit.jl/blob/main/Project.toml#L17. Can you try to update this and see if it works?

@rseydam
Copy link
Author

rseydam commented Nov 18, 2024

I am not entirely sure if I understand correctly. I change the line to

BifurcationKit = "^0.3.6, ^0.4.4"

I then updated BifurcationKit again to 0.4.4 and tried to install HclinicBifurcationKit, though it still reverted BifurcationKit to v0.3.6 and failed to precompile. Am I missing a step here?

@rveltz
Copy link
Member

rveltz commented Nov 18, 2024

you probably need:

] resolve

@rseydam
Copy link
Author

rseydam commented Nov 18, 2024

I installed BifurcationKit v0.4.4 and changed in the compat to

BifurcationKit = "^0.4.4"

Now it still has errors in precompilation with v0.4.4.

Precompiling HclinicBifurcationKit...
Info Given HclinicBifurcationKit was explicitly requested, output will be shown live
ERROR: LoadError: UndefVarError: @set not defined in HclinicBifurcationKit
Stacktrace:
[1] top-level scope
@ :0
[2] include(mod::Module, _path::String)
@ Base .\Base.jl:557
[3] include(x::String)
@ HclinicBifurcationKit C:\Users\RichardEydam.julia\packages\HclinicBifurcationKit\hOVPL\src\HclinicBifurcationKit.jl:1
[4] top-level scope
@ C:\Users\RichardEydam.julia\packages\HclinicBifurcationKit\hOVPL\src\HclinicBifurcationKit.jl:15
[5] include
@ .\Base.jl:557 [inlined]
[6] include_package_for_output(pkg::Base.PkgId, input::String, depot_path::Vector{String}, dl_load_path::Vector{String}, load_path::Vector{String}, concrete_deps::Vector{Pair{Base.PkgId, UInt128}}, source::Nothing)
@ Base .\loading.jl:2790
[7] top-level scope
@ stdin:5
in expression starting at C:\Users\RichardEydam.julia\packages\HclinicBifurcationKit\hOVPL\src\StandardShooting.jl:72
in expression starting at C:\Users\RichardEydam.julia\packages\HclinicBifurcationKit\hOVPL\src\StandardShooting.jl:68
in expression starting at C:\Users\RichardEydam.julia\packages\HclinicBifurcationKit\hOVPL\src\HclinicBifurcationKit.jl:1
in expression starting at stdin:5
✗ HclinicBifurcationKit
0 dependencies successfully precompiled in 6 seconds. 273 already precompiled.

ERROR: The following 1 direct dependency failed to precompile:

HclinicBifurcationKit

Failed to precompile HclinicBifurcationKit [0e751702-a6d5-4e4e-bf0f-194619fbec56] to "C:\Users\RichardEydam\.julia\compiled\v1.11\HclinicBifurcationKit\jl_671C.tmp".
ERROR: LoadError: UndefVarError: @set not defined in HclinicBifurcationKit
Stacktrace:
[1] top-level scope
@ :0
[2] include(mod::Module, _path::String)
@ Base .\Base.jl:557
[3] include(x::String)
@ HclinicBifurcationKit C:\Users\RichardEydam.julia\packages\HclinicBifurcationKit\hOVPL\src\HclinicBifurcationKit.jl:1
[4] top-level scope
@ C:\Users\RichardEydam.julia\packages\HclinicBifurcationKit\hOVPL\src\HclinicBifurcationKit.jl:15
[5] include
@ .\Base.jl:557 [inlined]
[6] include_package_for_output(pkg::Base.PkgId, input::String, depot_path::Vector{String}, dl_load_path::Vector{String}, load_path::Vector{String}, concrete_deps::Vector{Pair{Base.PkgId, UInt128}}, source::Nothing)
@ Base .\loading.jl:2790
[7] top-level scope
@ stdin:5
in expression starting at C:\Users\RichardEydam.julia\packages\HclinicBifurcationKit\hOVPL\src\StandardShooting.jl:72
in expression starting at C:\Users\RichardEydam.julia\packages\HclinicBifurcationKit\hOVPL\src\StandardShooting.jl:68
in expression starting at C:\Users\RichardEydam.julia\packages\HclinicBifurcationKit\hOVPL\src\HclinicBifurcationKit.jl:1
in expression starting at stdin:

@rveltz
Copy link
Member

rveltz commented Nov 18, 2024

That's because it is not exported by BK. Try BifurcationKit.@set

@rseydam
Copy link
Author

rseydam commented Nov 19, 2024

I added BifurcationKit.@set in StandardShooting.jl, and then I could build the package but running it still leads to some issues. It complained about the ambiguity of set in HomProblemPBC.jl in particular. I was unsure which ones should call BK.set and which should call Setfield.set. So first I changed them all to BK.set. Now I tried to run the example freire from the docs and after a few changes to the code (some things in it might be dated) I run into this problem

────────────────────────────
┌─ Start Hom_BT init
├─ ϵ = 0.018431210680221747
├─── ζ = 0.07071067811865475
ERROR: MethodError: no method matching newton(::BifurcationProblem{…}, ::NewtonPar{…})
The function newton exists, but no method is defined for this combination of argument types.

Closest candidates are:
newton(::BifurcationKit.AbstractBifurcationProblem, ::vectype, ::vectype, ::Any, ::NewtonPar{T, L, E}; ...) where {T, vectype, L, E}
@ BifurcationKit C:\Users\RichardEydam.julia\packages\BifurcationKit\RaJtn\src\DeflationOperator.jl:361
newton(::BifurcationKit.AbstractBifurcationProblem, ::vectype, ::vectype, ::Any, ::NewtonPar{T, L, E}, ::DeflationOperator; ...) where {T, vectype
@ BifurcationKit C:\Users\RichardEydam.julia\packages\BifurcationKit\RaJtn\src\DeflationOperator.jl:361
newton(::BifurcationKit.AbstractBifurcationProblem, ::vectype, ::vectype, ::Any, ::NewtonPar{T, L, E}, ::DeflationOperator, ::Any; kwargs...) wher
@ BifurcationKit C:\Users\RichardEydam.julia\packages\BifurcationKit\RaJtn\src\DeflationOperator.jl:361
...

Stacktrace:
[1] continuation(prob_vf::BifurcationProblem{…}, bt::BifurcationKit.BogdanovTakens{…}, bvp::PeriodicOrbitOCollProblem{…}, alg::PALC{…}, _contParams64, freeparams::Tuple{…}, maxT::Float64, update_every_step::Int64, test_orbit_flip::Bool, test_inclination_flip::Bool, kwargs::@kwargs{…})
@ HclinicBifurcationKit C:\Users\RichardEydam.julia\dev\HclinicBifurcationKit\src\HomProblemPBC.jl:413
[2] top-level scope
@ Untitled-1:66

@rveltz
Copy link
Member

rveltz commented Nov 19, 2024

That's because the new syntax is solve(prob, Newton(), optn)

@GabrieleCasagrande
Copy link

Hi,
sorry to interrupt the discussion but I'm also interested in using HclinicBifurcationKit.jl.
I tried to follow your suggestions and I was also able to precompile the package, however when I try to test it with Pkg.test() I receive the following error message

Testing Running tests...
HclinicBifurcationKit.jl: Error During Test at /home/gabricasa/HclinicBifurcationKit.jl/test/runtests.jl:4
Got exception outside of a @test
LoadError: AssertionError: lens isa Int || lens isa AllOpticTypes
Stacktrace:
[1] BifurcationProblem(_F::typeof(Fbt), u0::Vector{Float64}, parms::@NamedTuple{β1::Float64, β2::Float64, a::Float64, b::Float64}, lens::Setfield.PropertyLens{:β1}; jvp::Nothing, vjp::Nothing, J::Nothing, J!::Nothing, Jᵗ::Nothing, d2F::Nothing, d3F::Nothing, issymmetric::Bool, record_from_solution::typeof(BifurcationKit.record_sol_default), plot_solution::typeof(BifurcationKit.plot_default), delta::Float64, save_solution::typeof(BifurcationKit.save_solution_default), inplace::Bool)
@ BifurcationKit ~/.julia/packages/BifurcationKit/RaJtn/src/Problems.jl:221
[2] BifurcationProblem(_F::Function, u0::Vector{Float64}, parms::@NamedTuple{β1::Float64, β2::Float64, a::Float64, b::Float64}, lens::Setfield.PropertyLens{:β1})
@ BifurcationKit ~/.julia/packages/BifurcationKit/RaJtn/src/Problems.jl:207
[3] top-level scope
@ ~/HclinicBifurcationKit.jl/test/testHomoclinic.jl:16
[4] include(fname::String)
@ Main ./sysimg.jl:38
[5] macro expansion
@ ~/HclinicBifurcationKit.jl/test/runtests.jl:5 [inlined]
[6] macro expansion
@ ~/.julia/juliaup/julia-1.11.1+0.x64.linux.gnu/share/julia/stdlib/v1.11/Test/src/Test.jl:1700 [inlined]
[7] top-level scope
@ ~/HclinicBifurcationKit.jl/test/runtests.jl:5
[8] include(fname::String)
@ Main ./sysimg.jl:38
[9] top-level scope
@ none:6
[10] eval
@ ./boot.jl:430 [inlined]
[11] exec_options(opts::Base.JLOptions)
@ Base ./client.jl:296
[12] _start()
@ Base ./client.jl:531
in expression starting at /home/gabricasa/HclinicBifurcationKit.jl/test/testHomoclinic.jl:16
Test Summary: | Error Total Time
HclinicBifurcationKit.jl | 1 1 1.7s
ERROR: LoadError: Some tests did not pass: 0 passed, 0 failed, 1 errored, 0 broken.
in expression starting at /home/gabricasa/HclinicBifurcationKit.jl/test/runtests.jl:4
ERROR: Package HclinicBifurcationKit errored during testing
Stacktrace:
[1] pkgerror(msg::String)
@ Pkg.Types ~/.julia/juliaup/julia-1.11.1+0.x64.linux.gnu/share/julia/stdlib/v1.11/Pkg/src/Types.jl:68
[2] test(ctx::Pkg.Types.Context, pkgs::Vector{…}; coverage::Bool, julia_args::Cmd, test_args::Cmd, test_fn::Nothing, force_latest_compatible_version::Bool, allow_earlier_backwards_compatible_versions::Bool, allow_reresolve::Bool)
@ Pkg.Operations ~/.julia/juliaup/julia-1.11.1+0.x64.linux.gnu/share/julia/stdlib/v1.11/Pkg/src/Operations.jl:2104
[3] test
@ ~/.julia/juliaup/julia-1.11.1+0.x64.linux.gnu/share/julia/stdlib/v1.11/Pkg/src/Operations.jl:1989 [inlined]
[4] test(ctx::Pkg.Types.Context, pkgs::Vector{…}; coverage::Bool, test_fn::Nothing, julia_args::Cmd, test_args::Cmd, force_latest_compatible_version::Bool, allow_earlier_backwards_compatible_versions::Bool, allow_reresolve::Bool, kwargs::@kwargs{…})
@ Pkg.API ~/.julia/juliaup/julia-1.11.1+0.x64.linux.gnu/share/julia/stdlib/v1.11/Pkg/src/API.jl:475
[5] test(pkgs::Vector{Pkg.Types.PackageSpec}; io::IOContext{IO}, kwargs::@kwargs{})
@ Pkg.API ~/.julia/juliaup/julia-1.11.1+0.x64.linux.gnu/share/julia/stdlib/v1.11/Pkg/src/API.jl:159
[6] test(pkgs::Vector{Pkg.Types.PackageSpec})
@ Pkg.API ~/.julia/juliaup/julia-1.11.1+0.x64.linux.gnu/share/julia/stdlib/v1.11/Pkg/src/API.jl:148
[7] test(; name::Nothing, uuid::Nothing, version::Nothing, url::Nothing, rev::Nothing, path::Nothing, mode::Pkg.Types.PackageMode, subdir::Nothing, kwargs::@kwargs{})
@ Pkg.API ~/.julia/juliaup/julia-1.11.1+0.x64.linux.gnu/share/julia/stdlib/v1.11/Pkg/src/API.jl:174
[8] test()
@ Pkg.API ~/.julia/juliaup/julia-1.11.1+0.x64.linux.gnu/share/julia/stdlib/v1.11/Pkg/src/API.jl:165
[9] top-level scope
@ REPL[38]:1

@rveltz
Copy link
Member

rveltz commented Nov 27, 2024

OK ill correct it asap

@rveltz
Copy link
Member

rveltz commented Nov 27, 2024

it should be corrected on master. Ill push a tag soon

@rveltz rveltz closed this as completed Nov 27, 2024
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

3 participants