-1

Numpy in my computer is quite slow and I am suspecting that it is not using BLAS or LAPACK. When I run numpy.config.show(), I get the following output:

atlas_threads_info:
  NOT AVAILABLE
blas_opt_info:
    libraries = ['f77blas', 'cblas', 'atlas']
    library_dirs = ['C:\\local\\lib\\atlas\\sse3']
    define_macros = [('NO_ATLAS_INFO', -1)]
    language = c
atlas_blas_threads_info:
  NOT AVAILABLE
lapack_opt_info:
    libraries = ['lapack', 'f77blas', 'cblas', 'atlas']
    library_dirs = ['C:\\local\\lib\\atlas\\sse3']
    define_macros = [('NO_ATLAS_INFO', -1)]
    language = f77
atlas_info:
    libraries = ['lapack', 'f77blas', 'cblas', 'atlas']
    library_dirs = ['C:\\local\\lib\\atlas\\sse3']
    define_macros = [('NO_ATLAS_INFO', -1)]
    language = f77
lapack_mkl_info:
  NOT AVAILABLE
blas_mkl_info:
  NOT AVAILABLE
atlas_blas_info:
    libraries = ['f77blas', 'cblas', 'atlas']
    library_dirs = ['C:\\local\\lib\\atlas\\sse3']
    define_macros = [('NO_ATLAS_INFO', -1)]
    language = c
mkl_info:
  NOT 

The problem is that those library directories do not exist on my computer. I have no idea how those directories have sneaked in to the numpy config. Is there anyway to change a setting so that numpy can use the optimized BLAS and LAPACK after being installed? Or, should I re-install it?

DSKim
  • 575
  • 1
  • 6
  • 16

2 Answers2

0

The key will be a version of a site.cfg file, tuned to your system. You can find numpy's example, site.cfg.example, here. When I did this on Linux, I cloned numpy from source, edited that file as described in the comments, and ran python setup.py install in the numpy directory, and it worked. Hope this helps.

Stephen Shank
  • 362
  • 3
  • 8
0

You are using blas. These are the libraries you are using.

 blas_opt_info:
    libraries = ['f77blas', 'cblas', 'atlas']
    library_dirs = ['C:\\local\\lib\\atlas\\sse3']
    define_macros = [('NO_ATLAS_INFO', -1)]
    language = c

You are using lapack.

lapack_opt_info:
    libraries = ['lapack', 'f77blas', 'cblas', 'atlas']
    library_dirs = ['C:\\local\\lib\\atlas\\sse3']
    define_macros = [('NO_ATLAS_INFO', -1)]
    language = f77

You are not using blas_mkl and lapack_mkl. These are proprietary implementations of those libraries.

I hope that you aren't thinking numpy will compare in speed to direct implementations of blas and lapack. It will be an order of magnitude slower.

Joshua Cook
  • 12,495
  • 2
  • 35
  • 31