[Numpy-discussion] numpy blas running slow: how to check that it is properly linked

David Cottrell david.cottrell@gmail....
Tue Sep 6 13:38:35 CDT 2011


I posted on stackoverflow but then noticed this message board:

http://stackoverflow.com/questions/7311869/python-numpy-on-solaris-blas-slow-or-not-linked

I'm reposting the full post below:

Matrix-Matrix multiplies are very slow on my Solaris install (running
on a sparc server) compared to my OSX install (on a laptop!). The
laptop runs 100 times faster (for matrix-matrix multiplies of
3000x3000 dense random matrices of doubles).

It must be because the Solaris install is not using blas, but the
numpy scripts are reporting that the libs are 'found'.

    $python3 -c "import numpy.distutils.system_info as f; d =
f.get_info('blas',0); print(d); d = f.get_info('lapack',0); print(d)"
     {'libraries': ['sunperf'], 'library_dirs':
['/home/$myname/local/archive/SolarisStudio12.2-solaris-sparc-tar-ML/solstudio12.2/lib'],
'language': 'f77'}
     {'libraries': ['sunmath'], 'library_dirs':
['/home/$myname/local/archive/SolarisStudio12.2-solaris-sparc-tar-ML/solstudio12.2/lib'],'language':
'f77'}

The following import FAILS on the Solaris install but succeeds on OSX:

import numpy.core._dotblas

There is no ATLAS available for the Solaris install. I wouldn't think
this would make such a huge different in computational efficiency.

Any suggestions for other tests? Does the distutils.system_info not
necessarily mean anything about the install? I tried the
numpy.alterdot() command but that seems to have no effect.

Even more notes:

And I basically followed the setup on
http://www.scipy.org/Installing_SciPy/Solaris, except that my site.cfg
looked like:

    [DEFAULT]
    library_dirs =
$PATH_TO_MY_SOLARIS_DIR/SolarisStudio12.2-solaris-sparc-tar-ML/solstudio12.2/lib
    [blas]
    blas_libs = sunperf
    [lapack]
    lapack_libs = sunmath


More information about the NumPy-Discussion mailing list