Why do I get a concatenation error when I try to use the remote parallel server?
1 次查看(过去 30 天)
显示 更早的评论
I'd like to use a remote Parallel Server to execute my code. I have a main script, that calls a function embedding a parfor loop. When I run this script on my computer, everything works smoothly. However, when I try to use to remote Parallel Server, I got the error
Error using parallel.internal.pool.FileManager/addAttachedFiles
Dimensions of arrays being concatenated are not consistent.
A minimal working example is
myCluster = parcluster;
parpool(myCluster, 'IdleTimeout', 180);
parfevalOnAll(@feval,0,@ExternalLibrary);
myfunction;
where ExternalLibrary is a function of an external library that loads some files in memory, and myfunction is a dummy function
function myfunction
parfor l = 1:10
for k = 1:5
end
end
end
I noticed that when I copy and paste the code of myfunction inside the main script, I do not receive the error.
Why do I get this error and how can I solve it?
回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Startup and Shutdown 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!