Firstly, you should construct your distributed array directly on the workers to avoid building the large array at the client, like so:
D = rand(10000, 'distributed');
After this, your code should work correctly - I just tried pasting the following directly into the command window in R2015a:
D = rand(10000, 'distributed');
tic()
spmd
svd(D);
end
toc()
using 4 local workers, I got the result in 213 seconds.
It looks like you might be using the run function to run your script - there are sometimes problems using that with scripts containing spmd, so it might be worth avoiding that.
Best Answer