Re: [SciPy-user] blas/lapack issue on a freebsd box...
![](https://secure.gravatar.com/avatar/4049498c84d4a7a8f5f5afa5b86c4d2b.jpg?s=120&d=mm&r=g)
This is part of your problem. Do you have a site.cfg file? If so, please post it.
Ok. I have this one, in /usr/local/lib/python2.4/site-packages/numpy/distutils: [atlas] library_dirs = /usr/lib/atlas/3dnow/ atlas_libs = lapack, blas Looks wrong, no ?
You ought to have sections that look like these:
[DEFAULT] library_dirs=/usr/local/lib include_dirs=/usr/local/include
[blas_opt] libraries=f77blas, cblas, atlas
[lapack_opt] libraries=lapack, f77blas, cblas, atlas
I have deleted the lines above, and put yours. But nothing changes :-(
Possibly, you might also need to add g2c to the end of the libraries= lines.
Hmm, I have no g2c on my freebsd box.
Now, those libraries lists are from what I normally see installed from ATLAS. Given that I've never seen libalapack_r.so.1 before, it's possible that ATLAS gets build strangely on your machine. Please also give us a list of the libraries that ATLAS installs. Also tell us where you got /usr/local/lib/liblapack.so and /usr/local/lib/libblas.so .
Information for atlas-devel-3.7.11: Files: /usr/local/include/cblas.h /usr/local/include/clapack.h /usr/local/include/blas.h /usr/local/include/lapack.h /usr/local/lib/libalapack.a /usr/local/lib/libalapack.so.1 /usr/local/lib/libalapack.so /usr/local/lib/libalapack_r.a /usr/local/lib/libalapack_r.so.1 /usr/local/lib/libalapack_r.so /usr/local/lib/libatlas.a /usr/local/lib/libatlas.so.1 /usr/local/lib/libatlas.so /usr/local/lib/libatlas_r.a /usr/local/lib/libatlas_r.so.1 /usr/local/lib/libatlas_r.so /usr/local/lib/libcblas.a /usr/local/lib/libcblas.so.1 /usr/local/lib/libcblas.so /usr/local/lib/libcblas_r.a /usr/local/lib/libcblas_r.so.1 /usr/local/lib/libcblas_r.so /usr/local/lib/libf77blas.a /usr/local/lib/libf77blas.so.1 /usr/local/lib/libf77blas.so /usr/local/lib/libf77blas_r.a /usr/local/lib/libf77blas_r.so.1 /usr/local/lib/libf77blas_r.so /usr/local/lib/libptcblas.a /usr/local/lib/libptcblas.so.1 /usr/local/lib/libptcblas.so /usr/local/lib/libptf77blas.a /usr/local/lib/libptf77blas.so.1 /usr/local/lib/libptf77blas.so /usr/local/lib/libtstatlas.a /usr/local/lib/libtstatlas.so.1 /usr/local/lib/libtstatlas.so /usr/local/lib/libtstatlas_r.a /usr/local/lib/libtstatlas_r.so.1 /usr/local/lib/libtstatlas_r.so /usr/local/share/doc/atlas/AtlasCredits.txt /usr/local/share/doc/atlas/ChangeLog /usr/local/share/doc/atlas/DirStruct.txt /usr/local/share/doc/atlas/INDEX.txt /usr/local/share/doc/atlas/LibReadme.txt /usr/local/share/doc/atlas/TestTime.txt /usr/local/share/doc/atlas/TroubleShoot.txt /usr/local/share/doc/atlas/Windows.txt /usr/local/share/doc/atlas/atlas_contrib.ps /usr/local/share/doc/atlas/atlas_devel.ps /usr/local/share/doc/atlas/atlas_over.ps /usr/local/share/doc/atlas/cblas.ps /usr/local/share/doc/atlas/cblasqref.ps /usr/local/share/doc/atlas/f77blasqref.ps /usr/local/share/doc/atlas/lapackqref.ps I got liblapack.so from lapack-3.0_1 and libblas.so from blas-1.0 binary packages. Thanks in advance. PS : building scipy-0.5.1 requires that atlas be built with static libs. PS2 : thanks to added me to the EditorsList ;-) -- http://scipy.org/FredericPetit
![](https://secure.gravatar.com/avatar/764323a14e554c97ab74177e0bce51d4.jpg?s=120&d=mm&r=g)
fred wrote:
This is part of your problem. Do you have a site.cfg file? If so, please post it.
Ok. I have this one, in /usr/local/lib/python2.4/site-packages/numpy/distutils:
[atlas] library_dirs = /usr/lib/atlas/3dnow/ atlas_libs = lapack, blas
Looks wrong, no ?
Quite wrong. You should remove it. Also, put your site.cfg files next to the setup.py files for the package you are building. numpy.distutils will find it if it's in that location, but that's a bad place for it.
You ought to have sections that look like these:
[DEFAULT] library_dirs=/usr/local/lib include_dirs=/usr/local/include
[blas_opt] libraries=f77blas, cblas, atlas
[lapack_opt] libraries=lapack, f77blas, cblas, atlas
I have deleted the lines above, and put yours. But nothing changes :-(
Something should have changed. Maybe you don't get a successful compile, but the output of "python setup.py config" should be different.
Possibly, you might also need to add g2c to the end of the libraries= lines.
Hmm, I have no g2c on my freebsd box.
What FORTRAN compiler are you using? What FORTRAN compiler did you configure ATLAS with?
Now, those libraries lists are from what I normally see installed from ATLAS. Given that I've never seen libalapack_r.so.1 before, it's possible that ATLAS gets build strangely on your machine. Please also give us a list of the libraries that ATLAS installs. Also tell us where you got /usr/local/lib/liblapack.so and /usr/local/lib/libblas.so .
Information for atlas-devel-3.7.11:
Files: /usr/local/include/cblas.h /usr/local/include/clapack.h /usr/local/include/blas.h /usr/local/include/lapack.h /usr/local/lib/libalapack.a /usr/local/lib/libalapack.so.1 /usr/local/lib/libalapack.so /usr/local/lib/libalapack_r.a /usr/local/lib/libalapack_r.so.1 /usr/local/lib/libalapack_r.so /usr/local/lib/libatlas.a /usr/local/lib/libatlas.so.1 /usr/local/lib/libatlas.so /usr/local/lib/libatlas_r.a /usr/local/lib/libatlas_r.so.1 /usr/local/lib/libatlas_r.so /usr/local/lib/libcblas.a /usr/local/lib/libcblas.so.1 /usr/local/lib/libcblas.so /usr/local/lib/libcblas_r.a /usr/local/lib/libcblas_r.so.1 /usr/local/lib/libcblas_r.so /usr/local/lib/libf77blas.a /usr/local/lib/libf77blas.so.1 /usr/local/lib/libf77blas.so /usr/local/lib/libf77blas_r.a /usr/local/lib/libf77blas_r.so.1 /usr/local/lib/libf77blas_r.so /usr/local/lib/libptcblas.a /usr/local/lib/libptcblas.so.1 /usr/local/lib/libptcblas.so /usr/local/lib/libptf77blas.a /usr/local/lib/libptf77blas.so.1 /usr/local/lib/libptf77blas.so /usr/local/lib/libtstatlas.a /usr/local/lib/libtstatlas.so.1 /usr/local/lib/libtstatlas.so /usr/local/lib/libtstatlas_r.a /usr/local/lib/libtstatlas_r.so.1 /usr/local/lib/libtstatlas_r.so /usr/local/share/doc/atlas/AtlasCredits.txt /usr/local/share/doc/atlas/ChangeLog /usr/local/share/doc/atlas/DirStruct.txt /usr/local/share/doc/atlas/INDEX.txt /usr/local/share/doc/atlas/LibReadme.txt /usr/local/share/doc/atlas/TestTime.txt /usr/local/share/doc/atlas/TroubleShoot.txt /usr/local/share/doc/atlas/Windows.txt /usr/local/share/doc/atlas/atlas_contrib.ps /usr/local/share/doc/atlas/atlas_devel.ps /usr/local/share/doc/atlas/atlas_over.ps /usr/local/share/doc/atlas/cblas.ps /usr/local/share/doc/atlas/cblasqref.ps /usr/local/share/doc/atlas/f77blasqref.ps /usr/local/share/doc/atlas/lapackqref.ps
I got liblapack.so from lapack-3.0_1 and libblas.so from blas-1.0 binary packages.
Okay, try these sections: [DEFAULT] library_dirs=/usr/local/lib include_dirs=/usr/local/include [blas_opt] libraries=f77blas, cblas, atlas [lapack_opt] libraries=alapack, f77blas, cblas, atlas
Thanks in advance.
PS : building scipy-0.5.1 requires that atlas be built with static libs.
Says who? (It's possibly true, I don't know, but I'd like to know where you are getting this information from.) If that's the case, then add [DEFAULT] search_static_first = true
PS2 : thanks to added me to the EditorsList ;-)
No problem. -- Robert Kern "I have come to believe that the whole world is an enigma, a harmless enigma that is made terrible by our own mad attempt to interpret it as though it had an underlying truth." -- Umberto Eco
![](https://secure.gravatar.com/avatar/4049498c84d4a7a8f5f5afa5b86c4d2b.jpg?s=120&d=mm&r=g)
Robert Kern wrote: [snip]
Says who? (It's possibly true, I don't know, but I'd like to know where you are getting this information from.)
Who ? FreeBSD scipy port maintainer I guess. From scipy's Makefile: PORTNAME= scipy PORTVERSION= 0.5.1 CATEGORIES= science python MASTER_SITES= ${MASTER_SITE_SOURCEFORGE} MASTER_SITE_SUBDIR= scipy PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX} MAINTAINER= db@db.net COMMENT= Scientific tools for Python BUILD_DEPENDS= ${PYTHON_SITELIBDIR}/numpy/core/numeric.py:${PORTSDIR}/math/py-numpy \ ${LOCALBASE}/lib/libdjbfft.a:${PORTSDIR}/math/djbfft LIB_DEPENDS= fftw.2:${PORTSDIR}/math/fftw LATEST_LINK= py-${PORTNAME} OPTIONSFILE= ${PORT_DBDIR}/py-numpy/options USE_PYTHON= 2.3+ USE_PYDISTUTILS= yes USE_WX= 2.4-2.6 WX_COMPS= python:build python:run OPTIONS= ATLAS "Use optimized blas library" OFF post-patch: @${GREP} -lR "malloc\.h" ${WRKSRC} | ${XARGS} ${REINPLACE_CMD} \ -e "s@malloc\.h@stdlib.h@" .include <bsd.port.pre.mk> .if defined(WITH_ATLAS) LIB_DEPENDS+= atlas.1:${PORTSDIR}/math/atlas .if !exists(${LOCALBASE}/lib/libalapack.a) IGNORE= Atlas needs to be built with WITH_STATICLIB for scipy to function properly .endif .else LIB_DEPENDS+= lapack.3:${PORTSDIR}/math/lapack \ blas.1:${PORTSDIR}/math/blas .endif I don't know why... Cheers, -- http://scipy.org/FredericPetit
![](https://secure.gravatar.com/avatar/4049498c84d4a7a8f5f5afa5b86c4d2b.jpg?s=120&d=mm&r=g)
site.cfg was really guilty ;-) As I said, some packages were installed from binary packages, others from "ports" as freebsd users know, i.e. build on my freebsd box. So I rebuilt all from ports, site.cfg looks like good, and now it works fine. Thanks to have pointed to me where the issue could come from. Cheers, -- http://scipy.org/FredericPetit
participants (2)
-
fred
-
Robert Kern