coin-or / python-mip

Python-MIP: collection of Python tools for the modeling and solution of Mixed-Integer Linear programs
Eclipse Public License 2.0
538 stars 95 forks source link

still logging when verbose=0 (on a recent version of CBC) #359

Open ckchow opened 1 year ago

ckchow commented 1 year ago

Describe the bug 0.15.0 with a new custom-built version of cbc still logs to stdout when verbose=0.

below are the build instructions:

bash coinbrew fetch Cbc@master --time "Oct 20 2023 0:00"     && bash coinbrew build Cbc --prefix=/usr/local --tests=none -j 8 --no-third-party --disable-cbc-parallel

To Reproduce Build a version of the above and solve any model with model.verbose = 0

Expected behavior No logs should be emitted.

Logs of the following form are emitted

Cbc0038I Initial state - 0 integers unsatisfied sum - 0
Cbc0038I Solution found of 30
Cbc0038I Before mini branch and bound, 47 integers at bound fixed and 0 continuous
Cbc0038I Mini branch and bound did not improve solution (0.00 seconds)
Cbc0038I After 0.00 seconds - Feasibility pump exiting with objective of 30 - took 0.00 seconds
Cbc0012I Integer solution of 30 found by feasibility pump after 0 iterations and 0 nodes (0.00 seconds)
Cbc0001I Search completed - best objective 30, took 0 iterations and 0 nodes (0.00 seconds)
Cbc0035I Maximum depth 0, 0 variables fixed on reduced cost

Desktop (please complete the following information):

Additional context I can confirm that the same code does not emit logs when I use a version of cbc like

./coinbrew fetch Cbc@master --time "Oct 24 2021 0:00"
./coinbrew build Cbc