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
Using the MemLimit parameter leads to the following issue:
julia> using JuMP, Gurobi
julia> model = Model(Gurobi.Optimizer)
A JuMP Model
Feasibility problem with:
Variables: 0
Model mode: AUTOMATIC
CachingOptimizer state: EMPTY_OPTIMIZER
Solver name: Gurobi
julia> set_optimizer_attribute(model, "MemLimit", 100)
ERROR: Gurobi Error 10003: Unable to modify parameter MemLimit after environment started
Stacktrace:
[1] _check_ret
@ ~/.julia/packages/Gurobi/A9YqC/src/MOI_wrapper/MOI_wrapper.jl:350 [inlined]
[2] set(model::Gurobi.Optimizer, raw::MathOptInterface.RawOptimizerAttribute, value::Int64)
@ Gurobi ~/.julia/packages/Gurobi/A9YqC/src/MOI_wrapper/MOI_wrapper.jl:602
[3] set
@ ~/.julia/packages/MathOptInterface/eoIu0/src/Bridges/bridge_optimizer.jl:839 [inlined]
[4] set(model::MathOptInterface.Utilities.CachingOptimizer{MathOptInterface.Bridges.LazyBridgeOptimizer{Gurobi.Optimizer}, MathOptInterface.Utilities.UniversalFallback{MathOptInterface.Utilities.Model{Float64}}}, attr::MathOptInterface.RawOptimizerAttribute, value::Int64)
@ MathOptInterface.Utilities ~/.julia/packages/MathOptInterface/eoIu0/src/Utilities/cachingoptimizer.jl:979
[5] set(m::Model, attr::MathOptInterface.RawOptimizerAttribute, value::Int64)
@ JuMP ~/.julia/packages/JuMP/2IF9U/src/JuMP.jl:1294
[6] set_optimizer_attribute
@ ~/.julia/packages/JuMP/2IF9U/src/JuMP.jl:896 [inlined]
[7] set_optimizer_attribute(model::Model, name::String, value::Int64)
@ JuMP ~/.julia/packages/JuMP/2IF9U/src/JuMP.jl:870
[8] top-level scope
@ REPL[4]:1
julia>
It is necessary first to set up the Env and then create the model:
Set parameter ServerPassword
Set parameter TokenServer to value "35.242.224.71"
Gurobi.Env(Ptr{Nothing} @0x0000000003d55380, false, 0)
julia> Gurobi.GRBsetintparam(env, "MemLimit", 10)
10007
julia> model = Model(() -> Gurobi.Optimizer(env))
A JuMP Model
Feasibility problem with:
Variables: 0
Model mode: AUTOMATIC
CachingOptimizer state: EMPTY_OPTIMIZER
Solver name: Gurobi
julia>
Do you see a possibility of changing the package to avoid the workaround?
The text was updated successfully, but these errors were encountered:
Unlikely. Gurobi's documentation instructs users to do the exact workaround you used:
This parameter must be set when the Gurobi environment is first created. You will need to create an empty environment, set the parameter, and then start the environment.
Using the MemLimit parameter leads to the following issue:
It is necessary first to set up the Env and then create the model:
Do you see a possibility of changing the package to avoid the workaround?
The text was updated successfully, but these errors were encountered: