No improvements while using multiprocessing

89 views
Skip to first unread message

nicolas...@gmail.com

unread,
Oct 14, 2013, 3:48:52 AM10/14/13
to insp...@googlegroups.com
Hi,
I recently discovered Inspyred, and it seems very promising for my research work.
Unfortunately, I cannot succeed in using parallel evalutation mechanism, through multiprocessing.

Precisely, I cannot achieve speed-up. Running the example "parallel_evaluation_mp_example.py", slightly modified to increase evalution time (num_inputs=30000), I do not see any improvements setting mp_num_cpus=1 or 4.

Both runs in 35 seconds on a i7 CPU-quad core, running Linux/Python 2.7.2

Am I missing something ?

Thanks for your help.
Nicolas


Aaron Garrett

unread,
Oct 14, 2013, 8:42:54 AM10/14/13
to insp...@googlegroups.com
There are probably a couple of issues here. First, I think that example is only generating 2 new candidates each generation, which means having 4 cores will not really matter (since you only have two tasks to perform). Instead, changing the replacer to generational replacement and setting the num_selected to 8 would be my first step. Second, it may be that the task is simply not expensive enough to overcome the overhead of the parallel execution (even with the 30000). In the past, I have used this approach for significant speedups when the evaluation required executing expensive external programs through Python based on a candidate. You can look at the multiprocessing approach in inspyred.ec.evaluators to see what's going on there. It's pretty straightforward, and it has all of the limitations of the Python multiprocessing package.



Aaron Garrett, Ph.D.
Assistant Professor
Computer Science
131 Ayers Hall
Jacksonville State University
Jacksonville, AL  36265
agar...@jsu.edu
256-782-5364




--
You received this message because you are subscribed to the Google Groups "Inspyred" group.
To unsubscribe from this group and stop receiving emails from it, send an email to inspyred+u...@googlegroups.com.
To post to this group, send email to insp...@googlegroups.com.
Visit this group at http://groups.google.com/group/inspyred.
For more options, visit https://groups.google.com/groups/opt_out.

Reply all
Reply to author
Forward
0 new messages