PCT : cannot cancel a running job without a PCT chrash
1 vue (au cours des 30 derniers jours)
Afficher commentaires plus anciens
Mikaël LE GRAND
le 2 Avr 2019
Commenté : Edric Ellis
le 4 Avr 2019
Hello
I think i have an infinite loop running in a worker. Each time i try to cancel it, PCT crashes. When i restart parallel pool with :
if isempty(gcp('nocreate'))
p = parpool(1);
else
p = gcp('nocreate');
end
and then i ask for jobs with :
p.Cluster.Jobs
which gives :
ans =
Job
Properties:
ID: 1
Type: concurrent
Username: blafa
State: running
SubmitDateTime: 02-Apr-2019 14:49:24
StartDateTime: 02-Apr-2019 14:49:33
Running Duration: 0 days 0h 14m 47s
NumWorkersRange: [1 1]
AutoAttachFiles: true
Auto Attached Files: List files
AutoAddClientPath: true
AttachedFiles: {}
AdditionalPaths: 9 paths
Associated Tasks:
Number Pending: 0
Number Running: 1
Number Finished: 0
Task ID of Errors: []
Task ID of Warnings: []
when i try to cancel it, PCT crashes :
p.Cluster.Jobs.cancel
The client lost connection to worker 1. This might be due to network problems, or the interactive communicating job might have
errored.
0 commentaires
Réponse acceptée
Edric Ellis
le 3 Avr 2019
When you run a parallel pool, PCT uses a parallel.Job behind the scenes to launch and co-ordinate the workers. By directly cancelling that Job, you're asking the PCT Cluster object to forcibly terminate all the worker processes. This causes the parallel pool session to abort, because the workers have been shut down. This is precisely what you're seeing here.
Could I ask: where is the actual problem you're encountering?
2 commentaires
Edric Ellis
le 4 Avr 2019
The job reappears because it is being used behind the scenes by the parallel pool. This is entirely normal - you should leave it running, and when the parallel pool is deleted, the job will be deleted.
Plus de réponses (0)
Voir également
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!