You are located in service: RWTH Compute Cluster Linux (HPC)




1. How to access the software

module load MATH
module load gurobi

2. Matlab with gurobi

You have to prepare Matlab to use it with gurobi. To do this, you first have to find out where gurobi is installed:

$> module load MATH
$> module load gurobi
$> which gurobi_cl

At the time this manual was written, the default version of Gurobi was 7.5.1. This may change in the future, so the following steps must be adjusted accordingly. To make gurobi available in matlab, you have to switch to the matlab directory of gurobi in matlab and run gurobi_setup. In the prompt of the matlab-gui you have to enter the following:

>> % use the previously found path up to the 'bin' part and append 'matlab' at the end.
>> cd /usr/local_rwth/sw/gurobi/gurobi751/linux64/matlab
>> gurobi_setup

Now you can use gorubi from within matlab.

3. Python mit gurobi

You can import the gurobi python library after loading the gurobipy module:

$> module load python/3.6.0
$> module load MATH
$> module load gurobi/8.0.0
$> module load gurobipy/800-3.6 

You have to select the gurobipy module matching the gurobi and python version where the first number is the gurobi version without dots and the second number the python version reduced to the first two digits.

After loading the module you can import gurobipy in your python script:

import gurobipy

last changed on 29.01.2021

How did this content help you?