Running Gurobi CLI

There are two gurobi command line tools:

  • gurobi_cl: for solving the optimization problems passed as a file
  • gurobi: for running the interactive shell (ipython-like)

Parallel Execution

The gurobi solver solves a problem in parallel by default, trying multiple solution methods at the same time (see the official description).

It is also possible to run multiple problems in parallel (source), but each problem should be run in its own gurobi environment. Also, each environment should be configured to use only a single thread (e.g., in C++: env.set(GRB_IntParam_Threads, 1); ).

The problem with this approach is that the CPU is usually not the bottleneck of the computation, the bottleneck is the memory (source). Therefore, solving multiple problems in parallel does not guarantee any speed up, it could be actually slower.

The performance could be most likely improved when running the problems in parallel on multiple machines (not multiple cores of the same machine). Some advised to use MPI for that.