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

GurobiSolver acquires a local license at most once per process #19713

Merged

Conversation

RussTedrake
Copy link
Contributor

@RussTedrake RussTedrake commented Jun 30, 2023

Iff the contents of the file identified in GRB_LICENSE_FILE contain the magic keywork HOSTID, then any license that is obtained will never be destroyed.

Resolves #19657.


This change is Reviewable

Copy link
Contributor Author

@RussTedrake RussTedrake left a comment

Choose a reason for hiding this comment

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

@jwnimmer-tri ... i could use some advice on this one.

Reviewable status: 2 unresolved discussions, needs platform reviewer assigned, needs at least two assigned reviewers, missing label for release notes (waiting on @RussTedrake)


solvers/gurobi_solver.cc line 1098 at r1 (raw file):

hold on to the license beyond the lifetime of the GurobiSolver iff we can
confirm that the license is associated with the local host. */
std::shared_ptr<GurobiSolver::License> local_host_gurobi_license{};

i'm not sure if this is legal. i read over https://drake.mit.edu/styleguide/cppguide.html#Static_and_Global_Variables and know that the GetScopedSingleton holds the weak_ptr with never_destroyed. is that enough?


solvers/test/gurobi_solver_grb_license_file_test.cc line 84 at r1 (raw file):

TEST_F(GrbLicenseFileTest, LocalLicenseFile) {

This was my first idea for the testing strategy. But it does not work for two reasons:

  1. the license file acquired by an earlier test will continue to be used here.
  2. if I do get gurobi to use this license file, then Solve will throw (since it's not a valid license).

Might you have any suggestions?

@jwnimmer-tri jwnimmer-tri self-assigned this Jun 30, 2023
Copy link
Collaborator

@jwnimmer-tri jwnimmer-tri left a comment

Choose a reason for hiding this comment

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

Reviewed 1 of 4 files at r1, all commit messages.
Reviewable status: 5 unresolved discussions, LGTM missing from assignee jwnimmer-tri(platform), needs at least two assigned reviewers, missing label for release notes (waiting on @RussTedrake)


-- commits line 2 at r1:
BTW There might be a more direct phrasing for users to grok. Maybe:

Suggestion:

GurobiSolver acquires a license at most once per process

-- commits line 4 at r1:
typo

Suggestion:

contains

solvers/BUILD.bazel line 1247 at r1 (raw file):

        ":gurobi_solver",
        ":mathematical_program",
        "//common:temp_directory",

nit Oops, I should have reverted this line as well in my patch.


solvers/gurobi_solver.h line 174 at r1 (raw file):

   * license server).
   * @return A shared pointer to a license environment that will stay valid as
   * long as any shared_ptr returned by this function is alive. If Gurobi not

BTW This unearthed a lingering typo.

Suggestion:

If Gurobi is not

solvers/gurobi_solver.cc line 1098 at r1 (raw file):

Previously, RussTedrake (Russ Tedrake) wrote…

i'm not sure if this is legal. i read over https://drake.mit.edu/styleguide/cppguide.html#Static_and_Global_Variables and know that the GetScopedSingleton holds the weak_ptr with never_destroyed. is that enough?

RussTedrake#51


solvers/test/gurobi_solver_grb_license_file_test.cc line 84 at r1 (raw file):

Previously, RussTedrake (Russ Tedrake) wrote…

This was my first idea for the testing strategy. But it does not work for two reasons:

  1. the license file acquired by an earlier test will continue to be used here.
  2. if I do get gurobi to use this license file, then Solve will throw (since it's not a valid license).

Might you have any suggestions?

RussTedrake#51

Copy link
Collaborator

@jwnimmer-tri jwnimmer-tri left a comment

Choose a reason for hiding this comment

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

Reviewable status: 5 unresolved discussions, LGTM missing from assignee jwnimmer-tri(platform), needs at least two assigned reviewers, missing label for release notes (waiting on @RussTedrake)


solvers/test/gurobi_solver_grb_license_file_test.cc line 84 at r1 (raw file):
Ah, I'd also meant to explicitly discuss the thought process here...

When unit testing process-wide state (static variables), generally the best approach is to write a tiny C++ program that interacts with the state and then a Python driver that repeatedly launches the C++ program, so that each test is obviously guaranteed to be independent.

  1. the license file acquired by an earlier test will continue to be used here.

Hmm. Everything passes for me, but I wonder if the GrbLicenseFileUnset test case will fail now for users with host-local license. If so, then perhaps these two test cases should probably be ported to live in Python also.

@RussTedrake RussTedrake force-pushed the gurobi_license_never_destroyed branch 3 times, most recently from fe4e54d to 59ff383 Compare July 2, 2023 13:36
Copy link
Contributor Author

@RussTedrake RussTedrake left a comment

Choose a reason for hiding this comment

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

Now that this is ready, what would you like for our review strategy? Can you and I play cross-platform review? Should we seek any more?

Reviewable status: 2 unresolved discussions, LGTM missing from assignee jwnimmer-tri(platform), needs at least two assigned reviewers, missing label for release notes (waiting on @RussTedrake)


-- commits line 2 at r1:

Previously, jwnimmer-tri (Jeremy Nimmer) wrote…

BTW There might be a more direct phrasing for users to grok. Maybe:

but that is only true for local licenses. I started like that, but word-smithed it down to something that was true and fit in the github character limit.


-- commits line 4 at r1:

Previously, jwnimmer-tri (Jeremy Nimmer) wrote…

typo

Done,.


solvers/BUILD.bazel line 1247 at r1 (raw file):

Previously, jwnimmer-tri (Jeremy Nimmer) wrote…

nit Oops, I should have reverted this line as well in my patch.

Done.


solvers/gurobi_solver.h line 174 at r1 (raw file):

Previously, jwnimmer-tri (Jeremy Nimmer) wrote…

BTW This unearthed a lingering typo.

Done.


solvers/gurobi_solver.cc line 1098 at r1 (raw file):

Previously, jwnimmer-tri (Jeremy Nimmer) wrote…

RussTedrake#51

Accepted. Thanks!


solvers/test/gurobi_solver_grb_license_file_test.cc line 84 at r1 (raw file):

Previously, jwnimmer-tri (Jeremy Nimmer) wrote…

Ah, I'd also meant to explicitly discuss the thought process here...

When unit testing process-wide state (static variables), generally the best approach is to write a tiny C++ program that interacts with the state and then a Python driver that repeatedly launches the C++ program, so that each test is obviously guaranteed to be independent.

  1. the license file acquired by an earlier test will continue to be used here.

Hmm. Everything passes for me, but I wonder if the GrbLicenseFileUnset test case will fail now for users with host-local license. If so, then perhaps these two test cases should probably be ported to live in Python also.

Makes sense, and the tests all look good. Thanks!

@RussTedrake RussTedrake marked this pull request as ready for review July 2, 2023 13:37
@RussTedrake RussTedrake added the release notes: feature This pull request contains a new feature label Jul 2, 2023
@RussTedrake
Copy link
Contributor Author

fwiw --
Running bazel test --test_output=streamed //common/trajectories:bezier_curve_test now results in:

Using drake_cc_googletest_main.cc

[==========] Running 9 tests from 2 test suites.
[----------] Global test environment set-up.
[----------] 6 tests from BezierCurveTest
[ RUN      ] BezierCurveTest.DefaultConstructor
[       OK ] BezierCurveTest.DefaultConstructor (0 ms)
[ RUN      ] BezierCurveTest.Constant
[       OK ] BezierCurveTest.Constant (0 ms)
[ RUN      ] BezierCurveTest.Default
[       OK ] BezierCurveTest.Default (0 ms)
[ RUN      ] BezierCurveTest.MoveConstructor
[       OK ] BezierCurveTest.MoveConstructor (0 ms)
[ RUN      ] BezierCurveTest.Linear
Set parameter Username
Academic license - for non-commercial use only - expires 2024-06-23
[       OK ] BezierCurveTest.Linear (46 ms)
[ RUN      ] BezierCurveTest.Quadratic
[       OK ] BezierCurveTest.Quadratic (40 ms)
[----------] 6 tests from BezierCurveTest (87 ms total)

[----------] 3 tests from BezierCurve
[ RUN      ] BezierCurve.Clone
[       OK ] BezierCurve.Clone (0 ms)
[ RUN      ] BezierCurve.ScalarTypes
[       OK ] BezierCurve.ScalarTypes (0 ms)
[ RUN      ] BezierCurve.GetExpressionLinear
[       OK ] BezierCurve.GetExpressionLinear (0 ms)
[----------] 3 tests from BezierCurve (0 ms total)

[----------] Global test environment tear-down
[==========] 9 tests from 2 test suites ran. (87 ms total)
[  PASSED  ] 9 tests.

before it was

[==========] Running 9 tests from 2 test suites.
[----------] Global test environment set-up.
[----------] 6 tests from BezierCurveTest
[ RUN      ] BezierCurveTest.DefaultConstructor
[       OK ] BezierCurveTest.DefaultConstructor (0 ms)
[ RUN      ] BezierCurveTest.Constant
[       OK ] BezierCurveTest.Constant (0 ms)
[ RUN      ] BezierCurveTest.Default
[       OK ] BezierCurveTest.Default (0 ms)
[ RUN      ] BezierCurveTest.MoveConstructor
[       OK ] BezierCurveTest.MoveConstructor (0 ms)
[ RUN      ] BezierCurveTest.Linear
Set parameter Username
Academic license - for non-commercial use only - expires 2024-06-23
[       OK ] BezierCurveTest.Linear (46 ms)
[ RUN      ] BezierCurveTest.Quadratic
[       OK ] BezierCurveTest.Quadratic (40 ms)
[----------] 6 tests from BezierCurveTest (87 ms total)

[----------] 3 tests from BezierCurve
[ RUN      ] BezierCurve.Clone
[       OK ] BezierCurve.Clone (0 ms)
[ RUN      ] BezierCurve.ScalarTypes
[       OK ] BezierCurve.ScalarTypes (0 ms)
[ RUN      ] BezierCurve.GetExpressionLinear
[       OK ] BezierCurve.GetExpressionLinear (0 ms)
[----------] 3 tests from BezierCurve (0 ms total)

[----------] Global test environment tear-down
[==========] 9 tests from 2 test suites ran. (87 ms total)
[  PASSED  ] 9 tests.
Target //common/trajectories:bezier_curve_test up-to-date:
  bazel-bin/common/trajectories/bezier_curve_test
INFO: Elapsed time: 19.348s, Critical Path: 17.98s
INFO: 10 processes: 3 internal, 7 linux-sandbox.
INFO: Build completed successfully, 10 total actions

Executed 1 out of 1 test: 1 test passes.
russt@Puget-179850-01:~/drake$ bazel test --test_output=streamed //common/trajectories:bezier_curve_testgit check^C
russt@Puget-179850-01:~/drake$ git checkout master
Switched to branch 'master'
Your branch is up to date with 'origin/master'.
russt@Puget-179850-01:~/drake$ git pull
Already up to date.
russt@Puget-179850-01:~/drake$ bazel test --test_output=streamed //common/trajectories:bezier_curve_test
WARNING: Streamed test output requested. All tests will be run locally, without sharding, one at a time
INFO: Analyzed target //common/trajectories:bezier_curve_test (1 packages loaded, 213 targets configured).
INFO: Found 1 test target...
Using drake_cc_googletest_main.cc

[==========] Running 9 tests from 2 test suites.
[----------] Global test environment set-up.
[----------] 6 tests from BezierCurveTest
[ RUN      ] BezierCurveTest.DefaultConstructor
[       OK ] BezierCurveTest.DefaultConstructor (0 ms)
[ RUN      ] BezierCurveTest.Constant
[       OK ] BezierCurveTest.Constant (0 ms)
[ RUN      ] BezierCurveTest.Default
[       OK ] BezierCurveTest.Default (0 ms)
[ RUN      ] BezierCurveTest.MoveConstructor
[       OK ] BezierCurveTest.MoveConstructor (0 ms)
[ RUN      ] BezierCurveTest.Linear
Set parameter Username
Academic license - for non-commercial use only - expires 2024-06-23
Set parameter Username
Academic license - for non-commercial use only - expires 2024-06-23
Set parameter Username
Academic license - for non-commercial use only - expires 2024-06-23
Set parameter Username
Academic license - for non-commercial use only - expires 2024-06-23
Set parameter Username
Academic license - for non-commercial use only - expires 2024-06-23
Set parameter Username
Academic license - for non-commercial use only - expires 2024-06-23
Set parameter Username
Academic license - for non-commercial use only - expires 2024-06-23
Set parameter Username
Academic license - for non-commercial use only - expires 2024-06-23
Set parameter Username
Academic license - for non-commercial use only - expires 2024-06-23
Set parameter Username
Academic license - for non-commercial use only - expires 2024-06-23
Set parameter Username
Academic license - for non-commercial use only - expires 2024-06-23
Set parameter Username
Academic license - for non-commercial use only - expires 2024-06-23
Set parameter Username
Academic license - for non-commercial use only - expires 2024-06-23
Set parameter Username
Academic license - for non-commercial use only - expires 2024-06-23
Set parameter Username
Academic license - for non-commercial use only - expires 2024-06-23
Set parameter Username
Academic license - for non-commercial use only - expires 2024-06-23
Set parameter Username
Academic license - for non-commercial use only - expires 2024-06-23
Set parameter Username
Academic license - for non-commercial use only - expires 2024-06-23
Set parameter Username
Academic license - for non-commercial use only - expires 2024-06-23
Set parameter Username
Academic license - for non-commercial use only - expires 2024-06-23
Set parameter Username
Academic license - for non-commercial use only - expires 2024-06-23
Set parameter Username
Academic license - for non-commercial use only - expires 2024-06-23
Set parameter Username
Academic license - for non-commercial use only - expires 2024-06-23
Set parameter Username
Academic license - for non-commercial use only - expires 2024-06-23
Set parameter Username
Academic license - for non-commercial use only - expires 2024-06-23
Set parameter Username
Academic license - for non-commercial use only - expires 2024-06-23
Set parameter Username
Academic license - for non-commercial use only - expires 2024-06-23
Set parameter Username
Academic license - for non-commercial use only - expires 2024-06-23
Set parameter Username
Academic license - for non-commercial use only - expires 2024-06-23
Set parameter Username
Academic license - for non-commercial use only - expires 2024-06-23
Set parameter Username
Academic license - for non-commercial use only - expires 2024-06-23
Set parameter Username
Academic license - for non-commercial use only - expires 2024-06-23
Set parameter Username
Academic license - for non-commercial use only - expires 2024-06-23
Set parameter Username
Academic license - for non-commercial use only - expires 2024-06-23
Set parameter Username
Academic license - for non-commercial use only - expires 2024-06-23
Set parameter Username
Academic license - for non-commercial use only - expires 2024-06-23
Set parameter Username
Academic license - for non-commercial use only - expires 2024-06-23
Set parameter Username
Academic license - for non-commercial use only - expires 2024-06-23
Set parameter Username
Academic license - for non-commercial use only - expires 2024-06-23
Set parameter Username
Academic license - for non-commercial use only - expires 2024-06-23
Set parameter Username
Academic license - for non-commercial use only - expires 2024-06-23
Set parameter Username
Academic license - for non-commercial use only - expires 2024-06-23
Set parameter Username
Academic license - for non-commercial use only - expires 2024-06-23
Set parameter Username
Academic license - for non-commercial use only - expires 2024-06-23
Set parameter Username
Academic license - for non-commercial use only - expires 2024-06-23
Set parameter Username
Academic license - for non-commercial use only - expires 2024-06-23
Set parameter Username
Academic license - for non-commercial use only - expires 2024-06-23
Set parameter Username
Academic license - for non-commercial use only - expires 2024-06-23
Set parameter Username
Academic license - for non-commercial use only - expires 2024-06-23
Set parameter Username
Academic license - for non-commercial use only - expires 2024-06-23
Set parameter Username
Academic license - for non-commercial use only - expires 2024-06-23
Set parameter Username
Academic license - for non-commercial use only - expires 2024-06-23
Set parameter Username
Academic license - for non-commercial use only - expires 2024-06-23
Set parameter Username
Academic license - for non-commercial use only - expires 2024-06-23
Set parameter Username
Academic license - for non-commercial use only - expires 2024-06-23
Set parameter Username
Academic license - for non-commercial use only - expires 2024-06-23
Set parameter Username
Academic license - for non-commercial use only - expires 2024-06-23
Set parameter Username
Academic license - for non-commercial use only - expires 2024-06-23
Set parameter Username
Academic license - for non-commercial use only - expires 2024-06-23
Set parameter Username
Academic license - for non-commercial use only - expires 2024-06-23
Set parameter Username
Academic license - for non-commercial use only - expires 2024-06-23
Set parameter Username
Academic license - for non-commercial use only - expires 2024-06-23
Set parameter Username
Academic license - for non-commercial use only - expires 2024-06-23
Set parameter Username
Academic license - for non-commercial use only - expires 2024-06-23
Set parameter Username
Academic license - for non-commercial use only - expires 2024-06-23
Set parameter Username
Academic license - for non-commercial use only - expires 2024-06-23
Set parameter Username
Academic license - for non-commercial use only - expires 2024-06-23
Set parameter Username
Academic license - for non-commercial use only - expires 2024-06-23
Set parameter Username
Academic license - for non-commercial use only - expires 2024-06-23
Set parameter Username
Academic license - for non-commercial use only - expires 2024-06-23
Set parameter Username
Academic license - for non-commercial use only - expires 2024-06-23
Set parameter Username
Academic license - for non-commercial use only - expires 2024-06-23
Set parameter Username
Academic license - for non-commercial use only - expires 2024-06-23
Set parameter Username
Academic license - for non-commercial use only - expires 2024-06-23
Set parameter Username
Academic license - for non-commercial use only - expires 2024-06-23
Set parameter Username
Academic license - for non-commercial use only - expires 2024-06-23
Set parameter Username
Academic license - for non-commercial use only - expires 2024-06-23
Set parameter Username
Academic license - for non-commercial use only - expires 2024-06-23
Set parameter Username
Academic license - for non-commercial use only - expires 2024-06-23
Set parameter Username
Academic license - for non-commercial use only - expires 2024-06-23
Set parameter Username
Academic license - for non-commercial use only - expires 2024-06-23
Set parameter Username
Academic license - for non-commercial use only - expires 2024-06-23
Set parameter Username
Academic license - for non-commercial use only - expires 2024-06-23
Set parameter Username
Academic license - for non-commercial use only - expires 2024-06-23
Set parameter Username
Academic license - for non-commercial use only - expires 2024-06-23
Set parameter Username
Academic license - for non-commercial use only - expires 2024-06-23
Set parameter Username
Academic license - for non-commercial use only - expires 2024-06-23
Set parameter Username
Academic license - for non-commercial use only - expires 2024-06-23
Set parameter Username
Academic license - for non-commercial use only - expires 2024-06-23
Set parameter Username
Academic license - for non-commercial use only - expires 2024-06-23
Set parameter Username
Academic license - for non-commercial use only - expires 2024-06-23
Set parameter Username
Academic license - for non-commercial use only - expires 2024-06-23
Set parameter Username
Academic license - for non-commercial use only - expires 2024-06-23
Set parameter Username
Academic license - for non-commercial use only - expires 2024-06-23
Set parameter Username
Academic license - for non-commercial use only - expires 2024-06-23
Set parameter Username
Academic license - for non-commercial use only - expires 2024-06-23
Set parameter Username
Academic license - for non-commercial use only - expires 2024-06-23
Set parameter Username
Academic license - for non-commercial use only - expires 2024-06-23
Set parameter Username
Academic license - for non-commercial use only - expires 2024-06-23
Set parameter Username
Academic license - for non-commercial use only - expires 2024-06-23
Set parameter Username
Academic license - for non-commercial use only - expires 2024-06-23
Set parameter Username
Academic license - for non-commercial use only - expires 2024-06-23
Set parameter Username
Academic license - for non-commercial use only - expires 2024-06-23
Set parameter Username
Academic license - for non-commercial use only - expires 2024-06-23
Set parameter Username
Academic license - for non-commercial use only - expires 2024-06-23
Set parameter Username
Academic license - for non-commercial use only - expires 2024-06-23
Set parameter Username
Academic license - for non-commercial use only - expires 2024-06-23
Set parameter Username
Academic license - for non-commercial use only - expires 2024-06-23
Set parameter Username
Academic license - for non-commercial use only - expires 2024-06-23
Set parameter Username
Academic license - for non-commercial use only - expires 2024-06-23
Set parameter Username
Academic license - for non-commercial use only - expires 2024-06-23
Set parameter Username
Academic license - for non-commercial use only - expires 2024-06-23
Set parameter Username
Academic license - for non-commercial use only - expires 2024-06-23
Set parameter Username
Academic license - for non-commercial use only - expires 2024-06-23
Set parameter Username
Academic license - for non-commercial use only - expires 2024-06-23
Set parameter Username
Academic license - for non-commercial use only - expires 2024-06-23
Set parameter Username
Academic license - for non-commercial use only - expires 2024-06-23
Set parameter Username
Academic license - for non-commercial use only - expires 2024-06-23
Set parameter Username
Academic license - for non-commercial use only - expires 2024-06-23
Set parameter Username
Academic license - for non-commercial use only - expires 2024-06-23
Set parameter Username
Academic license - for non-commercial use only - expires 2024-06-23
Set parameter Username
Academic license - for non-commercial use only - expires 2024-06-23
Set parameter Username
Academic license - for non-commercial use only - expires 2024-06-23
Set parameter Username
Academic license - for non-commercial use only - expires 2024-06-23
Set parameter Username
Academic license - for non-commercial use only - expires 2024-06-23
Set parameter Username
Academic license - for non-commercial use only - expires 2024-06-23
Set parameter Username
Academic license - for non-commercial use only - expires 2024-06-23
Set parameter Username
Academic license - for non-commercial use only - expires 2024-06-23
Set parameter Username
Academic license - for non-commercial use only - expires 2024-06-23
Set parameter Username
Academic license - for non-commercial use only - expires 2024-06-23
Set parameter Username
Academic license - for non-commercial use only - expires 2024-06-23
Set parameter Username
Academic license - for non-commercial use only - expires 2024-06-23
Set parameter Username
Academic license - for non-commercial use only - expires 2024-06-23
Set parameter Username
Academic license - for non-commercial use only - expires 2024-06-23
Set parameter Username
Academic license - for non-commercial use only - expires 2024-06-23
Set parameter Username
Academic license - for non-commercial use only - expires 2024-06-23
Set parameter Username
Academic license - for non-commercial use only - expires 2024-06-23
Set parameter Username
Academic license - for non-commercial use only - expires 2024-06-23
Set parameter Username
Academic license - for non-commercial use only - expires 2024-06-23
Set parameter Username
Academic license - for non-commercial use only - expires 2024-06-23
Set parameter Username
Academic license - for non-commercial use only - expires 2024-06-23
Set parameter Username
Academic license - for non-commercial use only - expires 2024-06-23
Set parameter Username
Academic license - for non-commercial use only - expires 2024-06-23
Set parameter Username
Academic license - for non-commercial use only - expires 2024-06-23
Set parameter Username
Academic license - for non-commercial use only - expires 2024-06-23
Set parameter Username
Academic license - for non-commercial use only - expires 2024-06-23
Set parameter Username
Academic license - for non-commercial use only - expires 2024-06-23
Set parameter Username
Academic license - for non-commercial use only - expires 2024-06-23
Set parameter Username
Academic license - for non-commercial use only - expires 2024-06-23
Set parameter Username
Academic license - for non-commercial use only - expires 2024-06-23
Set parameter Username
Academic license - for non-commercial use only - expires 2024-06-23
Set parameter Username
Academic license - for non-commercial use only - expires 2024-06-23
Set parameter Username
Academic license - for non-commercial use only - expires 2024-06-23
Set parameter Username
Academic license - for non-commercial use only - expires 2024-06-23
Set parameter Username
Academic license - for non-commercial use only - expires 2024-06-23
Set parameter Username
Academic license - for non-commercial use only - expires 2024-06-23
Set parameter Username
Academic license - for non-commercial use only - expires 2024-06-23
Set parameter Username
Academic license - for non-commercial use only - expires 2024-06-23
Set parameter Username
Academic license - for non-commercial use only - expires 2024-06-23
Set parameter Username
Academic license - for non-commercial use only - expires 2024-06-23
Set parameter Username
Academic license - for non-commercial use only - expires 2024-06-23
Set parameter Username
Academic license - for non-commercial use only - expires 2024-06-23
Set parameter Username
Academic license - for non-commercial use only - expires 2024-06-23
Set parameter Username
Academic license - for non-commercial use only - expires 2024-06-23
Set parameter Username
Academic license - for non-commercial use only - expires 2024-06-23
Set parameter Username
Academic license - for non-commercial use only - expires 2024-06-23
Set parameter Username
Academic license - for non-commercial use only - expires 2024-06-23
Set parameter Username
Academic license - for non-commercial use only - expires 2024-06-23
Set parameter Username
Academic license - for non-commercial use only - expires 2024-06-23
Set parameter Username
Academic license - for non-commercial use only - expires 2024-06-23
Set parameter Username
Academic license - for non-commercial use only - expires 2024-06-23
Set parameter Username
Academic license - for non-commercial use only - expires 2024-06-23
Set parameter Username
Academic license - for non-commercial use only - expires 2024-06-23
Set parameter Username
Academic license - for non-commercial use only - expires 2024-06-23
Set parameter Username
Academic license - for non-commercial use only - expires 2024-06-23
Set parameter Username
Academic license - for non-commercial use only - expires 2024-06-23
Set parameter Username
Academic license - for non-commercial use only - expires 2024-06-23
Set parameter Username
Academic license - for non-commercial use only - expires 2024-06-23
Set parameter Username
Academic license - for non-commercial use only - expires 2024-06-23
Set parameter Username
Academic license - for non-commercial use only - expires 2024-06-23
Set parameter Username
Academic license - for non-commercial use only - expires 2024-06-23
Set parameter Username
Academic license - for non-commercial use only - expires 2024-06-23
Set parameter Username
Academic license - for non-commercial use only - expires 2024-06-23
Set parameter Username
Academic license - for non-commercial use only - expires 2024-06-23
Set parameter Username
Academic license - for non-commercial use only - expires 2024-06-23
Set parameter Username
Academic license - for non-commercial use only - expires 2024-06-23
Set parameter Username
Academic license - for non-commercial use only - expires 2024-06-23
Set parameter Username
Academic license - for non-commercial use only - expires 2024-06-23
Set parameter Username
Academic license - for non-commercial use only - expires 2024-06-23
Set parameter Username
Academic license - for non-commercial use only - expires 2024-06-23
Set parameter Username
Academic license - for non-commercial use only - expires 2024-06-23
Set parameter Username
Academic license - for non-commercial use only - expires 2024-06-23
Set parameter Username
Academic license - for non-commercial use only - expires 2024-06-23
Set parameter Username
Academic license - for non-commercial use only - expires 2024-06-23
Set parameter Username
Academic license - for non-commercial use only - expires 2024-06-23
Set parameter Username
Academic license - for non-commercial use only - expires 2024-06-23
Set parameter Username
Academic license - for non-commercial use only - expires 2024-06-23
Set parameter Username
Academic license - for non-commercial use only - expires 2024-06-23
Set parameter Username
Academic license - for non-commercial use only - expires 2024-06-23
Set parameter Username
Academic license - for non-commercial use only - expires 2024-06-23
[       OK ] BezierCurveTest.Linear (745 ms)
[ RUN      ] BezierCurveTest.Quadratic
Set parameter Username
Academic license - for non-commercial use only - expires 2024-06-23
Set parameter Username
Academic license - for non-commercial use only - expires 2024-06-23
Set parameter Username
Academic license - for non-commercial use only - expires 2024-06-23
Set parameter Username
Academic license - for non-commercial use only - expires 2024-06-23
Set parameter Username
Academic license - for non-commercial use only - expires 2024-06-23
Set parameter Username
Academic license - for non-commercial use only - expires 2024-06-23
Set parameter Username
Academic license - for non-commercial use only - expires 2024-06-23
Set parameter Username
Academic license - for non-commercial use only - expires 2024-06-23
Set parameter Username
Academic license - for non-commercial use only - expires 2024-06-23
Set parameter Username
Academic license - for non-commercial use only - expires 2024-06-23
Set parameter Username
Academic license - for non-commercial use only - expires 2024-06-23
Set parameter Username
Academic license - for non-commercial use only - expires 2024-06-23
Set parameter Username
Academic license - for non-commercial use only - expires 2024-06-23
Set parameter Username
Academic license - for non-commercial use only - expires 2024-06-23
Set parameter Username
Academic license - for non-commercial use only - expires 2024-06-23
Set parameter Username
Academic license - for non-commercial use only - expires 2024-06-23
Set parameter Username
Academic license - for non-commercial use only - expires 2024-06-23
Set parameter Username
Academic license - for non-commercial use only - expires 2024-06-23
Set parameter Username
Academic license - for non-commercial use only - expires 2024-06-23
Set parameter Username
Academic license - for non-commercial use only - expires 2024-06-23
Set parameter Username
Academic license - for non-commercial use only - expires 2024-06-23
Set parameter Username
Academic license - for non-commercial use only - expires 2024-06-23
Set parameter Username
Academic license - for non-commercial use only - expires 2024-06-23
Set parameter Username
Academic license - for non-commercial use only - expires 2024-06-23
Set parameter Username
Academic license - for non-commercial use only - expires 2024-06-23
Set parameter Username
Academic license - for non-commercial use only - expires 2024-06-23
Set parameter Username
Academic license - for non-commercial use only - expires 2024-06-23
Set parameter Username
Academic license - for non-commercial use only - expires 2024-06-23
Set parameter Username
Academic license - for non-commercial use only - expires 2024-06-23
Set parameter Username
Academic license - for non-commercial use only - expires 2024-06-23
Set parameter Username
Academic license - for non-commercial use only - expires 2024-06-23
Set parameter Username
Academic license - for non-commercial use only - expires 2024-06-23
Set parameter Username
Academic license - for non-commercial use only - expires 2024-06-23
Set parameter Username
Academic license - for non-commercial use only - expires 2024-06-23
Set parameter Username
Academic license - for non-commercial use only - expires 2024-06-23
Set parameter Username
Academic license - for non-commercial use only - expires 2024-06-23
Set parameter Username
Academic license - for non-commercial use only - expires 2024-06-23
Set parameter Username
Academic license - for non-commercial use only - expires 2024-06-23
Set parameter Username
Academic license - for non-commercial use only - expires 2024-06-23
Set parameter Username
Academic license - for non-commercial use only - expires 2024-06-23
Set parameter Username
Academic license - for non-commercial use only - expires 2024-06-23
Set parameter Username
Academic license - for non-commercial use only - expires 2024-06-23
Set parameter Username
Academic license - for non-commercial use only - expires 2024-06-23
Set parameter Username
Academic license - for non-commercial use only - expires 2024-06-23
Set parameter Username
Academic license - for non-commercial use only - expires 2024-06-23
Set parameter Username
Academic license - for non-commercial use only - expires 2024-06-23
Set parameter Username
Academic license - for non-commercial use only - expires 2024-06-23
Set parameter Username
Academic license - for non-commercial use only - expires 2024-06-23
Set parameter Username
Academic license - for non-commercial use only - expires 2024-06-23
Set parameter Username
Academic license - for non-commercial use only - expires 2024-06-23
Set parameter Username
Academic license - for non-commercial use only - expires 2024-06-23
Set parameter Username
Academic license - for non-commercial use only - expires 2024-06-23
Set parameter Username
Academic license - for non-commercial use only - expires 2024-06-23
Set parameter Username
Academic license - for non-commercial use only - expires 2024-06-23
Set parameter Username
Academic license - for non-commercial use only - expires 2024-06-23
Set parameter Username
Academic license - for non-commercial use only - expires 2024-06-23
Set parameter Username
Academic license - for non-commercial use only - expires 2024-06-23
Set parameter Username
Academic license - for non-commercial use only - expires 2024-06-23
Set parameter Username
Academic license - for non-commercial use only - expires 2024-06-23
Set parameter Username
Academic license - for non-commercial use only - expires 2024-06-23
Set parameter Username
Academic license - for non-commercial use only - expires 2024-06-23
Set parameter Username
Academic license - for non-commercial use only - expires 2024-06-23
Set parameter Username
Academic license - for non-commercial use only - expires 2024-06-23
Set parameter Username
Academic license - for non-commercial use only - expires 2024-06-23
Set parameter Username
Academic license - for non-commercial use only - expires 2024-06-23
Set parameter Username
Academic license - for non-commercial use only - expires 2024-06-23
Set parameter Username
Academic license - for non-commercial use only - expires 2024-06-23
Set parameter Username
Academic license - for non-commercial use only - expires 2024-06-23
Set parameter Username
Academic license - for non-commercial use only - expires 2024-06-23
Set parameter Username
Academic license - for non-commercial use only - expires 2024-06-23
Set parameter Username
Academic license - for non-commercial use only - expires 2024-06-23
Set parameter Username
Academic license - for non-commercial use only - expires 2024-06-23
Set parameter Username
Academic license - for non-commercial use only - expires 2024-06-23
Set parameter Username
Academic license - for non-commercial use only - expires 2024-06-23
Set parameter Username
Academic license - for non-commercial use only - expires 2024-06-23
Set parameter Username
Academic license - for non-commercial use only - expires 2024-06-23
Set parameter Username
Academic license - for non-commercial use only - expires 2024-06-23
Set parameter Username
Academic license - for non-commercial use only - expires 2024-06-23
Set parameter Username
Academic license - for non-commercial use only - expires 2024-06-23
Set parameter Username
Academic license - for non-commercial use only - expires 2024-06-23
Set parameter Username
Academic license - for non-commercial use only - expires 2024-06-23
Set parameter Username
Academic license - for non-commercial use only - expires 2024-06-23
Set parameter Username
Academic license - for non-commercial use only - expires 2024-06-23
Set parameter Username
Academic license - for non-commercial use only - expires 2024-06-23
Set parameter Username
Academic license - for non-commercial use only - expires 2024-06-23
Set parameter Username
Academic license - for non-commercial use only - expires 2024-06-23
Set parameter Username
Academic license - for non-commercial use only - expires 2024-06-23
Set parameter Username
Academic license - for non-commercial use only - expires 2024-06-23
Set parameter Username
Academic license - for non-commercial use only - expires 2024-06-23
Set parameter Username
Academic license - for non-commercial use only - expires 2024-06-23
Set parameter Username
Academic license - for non-commercial use only - expires 2024-06-23
Set parameter Username
Academic license - for non-commercial use only - expires 2024-06-23
Set parameter Username
Academic license - for non-commercial use only - expires 2024-06-23
Set parameter Username
Academic license - for non-commercial use only - expires 2024-06-23
Set parameter Username
Academic license - for non-commercial use only - expires 2024-06-23
Set parameter Username
Academic license - for non-commercial use only - expires 2024-06-23
Set parameter Username
Academic license - for non-commercial use only - expires 2024-06-23
Set parameter Username
Academic license - for non-commercial use only - expires 2024-06-23
Set parameter Username
Academic license - for non-commercial use only - expires 2024-06-23
Set parameter Username
Academic license - for non-commercial use only - expires 2024-06-23
Set parameter Username
Academic license - for non-commercial use only - expires 2024-06-23
Set parameter Username
Academic license - for non-commercial use only - expires 2024-06-23
Set parameter Username
Academic license - for non-commercial use only - expires 2024-06-23
Set parameter Username
Academic license - for non-commercial use only - expires 2024-06-23
Set parameter Username
Academic license - for non-commercial use only - expires 2024-06-23
Set parameter Username
Academic license - for non-commercial use only - expires 2024-06-23
Set parameter Username
Academic license - for non-commercial use only - expires 2024-06-23
Set parameter Username
Academic license - for non-commercial use only - expires 2024-06-23
Set parameter Username
Academic license - for non-commercial use only - expires 2024-06-23
Set parameter Username
Academic license - for non-commercial use only - expires 2024-06-23
Set parameter Username
Academic license - for non-commercial use only - expires 2024-06-23
Set parameter Username
Academic license - for non-commercial use only - expires 2024-06-23
Set parameter Username
Academic license - for non-commercial use only - expires 2024-06-23
Set parameter Username
Academic license - for non-commercial use only - expires 2024-06-23
Set parameter Username
Academic license - for non-commercial use only - expires 2024-06-23
Set parameter Username
Academic license - for non-commercial use only - expires 2024-06-23
Set parameter Username
Academic license - for non-commercial use only - expires 2024-06-23
Set parameter Username
Academic license - for non-commercial use only - expires 2024-06-23
Set parameter Username
Academic license - for non-commercial use only - expires 2024-06-23
Set parameter Username
Academic license - for non-commercial use only - expires 2024-06-23
Set parameter Username
Academic license - for non-commercial use only - expires 2024-06-23
Set parameter Username
Academic license - for non-commercial use only - expires 2024-06-23
Set parameter Username
Academic license - for non-commercial use only - expires 2024-06-23
Set parameter Username
Academic license - for non-commercial use only - expires 2024-06-23
Set parameter Username
Academic license - for non-commercial use only - expires 2024-06-23
Set parameter Username
Academic license - for non-commercial use only - expires 2024-06-23
Set parameter Username
Academic license - for non-commercial use only - expires 2024-06-23
Set parameter Username
Academic license - for non-commercial use only - expires 2024-06-23
Set parameter Username
Academic license - for non-commercial use only - expires 2024-06-23
Set parameter Username
Academic license - for non-commercial use only - expires 2024-06-23
Set parameter Username
Academic license - for non-commercial use only - expires 2024-06-23
Set parameter Username
Academic license - for non-commercial use only - expires 2024-06-23
Set parameter Username
Academic license - for non-commercial use only - expires 2024-06-23
Set parameter Username
Academic license - for non-commercial use only - expires 2024-06-23
Set parameter Username
Academic license - for non-commercial use only - expires 2024-06-23
Set parameter Username
Academic license - for non-commercial use only - expires 2024-06-23
Set parameter Username
Academic license - for non-commercial use only - expires 2024-06-23
Set parameter Username
Academic license - for non-commercial use only - expires 2024-06-23
Set parameter Username
Academic license - for non-commercial use only - expires 2024-06-23
Set parameter Username
Academic license - for non-commercial use only - expires 2024-06-23
Set parameter Username
Academic license - for non-commercial use only - expires 2024-06-23
Set parameter Username
Academic license - for non-commercial use only - expires 2024-06-23
Set parameter Username
Academic license - for non-commercial use only - expires 2024-06-23
Set parameter Username
Academic license - for non-commercial use only - expires 2024-06-23
Set parameter Username
Academic license - for non-commercial use only - expires 2024-06-23
Set parameter Username
Academic license - for non-commercial use only - expires 2024-06-23
Set parameter Username
Academic license - for non-commercial use only - expires 2024-06-23
Set parameter Username
Academic license - for non-commercial use only - expires 2024-06-23
Set parameter Username
Academic license - for non-commercial use only - expires 2024-06-23
Set parameter Username
Academic license - for non-commercial use only - expires 2024-06-23
Set parameter Username
Academic license - for non-commercial use only - expires 2024-06-23
Set parameter Username
Academic license - for non-commercial use only - expires 2024-06-23
Set parameter Username
Academic license - for non-commercial use only - expires 2024-06-23
Set parameter Username
Academic license - for non-commercial use only - expires 2024-06-23
Set parameter Username
Academic license - for non-commercial use only - expires 2024-06-23
Set parameter Username
Academic license - for non-commercial use only - expires 2024-06-23
Set parameter Username
Academic license - for non-commercial use only - expires 2024-06-23
Set parameter Username
Academic license - for non-commercial use only - expires 2024-06-23
Set parameter Username
Academic license - for non-commercial use only - expires 2024-06-23
Set parameter Username
Academic license - for non-commercial use only - expires 2024-06-23
Set parameter Username
Academic license - for non-commercial use only - expires 2024-06-23
Set parameter Username
Academic license - for non-commercial use only - expires 2024-06-23
Set parameter Username
Academic license - for non-commercial use only - expires 2024-06-23
Set parameter Username
Academic license - for non-commercial use only - expires 2024-06-23
Set parameter Username
Academic license - for non-commercial use only - expires 2024-06-23
Set parameter Username
Academic license - for non-commercial use only - expires 2024-06-23
Set parameter Username
Academic license - for non-commercial use only - expires 2024-06-23
Set parameter Username
Academic license - for non-commercial use only - expires 2024-06-23
Set parameter Username
Academic license - for non-commercial use only - expires 2024-06-23
Set parameter Username
Academic license - for non-commercial use only - expires 2024-06-23
Set parameter Username
Academic license - for non-commercial use only - expires 2024-06-23
Set parameter Username
Academic license - for non-commercial use only - expires 2024-06-23
Set parameter Username
Academic license - for non-commercial use only - expires 2024-06-23
Set parameter Username
Academic license - for non-commercial use only - expires 2024-06-23
Set parameter Username
Academic license - for non-commercial use only - expires 2024-06-23
Set parameter Username
Academic license - for non-commercial use only - expires 2024-06-23
Set parameter Username
Academic license - for non-commercial use only - expires 2024-06-23
Set parameter Username
Academic license - for non-commercial use only - expires 2024-06-23
Set parameter Username
Academic license - for non-commercial use only - expires 2024-06-23
Set parameter Username
Academic license - for non-commercial use only - expires 2024-06-23
Set parameter Username
Academic license - for non-commercial use only - expires 2024-06-23
Set parameter Username
Academic license - for non-commercial use only - expires 2024-06-23
Set parameter Username
Academic license - for non-commercial use only - expires 2024-06-23
Set parameter Username
Academic license - for non-commercial use only - expires 2024-06-23
Set parameter Username
Academic license - for non-commercial use only - expires 2024-06-23
Set parameter Username
Academic license - for non-commercial use only - expires 2024-06-23
Set parameter Username
Academic license - for non-commercial use only - expires 2024-06-23
Set parameter Username
Academic license - for non-commercial use only - expires 2024-06-23
Set parameter Username
Academic license - for non-commercial use only - expires 2024-06-23
Set parameter Username
Academic license - for non-commercial use only - expires 2024-06-23
Set parameter Username
Academic license - for non-commercial use only - expires 2024-06-23
Set parameter Username
Academic license - for non-commercial use only - expires 2024-06-23
Set parameter Username
Academic license - for non-commercial use only - expires 2024-06-23
Set parameter Username
Academic license - for non-commercial use only - expires 2024-06-23
Set parameter Username
Academic license - for non-commercial use only - expires 2024-06-23
Set parameter Username
Academic license - for non-commercial use only - expires 2024-06-23
Set parameter Username
Academic license - for non-commercial use only - expires 2024-06-23
Set parameter Username
Academic license - for non-commercial use only - expires 2024-06-23
Set parameter Username
Academic license - for non-commercial use only - expires 2024-06-23
Set parameter Username
Academic license - for non-commercial use only - expires 2024-06-23
[       OK ] BezierCurveTest.Quadratic (710 ms)
[----------] 6 tests from BezierCurveTest (1456 ms total)

[----------] 3 tests from BezierCurve
[ RUN      ] BezierCurve.Clone
[       OK ] BezierCurve.Clone (0 ms)
[ RUN      ] BezierCurve.ScalarTypes
[       OK ] BezierCurve.ScalarTypes (0 ms)
[ RUN      ] BezierCurve.GetExpressionLinear
[       OK ] BezierCurve.GetExpressionLinear (0 ms)
[----------] 3 tests from BezierCurve (0 ms total)

[----------] Global test environment tear-down
[==========] 9 tests from 2 test suites ran. (1456 ms total)
[  PASSED  ] 9 tests.

Copy link
Collaborator

@jwnimmer-tri jwnimmer-tri left a comment

Choose a reason for hiding this comment

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

Now that this is ready, what would you like for our review strategy? Can you and I play cross-platform review? Should we seek any more?

I think we share co-authorship and co-feature-review. I Think this still needs a platform reviewer, to make sure the code is clear to someone not in the trench with us.

Reviewed 6 of 6 files at r2, all commit messages.
Reviewable status: 3 unresolved discussions, LGTM missing from assignee jwnimmer-tri(platform), needs at least two assigned reviewers


-- commits line 2 at r1:

Previously, RussTedrake (Russ Tedrake) wrote…

but that is only true for local licenses. I started like that, but word-smithed it down to something that was true and fit in the github character limit.

I was thinking the commit body could explain the caveat, to the extent the subject line can't be completely precise.

Anyway, adding "local" in the subject like "GurobiSolver acquires a local license at most once per process" would be a good clue too.

Here's the defect I was shooting for (should have said this originally, instead of only a suggestion): I don't think the word "destroy" will be descriptive at all to any user.

(We could say "never relinquishes" but I still think the affirmative phrasing is best.)


solvers/gurobi_solver.h line 169 at r2 (raw file):

; see has_acquired_local_license().

This part is out of date now.


solvers/gurobi_solver.cc line 1114 at r2 (raw file):

               ? GetScopedSingleton<GurobiSolver::License>()
               : nullptr;
  }()};

BTW Re-reading this now, I noticed we probably don't need a lambda, since the body of the lambda is just a return statement.

Suggestion:

  static never_destroyed<std::shared_ptr<void>> local_host_holder{
     IsGrbLicenseFileLocalHost()
           ? GetScopedSingleton<GurobiSolver::License>()
           : nullptr};

solvers/test/gurobi_solver_grb_license_file_test.cc line 84 at r1 (raw file):

I wonder if the GrbLicenseFileUnset test case will fail now for users with host-local license.

I guess its still passing for you? That's good news. (I can't test with a local license.)

@RussTedrake RussTedrake force-pushed the gurobi_license_never_destroyed branch 2 times, most recently from 4e3f47f to f0e4898 Compare July 2, 2023 17:40
Copy link
Contributor Author

@RussTedrake RussTedrake left a comment

Choose a reason for hiding this comment

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

+@jwnimmer-tri for feature review.
+@RussTedrake for feature review
+@sherm1 for platform review

:lgtm:

Reviewable status: LGTM missing from assignees jwnimmer-tri(platform),sherm1(platform)


-- commits line 2 at r1:

Previously, jwnimmer-tri (Jeremy Nimmer) wrote…

I was thinking the commit body could explain the caveat, to the extent the subject line can't be completely precise.

Anyway, adding "local" in the subject like "GurobiSolver acquires a local license at most once per process" would be a good clue too.

Here's the defect I was shooting for (should have said this originally, instead of only a suggestion): I don't think the word "destroy" will be descriptive at all to any user.

(We could say "never relinquishes" but I still think the affirmative phrasing is best.)

Done.


solvers/gurobi_solver.h line 169 at r2 (raw file):

Previously, jwnimmer-tri (Jeremy Nimmer) wrote…

; see has_acquired_local_license().

This part is out of date now.

Done.


solvers/gurobi_solver.cc line 1114 at r2 (raw file):

Previously, jwnimmer-tri (Jeremy Nimmer) wrote…

BTW Re-reading this now, I noticed we probably don't need a lambda, since the body of the lambda is just a return statement.

Done.


solvers/test/gurobi_solver_grb_license_file_test.cc line 84 at r1 (raw file):

Previously, jwnimmer-tri (Jeremy Nimmer) wrote…

I wonder if the GrbLicenseFileUnset test case will fail now for users with host-local license.

I guess its still passing for you? That's good news. (I can't test with a local license.)

Correct.

Copy link
Collaborator

@jwnimmer-tri jwnimmer-tri left a comment

Choose a reason for hiding this comment

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

Reviewed 2 of 2 files at r3, all commit messages.
Reviewable status: 1 unresolved discussion, LGTM missing from assignees jwnimmer-tri(platform),sherm1(platform)


solvers/gurobi_solver.h line 174 at r3 (raw file):

Otherwise the default behavior is to release the license after each Solve().

This is too-easily misinterpreted.

It's true that each call to solvers::Solve() acquires and relinquishes the license (for a non-localhost license).

However, repeated calls to gurobi_solver.Solve() on the same instance of GurobiSolver do not relinquish the license afterward. The license is a member variable.

@RussTedrake RussTedrake force-pushed the gurobi_license_never_destroyed branch from f0e4898 to 385f318 Compare July 3, 2023 18:04
Copy link
Contributor Author

@RussTedrake RussTedrake left a comment

Choose a reason for hiding this comment

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

Reviewable status: LGTM missing from assignees jwnimmer-tri(platform),sherm1(platform)


solvers/gurobi_solver.h line 174 at r3 (raw file):

Previously, jwnimmer-tri (Jeremy Nimmer) wrote…

Otherwise the default behavior is to release the license after each Solve().

This is too-easily misinterpreted.

It's true that each call to solvers::Solve() acquires and relinquishes the license (for a non-localhost license).

However, repeated calls to gurobi_solver.Solve() on the same instance of GurobiSolver do not relinquish the license afterward. The license is a member variable.

Done. you're right. I've tried again.

@svenevs
Copy link
Contributor

svenevs commented Jul 3, 2023

@drake-jenkins-bot mac-arm-ventura-clang-bazel-experimental-release please.

Copy link
Contributor Author

@RussTedrake RussTedrake left a comment

Choose a reason for hiding this comment

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

@jwnimmer-tri -- this needs an LGTM from you when you're ready.

Reviewable status: LGTM missing from assignees jwnimmer-tri(platform),sherm1(platform)

Copy link
Collaborator

@jwnimmer-tri jwnimmer-tri left a comment

Choose a reason for hiding this comment

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

:lgtm: feature.

Reviewed 1 of 1 files at r4, all commit messages.
Reviewable status: LGTM missing from assignee sherm1(platform)

@jwnimmer-tri jwnimmer-tri changed the title Never destroy local Gurobi licenses GurobiSolver acquires a local license at most once per process Jul 5, 2023
Copy link
Member

@sherm1 sherm1 left a comment

Choose a reason for hiding this comment

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

Platform :lgtm: with a few typos

Reviewed 4 of 6 files at r2, 1 of 2 files at r3, 1 of 1 files at r4, all commit messages.
Reviewable status: 2 unresolved discussions


-- commits line 5 at r4:
typo: keywork -> keyword


solvers/gurobi_solver.h line 170 at r4 (raw file):

   * method on each Solve().
   *
   * If the license file contains the string `HOST_ID`, then we treat this as

typo: HOST_ID -> HOSTID

Iff the contents of the file identified in GRB_LICENSE_FILE contains
the magic keyword HOSTID, then any license that is obtained will never
be destroyed.

Resolves RobotLocomotion#19657.

A new implementation and unit test strategy
@RussTedrake RussTedrake force-pushed the gurobi_license_never_destroyed branch from 385f318 to e5c7068 Compare July 5, 2023 16:46
Copy link
Contributor Author

@RussTedrake RussTedrake left a comment

Choose a reason for hiding this comment

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

Reviewable status: :shipit: complete! all discussions resolved, LGTM from assignees jwnimmer-tri(platform),sherm1(platform),RussTedrake(platform)


-- commits line 5 at r4:

Previously, sherm1 (Michael Sherman) wrote…

typo: keywork -> keyword

Done.


solvers/gurobi_solver.h line 170 at r4 (raw file):

Previously, sherm1 (Michael Sherman) wrote…

typo: HOST_ID -> HOSTID

Done.

Copy link
Member

@sherm1 sherm1 left a comment

Choose a reason for hiding this comment

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

Reviewed 1 of 1 files at r5, all commit messages.
Reviewable status: :shipit: complete! all discussions resolved, LGTM from assignees jwnimmer-tri(platform),sherm1(platform),RussTedrake(platform)

@sherm1 sherm1 merged commit 8825531 into RobotLocomotion:master Jul 5, 2023
@RussTedrake RussTedrake deleted the gurobi_license_never_destroyed branch July 5, 2023 23:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
release notes: feature This pull request contains a new feature
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Only ever create one Gurobi environment (GRBenv)
4 participants