User`s guide
7 Program Independent Jobs
7-4
Create a Cluster Object
You use the parcluster function to create an object in your local MATLAB session
representing the local scheduler.
parallel.defaultClusterProfile('local');
c = parcluster();
Create a Job
You create a job with the createJob function. This statement creates a job in the
cluster’s job storage location, creates the job object job1 in the client session, and if you
omit the semicolon at the end of the command, displays some information about the job.
job1 = createJob(c)
Job
Properties:
ID: 2
Type: Independent
Username: eng864
State: pending
SubmitTime:
StartTime:
Running Duration: 0 days 0h 0m 0s
AutoAttachFiles: true
Auto Attached Files: List files
AttachedFiles: {}
AdditionalPaths: {}
Associated Tasks:
Number Pending: 0
Number Running: 0
Number Finished: 0
Task ID of Errors: []
Note that the job’s State property is pending. This means the job has not yet been
submitted (queued) for running, so you can now add tasks to it.
The scheduler’s display now indicates the existence of your job, which is the pending one,
as appears in this partial listing: