You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I had a very hard time getting Gurobi.jl to use the most recent version after upgrading to Gurobi 9.1.1 from 9.0.3. After installing 9.1.1 on my system but leaving the previous versions in place:
julia>ENV["GUROBI_HOME"]
"C:\\Program Files\\Gurobi911\\win64"
julia>run(`gurobi_cl --version`)
Gurobi Optimizer version 9.1.1 build v9.1.1rc0 (win64)
Copyright (c) 2020, Gurobi Optimization, LLC
Process(`gurobi_cl --version`, ProcessExited(0))
(@v1.6) pkg> st
Status `C:\Users\niclas\.julia\environments\v1.6\Project.toml`
[2e9cd046] Gurobi v0.9.10
[4076af6c] JuMP v0.21.6
[295af30f] Revise v3.1.14
(@v1.6) pkg> build Gurobi
Building Gurobi →`C:\Users\niclas\.julia\scratchspaces\44cfe95a-1eb2-52ea-b672-e2afdf69b78f\e66fa4ef62605be7730aa22832785ad9763e090e\build.log`
Precompiling project...
Progress [========================================>] 1/11 dependency successfully precompiled in3 seconds (41 already precompiled)
julia>using JuMP, Gurobi
julia> m =Model(Gurobi.Optimizer)
Academic license -for non-commercial use only
A JuMP Model
Feasibility problem with:
Variables:0
Model mode: AUTOMATIC
CachingOptimizer state: EMPTY_OPTIMIZER
Solver name: Gurobi
julia>optimize!(m) # Note the version!
Gurobi Optimizer version 9.0.3 build v9.0.3rc0 (win64)
Optimize a model with 0 rows, 0 columns and 0 nonzeros
Model fingerprint:0xf9715da1
Coefficient statistics:
Matrix range [0e+00, 0e+00]
Objective range [0e+00, 0e+00]
Bounds range [0e+00, 0e+00]
RHS range [0e+00, 0e+00]
Presolve time:0.00s
Presolve: All rows and columns removed
Iteration Objective Primal Inf. Dual Inf. Time
00.0000000e+000.000000e+000.000000e+000s
Solved in0 iterations and 0.00 seconds
Optimal objective 0.000000000e+00
User-callback calls 19, time in user-callback 0.00 sec
So I figured somehow 9.0.3 was sticking around. I tried renaming the folder C:\Program Files\Gurobi903 so Gurobi.jl couldn't find the 9.0.3 binaries:
Bizarre. How could Gurobi.jl successfully build and precompile, but then fail at runtime due to not finding the .dll? And why is it insisting on using gurobi90.dll when I have 9.1.1 installed? So I looked through my system again and found some very old Gurobi versions (8.0 and 8.1) still hanging around. When I renamed those folders too then finally everything worked:
(@v1.6) pkg> build Gurobi
Building Gurobi →`C:\Users\niclas\.julia\scratchspaces\44cfe95a-1eb2-52ea-b672-e2afdf69b78f\e66fa4ef62605be7730aa22832785ad9763e090e\build.log`
Progress [========================================>] 1/11 dependency successfully precompiled in3 seconds (41 already precompiled)
julia>using JuMP, Gurobi
julia> m =Model(Gurobi.Optimizer)
Academic license -for non-commercial use only - expires 2021-04-16
A JuMP Model
Feasibility problem with:
Variables:0
Model mode: AUTOMATIC
CachingOptimizer state: EMPTY_OPTIMIZER
Solver name: Gurobi
julia>optimize!(m)
Gurobi Optimizer version 9.1.1 build v9.1.1rc0 (win64)
Thread count:6 physical cores, 12 logical processors, using up to 12 threads
Optimize a model with 0 rows, 0 columns and 0 nonzeros
Model fingerprint:0xf9715da1
Coefficient statistics:
Matrix range [0e+00, 0e+00]
Objective range [0e+00, 0e+00]
Bounds range [0e+00, 0e+00]
RHS range [0e+00, 0e+00]
Presolve time:0.00s
Presolve: All rows and columns removed
Iteration Objective Primal Inf. Dual Inf. Time
00.0000000e+000.000000e+000.000000e+000s
Solved in0 iterations and 0.00 seconds
Optimal objective 0.000000000e+00
User-callback calls 20, time in user-callback 0.00 sec
So it's working for me now but I'm opening an issue in the hope that this could become easier in the future. Specifically I suggest:
Gurobi.jl should default to using the lib folder inside GUROBI_HOME and not some other arbitrary folder it manages to pick up from the path.
When building, Gurobi.jl should output which folders it's using for binaries and libraries. Then you can tell immediately on install if everything is OK.
The text was updated successfully, but these errors were encountered:
I had a very hard time getting Gurobi.jl to use the most recent version after upgrading to Gurobi 9.1.1 from 9.0.3. After installing 9.1.1 on my system but leaving the previous versions in place:
So I figured somehow 9.0.3 was sticking around. I tried renaming the folder
C:\Program Files\Gurobi903
so Gurobi.jl couldn't find the 9.0.3 binaries:Bizarre. How could Gurobi.jl successfully build and precompile, but then fail at runtime due to not finding the .dll? And why is it insisting on using gurobi90.dll when I have 9.1.1 installed? So I looked through my system again and found some very old Gurobi versions (8.0 and 8.1) still hanging around. When I renamed those folders too then finally everything worked:
So it's working for me now but I'm opening an issue in the hope that this could become easier in the future. Specifically I suggest:
The text was updated successfully, but these errors were encountered: