[SciPy-user] Multithreading cookbook entry

Anand Patil anand.prabhakar.patil@gmail....
Thu Feb 21 13:39:48 CST 2008

>  Yep. Oops. Fixed in the v2 versions of the files. The wiki doesn't
>  make a very good version control system. Is it worth incorporating
>  those files into scipy?

I vote yes. In my opinion the following would combine to form a killer feature:

- The handythread idea is developed a little, maybe to provide
functionality comparable to OpenMP
- Instructions for releasing the GIL in different extension types
(swig, f2py, pyrex) are combined in one place
- The numpy functions that release the GIL are clearly enumerated.

Seriously, this is too big of a deal to be just a cookbook entry. I
spent a full week last month beating my head against OpenMP trying to
do something embarrassingly parallel in an f2py extension. I had to
apply a patch to gcc 4.2's libgomp, compile it manually, learn how
linking works, and try several other options because OpenMP was so
frustrating. Now it works but I have tons of bug-prone code
duplication in Fortran because I couldn't figure out how to just apply
the same parallelism structure to all subroutines.  The ability to
multithread from Python would have saved me all of that work.


More information about the SciPy-user mailing list