フィルターのクリア

bug parfor: analyzing and transferring files to worker: not done: blocked

59 ビュー (過去 30 日間)
student student
student student 2024 年 1 月 17 日
編集済み: Walter Roberson 2024 年 7 月 7 日 20:33
Hello there,
I am a running a working script with parfor on matlab, after a while (~1200 iteration on parfor), matlab block without appareant reasons while producing the following message: "analyzing and transferring files to workers...". I am running the parfor on matlab 2023a, on local parfor only. I did validate the cluster of parfor before. The code is working correctly as the 1200 files were done. I tried with other very similar files and it did block also similarly. There is largely enough memory space on my PC. I tried to restart matlab, and also my PC, but this did not solve the problem. I also tried to find solution online, unsuccesfully. Anyone would have an idea ? many thanks for your attention.
  2 件のコメント
Ganesh
Ganesh 2024 年 1 月 17 日
In order for us to reproduce this issue, it would be a helpful if you share your code files.
I would also request you to share the stack trace of the error you are encountering.
student student
student student 2024 年 1 月 17 日
編集済み: Walter Roberson 2024 年 7 月 7 日 20:33
Thanks Ganesh,
The code is working, so there is no error message.
The code is very classic, and as following:
---------------------------------------------------------------------------------------------------
a=1:1:10000;
parfor amF=1:length(a)
functAA(a,amF)
end
---------------------------------------------------------------------------------------------------
So, I guess it is more low level, matlab bug on parfor
thanks

サインインしてコメントする。

回答 (2 件)

Edric Ellis
Edric Ellis 2024 年 1 月 17 日
The "analyzing and transferring files to workers" message occurs only when the workers encounter a failure to find some code that they need. If you're using the "local" cluster type, then you should basically never see this. You can diagnose what got transferred by using listAutoAttachedFiles after your parfor loop, like this:
parfor i = 1:n
doStuff()
end
% Assuming "analyzing and transferring..." message has occurred
listAutoAttachedFiles(gcp())
  3 件のコメント
Steven Lord
Steven Lord 2024 年 1 月 17 日
Without seeing the body of your functAA function, I suspect it's probably going to be difficult or impossible to offer any specific suggestions.
student student
student student 2024 年 1 月 22 日
thank you for your responses. what I suspect here is that the parfor display: "analyzing and transferring files to workers..." as it cannot find some unproduced data into the loop: so it should stop and report the problem. but instead it display this message. thanks

サインインしてコメントする。


Felix
Felix 2024 年 7 月 7 日 8:07
Ok. This is a bit late but hope it still helps. Also this may help people like me who encountered the same problem.
The behavior of stucking on 'analyzing and transferring files to worker ...' is most likely caused by error thrown by whatever functions called within the parfor loop somewhere in the middle of the parfor iterations.
When this happens, for reasons, instead of actually reporting the error, MATLAB will stuck on the message 'analyzing and transferring files to worker ...'.
The fix of this problem is obviously to resolve the error within the parfor loop. To see the error message, the workaround for MATLAB 2024a/2023b (I didn`t check other releases) is using thread based parpool, i.e., pool = parpool('Threads') before the parpool.
I hope this helps.

カテゴリ

Help Center および File ExchangeParallel for-Loops (parfor) についてさらに検索

製品


リリース

R2023a

Community Treasure Hunt

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

Start Hunting!

Translated by