User`s guide
Program Independent Jobs for a Generic Scheduler
7-37
delete(j1)
Get State Information About a Job or Task
When using a third-party scheduler, it is possible that the scheduler itself can have more
up-to-date information about your jobs than what is available to the toolbox from the
job storage location. To retrieve that information from the scheduler, you can write a
function to do that, and set the value of the GetJobStateFcn property as a handle to
your function.
Whenever you use a toolbox function such as wait, etc., that accesses the state of a job
on the generic scheduler, after retrieving the state from storage, the toolbox runs the
function specified by the GetJobStateFcn property, and returns its result in place of
the stored state. The function you write for this purpose must return a valid string value
for the State of a job object.
When using the generic scheduler interface in a nonshared file system environment, the
remote file system might be slow in propagating large data files back to your local data
location. Therefore, a job’s State property might indicate that the job is finished some
time before all its data is available to you.
Summary
The following list summarizes the sequence of events that occur when running a job that
uses the generic scheduler interface:
1
Provide a submit function and a decode function. Be sure the decode function is on
all the MATLAB workers’ search paths.
The following steps occur in the MATLAB client session:
1
Define the IndependentSubmitFcn property of your scheduler object to point to the
submit function.
2
Send your job to the scheduler.
submit(job)
3
The client session runs the submit function.
4
The submit function sets environment variables with values derived from its
arguments.
5
The submit function makes calls to the scheduler — generally, a call for each task
(with environment variables identified explicitly, if necessary).