Parallel Computing Toolbox - Need help to start with...
Show older comments
Hi.. I'm a student and 'm trying to configure Matlab R2010a Parallel Computing Toolbox for a client and one worker. Matlab doc doesn't talk much on the configuration part. Tried the one given on http://www.mathworks.in/help/toolbox/distcomp/f5-16141.html - not very clear and hence didn't work. As a beginner, I just want to run a simple parfor-loop on two machines. I would be grateful if someone provides me a step-by-step solution for how to, basically, connect two systems using Matlab.. Thanks for your time..
Accepted Answer
More Answers (2)
Alok D
on 30 Jan 2012
0 votes
Titus Edelhofer
on 31 Jan 2012
Hi Alok,
a simple sample that employs all workers (and therefore should spread across the machines your workers run on) would be
function testparfor
matlabpool open
n = 500;
x = zeros(n, 1);
parfor i=1:n
x(i) = rank(magic(i));
end
Make sure, that the default configuration is not the local configuration but the jobmanager configuration you have done.
Titus
Categories
Find more on Startup and Shutdown in Help Center and File Exchange
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!