MATLAB: How to speed up a built-in MATLAB optimization routine like FMINCON by parallel processing

clusterfminconoptimizationOptimization ToolboxparallelParallel Computing Toolboxspeed up

I would like to speed up my optimization application by running MATLAB on a cluster, but this cannot be done using implicit multithreading in MATLAB because the input of one iteration depends on the output of a previous iteration in my application.
I would like to know if there is a flag or option I can set to parallelize FMINCON in my application.

Best Answer

This functionality is available in MATLAB 7.6 (R2008a) and later versions. The Parallel Computing Toolbox is also required to set up a cluster using the MATLALPOOL command as follows:
matlabpool open 2
options = optimset('UseParallel','always');
fmincon(...,options)
matlabpool close
For more information, you may execute the following link at the MATLAB prompt to bring up the documentation on this issue:
web([docroot '/toolbox/optim/ug/briutqn.html'])