The source code for the parfor-loop could not be found
107 views (last 30 days)
Show older comments
John
on 30 Sep 2022
Commented: Walter Roberson
on 22 Jan 2023 at 4:37
Hi. I'm using the parfor in order to change some labels name:
Data = cell(1, length(DirList));
numberOfDbExamples = length(DirList);
parfor k = 1:numberOfDbExamples
Data{k} = load(fullfile(Folder, DirList(k).name));
[newLabelNames, newMask] = changeLabelNames(Data{k}.labelNames, Data{k}.mask);
Data{k}.labelNames = newLabelNames;
Data{k}.mask = newMask;
end
I get this error:
The source code (C:----) for the parfor-loop that is trying to execute on the worker could not be found.
Caused by:
Undefined function changeLabelNames for input arguments of type table.
Error using remoteParallelFunction
Do you have an idea of how fix it?
3 Comments
Accepted Answer
Walter Roberson
on 30 Sep 2022
Sometimes you need to addAttachedFiles; https://www.mathworks.com/help/parallel-computing/parallel.pool.addattachedfiles.html
6 Comments
Walter Roberson
on 22 Jan 2023 at 4:37
Over in https://www.mathworks.com/matlabcentral/answers/1897595-why-receive-error-integrand-output-size-does-not-match-the-input-size?s_tid=srchtitle the actual problem turned out to be the use of syms inside of parfor
More Answers (1)
See Also
Categories
Find more on Execution Speed in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!