Search All of the Math Forum:
Views expressed in these public forums are not endorsed by
Drexel University or The Math Forum.
|
|
|
|
Re: what is MATLAB POOL ?
Posted:
Mar 30, 2012 3:44 AM
|
|
"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.
|
|
|
|