Running differential evolution in parallel

72 views
Skip to first unread message

Rebinth Robin J

unread,
Aug 20, 2018, 5:21:04 AM8/20/18
to lmfit-py
Since my objective function in intensive, I wanted to multiprocess lmfit minimize (method ='differential_evolution'). Is there  any option currently available.

Matt Newville

unread,
Aug 20, 2018, 7:58:24 AM8/20/18
to lmfit-py
On Mon, Aug 20, 2018 at 4:21 AM Rebinth Robin J <reb...@gmail.com> wrote:
Since my objective function in intensive, I wanted to multiprocess lmfit minimize (method ='differential_evolution'). Is there  any option currently available.

I think differential evolution as implemented in scipy and used by lmfit does not support multiprocessing.  I have been told there may be other implementations of differential evolution that do support multiprocessing and also allow unbounded parameters, but I have not looked into the details.   Adding mutliprocessing might be actually "hard" as it relies on pickle by default, and pickle is pretty limited and will probably demand careful attention when dealing with constraint expressions.   But: being able to use multiprocessing with differntial evolution or any other algorithm would certainly be an important feature to add. 

--Matt

Andrew Nelson

unread,
Aug 20, 2018, 8:00:41 AM8/20/18
to lmfit-py

--
You received this message because you are subscribed to the Google Groups "lmfit-py" group.
To unsubscribe from this group and stop receiving emails from it, send an email to lmfit-py+u...@googlegroups.com.
To post to this group, send email to lmfi...@googlegroups.com.
Visit this group at https://groups.google.com/group/lmfit-py.
To view this discussion on the web visit https://groups.google.com/d/msgid/lmfit-py/CA%2B7ESboZFyUojTGWRyaH1HC158FeGf5yYBiBQfzuceDj0sZ6Og%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Matt Newville

unread,
Aug 20, 2018, 10:57:32 PM8/20/18
to lmfit-py
Hi Andrew, 

On Mon, Aug 20, 2018 at 7:00 AM Andrew Nelson <andy...@gmail.com> wrote:


OK, I see it.  Can you let us know would you like us to conclude from that discussion and evolving PR?  
Thanks,

--Matt

Rebinth Robin J

unread,
Aug 20, 2018, 11:56:00 PM8/20/18
to lmfit-py
I had run genetic algorithm with packages like platypus. But wanted to move towards scipy / lmfit / differential evolution

I did try out initially with https://github.com/scipy/scipy/issues/4864

I was able to successfully run the job in parallel. However, when I tried running it with lmfit, I had issues with starting the run. With the benefits that lmfit offers as a front end, it would be great to add the multiprocessing capability to the base package. For complex functions, differential evolution does a great job in identifying the optimal solution. Since it is a search across the entire spectrum, and with mode independent variables, being able to run it in parallel makes a lot of difference in the overall use of the optimizer.

- Robin JR
Reply all
Reply to author
Forward
0 new messages