[Numpy-discussion] site.cfg doesnt function?

Nadav Horesh nadavh@visionsense....
Mon Apr 7 14:21:14 CDT 2008


I checked out numpy from svn few hours ago, and created a site.cfg following site.cfg.example. During the build process I am getting an warning that unoptimized lapack in being used.

Machine: dual core amd64 running gentoo linux.
Relevant packages: python 2.5.1, blas-atlas-3.8.0, lapack-atlas-3.8.0

# site.cfg

[ALL]
library_dirs = /usr/lib64/lapack/atlas:/usr/lib64/blas/threaded-atlas:/usr/lib
include_dirs = /usr/include/atlas:/usr/include
[blas_opt]
library_dirs = /usr/lib64/blas/threaded-atlas:/usr/lib64
libraries = blas, cblas, atlas
[lapack_opt]
library_dirs = /usr/lib64/lapack/atlas:/usr/lib64
libraries = lapack, blas, cblas, atlas
[fftw]
libraries = fftw3




I added the following print lines in system_info class:

   def __init__ (self,
                  default_lib_dirs=default_lib_dirs,
                  default_include_dirs=default_include_dirs,
                  verbosity = 1,
                  ):
        print '\n\n====================================='
        print '    class: ',self.__class__
        print '     libs: ', default_lib_dirs
        print ' includes: ', default_include_dirs
        print '=====================================\n\n'


A partial dump out of "python setup.py build":

Running from numpy source directory.
F2PY Version 2_4971


=====================================
    class:  numpy.distutils.system_info.blas_opt_info
     libs:  ['/usr/local/lib', '/usr/lib']
 includes:  ['/usr/local/include', '/usr/include']
=====================================


blas_opt_info:


=====================================
    class:  numpy.distutils.system_info.blas_mkl_info
     libs:  ['/usr/local/lib', '/usr/lib']
 includes:  ['/usr/local/include', '/usr/include']
=====================================


blas_mkl_info:
  libraries mkl,vml,guide not found in /usr/lib
  libraries mkl,vml,guide not found in /usr/local/lib
  NOT AVAILABLE



=====================================
    class:  numpy.distutils.system_info.atlas_blas_threads_info
     libs:  ['/usr/local/lib', '/usr/lib']
 includes:  ['/usr/local/include', '/usr/include']
=====================================


atlas_blas_threads_info:
Setting PTATLAS=ATLAS
  NOT AVAILABLE



=====================================
    class:  numpy.distutils.system_info.atlas_blas_info
     libs:  ['/usr/local/lib', '/usr/lib']
 includes:  ['/usr/local/include', '/usr/include']
=====================================


atlas_blas_info:
  NOT AVAILABLE

/home/nadav/numpy/numpy/distutils/system_info.py:1345: UserWarning: 
    Atlas (http://math-atlas.sourceforge.net/) libraries not found.
    Directories to search for the libraries can be specified in the
    numpy/distutils/site.cfg file (section [atlas]) or by setting
    the ATLAS environment variable.
  warnings.warn(AtlasNotFoundError.__doc__)


=====================================
    class:  numpy.distutils.system_info.blas_info
     libs:  ['/usr/local/lib', '/usr/lib']
 includes:  ['/usr/local/include', '/usr/include']
=====================================


blas_info:
  NOT AVAILABLE

/home/nadav/numpy/numpy/distutils/system_info.py:1354: UserWarning: 
    Blas (http://www.netlib.org/blas/) libraries not found.
    Directories to search for the libraries can be specified in the
    numpy/distutils/site.cfg file (section [blas]) or by setting
    the BLAS environment variable.
  warnings.warn(BlasNotFoundError.__doc__)


=====================================
    class:  numpy.distutils.system_info.blas_src_info
     libs:  ['/usr/local/lib', '/usr/lib']
 includes:  ['/usr/local/include', '/usr/include']
=====================================


blas_src_info:
  NOT AVAILABLE

/home/nadav/numpy/numpy/distutils/system_info.py:1357: UserWarning: 
    Blas (http://www.netlib.org/blas/) sources not found.
    Directories to search for the sources can be specified in the
    numpy/distutils/site.cfg file (section [blas_src]) or by setting
    the BLAS_SRC environment variable.
  warnings.warn(BlasSrcNotFoundError.__doc__)
  NOT AVAILABLE



=====================================
    class:  numpy.distutils.system_info.lapack_opt_info
     libs:  ['/usr/local/lib', '/usr/lib']
 includes:  ['/usr/local/include', '/usr/include']
=====================================


lapack_opt_info:


=====================================
    class:  numpy.distutils.system_info.lapack_mkl_info
     libs:  ['/usr/local/lib', '/usr/lib']
 includes:  ['/usr/local/include', '/usr/include']
=====================================


lapack_mkl_info:


=====================================
    class:  numpy.distutils.system_info.mkl_info
     libs:  ['/usr/local/lib', '/usr/lib']
 includes:  ['/usr/local/include', '/usr/include']
=====================================


mkl_info:
  libraries mkl,vml,guide not found in /usr/lib
  libraries mkl,vml,guide not found in /usr/local/lib
  NOT AVAILABLE

  NOT AVAILABLE



=====================================
    class:  numpy.distutils.system_info.atlas_threads_info
     libs:  ['/usr/local/lib', '/usr/lib']
 includes:  ['/usr/local/include', '/usr/include']
=====================================


atlas_threads_info:
Setting PTATLAS=ATLAS
numpy.distutils.system_info.atlas_threads_info
  NOT AVAILABLE



=====================================
    class:  numpy.distutils.system_info.atlas_info
     libs:  ['/usr/local/lib', '/usr/lib']
 includes:  ['/usr/local/include', '/usr/include']
=====================================


atlas_info:
numpy.distutils.system_info.atlas_info
  NOT AVAILABLE

/home/nadav/numpy/numpy/distutils/system_info.py:1252: UserWarning: 
    Atlas (http://math-atlas.sourceforge.net/) libraries not found.
    Directories to search for the libraries can be specified in the
    numpy/distutils/site.cfg file (section [atlas]) or by setting
    the ATLAS environment variable.
  warnings.warn(AtlasNotFoundError.__doc__)


=====================================
    class:  numpy.distutils.system_info.lapack_info
     libs:  ['/usr/local/lib', '/usr/lib']
 includes:  ['/usr/local/include', '/usr/include']
=====================================


lapack_info:
  NOT AVAILABLE

/home/nadav/numpy/numpy/distutils/system_info.py:1263: UserWarning: 
    Lapack (http://www.netlib.org/lapack/) libraries not found.
    Directories to search for the libraries can be specified in the
    numpy/distutils/site.cfg file (section [lapack]) or by setting
    the LAPACK environment variable.
  warnings.warn(LapackNotFoundError.__doc__)


=====================================
    class:  numpy.distutils.system_info.lapack_src_info
     libs:  ['/usr/local/lib', '/usr/lib']
 includes:  ['/usr/local/include', '/usr/include']
=====================================


lapack_src_info:
  NOT AVAILABLE

/home/nadav/numpy/numpy/distutils/system_info.py:1266: UserWarning: 
    Lapack (http://www.netlib.org/lapack/) sources not found.
    Directories to search for the sources can be specified in the
    numpy/distutils/site.cfg file (section [lapack_src]) or by setting
    the LAPACK_SRC environment variable.
  warnings.warn(LapackSrcNotFoundError.__doc__)
  NOT AVAILABLE

running build
running scons

    .
    .
    .

building extension "numpy.core._dotblas" sources
building extension "numpy.lib._compiled_base" sources
building extension "numpy.numarray._capi" sources
building extension "numpy.fft.fftpack_lite" sources
building extension "numpy.linalg.lapack_lite" sources
creating build/src.linux-x86_64-2.5/numpy/linalg
### Warning:  Using unoptimized lapack ###
  adding 'numpy/linalg/lapack_litemodule.c' to sources.
  adding 'numpy/linalg/zlapack_lite.c' to sources.
  adding 'numpy/linalg/dlapack_lite.c' to sources.
  adding 'numpy/linalg/blas_lite.c' to sources.
  adding 'numpy/linalg/dlamch.c' to sources.
  adding 'numpy/linalg/f2c_lite.c' to sources.

-------------------------------------------

* Why /usr/local/lib and /usr/local/include are there although they are not in site.cfg?
* Why lapack library was not found?
* site.cfg.example is located in ~/numpy but the UserWarning indicates numpy/distutils/site.cfg. I copied site.cfg also to ~/numpy/numpy/distutils but it did not help.

  Nadav


More information about the Numpy-discussion mailing list