Cbc icon indicating copy to clipboard operation
Cbc copied to clipboard

Crash when Solving Simple Unbounded Model

Open cherrywoods opened this issue 2 years ago • 0 comments

Hallo, when running Cbc on the following simple, unbounded model, the program crashes with malloc(): invalid next size (unsorted).

*SENSE:Minimize
NAME          MODEL
ROWS
 N  OBJ
COLUMNS
    X0000000  OBJ        1.000000000000e+00
RHS
BOUNDS
 FR BND       X0000000
ENDATA

I am running Cbc trough PuLP. It looks a lot like the issue is with CBC and not with PuLP (the input works just fine with Gurobi). Therefore, I am creating the issue here. The above model is the export PuLP creates. If it helps, here is my python code:

import pulp
lp = pulp.LpProblem()
x = pulp.LpVariable("x")
lp += 1.0 * x
lp.solve(pulp.GUROBI())  # works fine, returns -2
lp.solve(pulp.PULP_CBC_CMD(keepFiles=True))  # produces the above mode file, fails with some error due to maloc issue above

Of course, this is a trivial input. I used in some test code. It is also easy to handle from the outside. Still, trivial inputs may be useful to test if things are running fine and then this issue is confusing.

Best regards, David

cherrywoods avatar Sep 29 '22 16:09 cherrywoods