How matlabpool does work??

42 views (last 30 days)
Again Vaudek
Again Vaudek on 10 Apr 2013
Hi all
I am a new Matlab users and actually I would like to optimize a simple algorithm with parallel computing. By optimize I mean that getting the results faster than waiting for some hours for a merely launched algorithm... Could matlabpool helps me out??
Thx in advance
Ag Vdk
  5 Comments
Again Vaudek
Again Vaudek on 10 Apr 2013
By asking your question you actually answered to mine :) I will not suit it for parallel calculus (not enough time) so because of its design parallel would not bring any improvement!!
Cedric
Cedric on 10 Apr 2013
Edited: Cedric on 10 Apr 2013
It is worth spending 30 minutes just for setting up a local parallel configuration, because your PDE solver may be able to exploit a few workers by itself. It is not something that I've often seen though, and usually I have to work a little on my code before I can see some improvement.
If you had a Monte-Carlo simulation to run though, I'd say that you could invest a day, because each experiment is disjoint from the others and writing code that is well suited for parallelization is almost direct. It means somehow adding the code for opening the pool, replacing FOR with PARFOR, and thinking a little about how you define/store sets of parameters/solutions.

Sign in to comment.

Accepted Answer

Jason Ross
Jason Ross on 10 Apr 2013
I'd suggest looking at the documentation for Parallel Computing Toolbox to see if the tools available might help with your problem. Matlabpool (parfor/spmd) is only one way you can do things, you can also run a batch job or control your own jobs and tasks.
  1 Comment
Jason Ross
Jason Ross on 10 Apr 2013
I also negelected to mention the other part of Parallel Computing : GPU support. I don't know if your problem can be arranged in such a way that a GPU would increase your performance, but that's another solution available.
From Cedric's comments it looks like you might have some thinking to do about how to set up your algorithm to make it amenable to parallel computing. Once you figure that part out, the one of the various methods available (parfor, spmd, job/task, batch and GPU) might show promise.

Sign in to comment.

More Answers (1)

Again Vaudek
Again Vaudek on 10 Apr 2013
Thank you all answering.
thx for the documentation link !
My algorithm is really simple one. Just solving Navier-Stokes equation in the driven cavity case. As my number of time step and my spatial discretization increase the "real" time to get results increase too. So I thought that launching it with parrallel programming will certainly accelerate the business. that's all... Am I wrong?

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!