jump-dev / Gurobi_jll.jl

A Julia package for installing the Gurobi Optimizer
https://anaconda.org/Gurobi/gurobi
MIT License
2 stars 3 forks source link

Julia crashes using Gurobi_jll@11.0.3 #30

Open sebastianangerhausen opened 1 day ago

sebastianangerhausen commented 1 day ago

After updating Gurobi_jll from version 11.0.2 to 11.0.3, the Julia instance crashes every time in a way that I can only quickly take a screenshot until the REPL is closed automatically. This is the information I could retain:

Screenshot

I believe, the responsible line is Solver.jl:82, which contains

set_optimizer(jump_model, () -> Gurobi.Optimizer(solver_env))

where solver_env is the previously created solver environment.

When I updated the Gurobi.jl package, I got the following warnings:

WARNING: redefinition of constant Gurobi_jll.PATH. This may fail, cause incorrect answers, or produce other errors.
WARNING: redefinition of constant Gurobi_jll.LIBPATH. This may fail, cause incorrect answers, or produce other errors.
WARNING: redefinition of constant Gurobi_jll.PATH_list. This may fail, cause incorrect answers, or produce other errors.
WARNING: redefinition of constant Gurobi_jll.LIBPATH_list. This may fail, cause incorrect answers, or produce other errors.
┌ Error: 2024-10-31 17:51:31 Error watching manifest
│   exception =
│    cannot set type for global Gurobi_jll.best_wrapper. It already has a value or is already set to a different type.
│    Stacktrace:
│     [1] top-level scope
│       @ C:\Users\angerhse\.julia\packages\JLLWrappers\jXOYx\src\toplevel_generators.jl:119
│    Revise evaluation error at C:\Users\angerhse\.julia\packages\JLLWrappers\jXOYx\src\toplevel_generators.jl:119
│
│    Stacktrace:
│     [1] methods_by_execution!(recurse::Any, methodinfo::Revise.CodeTrackingMethodInfo, docexprs::Dict{Module, Vector{Expr}}, mod::Module, ex::Expr; mode::Symbol, disablebp::Bool, always_rethrow::Bool, kwargs::@Kwargs{})
│       @ Revise C:\Users\angerhse\.julia\packages\Revise\uvGMC\src\lowered.jl:281
└ @ Revise C:\Users\angerhse\.julia\packages\Revise\uvGMC\src\pkgs.jl:495

I am using a Windows computer, so the x86_64-w64-mingw32 wrapper should be the one in question.

@odow If I remember correctly, you don't use Windows. So please let me know, if I can provide any more details helping to solve the issue.

odow commented 1 day ago

This is very weird. You should not have been able to trigger the WARNING: redefinition of constant.

How did you update Gurobi_jll?

Try:

] add Gurobi Gurobi_jll
] precompile Gurobi_jll
] precompile Gurobi

Close Julia, then restart Julia.

odow commented 1 day ago

I think this is because you had Revise loaded when you updated the package, and it's managed to get things into a weird state. This doesn't seem like an issue in Gurobi_jll.jl.