Drexel dragonThe Math ForumDonate to the Math Forum



Search All of the Math Forum:

Views expressed in these public forums are not endorsed by Drexel University or The Math Forum.


Math Forum » Discussions » Software » comp.soft-sys.matlab

Topic: what is MATLAB POOL ?
Replies: 4   Last Post: May 16, 2012 2:32 PM

Advanced Search

Back to Topic List Back to Topic List Jump to Tree View Jump to Tree View   Messages: [ Previous | Next ]
Edric Ellis

Posts: 690
Registered: 12/7/04
Re: what is MATLAB POOL ?
Posted: Mar 30, 2012 3:44 AM
  Click to see the message monospaced in plain text Plain Text   Click to reply to this topic Reply

"Lahdan alfahian" <gamar_Saudi_gamar@hotmail.com> writes:
> I'm using PCT to understand how to make better prefomance by using GPU
> and have some questions for you guys


There are two quite different types of parallelism supported by PCT.

Firstly, there is the parallelism that comes of having multiple MATLAB
sessions working together on your problem. That's the sort of
parallelism offered by MATLAB Pool.

When you execute:

matlabpool open local 4

(or similar), that launches 4 additional MATLAB worker sessions
connected to your desktop MATLAB session. When you then run a PARFOR
loop

parfor ii=1:100
x(ii) = max(abs(eig(rand(1000))));
end

then the work for that loop is broken up and executed by the MATLAB
worker sessions.

The GPU parallelism is a different direction. You can place MATLAB data
on the GPU by executing

g = gpuArray(rand(1000));

and then when you execute

g2 = g * g;

the matrix multiplication happens in parallel on the GPU.

If you have multiple GPUs, you can in fact use PARFOR and gpuArrays
together. (If you have 1 powerful GPU, you might find that you get some
benefit using PARFOR with gpuArrays).

Cheers,

Edric.



Point your RSS reader here for a feed of the latest messages in this topic.

[Privacy Policy] [Terms of Use]

© Drexel University 1994-2014. All Rights Reserved.
The Math Forum is a research and educational enterprise of the Drexel University School of Education.