Gurobi: Difference between revisions

From Alliance Doc
Jump to navigation Jump to search
mNo edit summary
No edit summary
Line 13: Line 13:
  My Compute Canada username is "_______" and I am a member of the institution "________________".  This message confirms that I will be using the Compute Canada Gurobi > license on Compute Canada systems only for non-commercial research project(s) that will be published in a publicly available article(s).
  My Compute Canada username is "_______" and I am a member of the institution "________________".  This message confirms that I will be using the Compute Canada Gurobi > license on Compute Canada systems only for non-commercial research project(s) that will be published in a publicly available article(s).


==Gurobi Command-Line Tools== <!--T:7-->
==Gurobi Command-Line Tools== <!--T:5-->


  [gra-login2:~] salloc --time=1:00:0 --cpus-per-task=8 --mem=1G --account=def-xyz
  [gra-login2:~] salloc --time=1:00:0 --cpus-per-task=8 --mem=1G --account=def-xyz
  [gra800:~] module load gurobi
  [gra800:~] module load gurobi
  [gra800:~] gurobi_cl Threads=8 Record=1 Method=2 ResultFile=p0033.sol InputFile=p0033.mst \
  [gra800:~] gurobi_cl Record=1 Threads=8 Method=2 ResultFile=p0033.sol LogFile=p0033.log $GUROBI_HOME/examples/data/p0033.mps
    InputFile=p0033.hnt.gz LogFile=p0033.log $GUROBI_HOME/examples/data/p0033.mps
[gra800:~] gurobi_cl recording000.grbr
[gra800:~] gurobi_cl --tokens
  [gra800:~] gurobi_cl --help
  [gra800:~] gurobi_cl --help


==Gurobi Interactive Shell == <!--T:6-->
==Gurobi Interactive Shell == <!--T:6-->
 
  [gra-login2:~] salloc --time=1:00:0 --cpus-per-task=8 --mem=1G --account=def-xyz
  [gra-login2:~] salloc --time=1:00:0 --cpus-per-task=8 --mem=1G --account=def-xyz
  [gra800:~] module load gurobi  
  [gra800:~] module load gurobi
[gra800:~] echo "Record 1" > gurobi.env
  [gra800:~] gurobi.sh
  [gra800:~] gurobi.sh
  gurobi> m = read('/cvmfs/restricted.computecanada.ca/easybuild/software/2017/Core/gurobi/8.1.1/examples/data/glass4')  
  gurobi> m = read('/cvmfs/restricted.computecanada.ca/easybuild/software/2017/Core/gurobi/8.1.1/examples/data/p0033.mps')  
  gurobi> m.setParam('Threads', 8)
  gurobi> m.Params.Threads = 8
  gurobi> m.optimize()
  gurobi> m.Params.Method = 2
  gurobi> m.reset()
gurobi> m.Params.ResultFile = "p0033.sol"
  gurobi> m.Params.LogFile = "p0033.log"
  gurobi> m.optimize()
  gurobi> m.optimize()
gurobi> m.tune()
  gurobi> help()
  gurobi> help()
==Replay API Call Recordings== <!--T:7-->
[gra800:~] gurobi_cl recording000.grbr

Revision as of 00:59, 30 November 2019

Other languages:

Gurobi is a commercial software suite for solving complex optimization problems. This page wiki page describes the non-commercial use of Gurobi software on Compute Canada clusters and is currently a work in progress.

License limitations

Compute Canada supports and provides a free license to use Gurobi Graham, Cedar, Beluga and Niagara clusters. The license provides a total number of 4096 simultaneous uses (tokens in use) and permits distributed usage. A single user can run multiple simultaneous jobs. In order to use Gurobi you must agree to certain conditions. Please contact support with a copy of the following statement. You will then be added into the Compute Canada license file as a permitted user.

My Compute Canada username is "_______" and I am a member of the institution "________________".  This message confirms that I will be using the Compute Canada Gurobi > license on Compute Canada systems only for non-commercial research project(s) that will be published in a publicly available article(s).

Gurobi Command-Line Tools

[gra-login2:~] salloc --time=1:00:0 --cpus-per-task=8 --mem=1G --account=def-xyz
[gra800:~] module load gurobi
[gra800:~] gurobi_cl Record=1 Threads=8 Method=2 ResultFile=p0033.sol LogFile=p0033.log $GUROBI_HOME/examples/data/p0033.mps
[gra800:~] gurobi_cl --help

Gurobi Interactive Shell

[gra-login2:~] salloc --time=1:00:0 --cpus-per-task=8 --mem=1G --account=def-xyz
[gra800:~] module load gurobi
[gra800:~] echo "Record 1" > gurobi.env
[gra800:~] gurobi.sh
gurobi> m = read('/cvmfs/restricted.computecanada.ca/easybuild/software/2017/Core/gurobi/8.1.1/examples/data/p0033.mps') 
gurobi> m.Params.Threads = 8
gurobi> m.Params.Method = 2
gurobi> m.Params.ResultFile = "p0033.sol"
gurobi> m.Params.LogFile = "p0033.log"
gurobi> m.optimize()
gurobi> help()

Replay API Call Recordings

[gra800:~] gurobi_cl recording000.grbr