User`s guide
Program Independent Jobs on a Local Cluster
7-5
c
Local Cluster
Associated Jobs
Number Pending: 1
Number Queued: 0
Number Running: 0
Number Finished: 0
Create Tasks
After you have created your job, you can create tasks for the job using the createTask
function. Tasks define the functions to be evaluated by the workers during the running
of the job. Often, the tasks of a job are all identical. In this example, five tasks will each
generate a 3-by-3 matrix of random numbers.
createTask(job1, @rand, 1, {{3,3} {3,3} {3,3} {3,3} {3,3}});
The Tasks property of job1 is now a 5-by-1 matrix of task objects.
job1.Tasks
ID State FinishTime Function Error
-----------------------------------------------------
1 1 pending @rand
2 2 pending @rand
3 3 pending @rand
4 4 pending @rand
5 5 pending @rand
Submit a Job to the Cluster
To run your job and have its tasks evaluated, you submit the job to the cluster with the
submit function.
submit(job1)
The local scheduler starts the workers on your machine, and distributes the tasks of
job1 to these workers for evaluation.