New issue 8 by niko.son...@gmail.com: pools should be closed properly in
parallel_evaluation_mp
http://code.google.com/p/ecspy/issues/detail?id=8
What steps will reproduce the problem?
Running PSO with the parallel_evaluation_mp evaluator.
What is the expected output? What do you see instead?
The PSO stops with an OS error, complaining about to many open files.
Fix:
Closing the worker pool after its work is done fixes the problem.
...
try:
pool = multiprocessing.Pool(processes=nprocs)
results = [pool.apply_async(evaluator, ([c], {})) for c in candidates]
return [r.get()[0] for r in results]
-->
try:
pool = multiprocessing.Pool(processes=nprocs)
results = [pool.apply_async(evaluator, ([c], {})) for c in candidates]
* pool.close()
return [r.get()[0] for r in results]
What version of the product are you using? On what operating system?
OS X Lion 10.7.2
Enthough Python Distribution
Python 2.7.1 |EPD 7.0-2 (64-bit)| (r271:86832, Dec 3 2010, 15:56:20)
Please provide any additional information below.
Thanks for the detailed report Niko!
Added the closing statement in the latest commit...
Thank you for the bug report, Niko, and thanks Jelle for such a quick response.
Aaron Garrett
(Sent from my Droid)
--
You received this message because you are subscribed to the Google Groups "Evolutionary Computations in Python" group.
To post to this group, send email to ec...@googlegroups.com.
To unsubscribe from this group, send email to ecspy+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/ecspy?hl=en.
Comment #2 on issue 8 by aaron.lee.garrett: pools should be closed properly
in parallel_evaluation_mp
http://code.google.com/p/ecspy/issues/detail?id=8
(No comment was entered for this change.)