Parfor consistently stalls with 0% CPU usage
조회 수: 3 (최근 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에서 Loops and Conditional Statements에 대해 자세히 알아보기
제품
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!