[Numpy-discussion] Multithreading support

David Cournapeau cournape@gmail....
Sat Feb 13 06:20:28 CST 2010

On Sat, Feb 13, 2010 at 6:20 PM, Wolfgang Kerzendorf
<wkerzendorf@googlemail.com> wrote:
> Dear all,
> I don't know much about parallel programming so I don't know how easy it is to do that: When doing simple arrray operations like adding two arrays or adding a number to the array, is numpy able to put this on multiple cores? I have tried it but it doesnt seem to do that. Is there a special multithread implementation of numpy.

Depending on your definition of simple operations, Numpy supports
multithreaded execution or not. For ufuncs (which is used for things
like adding two arrays together, etc...), there is no multithread

> IDL has this feature where it checks how many cores available and uses them. This feature in numpy would make an already amazing package even better.

AFAIK, using multi-thread at the core level of NumPy has been tried
only once a few years ago, without much success (no significant
performance improvement). Maybe the approach was flawed in some ways.
Some people have suggested using OpenMP, but nobody has every produced
something significant AFAIK:


Note that Linear algebra operations can run in // depending on your
libraries. In particular, the dot function runs in // if your
blas/lapack does.



More information about the NumPy-Discussion mailing list