If you are a Compute Server user, we recommend that you read How do I set up a Gurobi Compute Server Cluster (with/without a manager)? for information about configuring and using Remote Services. This article provides instructions to create a Compute Server client license in a self-managed Compute Server Cluster. If you are working with a managed cluster, please see How do I set up a managed Compute Server Cluster?
You have two options for indicating that a Gurobi program will act as a client of a Compute Server.
Using Gurobi parameters
If you are writing an application that calls Gurobi from a programming language API, these APIs provide parameters that allow you to specify the name of a Compute Server node (ComputeServer) before starting your Gurobi environment. With this approach, Gurobi license files aren't required on the client.
For Python, this may look as follows:
import gurobipy as gp
env = gp.Env(empty=True)
Using a license file
Alternatively, you can set up a
gurobi.lic file that points to the Compute Server. This option allows you to use a Compute Server with nearly any program that calls Gurobi, without the need to modify the calling program. You can create your client
gurobi.lic with a text editor. The file should contain a line that looks like this:
or like this:
This line should provide the name or IP address of any machine in your Compute Server cluster, optionally followed by the chosen port number on that server (which was chosen when you set up the Compute Server on that machine). If your Compute Server uses a password, you should also include a line that gives the password:
Please consult the Using Remote Services section of the Gurobi Remote Services Reference Manual for more information.
Note that if your client and server are both running on the same machine, you'll need to
- set the GRB_LICENSE_FILE environment variable to point to the Compute Server license.
- You'll then need to create a separate gurobi.lic file for the client, and
- temporarily set the GRB_LICENSE_FILE environment variable to point to this file. Please see Where do I place the Gurobi license file (gurobi.lic)? for important details.