Cannot iterate over table in parfor loop for fastering saving process on multiple workers in cluster.
이전 댓글 표시
% 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.
채택된 답변
추가 답변 (0개)
카테고리
도움말 센터 및 File Exchange에서 Tables에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!