[SciPy-user] dual core scipy in windows (signal.lsim2)

Gael Varoquaux gael.varoquaux at normalesup.org
Sat Nov 25 16:38:22 CST 2006

This is due to ain intrinsic limitation of python (the way it is
currently programmed). The python interpretor is not a multithreaded
program. Two python instruction cannot execute in the same time. This is
garantied by something known as the "global interpretor lock". C code
called by python can release the GIL and let the python interpretor run
other threads in parallel, but when the c call finishes the GIL rules
again. Workaround involve using different instances of the python
interpretor and doing some message passing between. The next version of
ipython will use this technic, but it is clearly not part of normal
python's feature.


On Sat, Nov 25, 2006 at 12:03:40PM -0600, Ryan Krauss wrote:
> I am running a python script that is taking 10-15 seconds to run a
> signal.lsim2 command (the number of steps I am asking for is fairly
> high).  I am fairly certain that lsim2 is mainly using ode routines in
> FORTRAN.  I am running this script on windows right now and noticed
> that when I look at the task manager performance indicator, python is
> using only 50% of my cpu.  I think this is because it is using only
> one core of my dual core processor.  Is there an easy way to take
> better advantage of dual core processors with scipy in Windows?  Is
> the situation much different in Linux (Ubuntu)?

> Thanks,

> Ryan
> _______________________________________________
> SciPy-user mailing list
> SciPy-user at scipy.org
> http://projects.scipy.org/mailman/listinfo/scipy-user

More information about the SciPy-user mailing list