Discover MakerZone

MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi

Learn more

Discover what MATLAB® can do for your career.

Opportunities for recent engineering grads.

Apply Today

To resolve issues starting MATLAB on Mac OS X 10.10 (Yosemite) visit:

Parallel Optimization with multistart and fmincon

Asked by KELVYN BARUC on 7 Apr 2012


I am running an optimization program with fmincon and multistart. I have 4 workers but I don't know which option is better.

  1. Multistart in parallel always and fmincon with parallel always.
  2. Multistart in parallel always and fmincon with parallel never.

Thanks in advance!




No products are associated with this question.

3 Answers

Answer by Alan Weiss on 16 Apr 2012

parfor has the limitation that inner parfor loops are not run in parallel, only the outermost parfor loop is run in parallel. The situation you ask about is documented in

The short answer is your option 1 is likely to be slightly faster, but in any case both options run pretty much the same, with just MultiStart running in parallel.


1 Comment

KELVYN BARUC on 16 Apr 2012

Thank you so much!! It's what I was looking for.

Alan Weiss
Answer by Sargondjani on 7 Apr 2012

just try?? this is likely to be very problem dependent...


Answer by Paul Kerr-Delworth on 12 Apr 2012

Hi Kelvyn,

There are some guidelines in the Optimization Toolbox documentation on parallel computing with the Optimization Toolboxes. See the following link for more information

Hope this helps!

Best regards,



Paul Kerr-Delworth

Contact us