Re: [Numpy-discussion] performance matrix multiplication vs. matlab
![](https://secure.gravatar.com/avatar/09a9548c23685e786b6519e2f3ef76f7.jpg?s=120&d=mm&r=g)
Hi, I followed what I collected about installation of numpy with lapack and atlas and installed numpy on our desktop with RHEL4 and 4 cores.
uname -a
Linux curie.physics.usyd.edu.au 2.6.9-89.0.15.ELsmp #1 SMP Sat Oct 10 05:59:16 EDT 2009 i686 i686 i386 GNU/Linux I successfully installed lapack-3.1.1, atlas3.8.0 with fortran comfiler: gfortran, and numpy-1.3.0 with enthought-python distribution (python2.5).
python
import numpy a = numpy.random.randn(6000, 6000) numpy.dot(a, a)
Surprisingly, it only uses 2 cores instead of 4 cores. Where and how should I set up the number of threads for numpy? Thanks! Dr. Xue (Sue) Yang School of Physics, University of Sydney Ph: 02 9351 6081 Email: x.yang@physics.usyd.edu.au
![](https://secure.gravatar.com/avatar/0c95cd90aef753bc89f1c48370eeb8b7.jpg?s=120&d=mm&r=g)
Xue (Sue) Yang wrote:
Hi,
I followed what I collected about installation of numpy with lapack and atlas and installed numpy on our desktop with RHEL4 and 4 cores.
uname -a
Linux curie.physics.usyd.edu.au 2.6.9-89.0.15.ELsmp #1 SMP Sat Oct 10 05:59:16 EDT 2009 i686 i686 i386 GNU/Linux
I successfully installed lapack-3.1.1, atlas3.8.0 with fortran comfiler: gfortran, and numpy-1.3.0 with enthought-python distribution (python2.5).
python
import numpy a = numpy.random.randn(6000, 6000) numpy.dot(a, a)
Surprisingly, it only uses 2 cores instead of 4 cores. Where and how should I set up the number of threads for numpy?
Atlas (at least your version, I don't know about 3.9.* series) does not support setting the number of threads dynamically - it is a compile time option. If the compile time option is indeed 4 threads, it may be that ATLAS decided that using 2 threads instead of 4 was more efficient. You can find this info in atlas_buildinfo.h file (the ATL_NCPU CPP define). Note that you should not use atlas 3.8.0, as it has a number of serious bugs - you should use 3.8.3. David
participants (2)
-
David Cournapeau
-
Xue (Sue) Yang