Parfor consistently stalls with 0% CPU usage

3 visualizaciones (últimos 30 días)
Daniel Terry
Daniel Terry el 29 de Sept. de 2015
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,

Respuestas (0)

Categorías

Más información sobre Loops and Conditional Statements en Help Center y File Exchange.

Productos

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by