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%