Personal tools
You are here: Home Documentation Installed Software Matlab Run Matlab Jobs via Matlab Runtime

Run Matlab Jobs via Matlab Runtime

What Is Matlab Runtime?

Normally Matlab is invoked as a graphical interface system, although it can also be invoked on the command line with a Matlab script file as an argument. Matlab runtime is an alternative method of invoking Matlab code via the command line.

What Are The Advantages of Matlab Runtime?

Using Matlab in the traditional way uses a Matlab licence instance for each invocation. By using the Matlab runtime the need for a Matlab licence for each invocation is removed (although a site licence for the runtime is required). This means that if you have, say, 40 Matlab jobs that you want to potentially run at the same time you are better off using Matlab runtime as you won't be limited to a time when there are 40 free licences across campus to be able to run your job.

How to use Matlab Runtime

First set up your Matlab Runtime environment by doing

source /wrg/profile.d/matlab-runtime

See these instructions from Matlab for additional help.

If you have a function named myfunc() in a Matlab m-script file myfunc.m

Run

mcc -m myfunc.m

This will create C source files called myfunc_main.c and myfunc_mcc_component_data.c an executable called myfunc and a run script called run_myfunc.sh

To run this type

./run_myfunc.sh $MCRROOT parameters (parameters if any parameters for the job)

For array jobs a wrapper script for handling parameters within a Sun Grid Engine array job system is required.
Document Actions
« March 2010 »
March
MoTuWeThFrSaSu
1234567
891011121314
15161718192021
22232425262728
293031
 

YorkWeb Disclaimer | YorkWeb Enquiries | YorkWeb Advanced Search | YorkWeb Text only