1

The problem pertains to JuMP, an optimization package for Julia. I realize this problem is likely specific to my machine; however, I have tried many of the obvious remedies with no luck.

When I run a JuMP model using optimize!(), I cannot interrupt the execution using ctrl+C. When I press ctrl+C, the REPL completely ignores the input. This is true regardless of solver. I have experienced this with Gurobi, Cbc, and GLPK. While I'm uncertain about Cbc and GLPK, I know that support for graceful interruption is supposed to be implemented in Gurobi.jl (https://github.com/jump-dev/Gurobi.jl/pull/349). Meanwhile, other julia code can be interrupted with ctrl+C using the same REPL (and even the same .jl file).

What I can try to fix this?

desertnaut
  • 57,590
  • 26
  • 140
  • 166

1 Answers1

0

Terminating external C code in Julia is difficult. GLPK and Cbc do not support it. Gurobi does, but not for LPs, and only at particular times. It may ignore the interrupt, if, for example, it is still solving the root node LP of a MIP.

Oscar Dowson
  • 2,395
  • 1
  • 5
  • 13
  • Thank you for your feedback, Oscar. I have noticed that I cannot interrupt convex MI-QCQPs (mixed-integer quadratically constrained quadratic programs). Is this the expected behavior of Gurobi.jl, or do you suspect there is something about my machine that makes this the case? – PippyEnjoyer Apr 01 '22 at 22:54
  • Does it work for a MIP? Are you on the latest version? – Oscar Dowson Apr 03 '22 at 02:01
  • I made a MILP to check. I also cannot interrupt the MILP using ctrl+C. I am on the latest versions of JuMP, Gurobi.jl, and Gurobi. I am using Julia version 1.7.0. – PippyEnjoyer Apr 07 '22 at 19:56