Skip to content
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

Accept patch-level variation for GUROBI_HOME automatically #14157

Closed
jwnimmer-tri opened this issue Oct 2, 2020 · 9 comments
Closed

Accept patch-level variation for GUROBI_HOME automatically #14157

jwnimmer-tri opened this issue Oct 2, 2020 · 9 comments
Assignees
Labels
component: build system Bazel, CMake, dependencies, memory checkers, linters priority: low

Comments

@jwnimmer-tri
Copy link
Collaborator

As of today, Drake is hardcoded to use only Gurobi version 9.0.2 (when enabled), but not all users will be able to easily obtain that exact version match. The download link from Gurobi's website is currently for 9.0.3.

Because Gurobi is commercially licensed software, users will typically bring their own copy (we can't provide one -- though see #10804 for related), so therefore it is difficult for us to control which version they are bringing. The Gurobi website also tends to remove the download links for prior releases (especially patch releases), so it's not obvious how to obtain the exact revision that Drake wants. (The trick is to just edit the download URL.)

We're already taking GUROBI_HOME as input from the user at fetch-time to know which Gurobi to use. It would be nice if any matching patch-level release (9.0.x) could be provided without complaint. As it stands now, we see:

Could NOT find Gurobi: Found unsuitable version "9.0.3", but required is exact version "9.0.2" (found /opt/gurobi903/linux64/include)

\CC @hongkai-dai

@jwnimmer-tri
Copy link
Collaborator Author

This is conceptually easy, but a lot of boilerplate to wade through. The gurobi library's filename, packaged install location, etc. all incorporate the version number and are referred to in dozens of place by our CMake and Bazel integration alike.

@jwnimmer-tri
Copy link
Collaborator Author

Drake currently supports 9.5.1. Per here we can see that 9.5.2 is already available. The call to action here is a PR to Drake so that either 9.5.1 or 9.5.2 can be used for the same revision of Drake when building from source, without any code changes.

KyleFromKitware added a commit to KyleFromKitware/drake that referenced this issue Dec 14, 2022
CMake's find_package_handle_standard_args() supports searching
for an "exact" version containing only a major and minor version,
allowing any patch version to suffice.

Issue: RobotLocomotion#14157
mwoehlke-kitware added a commit to mwoehlke-kitware/drake that referenced this issue Dec 15, 2022
Remove logic that limits Gurobi to 9.5.1, in order to support 9.5.x at
any patch version. Update documentation accordingly.

Fixes: RobotLocomotion#14157

Co-authored-by: Kyle Edwards <kyle.edwards@kitware.com>
mwoehlke-kitware added a commit to mwoehlke-kitware/drake that referenced this issue Dec 19, 2022
Remove logic that limits Gurobi to 9.5.1 and add logic to search for any
available supported version, in order to support 9.5.x at any patch
version. Update documentation accordingly. Modify FindGurobi.cmake to
search for any patch version, not just one specific patch version.

Fixes: RobotLocomotion#14157

Co-authored-by: Kyle Edwards <kyle.edwards@kitware.com>
mwoehlke-kitware added a commit to mwoehlke-kitware/drake that referenced this issue Dec 19, 2022
Remove logic that limits Gurobi to 9.5.1 and add logic to search for any
available supported version, in order to support 9.5.x at any patch
version. Update documentation accordingly. Modify FindGurobi.cmake to
search for any patch version, not just one specific patch version.

Fixes: RobotLocomotion#14157

Co-authored-by: Kyle Edwards <kyle.edwards@kitware.com>
mwoehlke-kitware added a commit to mwoehlke-kitware/drake that referenced this issue Jan 4, 2023
Remove logic that limits Gurobi to 9.5.1 and add logic to search for any
available supported version, in order to support 9.5.x at any patch
version. Update documentation accordingly. Modify FindGurobi.cmake to
search for any patch version, not just one specific patch version.

Fixes: RobotLocomotion#14157

Co-authored-by: Kyle Edwards <kyle.edwards@kitware.com>
mwoehlke-kitware added a commit to mwoehlke-kitware/drake that referenced this issue Jan 6, 2023
Remove logic that limits Gurobi to 9.5.1 and add logic to search for any
available supported version, in order to support 9.5.x at any patch
version. Update documentation accordingly. Modify FindGurobi.cmake to
search for any patch version, not just one specific patch version.

Fixes: RobotLocomotion#14157

Co-authored-by: Kyle Edwards <kyle.edwards@kitware.com>
mwoehlke-kitware added a commit to mwoehlke-kitware/drake that referenced this issue Jan 9, 2023
Remove logic that limits Gurobi to 9.5.1 and add logic to search for any
available supported version, in order to support 9.5.x at any patch
version. Update documentation accordingly. Modify FindGurobi.cmake to
search for any patch version, not just one specific patch version.

Fixes: RobotLocomotion#14157

Co-authored-by: Kyle Edwards <kyle.edwards@kitware.com>
mwoehlke-kitware added a commit to mwoehlke-kitware/drake that referenced this issue Jan 9, 2023
Remove logic that limits Gurobi to 9.5.1 and add logic to search for any
available supported version, in order to support 9.5.x at any patch
version. Update documentation accordingly. Modify FindGurobi.cmake to
search for any patch version, not just one specific patch version.

Fixes: RobotLocomotion#14157

Co-authored-by: Kyle Edwards <kyle.edwards@kitware.com>
mwoehlke-kitware added a commit to mwoehlke-kitware/drake that referenced this issue Jan 9, 2023
Remove logic that limits Gurobi to 9.5.1 and add logic to search for any
available supported version, in order to support 9.5.x at any patch
version. Update documentation accordingly. Modify FindGurobi.cmake to
search for any patch version, not just one specific patch version.

Fixes: RobotLocomotion#14157

Co-authored-by: Kyle Edwards <kyle.edwards@kitware.com>
mwoehlke-kitware added a commit to mwoehlke-kitware/drake that referenced this issue Jan 10, 2023
Remove logic that limits Gurobi to 9.5.1 and add logic to search for any
available supported version, in order to support 9.5.x at any patch
version. Update documentation accordingly. Modify FindGurobi.cmake to
search for any patch version, not just one specific patch version.

Fixes: RobotLocomotion#14157

Co-authored-by: Kyle Edwards <kyle.edwards@kitware.com>
@jwnimmer-tri
Copy link
Collaborator Author

+@BetsyMcPhail as a final item to prove that this patch works, please upgrade our CI images to use Gurobi 9.5.2 instead of Gurobi 9.5.1.

@BetsyMcPhail
Copy link
Contributor

BetsyMcPhail commented Jan 11, 2023

For reference, #16604 updated Gurobi to 9.5.1. The checklist from that issue is below:

  • Update required version in Drake itself should be covered by changes in this PR
  • Update Gurobi cask for drake_visualizer, no longer supported on mac although the repo is called homebrew-director, it is used in drake in general (https://github.com/RobotLocomotion/homebrew-director/blob/master/Casks/gurobi.rb)
  • Update Drake CI scripts
  • Update license server I am unsure if we need to regenerate the license for 9.5.2 vs. 9.5.1? Not needed
  • Update CI provisioned Mac and Linux images

@BetsyMcPhail
Copy link
Contributor

@svenevs and @williamjallen when you update the Linux AMIs for #18617 next week, do you want to also update the Gurobi version on the provisioned images?

@williamjallen
Copy link
Contributor

That seems reasonable to me. I was going to shadow Stephen on Monday anyway, and needed to ask him about updating Gurobi at the same time so we can knock out two things at once.

@BetsyMcPhail
Copy link
Contributor

The last step here is to update the Gurobi cask and the Mac images. @svenevs and @williamjallen can you please work together on this.

@svenevs
Copy link
Contributor

svenevs commented Jan 23, 2023

Gurobi cask is updated and live at robotlocomotion/director. The x86 monterey image has been updated to include gurobi 9.5.2. Orka (arm64) update is planned for Wednesday.

@BetsyMcPhail
Copy link
Contributor

Orka has also been updated. Closing this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component: build system Bazel, CMake, dependencies, memory checkers, linters priority: low
Development

No branches or pull requests

6 participants