[Numpy-discussion] Is numpy.test() supposed to be multithreaded?

Ralf Gommers ralf.gommers at gmail.com
Tue Jun 28 16:53:09 EDT 2016


On Tue, Jun 28, 2016 at 10:36 PM, Michael Ward <mward at cims.nyu.edu> wrote:

> Heya, I'm not a numbers guy, but I maintain servers for scientists and
> researchers who are.  Someone pointed out that our numpy installation on a
> particular server was only using one core.  I'm unaware of the who/how the
> previous version of numpy/OpenBLAS were installed, so I installed them from
> scratch, and confirmed that the users test code now runs on multiple cores
> as expected, drastically increasing performance time.
>
> Now the user is writing back to say, "my test code is fast now, but
> numpy.test() is still about three times slower than <some other server we
> don't manage>".  When I watch htop as numpy.test() executes, sure enough,
> it's using one core.  Now I'm not sure if that's the expected behavior or
> not.  Questions:
>
> * if numpy.test() is supposed to be using multiple cores, why isn't it,
> when we've established with other test code that it's now using multiple
> cores?
>

Some numpy.linalg functions (like np.dot) will be using multiple cores, but
np.linalg.test() takes only ~1% of the time of the full test suite.
Everything else will be running single core. So your observations are not
surprising.

Cheers,
Ralf
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/numpy-discussion/attachments/20160628/0501c4d2/attachment.html>


More information about the NumPy-Discussion mailing list