Cannot iterate over table in parfor loop for fastering saving process on multiple workers in cluster.
Show older comments
% remove all 0 activities
subject101(subject101.activityID == 0, :) = [];
% divide table to sub-tables by labels
groups = unique(subject101{:, 2});
parfor i = 1:length(groups)
str = [ 'Working on activity ' num2str(groups(i)) ];
disp(str);
T = subject101(subject101.activityID == groups(i), :); % HERE IS THE WARNING
str = [ 'subject101_' num2str(groups(i)) '.csv' ];
writetable(T, str);
end
Hello,
I get a warning "The entire array or structure 'subject101' is a broadcast variable. This might result in unnecessary communication overhead.".
'subject101' is type table 249957x12.
How can I solve it? Please help.
Thanks.
Accepted Answer
More Answers (0)
Categories
Find more on Tables 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!