Optimization using GA and FMINCON with more than 12 processors
3 views (last 30 days)
Show older comments
Hello,
Currently I am using the MATLAB Global Optimization Toolbox to use Genetic Algorithm and traditional optimization function fmincon(). While setting up the parameters I specify that I am going to use GA or fmincon using parallel computing capability (parallel=always). Before I invoke my GA command, I create a matlab pool of 12 workers such that matlab knows that it has 12 processors at its disposal.
My questions are: 1] I guess matlab's ga() and fmincon() functions use parfor internally. For parfor to work I have pre-specified the worker pool. Now I want to increase the number of workers to reduce the time of optimization. How can I do this with minimal effort? I know that parfor cannot go beyond 12 workers. Is there a way to stretch this capability?
2] Suppose I do not create the worker pool myself using matlabpool before invoking ga() or fmincon(), but still specify that the optimization function needs to work in parallel. Is there way for matlab to know by itself that it has multiple cores in the node or computer it is working in and it should use all the resources available to it?
Thanks, Sourish
0 Comments
Answers (4)
Jason Ross
on 24 Jan 2013
Edited: Jason Ross
on 24 Jan 2013
To go beyond 12 workers (which is the limit for the local scheduler), you need to set up the Matlab Distributed Computing Server (MDCS), either using the scheduler we ship (jobmanager / MJS), or by integrating with another scheduler you might already have (PBS, LSF, HPC Server, Torque, SGE, etc). This allows for higher worker counts, but it does require some setup and installation.
0 Comments
Edric Ellis
on 7 Mar 2014
Please note that in R2014a the limit on the number of local workers was removed. See the release notes.
0 Comments
Sean de Wolski
on 24 Jan 2013
I'm sure Alan or Seth will have a more concrete answer, but I am pretty sure fmincon is limited in how many workers it can use. It uses the workers to calculate the finite differences for gradients at each iteration and it should only need a few for this task. Not that it hurts to have more.
0 Comments
Gautham Sridharan
on 24 Apr 2015
I signed up for Matlab early adopter program with Amazon EC2. I'm able to run on a maximum of 256 workers now. Works great.
0 Comments
See Also
Categories
Find more on Genetic Algorithm 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!