You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
I have a single use Gurobi licence so I can't have more than one Gurobi environment running at the same time. However, I'm getting some confusing behaviour when trying to clean up the Gurobi environment after a run.
Then I get an error GurobiError: Single-use license. Another Gurobi process with pid 3981 running. when it tries to create a new model using gp.Model().
So then I tried to dispose of the model using del model first like so:
Steps to reproduce the behavior please include attached any files needed to reproduce the error. We can only help you if we can reproduce the error ourselves and debug.
Expected behavior
I would expect both del model and del model.solver to clean up the Gurobi environment.
Desktop (please complete the following information):
Describe the bug
I have a single use Gurobi licence so I can't have more than one Gurobi environment running at the same time. However, I'm getting some confusing behaviour when trying to clean up the Gurobi environment after a run.
To Reproduce
So if I firstly run this:
Then I get an error
GurobiError: Single-use license. Another Gurobi process with pid 3981 running.
when it tries to create a new model usinggp.Model()
.So then I tried to dispose of the model using
del model
first like so:However this produces the same error.
The thing that confuses me is that it works when I delete the solver directly like so:
The thing I don't understand is that this line: https://github.com/coin-or/python-mip/blob/master/mip/model.py#L135-L136 implies that when we do
del model
then it should be doingdel model.solver
under the hood. So I don't understand whydel model.solver
works butdel model
doesn't.Steps to reproduce the behavior please include attached any files needed to reproduce the error. We can only help you if we can reproduce the error ourselves and debug.
Expected behavior
I would expect both
del model
anddel model.solver
to clean up the Gurobi environment.Desktop (please complete the following information):
Let me know if you need any more information 😊
The text was updated successfully, but these errors were encountered: