Parfor consistently stalls with 0% CPU usage
1 次查看(过去 30 天)
显示 更早的评论
Hello,
We have an odd problem with parfor: it seems to stall sporadically for long periods of time (5-70 seconds) with no CPU activity, but eventually completes with no errors. The delay appears to happen after the computation has completed, but MATLAB still says "Busy" with the green bars indicating the worker threads are still running. I do not see any stalling with a regular 'for' loop. If I hit Control-C during the delay, I get:
Operation terminated by user during distcomp.remoteparfor/getCompleteIntervals (line 127).
System details: Dell Precision T7600 with two Xeon E5-2687W processors (16 cores total) and 128 GB of total RAM, Windows 7 professional with MATLAB 2014a or 2015a. We typically run a parallel pool with 10 cores.
I have looked through other questions and have not found anything relevant. Has anyone experienced this behavior? If so, did you find a solution?
Here is some example code to reproduce the problem:
N = 10000; M = 3000;
gcp;
for i=1:20,
X = rand(N,M);
tic;
parfor (j=1:N)
output = median( X(j,:) );
end
disp(toc);
end
Example run-times (seconds): 1.0, 0.78, 8.9, 3.1, 40, 47, 67, 58, 35
Thank you very much for your advice,
0 个评论
回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Logical 的更多信息
产品
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!