Sie befinden sich im Service: RWTH Compute Cluster Linux (HPC)

gurobi

gurobi

Detailinformation 

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
/usr/local_rwth/sw/gurobi/gurobi911/linux64/bin/gurobi_cl

At the time this manual was written, the default version of Gurobi was 9.1.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/gurobi911/linux64/matlab
>> gurobi_setup

Now you can use gurobi from within matlab.

3. Python mit gurobi

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

$> module load python/3.9.6
$> module load MATH
$> module load gurobi/9.1.1
$> module load gurobipy/911-3.9

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, i.e. gurobi 9.1.1 and python 3.9.6 become gurobipy/911-3.9

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

import gurobipy

zuletzt geändert am 10.11.2021

Wie hat Ihnen dieser Inhalt geholfen?

Creative Commons Lizenzvertrag
Dieses Werk ist lizenziert unter einer Creative Commons Namensnennung - Weitergabe unter gleichen Bedingungen 3.0 Deutschland Lizenz