필터 지우기
필터 지우기

Run-Time of Parfor becomes unbelievably lengthy sometimes

조회 수: 3 (최근 30일)
Yijun Li
Yijun Li 2018년 4월 21일
댓글: OCDER 2018년 7월 16일
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
Andrea Stevanato
Andrea Stevanato 2018년 7월 16일
I was wrong, why matlab have this behaviour???
OCDER
OCDER 2018년 7월 16일
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.

댓글을 달려면 로그인하십시오.

답변 (0개)

카테고리

Help CenterFile Exchange에서 Loops and Conditional Statements에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by