Filter Content By
Version
Languages

Env.ClientEnv()

Env.ClientEnv ( logfilename=””, computeServer=””, router=””, password=””, group=””, tlsInsecure=0, priority=0, timeout=-1 )

Compute Server Env constructor. Creates a client environment on a compute server. If all compute servers are at capacity, this command will cause a job to be placed in the compute server queue, and the command will return an environment once capacity is available.

Client environments have limited uses in the Python environment. You can use a client environment as an argument to the Model constructor, to indicate that a model should be constructed on a Compute Server, or as an argument to the global read function, to indicate that the result of reading the file should be place on a Compute Server.

Arguments:

logfilename: Name of the log file for this environment. Pass an an empty string if you don't want a log file.

computeServer: Node in the Remote Services cluster. Servers can be identified by name or by IP address. You can provide a comma-separated list of nodes for redundancy.

router: The router for a Compute Server cluster. A router can be used to improve the robustness of a Compute Server deployment. You should refer to the router using either its name or its IP address. If no router is used (which is the typical case), pass an empty string.

group: The name of the Compute Server group.

tlsInsecure: Indicates whether to use insecure mode in the TLS (Transport Layer Security). Set this to 0 unless your server administrator tells you otherwise.

priority: Job priority on the compute server. Higher priority jobs are pulled from the job queue before lower priority jobs. A special value of 100 indicates that the job should run immediately.

timeout: Job queue timeout. After the specified timeout (in seconds) has elapsed, this command will give up and return a Gurobi exception. Use a negative value to indicate that the call should never timeout.

Return value:

New environment object.

Example usage:

  env = Env.ClientEnv("client.log", "server1.mycompany.com,server2.mycompany.com")