Run-Time of Parfor becomes unbelievably lengthy sometimes

10 visualizaciones (últimos 30 días)
Yijun Li
Yijun Li el 21 de Abr. de 2018
Comentada: OCDER el 16 de Jul. de 2018
I have run my program multiple times using Parfor with profiling in Matlab-R2018a and there is no run-time error of the program. In most of times, the run-time is around 3000 seconds with the majority of run-time spent in "java.util.concurrent.LinkedBlockingQueue(Java method)".
But sometimes, the run-time became unbelievably lengthy up to 44370 seconds while the majority of which is also spent in "java.util.concurrent.LinkedBlockingQueue(Java method)".
As I have read a relevant MATLAB Answer in https://uk.mathworks.com/matlabcentral/answers/41353-parfor-takes-a-lot-of-time-to-run, the item "java.util.concurrent.LinkedBlockingQueue(Java method)" in profiler does not give any clue about where the workers are spending time, hence I guess there might be some unexpected internal run-time behaviours of Parfor (parallel computing toolbox) in Matlab-R2018a that could happen sometimes depending on the state of device.
I got such guess based on the thread posted by Meng-Yuan Huang in https://groups.google.com/forum/#!topic/comp.soft-sys.matlab/HYqR91wiWyk to the above MATLAB Answer in the first hyperlink, where it said a specific strange behaviour of Parfor it had encountered in Matlab-R2016b was solved by restarting Matlab.
  7 comentarios
Andrea Stevanato
Andrea Stevanato el 16 de Jul. de 2018
I was wrong, why matlab have this behaviour???
OCDER
OCDER el 16 de Jul. de 2018
To resolve yours or Yijun's slow parfor issue, someone has to provide EVERY code required to recreate the stalling behavior. So if someone in the forum downloads the .m files (or zip file) and runs your main function, it should repeat exactly what you do right before the program stalls.
>> myMainFcn %your main function that'll replicate EXACTLY what you do to get it stall
We need something to work with other than pseudocodes. Even better is if you can provide a simple example script that still replicates the stalling problem without all the extra lines of codes.

Iniciar sesión para comentar.

Respuestas (0)

Categorías

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

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by