MATLAB Runtime

Jump to: navigation, search

"The MATLAB Runtime is a standalone set of shared libraries that enables the execution of compiled MATLAB applications or components on computers that do not have MATLAB installed. When used together, MATLAB, MATLAB Compiler, and the MATLAB Runtime enable you to create and distribute numerical applications or software components quickly and securely."


You must have access to a valid MATLAB Compiler license on a computer running Linux to compile MATLAB code. You can execute the compiled code on an ACENET cluster using the MATLAB Runtime environment without the need for a MATLAB license on that cluster. You must use the command line and the Grid Engine job scheduler to submit your work to the cluster.

The version of the MATLAB Compiler on your machine and the MATLAB Runtime on the ACENET machine must match. You can see what versions are available by running

module avail matlab-runtime

at the command line on any of our clusters.


Running the MATLAB Compiler on your code will produce two files, a shell file and an executable. For example, if your MATLAB code is in Test.m, it will produce files named and Test. Transfer both these files to the cluster. Then create a job script like the following:

#$ -cwd
#$ -j yes
#$ -l h_rt=48:0:0
#$ -l h_vmem=4G
module load matlab-runtime/r2017a
./ $MCR

and submit it with qsub jobscript. You may need to adjust the time (h_rt) and memory (h_vmem) requests; see Job Control for more details. Early experience suggests 4G of memory may be a bare minimum. If your initial test run fails for no apparent reason, try increasing h_vmem.

Further reading