[Numpy-discussion] building numpy with atlas on ubuntu edgy

Christian K ckkart@hoc....
Fri Apr 13 23:44:48 CDT 2007


Hi,
I'm trying to build numpy from svn on ubuntu edgy with atlas provided by ubuntu
package atlas3-sse2-dev which contains:

/usr
/usr/lib
/usr/lib/sse2
/usr/lib/sse2/libatlas.a
/usr/lib/sse2/libcblas.a
/usr/lib/sse2/libf77blas.a
/usr/lib/sse2/liblapack_atlas.a
/usr/lib/atlas
/usr/lib/atlas/sse2
/usr/lib/atlas/sse2/libblas.a
/usr/lib/atlas/sse2/liblapack.a
/usr/share
/usr/share/doc
/usr/share/doc/atlas3-sse2-dev
/usr/share/doc/atlas3-sse2-dev/copyright
/usr/share/doc/atlas3-sse2-dev/changelog.Debian.gz
/usr/lib/sse2/libatlas.so
/usr/lib/sse2/libcblas.so
/usr/lib/sse2/libf77blas.so
/usr/lib/sse2/liblapack_atlas.so
/usr/lib/atlas/sse2/libblas.so
/usr/lib/atlas/sse2/liblapack.so

I tried both with and without a site.cfg:


[DEFAULT]
library_dirs = /usr/lib/sse2
include_dirs = /usr/include

[blas_opt]
libraries = f77blas, cblas, atlas

[lapack_opt]
libraries = lapack, f77blas, cblas, atlas

and tested wether numpy is actually using the optimized libs as demonstrated in
a posting by Simon Burton
(http://article.gmane.org/gmane.comp.python.numeric.general/5849).

It apparently is linked to
/usr/lib/sse2/libatlas.so.3.0
/usr/lib/sse2/libcblas.so.3.0
/usr/lib/sse2/libf77blas.so.3.0
/usr/lib/python2.4/site-packages/numpy/linalg/lapack_lite.so

The optimized lapack lib is not used. This is consistent with the output of the
build script:

ck@kiste:~/prog/scipy/numpy$ python setup.py build
Running from numpy source directory.
non-existing path in 'numpy/distutils': 'site.cfg'
F2PY Version 2_3714
blas_opt_info:
blas_mkl_info:
  libraries mkl,vml,guide not found in /usr/local/lib
  libraries mkl,vml,guide not found in /usr/lib
  NOT AVAILABLE

atlas_blas_threads_info:
Setting PTATLAS=ATLAS
  libraries ptf77blas,ptcblas,atlas not found in /usr/local/lib
  libraries ptf77blas,ptcblas,atlas not found in /usr/lib/atlas
  libraries ptf77blas,ptcblas,atlas not found in /usr/lib/sse2
  libraries ptf77blas,ptcblas,atlas not found in /usr/lib
  NOT AVAILABLE

atlas_blas_info:
  libraries f77blas,cblas,atlas not found in /usr/local/lib
  libraries f77blas,cblas,atlas not found in /usr/lib/atlas
  FOUND:
    libraries = ['f77blas', 'cblas', 'atlas']
    library_dirs = ['/usr/lib/sse2']
    language = c

customize GnuFCompiler
customize GnuFCompiler
customize GnuFCompiler using config
compiling '_configtest.c':

/* This file is generated from numpy_distutils/system_info.py */
void ATL_buildinfo(void);
int main(void) {
  ATL_buildinfo();
  return 0;
}
C compiler: gcc -pthread -fno-strict-aliasing -DNDEBUG -g -O2 -Wall
-Wstrict-prototypes -fPIC

compile options: '-c'
gcc: _configtest.c
gcc -pthread _configtest.o -L/usr/lib/sse2 -lf77blas -lcblas -latlas -o _configtest
ATLAS version 3.6.0 built by root on Fri Jan  9 15:57:20 UTC 2004:
   UNAME    : Linux intech67 2.4.20 #1 SMP Fri Jan 10 18:29:51 EST 2003 i686
GNU/Linux
   INSTFLG  :
   MMDEF    : /fix/g/camm/atlas3-3.6.0/CONFIG/ARCHS/P4SSE2/gcc/gemm
   ARCHDEF  : /fix/g/camm/atlas3-3.6.0/CONFIG/ARCHS/P4SSE2/gcc/misc
   F2CDEFS  : -DAdd__ -DStringSunStyle
   CACHEEDGE: 1048576
   F77      : /usr/bin/g77, version GNU Fortran (GCC) 3.3.3 20031229
(prerelease) (Debian)
   F77FLAGS : -fomit-frame-pointer -O
   CC       : /usr/bin/gcc, version gcc (GCC) 3.3.3 20031229 (prerelease) (Debian)
   CC FLAGS : -fomit-frame-pointer -O3 -funroll-all-loops
   MCC      : /usr/bin/gcc, version gcc (GCC) 3.3.3 20031229 (prerelease) (Debian)
   MCCFLAGS : -fomit-frame-pointer -O
success!
removing: _configtest.c _configtest.o _configtest
  FOUND:
    libraries = ['f77blas', 'cblas', 'atlas']
    library_dirs = ['/usr/lib/sse2']
    language = c
    define_macros = [('ATLAS_INFO', '"\\"3.6.0\\""')]

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

  NOT AVAILABLE

atlas_threads_info:
Setting PTATLAS=ATLAS
  libraries ptf77blas,ptcblas,atlas not found in /usr/local/lib
  libraries lapack_atlas not found in /usr/local/lib
  libraries ptf77blas,ptcblas,atlas not found in /usr/lib/atlas
  libraries lapack_atlas not found in /usr/lib/atlas
  libraries ptf77blas,ptcblas,atlas not found in /usr/lib/sse2
  libraries ptf77blas,ptcblas,atlas not found in /usr/lib
  libraries lapack_atlas not found in /usr/lib
numpy.distutils.system_info.atlas_threads_info
  NOT AVAILABLE

atlas_info:
  libraries f77blas,cblas,atlas not found in /usr/local/lib
  libraries lapack_atlas not found in /usr/local/lib
  libraries f77blas,cblas,atlas not found in /usr/lib/atlas
  libraries lapack_atlas not found in /usr/lib/atlas
  libraries lapack not found in /usr/lib/sse2
  libraries f77blas,cblas,atlas not found in /usr/lib
  libraries lapack_atlas not found in /usr/lib
numpy.distutils.system_info.atlas_info
/media/hda6/home/ck/prog/scipy/numpy/numpy/distutils/system_info.py:903:
UserWarning:
*********************************************************************
    Could not find lapack library within the ATLAS installation.
*********************************************************************

  warnings.warn(message)
  FOUND:
    libraries = ['f77blas', 'cblas', 'atlas']
    library_dirs = ['/usr/lib/sse2']
    language = c
    define_macros = [('ATLAS_WITHOUT_LAPACK', None)]

lapack_info:
  libraries lapack not found in /usr/local/lib
  libraries lapack not found in /usr/lib
  NOT AVAILABLE


Confusingly lapack_atlas resides in /usr/lib but even though setup.py looks for
it in that place it reports 'not found'.

What should I try next?

Thanks, Christian



More information about the Numpy-discussion mailing list