Skip to content

Update with v12.0.0 libraries #27

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

Merged
merged 10 commits into from
Nov 12, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 15 additions & 15 deletions Artifacts.toml
Original file line number Diff line number Diff line change
@@ -1,40 +1,40 @@
[[Gurobi]]
git-tree-sha1 = "0edbadd2721b9fc45e48158015af672c7fe8698a"
git-tree-sha1 = "c12ed87f704f6143cfac6977f14b6e192b9a1be3"
arch = "x86_64"
os = "linux"

[[Gurobi.download]]
sha256 = "ac41673f45fa177a0f2e10da6843b4c6c453ab924d7ae908669ddbf60a90e1cf"
url = "https://anaconda.org/Gurobi/gurobi/11.0.3/download/linux-64/gurobi-11.0.3-py311_0.tar.bz2"
sha256 = "9ee0dc92f05d71ff119e1095bb7f85cfdc48e1838ac528b7986734e361ec4c70"
url = "https://anaconda.org/Gurobi/gurobi/12.0.0/download/linux-64/gurobi-12.0.0-py311_0.tar.bz2"
[[Gurobi]]
git-tree-sha1 = "6f77c3577547830a6750396c26f466fe422b2dcf"
git-tree-sha1 = "4fbb888b4fef38cb20a89bc30cfe80e237ddc022"
arch = "aarch64"
os = "linux"

[[Gurobi.download]]
sha256 = "7c2bdd94a79cec28a222f0e558c3ea5ee44439e8b75c5fd9d748c9410457b213"
url = "https://anaconda.org/Gurobi/gurobi/11.0.3/download/linux-aarch64/gurobi-11.0.3-py311_0.tar.bz2"
sha256 = "0aef0f5ff3cd070c2d19971ddc46e145f3be138d99c46164c6b3f4caefeca1d5"
url = "https://anaconda.org/Gurobi/gurobi/12.0.0/download/linux-aarch64/gurobi-12.0.0-py311_0.tar.bz2"
[[Gurobi]]
git-tree-sha1 = "c8b5dda8d738ea893863c21a2a211689376e6081"
git-tree-sha1 = "3cf43492d8dd8ca1b56f7586337aa2cef46e88b0"
arch = "x86_64"
os = "macos"

[[Gurobi.download]]
sha256 = "d93292c26293490d3d843d679c69c4b4b03afe2297791412b71e33f691627e6e"
url = "https://anaconda.org/Gurobi/gurobi/11.0.3/download/osx-64/gurobi-11.0.3-py311_0.tar.bz2"
sha256 = "1a7bdd55ee6672c8e03b5e850ce80320213634cd011ddc6e66fce9ec73813457"
url = "https://anaconda.org/Gurobi/gurobi/12.0.0/download/osx-64/gurobi-12.0.0-py311_0.tar.bz2"
[[Gurobi]]
git-tree-sha1 = "4e272e7a93e64f059eb513cca7024d4d733579f0"
git-tree-sha1 = "d69be48c7cfd9757edf4e5c526dc21fbfbbfeca5"
arch = "aarch64"
os = "macos"

[[Gurobi.download]]
sha256 = "4bcecbcc3e3326594304a0adaa55a95d5e654686782f7a37250457cf5c0c74d2"
url = "https://anaconda.org/Gurobi/gurobi/11.0.3/download/osx-arm64/gurobi-11.0.3-py311_0.tar.bz2"
sha256 = "26e5e2dba36b555baba848155ec9030b9567d0822df8c1bff18f2cfb8d24998a"
url = "https://anaconda.org/Gurobi/gurobi/12.0.0/download/osx-arm64/gurobi-12.0.0-py311_0.tar.bz2"
[[Gurobi]]
git-tree-sha1 = "76c77f6de91d7cca8311906d79cddf42b2ce6e65"
git-tree-sha1 = "b021a044a0a882f1179239684d144d58f37324ed"
arch = "x86_64"
os = "windows"

[[Gurobi.download]]
sha256 = "4e2cae98498198ea33757cb3a5a803fc4239374a7b2391ae0bea582f98332c7c"
url = "https://anaconda.org/Gurobi/gurobi/11.0.3/download/win-64/gurobi-11.0.3-py311_0.tar.bz2"
sha256 = "88d11f8d6a5a27db7507c7e2ca043a88b99d9e8734e8819bb4d1cc0dc0fa1963"
url = "https://anaconda.org/Gurobi/gurobi/12.0.0/download/win-64/gurobi-12.0.0-py311_0.tar.bz2"
2 changes: 1 addition & 1 deletion Project.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name = "Gurobi_jll"
uuid = "c018c7e6-a5b0-4aea-8f80-9c1ef9991411"
authors = ["odow <o.dowson@gmail.com>"]
version = "11.0.3"
version = "12.0.0"

[deps]
Artifacts = "56f22d72-fd6d-98f1-02f0-08ddc0907c33"
Expand Down
15 changes: 4 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ you accept the terms of this agreement.

A copy of the license agreement is stored at `share/doc/gurobi/EULA.pdf` in the
installed artifact. Copies of the licenses of third-party software used in the
Gurobi libraries are provided in `share/doc/gurobi/refman/copyright_notices_for_3rd_.html`
in the installed artifact, which is located at `Gurobi_jll.artifact_dir`.
Gurobi libraries are provided in `info/licenses/thirdparty` in the installed
artifact, which is located at `Gurobi_jll.artifact_dir`.

The underlying solver is a closed-source commercial product for which you must
[purchase a license](https://www.gurobi.com).
Expand All @@ -43,13 +43,6 @@ The code bindings within this package are autogenerated from the following
* `ExecutableProduct`: `gurobi_cl`
* `ExecutableProduct`: `grbgetkey`

## Documentationn
## Documentation

Use `Gurobi_jll.open_documentation()` to open a local copy of the Gurobi
documentation in your browser.

```julia
julia> import Gurobi_jll

julia> Gurobi_jll.open_documentation()
```
Visit https://docs.gurobi.com/ for the documentation of Gurobi Optimizer.
27 changes: 0 additions & 27 deletions src/Gurobi_jll.jl
Original file line number Diff line number Diff line change
Expand Up @@ -14,31 +14,4 @@ JLLWrappers.@generate_main_file_header("Gurobi")

JLLWrappers.@generate_main_file("Gurobi", UUID("c018c7e6-a5b0-4aea-8f80-9c1ef9991411"))

function get_documentation_path()
path = @static if Sys.iswindows()
joinpath("Doc", "Gurobi", "refman", "index.html")
else
joinpath("share", "doc", "gurobi", "refman", "index.html")
end
return joinpath(artifact_dir, path)
end

function _browser_command(path::String)
@static if Sys.isapple()
return `open $path`
elseif Sys.iswindows()
return `cmd /c start $path`
else
@assert Sys.islinux()
return `xdg-open $path`
end
end

"""
open_documentation()

Open a local copy of the Gurobi documentation in your browser.
"""
open_documentation() = run(_browser_command(get_documentation_path()))

end # module Gurobi_jll
4 changes: 2 additions & 2 deletions src/wrappers/aarch64-apple-darwin.jl
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ export gurobi_cl, grbgetkey, libgurobi

JLLWrappers.@generate_wrapper_header("Gurobi")

JLLWrappers.@declare_library_product(libgurobi, "@rpath/libgurobi110.dylib")
JLLWrappers.@declare_library_product(libgurobi, "@rpath/libgurobi120.dylib")

JLLWrappers.@declare_executable_product(gurobi_cl)

Expand All @@ -17,7 +17,7 @@ function __init__()
JLLWrappers.@generate_init_header()
JLLWrappers.@init_library_product(
libgurobi,
"lib/libgurobi110.dylib",
"lib/libgurobi120.dylib",
RTLD_LAZY | RTLD_DEEPBIND,
)
JLLWrappers.@init_executable_product(gurobi_cl, "bin/gurobi_cl")
Expand Down
4 changes: 2 additions & 2 deletions src/wrappers/aarch64-linux-gnu.jl
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ export gurobi_cl, grbgetkey, libgurobi

JLLWrappers.@generate_wrapper_header("Gurobi")

JLLWrappers.@declare_library_product(libgurobi, "libgurobi110.so")
JLLWrappers.@declare_library_product(libgurobi, "libgurobi120.so")

JLLWrappers.@declare_executable_product(gurobi_cl)

Expand All @@ -17,7 +17,7 @@ function __init__()
JLLWrappers.@generate_init_header()
JLLWrappers.@init_library_product(
libgurobi,
"lib/libgurobi110.so",
"lib/libgurobi120.so",
RTLD_LAZY | RTLD_DEEPBIND,
)
JLLWrappers.@init_executable_product(gurobi_cl, "bin/gurobi_cl")
Expand Down
6 changes: 3 additions & 3 deletions src/wrappers/x86_64-apple-darwin.jl
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ export gurobi_cl, grbgetkey, libgurobi

JLLWrappers.@generate_wrapper_header("Gurobi")

JLLWrappers.@declare_library_product(libgurobi, "@rpath/libgurobi110.dylib")
JLLWrappers.@declare_library_product(libgurobi, "@rpath/libgurobi120.dylib")

JLLWrappers.@declare_executable_product(gurobi_cl)

Expand All @@ -17,12 +17,12 @@ function __init__()
JLLWrappers.@generate_init_header()
# This is needed to work-around a permission issue on some intel macs.
# See Gurobi.jl#545 for details.
libgurobi_path = joinpath(artifact_dir, "lib", "libgurobi110.dylib")
libgurobi_path = joinpath(artifact_dir, "lib", "libgurobi120.dylib")
run(`codesign --remove-signature $libgurobi_path`)
# Back to the standard header
JLLWrappers.@init_library_product(
libgurobi,
"lib/libgurobi110.dylib",
"lib/libgurobi120.dylib",
RTLD_LAZY | RTLD_DEEPBIND,
)
JLLWrappers.@init_executable_product(gurobi_cl, "bin/gurobi_cl")
Expand Down
4 changes: 2 additions & 2 deletions src/wrappers/x86_64-linux-gnu.jl
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ export gurobi_cl, grbgetkey, libgurobi

JLLWrappers.@generate_wrapper_header("Gurobi")

JLLWrappers.@declare_library_product(libgurobi, "libgurobi110.so")
JLLWrappers.@declare_library_product(libgurobi, "libgurobi120.so")

JLLWrappers.@declare_executable_product(gurobi_cl)

Expand All @@ -17,7 +17,7 @@ function __init__()
JLLWrappers.@generate_init_header()
JLLWrappers.@init_library_product(
libgurobi,
"lib/libgurobi110.so",
"lib/libgurobi120.so",
RTLD_LAZY | RTLD_DEEPBIND,
)
JLLWrappers.@init_executable_product(gurobi_cl, "bin/gurobi_cl")
Expand Down
4 changes: 2 additions & 2 deletions src/wrappers/x86_64-w64-mingw32.jl
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ export gurobi_cl, grbgetkey, libgurobi

JLLWrappers.@generate_wrapper_header("Gurobi")

JLLWrappers.@declare_library_product(libgurobi, "gurobi110.dll")
JLLWrappers.@declare_library_product(libgurobi, "gurobi120.dll")

JLLWrappers.@declare_executable_product(gurobi_cl)

Expand All @@ -23,7 +23,7 @@ function __init__()
end
JLLWrappers.@init_library_product(
libgurobi,
"gurobi110.dll",
"gurobi120.dll",
RTLD_LAZY | RTLD_DEEPBIND,
)
JLLWrappers.@init_executable_product(gurobi_cl, "gurobi_cl.exe")
Expand Down
33 changes: 16 additions & 17 deletions test/runtests.jl
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,9 @@ end
technicalP::Ptr{Cint},
)::Cvoid
# Update these values when you update Artifacts.toml
@test majorP[] == 11
@test majorP[] == 12
@test minorP[] == 0
@test technicalP[] == 3
@test technicalP[] == 0
end

@testset "gurobi_cl" begin
Expand All @@ -42,7 +42,20 @@ end

@testset "license_error" begin
envptr = Ref{Ptr{Cvoid}}()
error = @ccall libgurobi.GRBemptyenv(envptr::Ptr{Ptr{Cvoid}})::Cint
# Temporary workaround for 12.0.0. This can be reverted to use GRBemptyenv for 12.0.1
# https://docs.gurobi.com/projects/optimizer/en/12.0/reference/releasenotes/knownbugs.html
#
# This does not affect usage in Gurobi.jl because it defines the function
#
# function GRBemptyenv(envP)
# return GRBemptyenvinternal(
# envP,
# GRB_VERSION_MAJOR,
# GRB_VERSION_MINOR,
# GRB_VERSION_TECHNICAL,
# )
# end
error = @ccall libgurobi.GRBemptyenvinternal(envptr::Ptr{Ptr{Cvoid}}, 12::Int, 0::Int, 0::Int)::Cint
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't understand how this passed your testing?

This is a blocker for adoption in Gurobi.jl:

https://github.com/jump-dev/Gurobi.jl/blob/52ca3d9292804e0eea8f7f4e1a55eb517898c600/src/MOI_wrapper/MOI_wrapper.jl#L107

Can't you just release 12.0.1 immediately? I don't see the point in releasing this version if it can't be used without touching undocumented internals.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

GRBemptyenv is exposed via a header define. The majority of users don't need the internal function.

Can you clarify why it's a blocker here? libgrb_api.jl has the necessary additions, picked up automatically from the header files:

https://github.com/jump-dev/Gurobi.jl/blob/52ca3d9292804e0eea8f7f4e1a55eb517898c600/src/gen120/libgrb_api.jl#L4645-L4652

We've been testing Gurobi.jl with 12 already, and this doesn't appear to be a problem.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah, I didn't look for the header change. So this is a problem only for this particular test in Gurobi_jll.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Correct

@test error == 0
error = @ccall libgurobi.GRBstartenv(envptr[]::Ptr{Cvoid})::Cint
@test error == 10009 || error == 0
Expand All @@ -51,17 +64,3 @@ end
@test startswith(unsafe_string(ret), "No Gurobi license found")
end
end

@testset "open_documentation" begin
@test isfile(Gurobi_jll.get_documentation_path())
if Sys.isapple()
@test Gurobi_jll._browser_command("abc") == `open abc`
Gurobi_jll.open_documentation()
elseif Sys.iswindows()
@test Gurobi_jll._browser_command("abc") == `cmd /c start abc`
Gurobi_jll.open_documentation()
else
@test Gurobi_jll._browser_command("abc") == `xdg-open abc`
# Gurobi_jll.open_documentation() # Errors in CI
end
end
Loading