Search All of the Math Forum:

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

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

 Search Thread: Advanced Search

 Messages: [ Previous | Next ]
 Edric Ellis Posts: 721 Registered: 12/7/04
Re: what is MATLAB POOL ?
Posted: Mar 30, 2012 3:44 AM
 Plain Text 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.

Date Subject Author
3/29/12 Lahdan alfahian
3/30/12 Edric Ellis
3/31/12 Lahdan alfahian
5/16/12 Nathan Orloff
5/16/12 Sida Zhou

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