rs02.gms : Solving Three-dimensional Noughts and Crosses using Cplex and Gurobi distributed MIP

Description

We solve the cube model using the Gurobi distributed algorithm. The information about the compute
server addresses (using Gurobi's compute manager), ports and password come through the environment
variable GUROBI_CS_MANAGER, GUROBI_CS_USER and GUROBI_CS_PASSWORD.


Small Model of Type : GAMS


Category : GAMS Test library


Main file : rs02.gms

$title  Solving Three-dimensional Noughts and Crosses using Gurobi distributed algorithm (RS02,SEQ=676)
$onText

We solve the cube model using the Gurobi distributed algorithm. The information about the compute
server addresses (using Gurobi's compute manager), ports and password come through the environment
variable GUROBI_CS_MANAGER, GUROBI_CS_USER and GUROBI_CS_PASSWORD.
$offText

$onEcho > gurobi.lic
CSMANAGER=%sysenv.GUROBI_CS_MANAGER%
USERNAME=%sysenv.GUROBI_CS_USER%
PASSWORD=%sysenv.GUROBI_CS_PASSWORD%
$offEcho

$setEnv GRB_LICENSE_FILE "%gams.workdir%gurobi.lic"

$set gams_license ''
$if exist "%gams.sysdir%plicense.txt" $set gams_license license="%gams.sysdir%plicense.txt"

* Distributed MIP

$onEcho > gurobi.opt
DistributedMIPJobs 2
$offEcho

$call gamslib -q cube
$echo "abort$(cube.modelstat<>1 or cube.solvestat<>1) 'Bad model/solvestatus';" >> cube.gms
$call.checkErrorLevel gams cube solver=gurobi lo=2 optfile=1 %gams_license%

* Distributed Tuning

$onEcho > gurobi.opt
tuning gurobi.op2
tunejobs 2
tunetimelimit 5
$offEcho

$onEcho > gurobi.op2
$offEcho

$call gamslib -q cube
$echo "abort$(cube.modelstat<>14 or cube.solvestat<>1) 'Bad model/solvestatus';" >> cube.gms
$call.checkErrorLevel gams cube solver=gurobi lo=2 optfile=1 %gams_license%