Skip to content

Instantly share code, notes, and snippets.

@rschwarz
Created January 11, 2017 18:04
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save rschwarz/efa15d9fc05b751cf49fe67d8136d969 to your computer and use it in GitHub Desktop.
Save rschwarz/efa15d9fc05b751cf49fe67d8136d969 to your computer and use it in GitHub Desktop.
Demo memory leaks in SCIP.jl
using JuMP
using Cbc
using SCIP
function leaky(solver, d)
m = Model(solver=solver)
@variable(m, x[1:d] >= 0)
solve(m)
end
function loopy(solver, d=20000, n=200)
for i=1:n
leaky(solver, d)
end
end
println("precompiling both")
cbc = CbcSolver()
scip = SCIPSolver("display/verblevel", 0)
loopy(cbc, 10, 1)
loopy(scip, 10, 1)
println("running Cbc")
@time loopy(cbc)
println("running SCIP")
@time loopy(scip)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment