MATLAB PARALLEL COMPUTING TOOLBOX - S Guide de l'utilisateur Page 244

  • Télécharger
  • Ajouter à mon manuel
  • Imprimer
  • Page
    / 656
  • Table des matières
  • DEPANNAGE
  • MARQUE LIVRES
  • Noté. / 5. Basé sur avis des utilisateurs
Vue de la page 243
7 Program Independent Jobs
7-36
command to scheduler canceling job job_id
In a similar way, you can define what do to for deleting a job, and what to do for
canceling and deleting tasks.
Delete or Cancel a Running Job
After your functions are written, you set the appropriate properties of the cluster object
with handles to your functions. The corresponding cluster properties are:
CancelJobFcn
DeleteJobFcn
CancelTaskFcn
DeleteTaskFcn
You can set the properties in the Cluster Profile Manager for your cluster, or on the
command line:
c = parcluster('MyGenericProfile');
% set required properties
c.CancelJobFcn = @myCancelJob
c.DeleteJobFcn = @myDeleteJob
c.CancelTaskFcn = @myCancelTask
c.DeleteTaskFcn = @myDeleteTask
Continue with job creation and submission as usual.
j1 = createJob(c);
for ii = 1:n
t(ii) = createTask(j1,...)
end
submit(j1)
While the job is running or queued, you can cancel or delete the job or a task.
This command cancels the task and moves it to the finished state, and triggers execution
of myCancelTask, which sends the appropriate commands to the scheduler:
cancel(t(4))
This command deletes job data for j1, and triggers execution of myDeleteJob, which
sends the appropriate commands to the scheduler:
Vue de la page 243
1 2 ... 239 240 241 242 243 244 245 246 247 248 249 ... 655 656

Commentaires sur ces manuels

Pas de commentaire