Zombie MATLAB Processes Remain After parpool/parfor and delete(gcp('nocreate'))
8 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
Sean
le 4 Juil 2025
Réponse apportée : Edric Ellis
le 8 Juil 2025
I'm encountering a persistent issue with MATLAB's Parallel Computing Toolbox when using "parpool('Processes', 20)" or "parpool(20)" and later "parfor" computing.
I launch a pool using "parpool('Processes', 20)" or "parpool(20)" and then run a parfor loop. During execution, CPU and memory usage behave normally.
After the computation ends as expectation, I call "delete(gcp('nocreate'))" to close the parallel pool or time ends MATLAB shuts it down. However, CPU usage spikes to 100%, and dozens of MATLAB background processes remain visible in Task Manager, each using ~1–2% CPU. Even after closing the main MATLAB GUI, the processes continue running.
The only thing i can do is restart the computer.
3 commentaires
Raymond Norris
le 7 Juil 2025
@Sean I'm gathering these dozens of MATLAB processes weren't running before you started the pool? You're running R2025a, have you seen this with any older versions of MATLAB?
What does the following return?
feature numcores
After you delete the pool, what does the following return?
isempty(gcp("nocreate"))
Réponse acceptée
Edric Ellis
le 8 Juil 2025
This is not expected. Please contact MathWorks support who can help get to the bottom of this problem. When you contact them, it would be helpful to include the following pieces of information
- MATLAB version, computer OS
- What are you running on the workers? Numerics? Graphics? Simulink?
- Can you reproduce the problem using delete(parpool("Processes")) ?
As a temporary workaround, here are a couple of things you can try, either in MATLAB, or at a Windows Command Prompt. Firstly, list all worker MATLAB processes
% List worker processes
!tasklist /fi "IMAGENAME eq MATLAB.exe" /fi "WINDOWTITLE ne MATLAB*" /v
Rather than rebooting your system, you can try cautiously the following command, which will forcibly terminate the processes listed above:
% DANGER DANGER! THIS COMMAND KILLS PROCESSES!
!taskkill /fi "IMAGENAME eq MATLAB.exe" /fi "WINDOWTITLE ne MATLAB*"
0 commentaires
Plus de réponses (0)
Voir également
Catégories
En savoir plus sur Parallel Computing Fundamentals dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!