User`s guide

Program Independent Jobs for a Generic Scheduler
7-23
testlocation = 'Plant30'
c.IndependentSubmitFcn = {@mysubmitfunc, time_limit, testlocation}
In this example, the submit function requires five arguments: the three defaults, along
with the numeric value of time_limit and the string value of testlocation. The
function's declaration line might look like this:
function mysubmitfunc(cluster, job, props, localtimeout, plant)
The following discussion focuses primarily on the minimum requirements of the submit
and decode functions.
This submit function has three main purposes:
To identify the decode function that MATLAB workers run when they start
To make information about job and task data locations available to the workers via
their decode function
To instruct your scheduler how to start a MATLAB worker on the cluster for each
task of your job
Client node
MATLAB client
Environment variables
Submit
function
Scheduler
MDCE_DECODE_FUNCTION
MDCE_STORAGE_CONSTRUCTOR
MDCE_STORAGE_LOCATION
MDCE_JOB_LOCATION
MDCE_TASK_LOCATION
Parallel
Computing
Toolbox
job.SubmitFcn
setenv
submit
Identify the Decode Function
The client’s submit function and the worker’s decode function work together as a pair.
Therefore, the submit function must identify its corresponding decode function. The
submit function does this by setting the environment variable MDCE_DECODE_FUNCTION.
The value of this variable is a string identifying the name of the decode function
on the path of the MATLAB worker. Neither the decode function itself nor its
name can be passed to the worker in a job or task property; the file must already