I’m not sure why, but, some times when I run Gurobi.Optimizer()
, it throws, reporting Gurobi Error 10001
, which is meant for out-of-memory situations. I’m pretty sure that’s some kind of bug, because there seems to be plenty of memory left (there’s 32 GB of RAM, and, looking at top
, I don’t think that more than 8 GB is utilized at any point. There’s also lots of swap space that’s not used at all.
This started happening recently and now it happens often.
I think it may have been caused by running two instances of Gurobi concurrently, not sure if that’s allowed under the Academic License. In any case, now it happens even when just a single Gurobi is running.
Output with stack trace:
ERROR: Gurobi Error 10001:
Stacktrace:
[1] _check_ret
@ ~/.julia/packages/Gurobi/W2h9r/src/MOI_wrapper/MOI_wrapper.jl:400 [inlined]
[2] Gurobi.Env(; output_flag::Int64, memory_limit::Nothing, started::Bool)
@ Gurobi ~/.julia/packages/Gurobi/W2h9r/src/MOI_wrapper/MOI_wrapper.jl:110
[3] Env
@ ~/.julia/packages/Gurobi/W2h9r/src/MOI_wrapper/MOI_wrapper.jl:102 [inlined]
[4] Gurobi.Optimizer(env::Nothing; enable_interrupts::Bool)
@ Gurobi ~/.julia/packages/Gurobi/W2h9r/src/MOI_wrapper/MOI_wrapper.jl:331
[5] Optimizer (repeats 2 times)
@ ~/.julia/packages/Gurobi/W2h9r/src/MOI_wrapper/MOI_wrapper.jl:325 [inlined]
julia> versioninfo()
Julia Version 1.11.0-DEV.1008
Commit b69398a810f (2023-12-04 03:08 UTC)
Build Info:
Official https://julialang.org/ release
Platform Info:
OS: Linux (x86_64-linux-gnu)
CPU: 8 × Intel(R) Core(TM) i5-8300H CPU @ 2.30GHz
WORD_SIZE: 64
LLVM: libLLVM-15.0.7 (ORCJIT, skylake)
Threads: 11 on 8 virtual cores
Environment:
JULIA_PKG_DEVDIR = /home/nsajko/julia-dev-pkgs
JULIA_EDITOR = code
JULIA_NUM_THREADS = 8
(@v1.11) pkg> st Gurobi
Status `~/.julia/environments/v1.11/Project.toml`
[2e9cd046] Gurobi v1.2.0
I’ll try rebooting now, not sure what else to try
EDIT: a reboot didn’t help, so I switched to SCIP. This is so weird, I have no idea what could have changed on my laptop to cause this? Is it possible that Gurobi “phones home” and some of their servers are down, causing the solver to fail on my laptop? Really strange.
EDIT2: a workaround is to reuse the same Gurobi environment for multiple solves. In my case I needed to change the line make_opt() = Gurobi.Optimizer()
to:
const gurobi_environment = Gurobi.Env()
make_opt() = Gurobi.Optimizer(gurobi_environment)