Closed seblabbe closed 6 years ago
This post on Gurobi list seems to propose a solution for silencing the output when using their Python interface, but it seems we use our own interface. So we need to find the solution.
The print occurs with
line 63 in the __init__
:
# Initializing the master Environment. This one is kept to be
# deallocated on __dealloc__
error = GRBloadenv(&self.env_master, NULL)
And self.set_verbosity(0)
arrives too late some lines below. This goes beyond my knowledge: how to set the GRB_INT_PAR_OUTPUTFLAG
or OutputFlag
(see gurubi_backend.pxd
) to 0 before the initialization of the master environment?
shorter is better
I checked but it's also beyond my knowledge.
Branch: u/dcoudert/25258_gurobi
Author: David Coudert
I have a fix !
The solution is to use GRBemptyenv to get empty environment, then set verbose mode and finally start environment, instead of directly calling GRBloadenv.
New commits:
9042687 | trac #25258: silent initialization |
Reviewer: Sébastien Labbé
Changed branch from u/dcoudert/25258_gurobi to 9042687
After installing Gurobi 8.0,
make ptestlong
gives:All of the failing tests looking like:
Or sometimes:
Component: linear programming
Author: David Coudert
Branch/Commit:
9042687
Reviewer: Sébastien Labbé
Issue created by migration from https://trac.sagemath.org/ticket/25258