Multi-threading in Gurobi-JuMP Interface

Hi there,

I am a new Julia user in optimization usage, switched from GAMS and AMPL. I have tested some codes and they worked well. However, I would like to know how to set multi-threading in the Gurobi-JuMP interface.

I was just using Barrier method (Method=2) in Gurobi to solve an LP problem. I guess if I need to indicate the threads in the following code?
‘’'julia
using JuMP
import Gurobi

m1 = Model(solver = Gurobi.GurobiSolver(Method=2))
‘’’

In the output, I got:

Barrier statistics:
AA’ NZ : 6.000e+00
Factor NZ : 1.000e+01
Factor Ops : 3.000e+01 (less than 1 second per iteration)
Threads : 1

That’s where I am interested to change. Thanks in advance for your replies!

Gabriel

Sorry for the wrong quote lol, first-time user, I guess the right way is:

using JuMP
import Gurobi

m1 = Model(solver = Gurobi.GurobiSolver(Method=2))

You’re looking for the Threads option, e.g., GurobiSolver(Threads=2).

Thanks for your reply.

I do not know if you mean to do like this, but it seems not working.


It is just a small LP example.

Gabriel

Presumably Gurobi decides that the model is too easy and it only uses one thread. Try on a harder model.

This isn’t really JuMP or Julia related, so you might have more luck on the Gurobi forum:
https://groups.google.com/forum/#!forum/gurobi