Is there a known issue with parfor loops in linux?

10 visualizaciones (últimos 30 días)
Andrew Harris
Andrew Harris el 16 de Jul. de 2015
Respondida: Andrew Harris el 11 de Ag. de 2015
I have code that uses a parfor loop to iterate over arrays with the signal processing toolkit pburg function. It works fine in Windows but in Linux the computer becomes unresponsive when I run it. Has anyone experienced long parfor loops causing this kind of thing? I have tried reducing the number of workers in the cluster with no change. The code causing the problem is:
parfor n = 1:numberOfArrays
Pxx = pburg(arrays(:, :, n), p(n), NFFT(n), fs(n));
  3 comentarios
Shuo el 7 de Ag. de 2015
I have the same problem. I think it probably has something to do with the hardware and the linux distribution.
I think the parfor worked when I updated my system to fedora 21, but it did not work on fedora 20 and ubuntu 14.04 which I am now using.
Shuo el 7 de Ag. de 2015
I think it has something to do with the cpu temperature.
I tracked the cpu temperature every minute and found the temperature went from about 30 C to 64 C, and the system became unresponsive. When I check the syslog after rebooting, there are strange characters ^@^@^@^@^@ kept in my syslog, and no more activity after the halt.

Iniciar sesión para comentar.

Respuesta aceptada

Andrew Harris
Andrew Harris el 11 de Ag. de 2015
I fixed the issue by eliminating the parfor entirely, and using arrayfun:
Pxx = arrayfun(@(n) pburg(arrays(:, :, n), p(n), NFFT(n), fs(n)), 1:numberOfArrays, 'UniformOutput', false);
Pxx = reshape(cell2mat(Pxx), size(cell2mat(Pxx(1)), 1), [], numberOfArrays);

Más respuestas (1)

Richa Gupta
Richa Gupta el 20 de Jul. de 2015
There is no known issue with parfor specific to any platform. Normally, this issue is seen when the number of workers is more than the number of physical cores available in the machine. What is the number of physical cores in your Windows and Linux machines? You can find this by executing the command "feature numcores" in MATLAB. Also, what is the number of workers you have set in MATLAB in both the machines? It would be easier for the community to help if you can provide a sample code.


Más información sobre Parallel Computing Fundamentals en Help Center y File Exchange.

Community Treasure Hunt

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

Start Hunting!

Translated by