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
525 stars 92 forks source link

Segfault when solving large problems #128

Open StickBrush opened 4 years ago

StickBrush commented 4 years ago

Describe the bug When I try to solve a quite large problem (884,920 constraints, 4,501,731 variables, all binary), I get a silent crash on Windows and a SEGFAULT on Linux. It is not a memory problem (I have already tested the maximum problem that my computer refuses solving), and it actually seems to find a solution. The output is the following:

Clp0006I 30995  Obj 22732.359 Primal inf 2.3382576e-05 (19) Dual inf 1.1124731e+13 (2111)
Clp0006I 31382  Obj 22732.359 Primal inf 2.6899748e-05 (18) Dual inf 1.2349934e+13 (1664)
Clp0006I 31958  Obj 22732.359 Primal inf 6.5219138e-05 (46) Dual inf 2.8479124e+13 (2853)
Clp0006I 32009  Obj 22732.359
Clp0000I Optimal - objective value 22732.4
Clp0006I 0  Obj 22732.4
Clp0000I Optimal - objective value 22732.4
Clp0006I 0  Obj 22732.4
Clp0000I Optimal - objective value 22732.4
Coin0511I After Postsolve, objective 22732.4, infeasibilities - dual 0 (0), primal 0 (0)
Clp0032I Optimal objective 22732.4 - 0 iterations time 11875.162, Presolve 5.95, Idiot 11868.25

Starting MIP optimization
Option for timeMode changed from cpu to elapsed
threads was changed from 0 to 8
maxSavedSolutions was changed from 0 to 10
Continuous objective value is 22732.4 - 1.53 seconds
Cgl0004I processed model has 646911 rows, 4023430 columns (4023430 integer (4023430 of which binary)) and 12068130 elements
Coin3009W Conflict graph built in 7.768 seconds, density: 0.000%
Cbc0038I Initial state - 0 integers unsatisfied sum - 1.74305e-14
Cbc0038I Solution found of 22732.4
Cbc0038I Before mini branch and bound, 4023430 integers at bound fixed and 0 continuous
Cbc0038I Mini branch and bound did not improve solution (801.23 seconds)Cbc0038I After 801.50 seconds - Feasibility pump exiting with objective 
of 22732.4 - took 7.72 seconds
Cbc0012I Integer solution of 22732.4 found by feasibility pump after 0 iterations and 0 nodes (802.91 seconds)
[1]    5753 segmentation fault (core dumped)

To Reproduce It is complicated to upload the problem in LP format to GitHub, since it is roughly 1GB in size. This is its link in Google Drive.

Expected behavior I expected Python-MIP to solve the problem. It does find a solution, but Coin-OR crashes right afterwards.

Desktop (please complete the following information):

Additional context None.