User`s guide
7-7
Creating and Finding Jobs and Tasks
In the old interface, to create or find jobs or tasks, you could specify property name
and value pairs in structures or cell arrays, and then provide the structure or cell
array as an input argument to the function you used. In the new interface, property
names and values must be pairs of separate arguments, with the property name as a
string expression and its value of the appropriate type. This applies to the functions
createJob, createCommunicatingJob, createTask, findJob, and findTask.
Batch
Jobs created by the batch command use the new interface, even if you specify
configurations or properties using the old interface. For example, the following code
generates two identical jobs of the new interface, even though job j2 is defined with an
old interface property. The script randScript contains just the one line of code, R =
rand(3), and the default profile is local.
j1 = batch('randScript','AdditionalPaths','c:\temp');
j1.wait;
R1 = j1.load('R');
or
j2 = batch('randScript','PathDependencies','c:\temp');
j2.wait;
R2 = j2.load('R');
whos
Name Size Bytes Class
R1 1x1 248 struct
R2 1x1 248 struct
j1 1x1 112 parallel.job.CJSIndependentJob
j2 1x1 112 parallel.job.CJSIndependentJob
Communicating Job Wrapper
In the old interface, for a parallel job in an LSF, TORQUE, or PBS Pro scheduler, you
would call the scheduler’s setupForParallelExecution method with the necessary
arguments so that the toolbox could automatically set the object’s ClusterOSType and
ParallelSubmissionWrapperScript properties, thus determining which wrapper
was used. In the new interface, with a communicating job you only have to set the LSF,
Torque, or PBSPro cluster object’s OperatingSystem and CommunicatingJobWrapper