-
Notifications
You must be signed in to change notification settings - Fork 34
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
GLPK binaries crashing #206
Comments
So you have an MPS file of the problem? Pretty hard to do anything about it unless it's semi-reproducible. |
I am running a loop of problems until one causes it again to grab the problem file. Will post it soon, sorry if I opened the issue too soon. |
I was avoiding doing this, but maybe we need to re-introduce the Lines 201 to 229 in 9816d0e
|
Yeah, the issue is that it is crashing the julia session. |
@odow I have the MOF file of the problem that cause the errors but it doesn't trigger the same error when solving after loading from file. I am not sure how to best reproduce this error :. |
Can GLPK write the in-memory MPS (with their own methods) ? |
I zipped the file to be able to upload it here. I extracted it with this code
JuMP won't load it though.
|
I hate MPS files with their weird formatting. Why is |
Okay, I remember why I removed the error stuff. We could add something like: mutable struct GLPKError <: Exception
message::String
end
function _glp_error_hook(::Ptr{Cvoid})
glp_free_env()
return throw(GLPKError("GLPK call failed. Objects are invalidated"))
end
function __init__()
glp_error_hook(@cfunction(_glp_error_hook, Cvoid, (Ptr{Cvoid},)), C_NULL)
return
end But the PDF has this unhelpful line: So if things go wrong, GLPK just terminates. You can intercept this termination and Therefore, there's no real way to gracefully exit from an error, so we might as well terminate immediately without the additional error handling. (MOI doesn't have a concept of "this call failed during a solve, so throw out the model.") We can fix issues like #207 by checking the input (#208), but we can't really fix assertion errors deep inside the simplex solve. |
@jd-lara I can't reproduce using your example. It needs to be reproducible with: using GLPK
P = glp_create_prob()
parm = glp_mpscp()
glp_init_mpscp(parm)
glp_read_mps(P, GLP_MPS_FILE, parm, "file.mps")
opt = glp_smcp()
glp_init_smcp(opt)
glp_simplex(P, opt)
glp_delete_prob(P) |
@odow I got the same crash on another problem instance and found the reason to be that the model that was provided contained NaNs. I don't know if this is intended behaviour (i.e., if the user is responsible for providing GLPK.jl with sensible input) or if some check should be performed to avoid the Julia session from crashing. |
That is a bit non-trivial, because checking all coefficients might be a very meaningful bottleneck for some applications. |
@joaquimg I solved my problem upstream (the NaN's came from a flaw in the problem generation in my particular application). Thought I'd share a possible source for the error here, however, if someone else encounters something similar. |
@darnstrom use HiGHS.jl instead. |
Closing as non-reproducible. Anyone encountering errors is encouraged to use HiGHS.jl instead. |
GLPK is crashing when certain infeasibilities are present but it does it non-deterministically. It looks like this is an issue with the binary.
The text was updated successfully, but these errors were encountered: