[Numpy-discussion] Problems building NumPy with GotoBLAS

ashford at whisperpc.com ashford at whisperpc.com
Tue Aug 17 00:58:09 EDT 2010


I'm having problems getting the GotoBLAS library (Nehalem optimized BLAS -
"http://www.tacc.utexas.edu/tacc-projects/gotoblas2/") working properly under
the Python NumPy package ("http://numpy.scipy.org/") on a quad-core Nehalem
under FC10.

The command used to build the library is:
    make BINARY=64 USE_THREAD=1 MAX_CPU_NUMBER=4

I'm limiting this to four cores, as I believe HyperThreading will slow it down
(I've seen this happen with other scientific code).  I'll benchmark later to
see whether or not HyperThreading helps.

I built the library (it uses -fPIC), then installed it under /usr/local/lib64,
and created the appropriate links:
    # cp libgoto2_nehalemp-r1.13.a /usr/local/lib64
    # cp libgoto2_nehalemp-r1.13.so /usr/local/lib64
    # cd /usr/local/lib64
    # ln -s libgoto2_nehalemp-r1.13.a libgoto2.a
    # ln -s libgoto2_nehalemp-r1.13.so libgoto2.so
    # ln -s libgoto2_nehalemp-r1.13.a libblas.a
    # ln -s libgoto2_nehalemp-r1.13.so libblas.so

Without the libblas links, the NumPy configuration used the system default
BLAS library (single-threaded NetLib under FC10); it's set up for the NetLib
and Atlas BLAS libraries.

I used the latest release of NumPy, with no site.cfg file, and no NumPy
directory ("rm -rf /usr/local/python2.6/lib/python2.6/site-packages/numpy"). 
The configuration step ("python setup.py config") appears to run OK, as do the
build ("python setup.py build") and install ("python setup.py install") steps.
 The problem is that the benchmark takes 8.5 seconds, which is what it took
before I changed the library.

    python -c "import numpy as N; a=N.random.randn(1000, 1000); N.dot(a, a)"

I expect I'm missing something really simple here, but I've spent >10 hours on
it, and I have no idea as to what it could be.  I've tried various
permutations on the site.cfg file, all to no avail.  I've also tried different
names on the library, and different locations.  I've even tried a set of
symbolic links in /usr/local/lib64 for liblapack that point to libgoto.

Could someone offer some suggestions?

Thank you for your time.

Peter Ashford




More information about the NumPy-Discussion mailing list