Invoke function in a parfor loop
古いコメントを表示
Hi all, I run a for loop where the iterations are independent and it's works well. To speed up my simulation, I'm trying to use a parfor loop. But I'm having some trouble with the invoke function I use to call another software to make some calculation. I get the following error :
An UndefinedFunction error was thrown on the workers for 'invoke'. This might be because the
file containing 'invoke' is not accessible on the workers. Use addAttachedFiles(pool, files)
to specify the required files to be attached. See the documentation for
'parallel.Pool/addAttachedFiles' for more details.
I understand that the file containing invoke could not be found but I could not find in the documentation the location of this file. Has someone already obtained this error and fix it ?
2 件のコメント
Edric Ellis
2016 年 12 月 6 日
編集済み: Edric Ellis
2016 年 12 月 6 日
A few questions. What cluster type are you using? (Normally, if you are using the 'local' cluster type, then the workers can see the same code on the path as your desktop MATLAB). Is your invoke a function or a method? What happens if you try
addAttachedFiles(gcp(), {'invoke'})
?
Guillaume Worms
2016 年 12 月 6 日
採用された回答
その他の回答 (0 件)
カテゴリ
ヘルプ センター および File Exchange で Use COM Objects in MATLAB についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!