From the Gurobi website: The Gurobi Optimizer is a state-of-the-art solver for mathematical programming. The solvers in the Gurobi Optimizer were designed from the ground up to exploit modern architectures and multi-core processors, using the most advanced implementations of the latest algorithms. It includes the following solvers: linear programming solver (LP), mixed-integer linear programming solver (MILP), mixed-integer quadratic programming solver (MIQP), quadratic programming solver (QP), quadratically constrained programming solver (QCP), and mixed-integer quadratically constrained programming solver (MIQCP).


  • 9.0.2

Authorized Users

  • CIRCE account holders
  • SC account holders


  • CIRCE cluster
  • SC cluster


Gurobi requires the following module file to run:

  • apps/gurobi/9.0.2

Running Gurobi on CIRCE/SC

The Gurobi user guide is essential to understanding the application and making the most of it. The guide and this page should help you to get started with your simulations. Please refer to the Documentation section for a link to the guide.

  • Note on CIRCE: Make sure to run your jobs from your $WORK directory!
  • Note: Scripts are provided as examples only. Your SLURM executables, tools, and options may vary from the example below. For help on submitting jobs to the queue, see our SLURM User’s Guide.

The Gurobi Optimizer includes several interfaces. In order to use graphical interfaces, users will need to connect to the CIRCE/SC Desktop Environment. See CIRCE/SC Desktop Environment for more information and instructions.

Launching Gurobi

Gurobi can be launched from any terminal window once you are connected to CIRCE/SC. After you have the module loaded, simply type "" at the command prompt, to enter the Gurobi interactive shell.

[user@login0 ~]$ cd my/jobdir
[user@login0 jobdir]$ module add apps/gurobi/9.0.2
[user@login0 jobdir]$

The Gurobi documentation is essential to understanding the application and making the most of it. Browse through the links below for more information about the features in the Gurobi Optimizer, and how to use them.

Tasks Longer than 30 Minutes

To run Gurobi jobs on CIRCE/SC, users will need to submit "batch jobs" to the scheduling environment if their jobs takes more than 30 minutes to run on a standard PC. The command to run Gurobi in batch mode is "gurobi_cl".

If, for example, you have a Gurobi script file named testing.lp with all your functions defined in it, you would set up a submit script like this:

  • The script below (for testing, name it "gurobi-test.sub") can be copied into your job directory (the folder with your input files) and modified so that you can submit batch processes to the queue. For help on submitting jobs to the queue, see our SLURM User's Guide. Scripts are provided as examples only. Your SLURM executables, tools, and options will vary.
#SBATCH --job-name=gurobi-test
#SBATCH --ntasks=1
#SBATCH --mem-per-cpu=1024
#SBATCH --output=output.%j.gurobi-test
#SBATCH --time=01:00:00

#### Slurm 1 processor Gurobi test to run for 1 hour.

module load apps/gurobi/9.0.2

gurobi_cl ResultFile=testing.sol ./testing.lp


  • Then, make sure that you are in the correct job directory, and run the sbatch command to submit the job:
[user@login0 ~]$ cd my/jobdir
[user@login0 jobdir]$ sbatch ./gurobi-test.sub
  • You can view the status of your job with the “squeue -u <username>” command.

Using the Gurobi toolbox with Matlab

Establishing a GUI connection to CIRCE/SC

To use Gurobi, you will need to connect to CIRCE/SC with GUI redirection, either using:

  • CIRCE/SC Desktop Environment
  • SSH with X11 redirection
    • If connecting from OSX or Linux via SSH, please ensure that you use one of the following commands to properly redirect X11:
      • [user@localhost ~]$ ssh -X
      • [user@localhost ~]$ ssh -X

Once connected to CIRCE/SC, you will need to load the proper modules in your terminal window. See above for more details about modules and below for an example. If you have properly configured an X11 session, you should see the full Matlab interface.

[user@login0 ~]$ module add apps/gurobi/9.0.2
[user@login0 ~]$ module add apps/matlab/r2019b
[user@login0 ~]$ matlab

To begin, you'll need to tell MATLAB where to find the Gurobi routines. A script is provided to assist with this. The Gurobi MATLAB setup script, gurobi_setup.m, can be found in:

  • /apps/gurobi/gurobi652/linux64/matlab

After you have the Matlab interface open, you will need to issue a few commands within MATLAB to change to the matlab directory and call gurobi_setup:

>> cd /apps/gurobi/gurobi751/linux64/matlab
>> gurobi_setup


Home Page, User Guides, and Manuals

Benchmarks, Known Tests, Examples, Tutorials, and Other Resources

More Job Information

See the following for more detailed job submission information:

Reporting Bugs

Report bugs with Gurobi to the IT Help Desk: