Bug in JuMP

I am running into an unusual error if I specify a method (such as dual simplex, barrier) to use. The solver finds a solution but then I get an error message and Julia exits.

The code below reproduces the error. Is this error coming from JuMP or Cbc?

using JuMP, Cbc

a = rand(10:55,20)
b = rand(10:25,20)
e = rand(10:20,20)

function err_model(a,b,e)
    model = Model(Cbc.Optimizer)
    set_optimizer_attribute(model,"solve" , "dualSimplex")   # This line is the source of the error
    @variable(model, x[1:20],Bin)
    @objective(model,Min,sum(x[i]*e[i] for i=1:20))
    @constraint(model,sum(x[i]*a[i] -b[i] for i=1:20) >=0)
    optimize!(model)
    return value.(x)
end
    err_model(a,b,e)

Result - Optimal solution found

Objective value:                95.00000000
Enumerated nodes:               0
Total iterations:               3
Time (CPU seconds):             1.47
Time (Wallclock seconds):       1.46

Presolve 0 (-1) rows, 0 (-20) columns and 0 (-20) elements
Optimal - objective value 95
After Postsolve, objective 95, infeasibilities - dual 0 (0), primal 0 (0)
Optimal objective 95 - 0 iterations time 0.032, Presolve 0.02

Please submit a bug report with steps to reproduce this fault, and any error messages that follow (in their entirety). Thanks.
Exception: EXCEPTION_ACCESS_VIOLATION at 0x0 -- unknown function (ip: 0000000000000000)
in expression starting at untitled-d84a489a2d41c442762dacd4c1b93718:16
unknown function (ip: 0000000000000000)

It seems the segmentation fault is coming from Cbc, not from its Julia interface or its MathOptInterface implementation. I would raise the issue here: GitHub - coin-or/Cbc: COIN-OR Branch-and-Cut solver

1 Like

Thank you @blegat

I have raised an issue on coin-or github: Segmentation fault in Cbc · Issue #411 · coin-or/Cbc (github.com)