Path: news.mathworks.com!not-for-mail
From: "Steffen" <rileksn@gmail.com>
Newsgroups: comp.soft-sys.matlab
Subject: Distributed Computing
Date: Sun, 15 Mar 2009 17:27:01 +0000 (UTC)
Organization: Heinz-Mueller-Institut
Lines: 21
Message-ID: <gpjdp5$5cd$1@fred.mathworks.com>
Reply-To: "Steffen" <rileksn@gmail.com>
NNTP-Posting-Host: webapp-02-blr.mathworks.com
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: 8bit
X-Trace: fred.mathworks.com 1237138021 5517 172.30.248.37 (15 Mar 2009 17:27:01 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Sun, 15 Mar 2009 17:27:01 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 1370453
Xref: news.mathworks.com comp.soft-sys.matlab:525039


Hello,

I am kind of confused by the stuff I read the last days about the Distributed/Parallel Computing Toolbox, perhaps someone can give me some general advices.

Very briefly my problem. I have a 300x300 movie and each pixel contains in its third dimension a spectrum which I need to fit. Basically I run for all 90000 pixels two functions, a fitting routine and some math to convert the fitted peaks. Since this takes me about 2 days, I thought of distributing the fitting/conversion routine to other computers (4 to 8 PCs).

for i=1:300
    for j=1:300
        spectrum=series(i,j,:);
        peaks=func_fit_spectrum(spectrum);
        handles=func_peak_conversion(peaks);
    end
end

1) Would that task be solveable via distributed computing or am I missing some major pitfalls here?
2) Am I right that the other computers require Matlab and the distributed toolbox to be installed? How about the functions that are called, just copying them to the workers or is the toolbox automatically taking care of that?
3) The example given in the help somehow suggests just to replace the for loops by parfor loops. Does that hold true for this particular case with two for loops? Or do I have to cut the main image into small pieces myself and then send it to the workers?

Many thanks in advance for any advice, much appreciated!

Steffen