Create independent job on cluster
obj = createJob(cluster)
obj = createJob(...,'p1
',v1,'p2
',v2,...)
job = createJob(...,'Profile','profileName',...)
| The job object. |
| The cluster object created by |
| Object properties configured at object creation. |
| Initial values for corresponding object properties. |
obj = createJob(cluster)
creates an independent
job object for the identified cluster.
The job's data is stored in the location specified by
the cluster's JobStorageLocation
property.
obj = createJob(...,'
creates
a job object with the specified property values. For a listing of
the valid properties of the created object, see the p1
',v1,'p2
',v2,...)parallel.Job
object reference page.
The property name must be in the form of a string, with the value
being the appropriate type for that property. In most cases, the values
specified in these property-value pairs override the values in the
profile; but when you specify AttachedFiles
or AdditionalPaths
at
the time of creating a job, the settings are combined with those specified
in the applicable profile. If an invalid property name or property
value is specified, the object will not be created.
job = createJob(...,'Profile','profileName',...)
creates an independent job object with the property values specified
in the profile 'profileName'
. If a profile is not
specified and the cluster has a value specified in its 'Profile'
property,
the cluster's profile is automatically applied. For details
about defining and applying profiles, see Clusters and Cluster Profiles.
Create and Run a Basic Job
Construct an independent job object using the default profile.
c = parcluster j = createJob(c);
Add tasks to the job.
for i = 1:10 createTask(j,@rand,1,{10}); end
Run the job.
submit(j);
Wait for the job to finish running, and retrieve the job results.
wait(j); out = fetchOutputs(j);
Display the random matrix returned from the third task.
disp(out{3});
Delete the job.
delete(j);
Create a Job with Attached Files
Construct an independent job with attached files in addition to those specified in the default profile.
c = parcluster j = createJob(c,'AttachedFiles',... {'myapp/folderA','myapp/folderB','myapp/file1.m'});
createCommunicatingJob
| createTask
| findJob
| parcluster
| recreate
| submit