Zombie MATLAB Processes Remain After parpool/parfor and delete(gcp('nocreate'))
Show older comments
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 Comments
Sean
on 5 Jul 2025
Raymond Norris
on 7 Jul 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"))
Accepted Answer
More Answers (0)
Categories
Find more on Parallel Computing Fundamentals in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!