User`s guide
7 Program Independent Jobs
7-22
Client node
MATLAB client
Environment
variables
Submit
function
Worker node
MATLAB worker
Environment
variables
Decode
function
Scheduler
Note Whereas the MJS keeps MATLAB workers running between tasks, a third-party
scheduler runs MATLAB workers for only as long as it takes each worker to evaluate its
one task.
MATLAB Client Submit Function
When you submit a job to a cluster, the function identified by the cluster object's
IndependentSubmitFcn property executes in the MATLAB client session. You set the
cluster’s IndependentSubmitFcn property to identify the submit function and any
arguments you might want to send to it. For example, to use a submit function called
mysubmitfunc, you set the property with the command
c.IndependentSubmitFcn = @mysubmitfunc
where c is the cluster object in the client session, created with the parcluster function.
In this case, the submit function gets called with its three default arguments: cluster, job,
and properties object, in that order. The function declaration line of the function might
look like this:
function mysubmitfunc(cluster, job, props)
Inside the function of this example, the three argument objects are known as cluster,
job, and props.
You can write a submit function that accepts more than the three default arguments,
and then pass those extra arguments by including them in the definition of the
IndependentSubmitFcn property.
time_limit = 300