Jump label

Service navigation

Main navigation

You are here:

Main content

Hard- und Software

Gurobi (11.12.2019)

Die Optimierungssoftware "Gurobi" kann auf den Rechnern des LS4 genutzt werden.

Installiert ist die Software unter /app/unido-i04linux/Gurobi. Zum Starten müssen einige Umgebungsvariablen gesetzt werden, was durch die Datei startgurobi.sh automatisch passiert.

 

Unter /app/unido-i04linux/Gurobi/gurobi900/linux64/docs befinden sich diverse Quickstart-Guides sowie ein Manual (pdf). Die zugehörigen Beispiele befinden sich unter /app/unido-i04linux/Gurobi/gurobi900/linux64/examples.

 

Der Lizenz-Server läuft auf dem ls4gpu2.

Achtung:  Diese Lizenz ist derzeit gültig bis zum 09.12.2020!

Anbei noch einige Hinweise für Installationen auf Windows-Rechnern:

Für Windows-Plattformen befindet sich unter /app/unido-i04linux/Gurobi die msi-Datei zur Installation.

Es folgen einige Hinweise zur Nutzung der Floating-Lizenz für Client-Systeme von der Gurobi Web-Seite:

Creating a token server client license

The purpose of a token server client license is quite simple: it tells the
client where to find the Gurobi token server. You can create this file yourself
(using a text editor like vim, for example). The client gurobi.lic file
typically contains a single line of text:

TOKENSERVER=mymachine.mydomain.com

or:

TOKENSERVER=192.168.1.100

You should of course substitute the name or IP address of your token server in
the example above.

If your token server was configured to use a non-default port, you'll also need
a line that provides the port number:

PORT=46325

The client license file may also include four optional lines. A QUEUETIMEOUT
line allows you to set a limit (in seconds) on how long a new Compute Server
job will wait in queue before it gives up (and reports a JOB_REJECTED error).
Any negative value will allow a job to sit in the Compute Server queue
indefinitely.

An IDLETIMEOUT line allows you to set a limit on how long a Compute Server job
can sit idle before the server kills the job (in seconds). A job is considered
idle if the server is not currently performing an optimization and the client
has not issued any additional commands. The default value will allow a job to
sit idle indefinitely in all but a few circumstances. The first exception is
the Gurobi Instant Cloud, where the default setting will automatically impose a
30 minute idle time limit (1800 seconds). If you are using an Instant Cloud
pool, the actual value will be the maximum between this parameter value and the
idle timeout defined by the pool. The second exception is any program that uses
the Gurobi Python interface (including the Gurobi Interactive Shell). Such
programs will also get a 30 minute idle time limit by default.

A SERVERTIMEOUT line allows you to specify the timeout (in seconds) in case the
token server is unavailable. The default value is 30 seconds. If the client
program is unable to contact the server for more than the specified amount of
time, the client will quit with a network error.

A PASSWORD line allows you to connect to a password-protected token server
(you'll need to get the password from the owner of the token server).

A more complex client token file might look like this:

TOKENSERVER=192.168.1.100
IDLETIMEOUT=60
QUEUETIMEOUT=120
SERVERTIMEOUT=10
PASSWORD=abcd1234

We strongly recommend that you place your client gurobi.lic file in a default
location for your platform (either your home directory or /opt/gurobi). Setting
up a non-default location is error-prone and a frequent source of trouble. (If
you still want to use a non-default location, please refer to the instructions
that appeared earlier in this section).

If your client and the token server are both running on the same machine, they
can share a single gurobi.lic file. You just need to add the following line to
the gurobi.lic file you obtained from our website:

TOKENSERVER=localhost

The token server will ignore this line, and the client will ignore everything
but this line. Your other option when both client and server are running on the
same machine is to create a separate gurobi.lic file for the client, and to set
the GRB_LICENSE_FILE environment variable to point to this file (following the
earlier instructions for using a non-default license location).

Once your client license is in place, you can test the license. If you are
unable to connect to the server, you'll need to make sure the server is
installed and running. Please consult the instructions for starting a token
server for more information.


Testing your license

Once you have obtained a license key for your machine, you are ready to test
your license using the Gurobi Interactive Shell. To do this, type gurobi.sh in
a Terminal window. The shell should produce the following output:

Using license file /opt/gurobi/gurobi.lic
Set parameter LogFile to value gurobi.log

Gurobi Interactive Shell, Version 9.0.0
Copyright (c) 2019, Gurobi Optimization, LLC
Type "help()" for help

gurobi>

If you are running as a client of a Gurobi Compute Server, the message above
will be preceded by a message like this:

Capacity available on 'myserver' - connecting...
Established HTTP unencrypted connection

Congratulations, your license is functioning correctly! You are now ready to
use the Gurobi Optimizer. The next section will show you how to solve a simple
optimization model.

Possible errors

If the Gurobi shell didn't produce the desired output, there's a problem with
your license. We'll list a few common errors here.

The following message...

ERROR: No Gurobi license found (user smith, host mymachine, hostid 9d3128ce)

indicates that your gurobi.lic file couldn't be found.

Did you use a non-default license file location? When you run the Linux version
of the Gurobi Optimizer, it will look for the gurobi.lic key file in three
different default locations. It will always look in your home directory. In
addition, Gurobi Optimizer 9.0.0 will also look in /opt/gurobi
and /opt/gurobi900. If you used a non-default license key file location, you
should set environment variable GRB_LICENSE_FILE to point to the license key
file. See Setting environment variables for details on how to do this.

Important note: the environment variable should point to the license key file
itself, not to the directory that contains the file.

The following message:

ERROR: HostID mismatch (licensed to 9d3128ce, hostid is 7de025e9)

indicates that your gurobi.lic isn't valid for this machine. You should make
sure that you are using the right gurobi.lic file.

If you are running as a client of a Gurobi token server and receive this
message:

ERROR: Failed to connect to token server 'myserver' (port 41954)

the token server isn't currently running. If you receive this message:

ERROR: No TOKENSERVER specified for TOKEN license

your license file is missing the TOKENSERVER= line that provides the name of
your token server. Please consult the section on setting up a token server.

If you are running as a client of a Gurobi Compute Server and receive this
message:

ERROR: No server available

the Compute Server isn't currently running. Please consult the section on
setting up a Compute Server.

If, after following the instructions, you still experience problems while
setting up or testing your license, you can contact us at key@gurobi.com.
Please include the exact text of the error message you are receiving.