User`s guide
7 Program Independent Jobs
7-14
Computing Server software or other cluster resources remain in place. When the client
session ends, only the local reference objects are lost, not the actual job and task data in
the cluster.
Therefore, if you have submitted your job to the cluster job queue for execution, you can
quit your client session of MATLAB, and the job will be executed by the cluster. You can
retrieve the job results later in another client session.
Recover Objects
A client session of Parallel Computing Toolbox software can access any of the objects in
MATLAB Distributed Computing Server software, whether the current client session or
another client session created these objects.
You create cluster objects in the client session by using the parcluster function.
c = parcluster('MyProfile');
When you have access to the cluster by the object c, you can create objects that reference
all those job contained in that cluster. The jobs are accessible in cluster object’s Jobs
property, which is an array of job objects:
all_jobs = c.Jobs
You can index through the array all_jobs to locate a specific job.
Alternatively, you can use the findJob function to search in a cluster for any jobs or a
particular job identified by any of its properties, such as its State.
all_jobs = findJob(c);
finished_jobs = findJob(c,'State','finished')
This command returns an array of job objects that reference all finished jobs on the
cluster c.
Reset Callback Properties (MJS Only)
When restarting a client session, you lose the settings of any callback properties (for
example, the FinishedFcn property) on jobs or tasks. These properties are commonly
used to get notifications in the client session of state changes in their objects. When you
create objects in a new client session that reference existing jobs or tasks, you must reset
these callback properties if you intend to use them.