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

Failing to precompile with NLOptControl and JuMP #39

Open
RobotikPraktikum opened this issue Jul 30, 2021 · 3 comments
Open

Failing to precompile with NLOptControl and JuMP #39

RobotikPraktikum opened this issue Jul 30, 2021 · 3 comments

Comments

@RobotikPraktikum
Copy link

RobotikPraktikum commented Jul 30, 2021

Hi,
I have great interest in your NLOptControl package and am trying it recently. But I encountered some problems while precompiling it.

I can add NLOptControl successfully but I cannot precompile NLOptControl and JuMP contained in it. I guess the reason may be that, it contains an out of date version (v0.18.6) of JuMP. When I try to precompile JuMP v0.18.6, it always shows failure, but the JuMP(v0.21.4) can be precompiled successfully after I remove NLOptControl.

#add NLOptControl:
(@v1.6) pkg> add https://github.com/JuliaMPC/NLOptControl.jl
Updating git-repo https://github.com/JuliaMPC/NLOptControl.jl
Resolving package versions...
Updating C:\Users\13614.julia\environments\v1.6\Project.toml
[4076af6c] ↓ JuMP v0.21.4 ⇒ v0.18.6
[290757bd] + NLOptControl v0.3.0 https://github.com/JuliaMPC/NLOptControl.jl#master
Updating C:\Users\13614.julia\environments\v1.6\Manifest.toml
[336ed68f] + CSV v0.8.5
[442a2c76] + FastGaussQuadrature v0.4.5
[4076af6c] ↓ JuMP v0.21.4 ⇒ v0.18.6
[290757bd] + NLOptControl v0.3.0 https://github.com/JuliaMPC/NLOptControl.jl#master
[89212889] + ReverseDiffSparse v0.8.6
[91c51154] + SentinelArrays v1.3.5
Precompiling project...
✗ JuMP
✗ NLOptControl
0 dependencies successfully precompiled in 27 seconds (296 already precompiled)
2 dependencies errored. To see a full report either run import Pkg; Pkg.precompile() or load the packages

julia> Pkg.precompile()
Precompiling project...
✗ JuMP
✗ NLOptControl

0 dependencies successfully precompiled in 29 seconds (296 already precompiled)

ERROR: The following 2 direct dependencies failed to precompile:

NLOptControl [290757bd-39a7-5095-97bb-ca0f46959724]

WARNING: could not import JuMP.setRHS into NLOptControl
WARNING: could not import JuMP.internalmodel into NLOptControl
ERROR: LoadError: LoadError: UndefVarError: Variable not defined
Stacktrace:
[1] top-level scope
@ C:\Users\13614.julia\packages\Parameters\cGriM\src\Parameters.jl:572
[2] include(mod::Module, _path::String)
@ Base .\Base.jl:386
[3] include(x::String)
@ NLOptControl C:\Users\13614.julia\packages\NLOptControl\Yh2kR\src\NLOptControl.jl:3
[4] top-level scope
@ C:\Users\13614.julia\packages\NLOptControl\Yh2kR\src\NLOptControl.jl:36
[5] include
@ .\Base.jl:386 [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, UInt64}}, source::Nothing)
@ Base .\loading.jl:1213
[7] top-level scope
@ none:1
[8] eval
@ .\boot.jl:360 [inlined]
[9] eval(x::Expr)
@ Base.MainInclude .\client.jl:446
[10] top-level scope
@ none:1
in expression starting at C:\Users\13614.julia\packages\NLOptControl\Yh2kR\src\types.jl:100
in expression starting at C:\Users\13614.julia\packages\NLOptControl\Yh2kR\src\NLOptControl.jl:3

JuMP [4076af6c-e467-56ae-b986-b466b2749572]

ERROR: LoadError: LoadError: UndefVarError: Grisu not defined
Stacktrace:
[1] getproperty(x::Module, f::Symbol)
@ Base .\Base.jl:26
[2] top-level scope
@ C:\Users\13614.julia\packages\JuMP\I7whV\src\writers.jl:6
[3] include(mod::Module, _path::String)
@ Base .\Base.jl:386
[4] include(x::String)
@ JuMP C:\Users\13614.julia\packages\JuMP\I7whV\src\JuMP.jl:11
[5] top-level scope
@ C:\Users\13614.julia\packages\JuMP\I7whV\src\JuMP.jl:947
[6] include
@ .\Base.jl:386 [inlined]
[7] 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, UInt64}}, source::Nothing)
@ Base .\loading.jl:1213
[8] top-level scope
@ none:1
[9] eval
@ .\boot.jl:360 [inlined]
[10] eval(x::Expr)
@ Base.MainInclude .\client.jl:446
[11] top-level scope
@ none:1
in expression starting at C:\Users\13614.julia\packages\JuMP\I7whV\src\writers.jl:5
in expression starting at C:\Users\13614.julia\packages\JuMP\I7whV\src\JuMP.jl:11

Stacktrace:
[1] pkgerror(msg::String)
@ Pkg.Types C:\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.6\Pkg\src\Types.jl:55
[2] precompile(ctx::Pkg.Types.Context; internal_call::Bool, strict::Bool, kwargs::Base.Iterators.Pairs{Union{}, Union{}, Tuple{}, NamedTuple{(), Tuple{}}})
@ Pkg.API C:\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.6\Pkg\src\API.jl:1244
[3] precompile
@ C:\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.6\Pkg\src\API.jl:920 [inlined]
[4] #precompile#196
@ C:\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.6\Pkg\src\API.jl:918 [inlined]
[5] precompile()
@ Pkg.API C:\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.6\Pkg\src\API.jl:918
[6] top-level scope
@ REPL[43]:1

(@v1.6) pkg> rm NLOptControl
Updating C:\Users\13614\.julia\environments\v1.6\Project.toml
[290757bd] - NLOptControl v0.3.0 https://github.com/JuliaMPC/NLOptControl.jl#master
Updating C:\Users\13614\.julia\environments\v1.6\Manifest.toml
[336ed68f] - CSV v0.8.5
[442a2c76] - FastGaussQuadrature v0.4.5
[290757bd] - NLOptControl v0.3.0 https://github.com/JuliaMPC/NLOptControl.jl#master
[91c51154] - SentinelArrays v1.3.5

(@v1.6) pkg> rm JuMP
Updating C:\Users\13614\.julia\environments\v1.6\Project.toml
[4076af6c] - JuMP v0.18.6
Updating C:\Users\13614\.julia\environments\v1.6\Manifest.toml
[49dc2e85] - Calculus v0.5.1
[4076af6c] - JuMP v0.18.6
[89212889] - ReverseDiffSparse v0.8.6

(@v1.6) pkg> add JuMP
Resolving package versions...
Updating C:\Users\13614\.julia\environments\v1.6\Project.toml
[4076af6c] + JuMP v0.21.4
Updating C:\Users\13614\.julia\environments\v1.6\Manifest.toml
[49dc2e85] + Calculus v0.5.1
[4076af6c] + JuMP v0.21.4

julia> Pkg.precompile()
#Success

Could you please help me and solve this problem?

@albheim
Copy link

albheim commented Oct 29, 2021

Having the same problem, any progress on this?

@lilianping
Copy link

Excuse me, is your problem solved?I also encountered a similar problem when installing NLOPT
`import Pkg; Pkg.add(path="https://github.com/JuliaMPC/NLOptControl.jl")
Fetching: [========================================>] 100.0 %36mFetching: [===> ] 5.2 % [===> ] 6.9 % [========> ] 17.6 %] 19.3 %Fetching: [==========> ] 24.1 %Fetching: [===========> ] 26.9 %37.8 % ] 40.7 %54.0 %58.5 %Fetching: [================================> ] 78.6 % [=================================> ] 82.0 % ] 87.5 % ] 96.5 %] 99.0 %
Unsatisfiable requirements detected for package OrdinaryDiffEq [1dea7af3]:
OrdinaryDiffEq [1dea7af3] log:
├─possible versions are: 4.0.0-6.0.3 or uninstalled
├─restricted to versions * by NLOptControl [290757bd], leaving only versions 4.0.0-6.0.3
│ └─NLOptControl [290757bd] log:
│ ├─possible versions are: 0.3.0 or uninstalled
│ └─NLOptControl [290757bd] is fixed to version 0.3.0
├─restricted by compatibility requirements with Parameters [d96e819e] to versions: [4.0.0-5.6.0, 5.17.0-6.0.3] or uninstalled, leaving only versions: [4.0.0-5.6.0, 5.17.0-6.0.3]
│ └─Parameters [d96e819e] log:
│ ├─possible versions are: 0.9.1-0.12.3 or uninstalled
│ ├─restricted to versions * by NLOptControl [290757bd], leaving only versions 0.9.1-0.12.3
│ │ └─NLOptControl [290757bd] log: see above
│ └─restricted by compatibility requirements with ContactImplicitMPC [842347fd] to versions: 0.12.0-0.12.3
│ └─ContactImplicitMPC [842347fd] log:
│ ├─possible versions are: 0.1.0-0.2.0 or uninstalled
│ └─restricted to versions * by an explicit requirement, leaving only versions 0.1.0-0.2.0
├─restricted by compatibility requirements with StaticArrays [90137ffa] to versions: 5.46.0-6.0.3 or uninstalled, leaving only versions: 5.46.0-6.0.3
│ └─StaticArrays [90137ffa] log:
│ ├─possible versions are: 0.8.0-1.2.13 or uninstalled
│ └─restricted by compatibility requirements with ContactImplicitMPC [842347fd] to versions: 1.2.0-1.2.13
│ └─ContactImplicitMPC [842347fd] log: see above
└─restricted by compatibility requirements with DataStructures [864edb3b] to versions: 4.0.0-5.42.3 or uninstalled — no versions left
└─DataStructures [864edb3b] log:
├─possible versions are: 0.9.0-0.18.11 or uninstalled
├─restricted by compatibility requirements with ReverseDiffSparse [89212889] to versions: 0.9.0-0.18.11
│ └─ReverseDiffSparse [89212889] log:
│ ├─possible versions are: 0.8.2-0.8.6 or uninstalled
│ ├─restricted to versions * by NLOptControl [290757bd], leaving only versions 0.8.2-0.8.6
│ │ └─NLOptControl [290757bd] log: see above
│ └─restricted by compatibility requirements with ForwardDiff [f6369f11] to versions: 0.8.5-0.8.6 or uninstalled, leaving only versions: 0.8.5-0.8.6
│ └─ForwardDiff [f6369f11] log:
│ ├─possible versions are: 0.9.0-0.10.24 or uninstalled
│ ├─restricted by compatibility requirements with ReverseDiffSparse [89212889] to versions: 0.9.0-0.10.24
│ │ └─ReverseDiffSparse [89212889] log: see above
│ ├─restricted by compatibility requirements with ContactImplicitMPC [842347fd] to versions: 0.10.0-0.10.24
│ │ └─ContactImplicitMPC [842347fd] log: see above
│ └─restricted by compatibility requirements with StaticArrays [90137ffa] to versions: 0.10.13-0.10.24 or uninstalled, leaving only versions: 0.10.13-0.10.24
│ └─StaticArrays [90137ffa] log: see above
├─restricted by compatibility requirements with JLD2 [033835bb] to versions: 0.17.0-0.18.11
│ └─JLD2 [033835bb] log:
│ ├─possible versions are: 0.1.0-0.4.16 or uninstalled
│ └─restricted by compatibility requirements with ContactImplicitMPC [842347fd] to versions: 0.4.0-0.4.16
│ └─ContactImplicitMPC [842347fd] log: see above
└─restricted by compatibility requirements with Compat [34da2185] to versions: 0.9.0-0.17.20 or uninstalled, leaving only versions: 0.17.0-0.17.20
└─Compat [34da2185] log:
├─possible versions are: 1.0.0-3.41.0 or uninstalled
└─restricted by compatibility requirements with ReverseDiffSparse [89212889] to versions: 1.0.0-2.2.1
└─ReverseDiffSparse [89212889] log: see above

Stacktrace:
[1] propagate_constraints!(graph::Pkg.Resolve.Graph, sources::Set{Int64}; log_events::Bool)
@ Pkg.Resolve C:\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.6\Pkg\src\Resolve\graphtype.jl:1048
[2] propagate_constraints! (repeats 2 times)
@ C:\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.6\Pkg\src\Resolve\graphtype.jl:989 [inlined]
[3] simplify_graph!(graph::Pkg.Resolve.Graph, sources::Set{Int64}; clean_graph::Bool)
@ Pkg.Resolve C:\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.6\Pkg\src\Resolve\graphtype.jl:1503
[4] simplify_graph! (repeats 2 times)
@ C:\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.6\Pkg\src\Resolve\graphtype.jl:1503 [inlined]
[5] resolve_versions!(ctx::Pkg.Types.Context, pkgs::Vector{Pkg.Types.PackageSpec})
@ Pkg.Operations C:\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.6\Pkg\src\Operations.jl:405
[6] targeted_resolve(ctx::Pkg.Types.Context, pkgs::Vector{Pkg.Types.PackageSpec}, preserve::Pkg.Types.PreserveLevel)
@ Pkg.Operations C:\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.6\Pkg\src\Operations.jl:1210
[7] tiered_resolve(ctx::Pkg.Types.Context, pkgs::Vector{Pkg.Types.PackageSpec})
@ Pkg.Operations C:\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.6\Pkg\src\Operations.jl:1196
[8] _resolve
@ C:\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.6\Pkg\src\Operations.jl:1216 [inlined]
[9] add(ctx::Pkg.Types.Context, pkgs::Vector{Pkg.Types.PackageSpec}, new_git::Vector{Base.UUID}; preserve::Pkg.Types.PreserveLevel, platform::Base.BinaryPlatforms.Platform)
@ Pkg.Operations C:\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.6\Pkg\src\Operations.jl:1231
[10] add(ctx::Pkg.Types.Context, pkgs::Vector{Pkg.Types.PackageSpec}; preserve::Pkg.Types.PreserveLevel, platform::Base.BinaryPlatforms.Platform, kwargs::Base.Iterators.Pairs{Symbol, Base.TTY, Tuple{Symbol}, NamedTuple{(:io,), Tuple{Base.TTY}}})
@ Pkg.API C:\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.6\Pkg\src\API.jl:203
[11] add(pkgs::Vector{Pkg.Types.PackageSpec}; io::Base.TTY, kwargs::Base.Iterators.Pairs{Union{}, Union{}, Tuple{}, NamedTuple{(), Tuple{}}})
@ Pkg.API C:\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.6\Pkg\src\API.jl:79
[12] add(pkgs::Vector{Pkg.Types.PackageSpec})
@ Pkg.API C:\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.6\Pkg\src\API.jl:77
[13] #add#22
@ C:\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.6\Pkg\src\API.jl:74 [inlined]
[14] add
@ C:\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.6\Pkg\src\API.jl:74 [inlined]
[15] add(; name::Nothing, uuid::Nothing, version::Nothing, url::Nothing, rev::Nothing, path::String, mode::Pkg.Types.PackageMode, subdir::Nothing, kwargs::Base.Iterators.Pairs{Union{}, Union{}, Tuple{}, NamedTuple{(), Tuple{}}})
@ Pkg.API C:\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.6\Pkg\src\API.jl:97
[16] top-level scope
@ In[3]:1
[17] eval
@ .\boot.jl:360 [inlined]
[18] include_string(mapexpr::typeof(REPL.softscope), mod::Module, code::String, filename::String)
@ Base .\loading.jl:1094
`

@stephans3
Copy link

This package seems to be no longer developed.
If you search for a Model Predictive Control example using JuMP you may take a look here:
DynamicWalking2018.jl - Optimization with JuMP

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

4 participants