Number of Threads affects MIP solution
AnsweredHi,
I am solving a MIP using Gurobi 9.5. There seems to be an issue that causes Gurobi to find a drastically different objective value when a certain number of threads is set. In particular, I got the following objective values for different thread counts:
-
The result for Threads=8 is certainly suspicious. Can you please post the log output you see when solving the model with 8 threads? Also, are you using the latest version of Gurobi (9.5.2)?
0 -
Eli,
The Gurobi version is 9.5.0, I unfortunately have no control over software updates at my institution, so switching to 9.5.2 on that machine isn't easily done.
Here is the log:
Gurobi 9.5.0 (win64) logging started Thu Jul 21 09:27:10 2022
Set parameter LogFile to value "gurobi_debug.log"
Read MPS format model from file it6.mps
Reading time = 0.05 seconds
minmax_output_bnf/: 840 rows, 899 columns, 3550 nonzeros
Set parameter NonConvex to value 2
Set parameter Threads to value 8
Gurobi Optimizer version 9.5.0 build v9.5.0rc5 (win64)
Thread count: 28 physical cores, 56 logical processors, using up to 8 threads
Optimize a model with 840 rows, 899 columns and 3550 nonzeros
Model fingerprint: 0x445e2538
Model has 45 quadratic constraints
Variable types: 434 continuous, 465 integer (465 binary)
Coefficient statistics:
Matrix range [1e-02, 1e+02]
QMatrix range [1e-02, 1e-02]
QLMatrix range [1e+00, 1e+02]
Objective range [1e+00, 1e+00]
Bounds range [3e-01, 5e+04]
RHS range [3e-03, 9e+01]
Presolve removed 150 rows and 150 columns
Presolve time: 0.03s
Presolved: 915 rows, 884 columns, 3875 nonzeros
Presolved model has 135 bilinear constraint(s)
Variable types: 419 continuous, 465 integer (465 binary)
Root relaxation: objective -9.366221e+01, 1063 iterations, 0.04 seconds (0.02 work units)
Nodes | Current Node | Objective Bounds | Work
Expl Unexpl | Obj Depth IntInf | Incumbent BestBd Gap | It/Node Time
0 0 -93.66221 0 224 - -93.66221 - - 0s
H 0 0 0.0123268 -93.66221 - - 0s
H 0 0 0.0031427 -93.66221 - - 0s
0 0 -93.66221 0 354 0.00314 -93.66221 - - 0s
0 0 -93.66221 0 370 0.00314 -93.66221 - - 0s
H 0 0 -0.0217499 -92.47724 - - 0s
0 0 -92.47508 0 354 -0.02175 -92.47508 - - 0s
0 0 -70.33434 0 357 -0.02175 -70.33434 - - 0s
0 0 -9.34311 0 149 -0.02175 -9.34311 - - 0s
0 0 -9.27170 0 147 -0.02175 -9.27170 - - 0s
0 0 -7.54211 0 153 -0.02175 -7.54211 - - 0s
0 0 -6.09764 0 153 -0.02175 -6.09764 - - 0s
0 0 -6.09764 0 152 -0.02175 -6.09764 - - 0s
0 0 -5.49716 0 153 -0.02175 -5.49716 - - 0s
0 0 -5.32572 0 154 -0.02175 -5.32572 - - 0s
0 0 -4.23841 0 155 -0.02175 -4.23841 - - 0s
0 0 -4.23841 0 154 -0.02175 -4.23841 - - 0s
0 0 -4.23841 0 154 -0.02175 -4.23841 - - 0s
0 0 -4.09206 0 150 -0.02175 -4.09206 - - 1s
0 0 -3.98261 0 152 -0.02175 -3.98261 - - 1s
0 0 -3.95741 0 150 -0.02175 -3.95741 - - 1s
0 0 -3.95741 0 154 -0.02175 -3.95741 - - 1s
0 0 -3.87786 0 150 -0.02175 -3.87786 - - 1s
0 0 -3.76887 0 150 -0.02175 -3.76887 - - 1s
0 0 -3.76887 0 325 -0.02175 -3.76887 - - 1s
0 0 -3.76887 0 163 -0.02175 -3.76887 - - 1s
0 0 -3.76887 0 163 -0.02175 -3.76887 - - 1s
0 0 -3.76887 0 164 -0.02175 -3.76887 - - 1s
0 0 -3.76887 0 166 -0.02175 -3.76887 - - 1s
0 0 -3.76887 0 168 -0.02175 -3.76887 - - 1s
0 0 -1.25973 0 166 -0.02175 -1.25973 5692% - 1s
0 0 -1.25973 0 164 -0.02175 -1.25973 5692% - 1s
0 0 -1.25973 0 168 -0.02175 -1.25973 5692% - 1s
0 0 -1.21637 0 166 -0.02175 -1.21637 5493% - 1s
0 0 -1.21632 0 166 -0.02175 -1.21632 5492% - 1s
0 0 -1.11653 0 166 -0.02175 -1.11653 5033% - 1s
0 0 -1.09918 0 165 -0.02175 -1.09918 4954% - 1s
0 0 -0.97465 0 165 -0.02175 -0.97465 4381% - 1s
0 0 -0.81027 0 160 -0.02175 -0.81027 3625% - 2s
0 0 -0.81027 0 161 -0.02175 -0.81027 3625% - 2s
0 0 -0.81027 0 161 -0.02175 -0.81027 3625% - 2s
0 0 -0.81027 0 161 -0.02175 -0.81027 3625% - 2s
0 0 -0.81027 0 161 -0.02175 -0.81027 3625% - 2s
0 0 -0.81027 0 161 -0.02175 -0.81027 3625% - 2s
0 0 -0.81027 0 161 -0.02175 -0.81027 3625% - 2s
0 2 -0.81027 0 161 -0.02175 -0.81027 3625% - 2s
Cutting planes:
Implied bound: 40
MIR: 19
RLT: 50
Relax-and-lift: 11
Explored 2820 nodes (17647 simplex iterations) in 2.98 seconds (1.29 work units)
Thread count was 8 (of 56 available processors)
Solution count 3: -0.0217499 0.00314266 0.0123268
Optimal solution found (tolerance 1.00e-04)
Best objective -2.174989470392e-02, best bound -2.174989470392e-02, gap 0.0000%0 -
Also see the forum post MIP bound is greater than reported incumbent solution and reported solution is suboptimal.
0 -
Thanks for posting the log file and for taking the time to report the issue. This inconsistency is caused by a bug that was fixed in Gurobi 9.5.2. Upgrading to the latest version of Gurobi should resolve the issue. Unfortunately, I'm not aware of any workarounds for Gurobi 9.5.0 that can avoid the issue (on this particular model, at least).
1 -
Ok, thanks for the help.
0
Please sign in to leave a comment.
Comments
5 comments