How to fix an error in Parallel Processing?

1 回表示 (過去 30 日間)
Benson Gou
Benson Gou 2019 年 8 月 31 日
コメント済み: Walter Roberson 2019 年 9 月 4 日
Dear All,
When I tried to use parfor to run my code, I always got the following error message (I defined the variable "red" at different places but still got this error message):
"An UndefinedFunction error was thrown on the workers for 'red'. This might be because the file containing 'red' is not accessible on the workers. Use addAttachedFiles(pool, files) to specify the required files to be attached. For more information see the documentation for 'parallel.Pool/addAttachedFiles'.
Caused by:
Undefined function or variable 'red'."
It is weird for me because I tried to define "red" at different place but still cannot fix this problem. Thanks a lot for your great help in advance.
Best regards,
Benson
  7 件のコメント
Benson Gou
Benson Gou 2019 年 9 月 4 日
I did not copy all the codes in here. S0 and Ind_mixM0 are defined and used in my code. These two variables are key variables and used from the beginning to te end.
Thanks.
Benson
Walter Roberson
Walter Roberson 2019 年 9 月 4 日
If you cannot post your actual code here, then I think you will need to open a support case. (Which might be needed anyhow, as the solution might not be obvious to the outside volunteers.)

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

回答 (0 件)

カテゴリ

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

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by