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

Releasing the License #294

Open
sonofwatt84 opened this issue Jul 1, 2024 · 2 comments
Open

Releasing the License #294

sonofwatt84 opened this issue Jul 1, 2024 · 2 comments

Comments

@sonofwatt84
Copy link

When using KNITRO.Optimizer with JuMP, KNITRO licenses tend to remain checked out. Is there an elegant way with JuMP to make sure KN_free() gets called after the optimization is complete?

@odow
Copy link
Member

odow commented Jul 16, 2024

I think the correct solution to this is to use a license manager:

using JuMP, KNITRO
manager = KNITRO.LMcontext()
model = Model(() -> KNITRO.Optimizer(; license_manager = manager))
# maybe needed
finalize(manager)

this isn't documented yet (and I don't have a license setup that requires this, so I can't easily test), so let me know if it works and I will add to the README.

@sonofwatt84
Copy link
Author

Great, thanks for the suggestion. Still working on testing this in our context, but should be able to provide results soonish.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants