scipopt / SCIP.jl

Julia interface to SCIP solver
MIT License
95 stars 24 forks source link

SCIP craches due to symbol lookup error #222

Closed mathieuLacroix closed 2 years ago

mathieuLacroix commented 2 years ago

Hi, I am using SCIP.jl for teaching this year. When solving a (small) MIP example, SCIP craches terminating julia. The error is:

presolving:
(round 1, fast)       0 del vars, 0 del conss, 0 add conss, 19 chg bounds, 0 chg sides, 0 chg coeffs, 0 upgd conss, 0 impls, 0 clqs
   (0.0s) probing cycle finished: starting next cycle
   (0.0s) symmetry computation started: requiring (bin +, int -, cont +), (fixed: bin -, int +, cont -)
julia: symbol lookup error: /home/mathieu/.julia/artifacts/57fdba491f69913899ed2d7f646b5d8b59c6945a/lib/libscip.so: undefined symbol: _ZN5bliss13AbstractGraph18find_automorphismsERNS_5StatsEPFvPvjPKjES3_

When I change the solver (I tried GLPK and HiGHS for instance), there is no error. Is there a way to correct this bug to keep using SCIP? Best, Mathieu

PS: Pkg status

  [9961bab8] Cbc v1.0.0
  [e2554f3b] Clp v1.0.0
  [60bf3e95] GLPK v1.0.0
  [86223c79] Graphs v1.6.0
  [87dc4568] HiGHS v1.1.0
  [7073ff75] IJulia v1.23.2
  [4076af6c] JuMP v0.23.0
  [b8f27783] MathOptInterface v1.1.0
  [82193955] SCIP v0.10.2

PPS: Code to reproduce the bug:

using JuMP, SCIP

Centrales = ["C1", "C2", "C3", "C4", "C5"]
PuissancesMax = [9000, 6000, 3000, 4000, 7000]
CoûtsFixes = [35000, 24000, 14000, 17000, 23000]
Villes = ["Villetaneuse", "Épinay", "Saint-Denis"]
Demandes = [3000, 6000, 5000]

Coûts = [
    80 100 120;
    20  30  40;
    40  60  80;
    70  90  40;
    30  30  50
];

function electricite(Centrales, Villes, PuissancesMax, CoûtsFixes, Demandes, Coûts)

    V = 1:length(Villes)
    C = 1:length(Centrales)

    m = Model(SCIP.Optimizer)

    @variable(m, x[C, V] >= 0)
    @variable(m, y[C], Bin)

    @objective(m, Min, sum(Coûts[i,j] * x[i,j] for i in C, j in V) +
        sum(CoûtsFixes[i] * y[i] for i in C))

    for i in C
        @constraint(m, sum(x[i,j] for j in V) <= PuissancesMax[i] * y[i])
    end

    for j in V
        @constraint(m, sum(x[i,j] for i in C) == Demandes[j])
    end

    optimize!(m)
    if termination_status(m) == JuMP.MathOptInterface.OPTIMAL
        println("Optimum = ", objective_value(m))
        x = value.(x)
        y = round.(Int, value.(y))
        print(x, y)
    else
        println("Pb irréalisable")
    end
end

electricite(Centrales, Villes, PuissancesMax, CoûtsFixes, Demandes, Coûts)    
matbesancon commented 2 years ago

Hi, thanks for the report, we will look into it

matbesancon commented 2 years ago

Can you check in your Manifest what is the version of SCIP_jll when you ran it. And whether you can downgrade the version to the previous one?

iSoron commented 2 years ago

@matbesancon I think this is the same issue as https://github.com/scipopt/SCIP.jl/issues/221#issuecomment-1057329556

mathieuLacroix commented 2 years ago

Hi,

iSoron is right, this is due to the incompatible version of bliss_jll installed by default. The solution given here works!

Thank you both for your answers. Best, Mathieu

matbesancon commented 2 years ago

I updated the bliss version in SCIP.jl for now to be sure we take the same one: https://github.com/scipopt/SCIP.jl/pull/223