What version of OR-tools and what language are you using?
Version: v8.0
Language: Python
Which solver are you using (e.g. CP-SAT, Routing Solver, GLOP, BOP, Gurobi)
Works on GLOP, SCIP
But doesn't work on Gurobi
What operating system (Linux, Windows, ...) and version?
Linux Ubuntu 20.04
What did you do?
Steps to reproduce the behavior:
Python 3.8.5 (default, Jul 28 2020, 12:59:40)
Type 'copyright', 'credits' or 'license' for more information
IPython 7.14.0 -- An enhanced Interactive Python. Type '?' for help.
In [1]: from ortools.linear_solver import pywraplp
In [2]: solver = pywraplp.Solver('simple_lp_program',
...: pywraplp.Solver.GUROBI_LINEAR_PROGRAMMING)
terminate called after throwing an instance of 'std::bad_function_call'
what(): bad_function_call
Aborted (core dumped)
What did you expect to see
No errors
What did you see instead?
core dump
Make sure you include information that can help us debug (full error message, model Proto).
Anything else we should know about your project / environment
I have Gurobi installed and can run it and managed to solve a simple problem using the gurobipy interface.
I have also recompiled v8.0 of ortools from source, and the generated Python files gives the same error.
I also have my $GUROBI_HOME set to /opt/gurobi910/linux64
Nevermind, I found the problem or solution.
In gurobi_environment.cc we can see it is looking for a older version of Gurobi, namely Gurobi 9.0.2, but I had 9.1.0 installed.
Downloading 9.0.3 and changing the GUROBI_HOME env variable actually works
It is fixed on master, and should be integrated in 8.1 (hopefully next week).
smooth
Most helpful comment
It is fixed on master, and should be integrated in 8.1 (hopefully next week).