[SciPy-User] MPI, threading, and the GIL

Sturla Molden sturla at molden.no
Sat Sep 10 17:36:35 EDT 2011


Den 09.09.2011 21:41, skrev Matthew Emmett:
> The behavior that I have come across is the following: the time taken
> for each iteration of the computational part varies quite a bit.  It
> should remain roughly constant, which I have confirmed in other tests.
>   After all, the amount of work done in the computational part remains
> the same during each iteration.  It seems like the threads are not
> running as smoothly as I expect, and I wonder if this is due to the
> GIL and my use of threads.
>

It might be the GIL, if the blocking i/o calls comm.Send and comm.Recv 
do not release the GIL. I am not sure what mpi4py does. It ought to 
release the GIL around blocking i/o calls though.

Sturla





More information about the SciPy-User mailing list