[SciPy-User] Multiprocessing in optimize.leastsq?

Robert Kern robert.kern@gmail....
Tue Jul 24 07:38:55 CDT 2012


On Tue, Jul 24, 2012 at 12:48 PM, Andreas Hilboll <lists@hilboll.de> wrote:
> I wrote a script which calls optimize.leastsq in a for loop. The script is
> running on a machine with 24 CPU cores (Gentoo Linux 64bit). Now in htop,
> I can see one python process which in turn has 24 child processes, all of
> them running at between 0 and 100% CPU.
>
> I don't quite understand the origin of the 24 child processes. Is leastsq
> using some OpenMP parallelization automatically? If so: How can I
> influence how many child processes will be started?

You probably linked in a multithreaded ATLAS for scipy.linalg, which
scipy.optimize.leastsq() uses. To my knowledge, the number of threads
it uses is not adjustable at runtime.

http://math-atlas.sourceforge.net/faq.html#tnum

-- 
Robert Kern


More information about the SciPy-User mailing list