I am trying to solve a mixed integer linear program by branch-and-cut using JuMP and CPLEX.
I am having some trouble setting the number of threads for CPLEX.
I am trying to set the parameter CPXPARAM_Threads using set_optimizer_attribute in the following way:
model = Model(CPLEX.Optimizer)
set_optimizer_attribute(model, "CPXPARAM_Threads", 4)
However, in the log I get the following:
Version identifier: 20.1.0.0 | 2020-11-10 | 9bedb6d68
CPXPARAM_Threads 1
...
Parallel mode: none, using 1 thread.
...
I don’t understand why the value of 4 that I provided turns into 1.
I would like to run CPLEX in parallel mode with more than one thread.
Thanks in advance.
Obs: I have CPLEX Optimization Studio v20.1 installed which I got through an academic license.
I am running Julia on version 1.7.3, JuMP on version 0.21.10 and CPLEX on version 0.7.8.
Perhaps CPLEX started automatically turning off multithreading with callbacks.
But yes, you cannot use threading if you have a callback. The underlying problem is that callbacks from Julia into C are not thread safe, so there is no way to implement this.