Releasing the License
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?
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.
Great, thanks for the suggestion. Still working on testing this in our context, but should be able to provide results soonish.
This works fine.
KNITRO.KN_release_license(manager)