Path: news.mathworks.com!not-for-mail
From: Edric M Ellis <eellis@mathworks.com>
Newsgroups: comp.soft-sys.matlab
Subject: Re: Distributed Computing
Date: Mon, 16 Mar 2009 09:01:05 +0000
Organization: The Mathworks, Ltd.
Lines: 31
Message-ID: <ytw7i2pc04u.fsf@uk-eellis-deb4-64.mathworks.co.uk>
References: <gpjdp5$5cd$1@fred.mathworks.com> <53e8f7a0-8878-491d-b58f-04960d1fdc92@s20g2000yqh.googlegroups.com> <gpjg7t$ju$1@fred.mathworks.com>
NNTP-Posting-Host: uk-eellis-deb4-64.mathworks.co.uk
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
X-Trace: fred.mathworks.com 1237194065 18818 172.16.27.141 (16 Mar 2009 09:01:05 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Mon, 16 Mar 2009 09:01:05 +0000 (UTC)
X-Face: $Ahg}Iylezql"r1WV1Me5&)ng"a4v%D>==KMs-elCfj"o}$bh-VOt7lVXgLWsC?9mZ`mINT
 G6PDvca;nrgs$lfcr0l1ew'N]>nXKl}m|Zpg>,6*gLp~-N0N2*+b.iwv=u>@R$L4SEG&NYUU;lSR@u
 IHphdAy
User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.1 (gnu/linux)
Cancel-Lock: sha1:Zvg2rDipfpdOfJbuplji5xK+pyU=
Xref: news.mathworks.com comp.soft-sys.matlab:525142


"Steffen" <rileksn@gmail.com> writes:

> Am I getting you right, that I just need the parallel toolbox for my single
> client which sends out the tasks to the workers (having a licence) and not the
> distributed toolbox? Or was the parallel toolbox for max of 4 workers and that
> could be extended via the distributed toolbox?

On your client machine, you always need MATLAB + PCT, and with that you get 4
local workers.

If you want more workers, or workers on 1 or more separate machines, you need
MDCS licences for those machines - 1 licence per worker.

> To make the code ready for parallel computing it would only be a replacement
> of the inner for- to parfor loop (basically meaning to look at a single row
> and send the corresponding columns to the workers, then the next row and so
> forth)? I copy the functions to the workers and that`s it?

Looking at your code, I think that should work, however I would be tempted to
make the outer loop the PARFOR - it's generally better to make the largest
possible chunk of parallelisation (unless you need to handle cases where the
execution times for the iterations are vastly different).

There are several different ways of getting your code to run on the workers - if
they can see the same filesystem as your client, you can simply add the path;
otherwise, PCT/MCDS have mechanisms for copying your code to the workers so they
can find it.

Cheers,

Edric.