Comments (8)
Yeah I see this as well, I mostly use CPLEX but I think I've noticed it for other solvers as well. I have pretty much no idea how to work around this though, but @mlubin maybe has some thoughts?
from cplex.jl.
I've seen similar issues but haven't been following the state of signal
handling in julia.
CC @tkelman @vtjnash
On Jul 30, 2015 1:02 PM, "Joey Huchette" [email protected] wrote:
Yeah I see this as well, I mostly use CPLEX but I think I've noticed it for
other solvers as well. I have pretty much no idea how to work around this
though, but @mlubin https://github.com/mlubin maybe has some thoughts?
—
Reply to this email directly or view it on GitHub
#45 (comment).
from cplex.jl.
might need some sigint
fiddling? ref JuliaLang/julia#2622 and JuliaLang/julia#12309
from cplex.jl.
So just wrapping e.g.
stat = disable_sigint() do
@cpx_ccall(mipopt, Cint, (Ptr{Void}, Ptr{Void}), model.env.ptr, model.lp)
end
means CPLEX just keeps running after CTRL+C, which IMO is less desirable than a brutal segfault. Ideally we'd want to propagate the SIGINT to CPLEX so it can fail gracefully, but I'm not certain how to do that.
from cplex.jl.
The CPLEX callable library does provide a function to terminate it gracefully: http://www-01.ibm.com/support/knowledgecenter/SSSA5P_12.6.2/ilog.odms.cplex.help/refcallablelibrary/cpxapi/setterminate.html?cp=SSSA5P_12.6.2%2F2-8-0-30-2&lang=en
I wonder if it's possible to (temporarily) replace the default Julia signal handler with something that ccalls CPXsetterminate()
. Make sense?
from cplex.jl.
Looks like maybe we could do something like this:
try
@cpx_ccall(mipopt, Cint, (Ptr{Void}, Ptr{Void}), model.env.ptr, model.lp)
catch ex
if isa(ex, InterruptException)
@cpx_ccall(setterminate, Cint, (Ptr{Void}, Ptr{Void}), model.env.ptr, CPLEX_SIGINT)
else
rethrow(ex)
end
end
(ref http://stackoverflow.com/questions/20831290/julia-handle-keyboard-interrupt)
from cplex.jl.
I don't know what CPLEX_SIGINT
should be, though.
from cplex.jl.
In my not too exhaustive testing, ab71579 seems to give the expected behavior now. Reopen if I'm wrong!
from cplex.jl.
Related Issues (20)
- CPLEX.jl on Windows CPLEX 20.1 HOT 4
- Add support for CPLEX 22.1.0 HOT 5
- Slow solution of large LPs w/o direct model HOT 7
- Add CI for 22.1.0 HOT 1
- Support for cplex 22 HOT 9
- Still can not Pkg.build("CPLEX") HOT 5
- Unable to get node id in callback HOT 2
- CPLEX Error 3003: Not a mixed-integer problem when calling relative_gap on a pure LP model HOT 5
- Installing CPLEX.jl without cplex, as a placeholder / "empty wrapper" HOT 8
- Example on annotation is failing v22.1.0.0 HOT 6
- Parameter UpperCutoff not working HOT 2
- MOI.NUMERICAL_ERROR when solving quadratic problems HOT 6
- How to import cplex.jl on google colab HOT 4
- CPLEX 22.1.1
- CPLEX 22.1.1 is not yet supported on Linux HOT 5
- CPLEX does not work with version 22.1.1 HOT 14
- Large overhead time even using direct_model(CPLEX.Optimizer()) HOT 4
- Segmentation fault when adding a UserCut HOT 1
- Screenoutput in CPLEX version 22.1.1 HOT 5
- Installation problems with Apple M1 and CPLEX 22.1.1 HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from cplex.jl.