The Math Forum

Search All of the Math Forum:

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

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

Notice: We are no longer accepting new posts, but the forums will continue to be readable.

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: 721
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" <> 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

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

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).



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

[Privacy Policy] [Terms of Use]

© The Math Forum at NCTM 1994-2018. All Rights Reserved.