Nested parfor loops ( a statement within a parfor loop calls a function which also contains a parfor loop)

1 回表示 (過去 30 日間)
Hi all
I need to use a parfor loop to speed up the code running. However, it reports errors when a statement within this parfor loop (marked in dFC.m, line 45) calls a function which also contains a parfor loop (marked in multilayerNetFunc.m, line 28). I can run them smoothly if I change either of them into 'for-loop'. I have been trying to find the solution by google and looking up the information in this community. But haven't found the right tips.
I really need these two parfor loops stay in position or it will be a week-long process for my computer.
Wish somebody could help me to figure out the solution!
Thanks!
ps: The two scripts have been attached to this post.
  7 件のコメント
Yovan Ho
Yovan Ho 2020 年 2 月 21 日
Ok~ Thank you very much! I'll see what I can do to upload the runable version. Sorry, I didn't realize this is necessary. The original code needs to call a couple of neuroimaging processing packages. I'll try to replace the input with modelling data and provide the code later. I really hope someone could help me to solve this problem! Thanks!
Yovan Ho
Yovan Ho 2020 年 2 月 21 日
Hi
I have been struggling to make the parfor-loops in dFC.m & multilayerNetFunc.m feasible. But haven't found the solution yet. I have attached the runable version of my code with this post. However, this community doesn't allow to upload packages, I am not sure if without the complete package-(genlouvain:http://netwiki.amath.unc.edu/GenLouvain/GenLouvain) the major script dFC.m still can run smoothly. Nevertheless, I still wish somebody could help me to solve this problem! Thanks!

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

回答 (0 件)

カテゴリ

Help Center および File ExchangeLoops and Conditional Statements についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by