Creating a Compute Server client license


Creating a Compute Server client license

You have two options for indicating that a Gurobi program will act as a client of a Compute Server. If you are writing a program that calls the Gurobi C, C++, Java, .NET, or Python APIs, these APIs provide routines that allow you to specify the names of the Compute Servers (GRBloadclientenv in C, and special signatures for the GRBEnv constructor in the object-oriented languages). If you use these routines, Gurobi licenses aren't required on the client.

Alternately, 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:

COMPUTESERVER=machine1.mydomain.com,machine2.mydomain.com,machine3.mydomain.com
or like this:
COMPUTESERVER=192.168.1.100,192.168.1.101,192,168.1.102
This line provides a comma-separated list of Gurobi Compute Servers. If your Compute Servers use a password, you should also include a line that gives the password:
PASSWORD=cspwd

Please consult the Gurobi Compute Server section of the Gurobi Reference Manual for more information.

Note that if your client and server are both running on the same machine, they can share the same gurobi.lic file. You just need to add a COMPUTESERVER=localhost line to the gurobi.lic file you obtained from our website. The Compute Server will ignore this line, and the client will ignore everything but this line. Another option in this situation 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 setting up a Compute Server for more information.