coin-or / Cbc

COIN-OR Branch-and-Cut solver

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

CBC hangs on Linux

bmatasar opened this issue · comments

I have a MPS model that is solved quickly by cbc on a MacOS machine but hangs on all 3 Linux machines that I tested.

The same system but with LI BOUND 0 to mark integer vars: fail2.mps.zip

Solving the system without the BOUNDS section succeeds but the variables are not integers anymore.

The Mac output is Cbc 2.10.8, while the linux output is 2.10.3 and more than two years old. Does the error occur with 2.10.8?

I installed it couple of days ago. The output of apt is:

$ sudo apt install coinor-cbc
Reading package lists... Done
Building dependency tree       
Reading state information... Done
coinor-cbc is already the newest version (2.10.3+repack1-1build1).
0 upgraded, 0 newly installed, 0 to remove and 28 not upgraded.

I will try to upgrade it and see what happens. The problem is I am not using it directly but from OR-Tools and it does not respect the timeout for this particular case.
If I try to solve it with cbc CLI, it blocks and it does not even get interrupted with Ctrl+C but at least if I give it a timeout, it stops.

Hi John,
thanks for your quick reply. I tried both files with 2.10.8 and I have got the same result. It sticks at the same iteration:

$ cbc fail3.mps 
Welcome to the CBC MILP Solver 
Version: 2.10.8 
Build Date: May  9 2022 

command line - cbc fail.mps (default strategy 1)
At line 9 NAME
At line 10 ROWS
At line 2309 COLUMNS
At line 7806 RHS
At line 8956 BOUNDS
At line 12039 ENDATA
Problem no_name has 2297 rows, 3082 columns and 8758 elements
Coin0008I no_name read with 0 errors
Continuous objective value is 0.112573 - 0.04 seconds
Cgl0003I 0 fixed, 2844 tightened bounds, 134 strengthened rows, 0 substitutions
Cgl0003I 0 fixed, 2037 tightened bounds, 134 strengthened rows, 0 substitutions
Cgl0003I 0 fixed, 1670 tightened bounds, 0 strengthened rows, 0 substitutions
Cgl0003I 0 fixed, 1384 tightened bounds, 0 strengthened rows, 0 substitutions
Cgl0003I 0 fixed, 1058 tightened bounds, 0 strengthened rows, 0 substitutions
Cgl0003I 0 fixed, 552 tightened bounds, 0 strengthened rows, 0 substitutions
Cgl0003I 0 fixed, 253 tightened bounds, 0 strengthened rows, 0 substitutions
Cgl0003I 0 fixed, 93 tightened bounds, 0 strengthened rows, 0 substitutions
Cgl0003I 0 fixed, 23 tightened bounds, 0 strengthened rows, 0 substitutions
Cgl0004I processed model has 1924 rows, 2929 columns (2929 integer (2843 of which binary)) and 11372 elements
Cbc0038I Initial state - 10 integers unsatisfied sum - 5
Cbc0038I Pass   1: suminf.    4.75000 (14) obj. 0.112574 iterations 175
Cbc0038I Pass   2: suminf.    4.75000 (14) obj. 0.112574 iterations 30
Cbc0038I Pass   3: suminf.    4.75000 (14) obj. 0.112574 iterations 29
Cbc0038I Pass   4: suminf.   14.11905 (57) obj. 12822.5 iterations 529
Cbc0038I Pass   5: suminf.   11.55626 (80) obj. 39881.8 iterations 241
Cbc0038I Pass   6: suminf.   11.04844 (109) obj. 70052.9 iterations 47
Cbc0038I Pass   7: suminf.   11.04150 (142) obj. 107042 iterations 91
Cbc0038I Pass   8: suminf.   14.57593 (180) obj. 356456 iterations 124
Cbc0038I Pass   9: suminf.   12.15696 (127) obj. 310233 iterations 147
Cbc0038I Pass  10: suminf.   12.15696 (127) obj. 310233 iterations 4
Cbc0038I Pass  11: suminf.   18.13950 (163) obj. 829076 iterations 111
Cbc0038I Pass  12: suminf.   17.68415 (170) obj. 829077 iterations 35
Cbc0038I Pass  13: suminf.   17.99665 (169) obj. 829076 iterations 8
Cbc0038I Pass  14: suminf.   25.96429 (112) obj. 3095.17 iterations 402
Cbc0038I Pass  15: suminf.   21.17719 (239) obj. 875675 iterations 271
Cbc0038I Pass  16: suminf.   19.64429 (298) obj. 908395 iterations 115
Cbc0038I Pass  17: suminf.   28.97523 (355) obj. 1.03914e+06 iterations 101
Cbc0038I Pass  18: suminf.   27.73815 (316) obj. 1.11266e+06 iterations 87
Cbc0038I Pass  19: suminf.   27.73815 (316) obj. 1.11266e+06 iterations 2
Cbc0038I Pass  20: suminf.   24.43512 (309) obj. 1.10893e+06 iterations 22
Cbc0038I Pass  21: suminf.   24.29227 (310) obj. 1.10893e+06 iterations 15
Cbc0038I Pass  22: suminf.   28.33042 (310) obj. 1.10604e+06 iterations 43
Cbc0038I Pass  23: suminf.   27.83042 (316) obj. 1.11266e+06 iterations 24
Cbc0038I Pass  24: suminf.   26.19405 (312) obj. 1.10893e+06 iterations 10
Cbc0038I Pass  25: suminf.   26.19405 (312) obj. 1.10893e+06 iterations 0
Cbc0038I Pass  26: suminf.   28.14292 (311) obj. 1.11266e+06 iterations 18
Cbc0038I Pass  27: suminf.   31.73214 (160) obj. 317797 iterations 402
Cbc0038I Pass  28: suminf.   25.36680 (287) obj. 1.01105e+06 iterations 339
Cbc0038I Pass  29: suminf.   25.36680 (287) obj. 1.01105e+06 iterations 8
Cbc0038I Pass  30: suminf.   29.13624 (287) obj. 1.00876e+06 iterations 73
Cbc0038I No solution found this major pass
Cbc0038I Before mini branch and bound, 2143 integers at bound fixed and 0 continuous
Cbc0038I Full problem 1924 rows 2929 columns, reduced to 683 rows 729 columns
Cbc0038I Mini branch and bound improved solution from 1.79769e+308 to 0.113906 (0.70 seconds)
Cbc0038I Round again with cutoff of 0.113764
Cbc0038I Reduced cost fixing fixed 1080 variables on major pass 2
Cbc0038I Pass  30: suminf.    4.75000 (14) obj. 0.112574 iterations 0
Cbc0038I Pass  31: suminf.    4.75000 (14) obj. 0.112574 iterations 342
Cbc0038I Pass  32: suminf.    4.75000 (14) obj. 0.113764 iterations 114
Cbc0038I Pass  33: suminf.    4.75000 (14) obj. 0.113764 iterations 61
Cbc0038I Pass  34: suminf.    4.75000 (14) obj. 0.113764 iterations 127
Cbc0038I Pass  35: suminf.    5.25000 (15) obj. 0.112574 iterations 148
Cbc0038I Pass  36: suminf.    4.75000 (14) obj. 0.112574 iterations 37
Cbc0038I Pass  37: suminf.    4.75000 (14) obj. 0.112574 iterations 160
Cbc0038I Pass  38: suminf.    4.75000 (14) obj. 0.113764 iterations 117
Cbc0038I Pass  39: suminf.    4.75000 (14) obj. 0.113764 iterations 116
Cbc0038I Pass  40: suminf.    4.75000 (14) obj. 0.112574 iterations 179
Cbc0038I Pass  41: suminf.    4.75000 (14) obj. 0.112574 iterations 17
Cbc0038I Pass  42: suminf.    4.75000 (14) obj. 0.112574 iterations 116
Cbc0038I Pass  43: suminf.    4.75000 (14) obj. 0.112574 iterations 6
^C^C

I can get the looping if I download binaries. It has taken me a few attempts to build a version that loops, as tiny variations in compilation make the code take a slightly different path. However I have now managed to build a bad executable and will look into it.

Should have fixed in stable and master. Very small change to ClpSolve.cpp if you can build from source.

I will try and thanks a lot! I hope I can put some effort in CBC to repay for your kindness

I tested it on 3 Linux machines with different Ubuntu versions and it works fine. I used coinbrew to build it, without any tweaking.
Thanks a lot!