Install and Running Matlab CobraToolbox, Gurobi, and IBM ILOG CPLEX

This document provides the steps to install and run MATLAB CobraToolbox in the cluster. Also, it provides an instructions on how to load gurobi, and IBM ILOG CPLEX.

INSTALLATION GUIDE

After logging into the cluster, load the requierd GIT module.

$ module load git/2.22

Download Cobra toolbox in your local $WORK directory by using the following command

$ git clone --depth=1 https://github.com/opencobra/cobratoolbox.git cobratoolbox

After the download been finished, a directory named “cobratoolbox” should be created in your WORK directory.

Enter the directory “cobratoolbox” using the following command

$ cd cobratoolbox

Then run the following command for uploading the required modules for cobratoolbox

$ git submodule update --init

If you need to use Gurobi then you need to load its module using the following command

$ gurobi/py38/9.5

More versions of Gurobi are installed on the HCC resources and can be discovered used the following command

$ module spider gurobi

If you need to use IBM ILOG CPLEX then you need to load its module using the following command

$ module load ibm-ilog-cplex

Then run Matlab using the following command

$ matlab 

Finally, run the following command to test CobraToolbox using the following Matlab command

>> initCobraToolbox

NOTE: you need to install CobraToolbox under your WORK directory NOT HOME directory. Because HOME directories are read-only from the compute nodes.

NOTE: if you load Gurobi and IBM ILOG CPLEX modules before starting matlab and running initCobraToolbox, CobraToolbox will automatically find them and configure them for use