How matlabpool does work??
12 views (last 30 days)
Show older comments
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
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.
Accepted Answer
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
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.
More Answers (1)
See Also
Categories
Find more on Get Started with Optimization Toolbox in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!