-
Notifications
You must be signed in to change notification settings - Fork 81
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
Use Gurobi_jll for binaries #545
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #545 +/- ##
==========================================
+ Coverage 80.46% 83.24% +2.78%
==========================================
Files 6 6
Lines 2928 3635 +707
==========================================
+ Hits 2356 3026 +670
- Misses 572 609 +37 ☔ View full report in Codecov by Sentry. |
Hmm. Something isn't right: (base) oscar@Oscars-MBP /tmp % julia --project=xpr
The latest version of Julia in the `1.10` channel is 1.10.2+0.x64.apple.darwin14. You currently have `1.10.1+0.x64.apple.darwin14` installed. Run:
juliaup update
to install Julia 1.10.2+0.x64.apple.darwin14 and update the `1.10` channel to that version.
_
_ _ _(_)_ | Documentation: https://docs.julialang.org
(_) | (_) (_) |
_ _ _| |_ __ _ | Type "?" for help, "]?" for Pkg help.
| | | | | | |/ _` | |
| | |_| | | | (_| | | Version 1.10.1 (2024-02-13)
_/ |\__'_|_|_|\__'_| | Official https://julialang.org/ release
|__/ |
(xpr) pkg> st
Status `/private/tmp/xpr/Project.toml` (empty project)
(xpr) pkg> add https://github.com/jump-dev/Xpress_jll.jl
Cloning git-repo `https://github.com/jump-dev/Xpress_jll.jl`
Updating git-repo `https://github.com/jump-dev/Xpress_jll.jl`
Resolving package versions...
Updating `/private/tmp/xpr/Project.toml`
[308bddfa] + Xpress_jll v9.3.0 `https://github.com/jump-dev/Xpress_jll.jl#master`
Updating `/private/tmp/xpr/Manifest.toml`
[692b3bcd] + JLLWrappers v1.5.0
[21216c6a] + Preferences v1.4.3
[308bddfa] + Xpress_jll v9.3.0 `https://github.com/jump-dev/Xpress_jll.jl#master`
[56f22d72] + Artifacts
[ade2ca70] + Dates
[8f399da3] + Libdl
[de0858da] + Printf
[fa267f1f] + TOML v1.0.3
[4ec0a83e] + Unicode
Precompiling project...
1 dependency successfully precompiled in 2 seconds. 2 already precompiled.
julia> import Xpress_jll
(xpr) pkg> st
Status `/private/tmp/xpr/Project.toml`
[308bddfa] Xpress_jll v9.3.0 `https://github.com/jump-dev/Xpress_jll.jl#master`
(xpr) pkg> add https://github.com/jump-dev/Gurobi_jll
Cloning git-repo `https://github.com/jump-dev/Gurobi_jll`
ERROR: failed to clone from https://github.com/jump-dev/Gurobi_jll, error: GitError(Code:ERROR, Class:HTTP, unexpected http status code: 404)
(xpr) pkg> add https://github.com/jump-dev/Gurobi_jll.jl
Updating git-repo `https://github.com/jump-dev/Gurobi_jll.jl`
Resolving package versions...
Updating `/private/tmp/xpr/Project.toml`
[c018c7e6] + Gurobi_jll v11.0.0 `https://github.com/jump-dev/Gurobi_jll.jl#master`
Updating `/private/tmp/xpr/Manifest.toml`
[c018c7e6] + Gurobi_jll v11.0.0 `https://github.com/jump-dev/Gurobi_jll.jl#master`
julia> import Gurobi_jll
zsh: killed julia --project=xpr
(base) oscar@Oscars-MBP /tmp % |
The issue appears to be
I wonder if it is because julia> using Libdl
julia> dlpath("libgurobi110.dylib")
"/Library/gurobi1100/macos_universal2/lib/libgurobi110.dylib"
|
Here's a user that this would help: https://discourse.julialang.org/t/how-to-use-gurobi-11-in-julia-launched-by-anaconda/111271/5?u=odow |
I can't reproduce your issue following your steps (julia 1.10.2 (arm64 version) on M2 Pro). It seems to run fine for me but I don't have Gurobi 11 installed. I know you've thought of this already, but have you definitely ruled out Rosetta incompatibilities? |
I stopped digging into this. I was waiting for Gurobi to get back to me on whether they're okay with this general approach. |
Can people try this locally? I'm still getting jump-dev/Gurobi_jll.jl#5 |
Still seems fine on an M2 at least. I can try on an Intel Mac. (Remote possibility: clear out |
Tested on M3 mac and linux (intel, glibc). No issues so far! |
Tested on an M1 and Linux, both worked! |
Yeah I've obviously borked something. I guess one question for @simonbowly and @torressa: should have we have this enabled by default? Xpress asked us not to: https://github.com/jump-dev/Xpress.jl?tab=readme-ov-file#use-with-xpress_jll But I would be in favor of enabling by default. It should mean that we just start having zero installation questions because everything will magically work. We should just add documentation on how to use grbgetkey to initialize a license. |
Sorry I missed this, travelling at the moment. Yes I'd say enable it by default if that's your preference. Whatever is most familiar/easy for JuMP users. I assume it will still be possible to manually build Gurobi.jl against a local install (say if someone needs a specific technical release not covered by Gurobi_jll)? |
Okay, great.
Yes, I'll sort some documentation for this. |
I still haven't gotten to the bottom of my local crash, although I verified that things work okay on a different machine... I propose that we take a look over the documentation, merge this, and then invite the community to test |
Ok, I finally got around to trying this on my Intel Mac and I can reproduce (so it's not just you!). |
@jd-foster does it work if you run If so, we can add this to the JLL |
Install with: |
Yes, that part also works, and installing with the |
Great. I'll tag a new release JuliaRegistries/General#106832 |
An update should do the trick: julia> using Gurobi
julia> Gurobi.libgurobi
"/Users/oscar/.julia/artifacts/c6002a5d5f15ef98c2821ea90c04c1ce087df37f/lib/libgurobi110.dylib"
(Gurobi) pkg> test
Testing Gurobi
Status `/private/var/folders/bg/dzq_hhvx1dxgy6gb5510pxj80000gn/T/jl_pAJTLT/Project.toml`
[2e9cd046] Gurobi v1.2.3 `~/.julia/dev/Gurobi`
[b8f27783] MathOptInterface v1.29.0
[c018c7e6] Gurobi_jll v11.0.2
...
Set parameter OutputFlag to value 1
Set parameter OutputFlag to value 1
Test Summary: | Pass Total Time
MathOptInterface Tests | 4438 4438 4m48.2s
Testing Gurobi tests passed |
@simonbowly any comments before I merge? |
No comments, looks good to me. |
See https://github.com/jump-dev/Gurobi_jll.jl
There are still a few unresolved issues:
Pkg.add
, or only if neededA potential first-pass is to use the binaries only on CI (or linux, to maintain compat).
Would fix issues like
https://discourse.julialang.org/t/how-to-use-gurobi-11-in-julia-launched-by-anaconda/111271/2
Closes #509