-
Notifications
You must be signed in to change notification settings - Fork 3
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
Julia crashes using [email protected] #30
Comments
This is very weird. You should not have been able to trigger the How did you update Gurobi_jll? Try: ] add Gurobi Gurobi_jll
] precompile Gurobi_jll
] precompile Gurobi Close Julia, then restart Julia. |
I think this is because you had Revise loaded when you updated the package, and it's managed to get things into a weird state. This doesn't seem like an issue in Gurobi_jll.jl. |
Any update? If not, I will close this issue. I don't think it's a problem with Gurobi_jll. |
I still encounter the issue, even if Revise is not loaded. I tried to build a MWE:
I put this into the file
After that, executing
However, after repeating the execution a few times, I always end up with a crashed Julia instance as described in the original post. Executing all of the above steps with |
Error 10009 is no license: https://www.gurobi.com/documentation/current/refman/error_codes.html You need to get a license for Gurobi 12 if you want to use Gurobi_jll@12. |
I get the same error using |
The problem might just be that our compute server is still running on version 11.0.2 while I am trying to use the binary of version 11.0.3 or even 12.0.0. It was not clear to me that there is no backwards compatability in this direction (whereas I can update the server and keep using the older binary). Sorry! |
In your test function you called a lower level function directly without checking the error code or message:
Either of the following would give you the full error:
These would both show the following error message if the issue is that the compute server is not up to date:
|
This is a good tip! It appears that the error code shown by my original code is always 10009, even if there is no problem with the license file. Using your proposed method works well. It turned out that the actual issue after updating the compute server was that I didn't wait long enough for the server to obtain a valid license from the WLS service. However, the reason for my code choice was that I need to modify some parameters before starting the environment:
Is there an other way to do that without using the lower level function |
I don't think Gurobi.jl has another way to pass configuration variables before starting an environment. There is a specific constructor for compute servers, but not for the cluster manager. The commonly used approach would be to have these parameters in a license file ( To set the parameters in the code rather than a license file: you can still take the approach you've used, but since you're calling the C API functions directly you must check for the error code and error message. These checks are done in the Gurobi.jl wrapper using a function using JuMP, Gurobi
model = Model()
function _check_ret(env, ret::Cint)
if ret != 0
msg = unsafe_string(GRBgeterrormsg(env))
throw(ErrorException("Gurobi Error $(ret): $(msg)"))
end
return
end
env = Gurobi.Env(started = false)
ret = Gurobi.GRBsetstrparam(env, "CSAppName", "some name")
_check_ret(env, ret)
ret = Gurobi.GRBsetstrparam(env, "CSManager", "some url")
_check_ret(env, ret)
ret = Gurobi.GRBsetintparam(env, "CSPriority", 10)
_check_ret(env, ret)
ret = Gurobi.GRBstartenv(env)
_check_ret(env, ret)
set_optimizer(model, () -> Gurobi.Optimizer(env))
optimize!(model)
finalize(backend(model).optimizer.model)
finalize(env) The parameters are obviously wrong, but you'll get a valid error message this way:
|
I opened jump-dev/Gurobi.jl#588 to propose a supported approach for setting these configuration parameters. |
Closing because the original issue seems resolved (please comment if not, and I will re-open), and it isn't a bug in Gurobi_jll. The |
After updating
Gurobi_jll
from version 11.0.2 to 11.0.3, the Julia instance crashes every time in a way that I can only quickly take a screenshot until the REPL is closed automatically. This is the information I could retain:I believe, the responsible line is
Solver.jl:82
, which containswhere
solver_env
is the previously created solver environment.When I updated the
Gurobi.jl
package, I got the following warnings:I am using a Windows computer, so the
x86_64-w64-mingw32
wrapper should be the one in question.@odow If I remember correctly, you don't use Windows. So please let me know, if I can provide any more details helping to solve the issue.
The text was updated successfully, but these errors were encountered: