Invoke function in a parfor loop
Mostra commenti meno recenti
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 Commenti
Edric Ellis
il 6 Dic 2016
Modificato: Edric Ellis
il 6 Dic 2016
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
il 6 Dic 2016
Risposta accettata
Più risposte (0)
Categorie
Scopri di più su Use COM Objects in MATLAB in Centro assistenza e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!