In order to get scipy-0.3.2 to build on Gentoo Linux, I use site.cfg in the distutils module. This is necessary because Gentoo has renamed the libf77blas.* libraries to libblas.* in order to allow users to easily switch between different libraries, ATLAS and Intel's MKL for example. When I compile newcore using the old site.cfg, my atlas info is properly reported. However, when I compile newscipy, the atlas info is reportedly unavailable. I looked into system_info.atlas_info and friends, and discovered that _lib_names is not informed by site.cfg, it is hardcoded with ['f77blas', 'cblas'], or ['ptf77blas','ptcblas'], etc. If I remove the 'f77', my atlas info is correctly reported. Darren
Darren Dale wrote:
In order to get scipy-0.3.2 to build on Gentoo Linux, I use site.cfg in the distutils module.
Although I don't use Gentoo, I tried to use site.cfg on my Ubuntu laptop and, like Darren, found it didn't seem to work. Where does it need to be located? It seems to me that distribution of distro-specific site.cfg files might be preferable to trying to get system_info.py to sniff out every possible one.
On Wednesday 19 October 2005 11:15 am, you wrote:
Darren Dale wrote:
In order to get scipy-0.3.2 to build on Gentoo Linux, I use site.cfg in the distutils module.
Although I don't use Gentoo, I tried to use site.cfg on my Ubuntu laptop and, like Darren, found it didn't seem to work. Where does it need to be located? It seems to me that distribution of distro-specific site.cfg files might be preferable to trying to get system_info.py to sniff out every possible one.
I was thinking that it would be good for scipy to use a site.cfg by default. Maybe distro-specific site.cfg files could be posted on the wiki and ultimately included in scipy. Darren
Darren Dale wrote:
I was thinking that it would be good for scipy to use a site.cfg by default.
site.cfg does work. I created a site.cfg in newcore/scipy/distutils containing [lapack_src] src_dirs=/home/swalton/src/LAPACK/SRC which is where, in fact, my LAPACK sources are. "python system_info.py" in this directory then correctly finds the sources.
The solution to this issue was hinted at, but never explicitly stated. Just for completeness, on my Gentoo system, to detect ATLAS with newcore I placed the following in newcore/scipy/distutils/site.cfg [atlas] library_dirs = /usr/lib/blas/atlas:/usr/lib/lapack/atlas atlas_libs = lapack, blas, cblas, atlas Also, pls email if you're interested in scipy-core-svn and scipy-svn ebuilds --Roman __________________________________ Yahoo! Mail - PC Magazine Editors' Choice 2005 http://mail.yahoo.com
Roman Stanchak wrote:
The solution to this issue was hinted at, but never explicitly stated. Just for completeness, on my Gentoo system, to detect ATLAS with newcore I placed the following in newcore/scipy/distutils/site.cfg
[atlas] library_dirs = /usr/lib/blas/atlas:/usr/lib/lapack/atlas atlas_libs = lapack, blas, cblas, atlas
Again, and for completeness, Ubuntu and now Fedora Core 4 have used a similar setup in their distributed ATLAS packages, where architecture-specific versions of atlas go in /usr/lib/${ARCH}, /usr/lib/atlas, and/or /usr/lib/atlas/${ARCH}, where ARCH can be sse, sse2 or 3dnow. Thus I think the following site.cfg works for both Ubuntu and FC4 (tested for Ubuntu 5.10, being tested now for FC4): [atlas] library_dirs=/usr/lib/sse:/usr/lib/atlas/sse:/usr/lib/atlas:/usr/lib atlas_libs=lapack,blas,cblas,atlas (change sse to sse2 or 3dnow as appropriate for your system)
On Wednesday 19 October 2005 12:09 pm, Stephen Walton wrote:
Darren Dale wrote:
I was thinking that it would be good for scipy to use a site.cfg by default.
site.cfg does work. I created a site.cfg in newcore/scipy/distutils containing
[lapack_src] src_dirs=/home/swalton/src/LAPACK/SRC
which is where, in fact, my LAPACK sources are. "python system_info.py" in this directory then correctly finds the sources.
Well, in my case, editing site.cfg alone does not work, because my fortran blas libraries are named "blas" instead of "f77blas". system_info.py has "f77blas" hardcoded in several places, which I have to change in order to build scipy. I think system_info.py should be set up to respect the library list in site.cfg. Darren
Darren Dale wrote:
Well, in my case, editing site.cfg alone does not work, because my fortran blas libraries are named "blas" instead of "f77blas". system_info.py has "f77blas" hardcoded in several places...
Only in the parts related to ATLAS, because the ATLAS-generated BLAS libraries are named this. I deliberately moved my libf77blas.a and libcblas.a to a place where distutils doesn't look, and did a "touch /usr/lib/libblas.a" to produce a bogus BLAS library. "python system_info.py" then produces, in part: blas_info: ( library_dirs = /usr/local/lib:/opt/lib:/usr/lib ) ( paths: /usr/lib/libblas.a ) ( library_dirs = /usr/local/lib:/opt/lib:/usr/lib ) FOUND: libraries = ['blas'] library_dirs = ['/usr/lib'] language = f77 Is your libblas.a in a different directory than the three listed as "library_dirs" up there? If so, you can change that too in site.cfg.
On Friday 11 November 2005 03:16 pm, Stephen Walton wrote:
Darren Dale wrote:
Well, in my case, editing site.cfg alone does not work, because my fortran blas libraries are named "blas" instead of "f77blas". system_info.py has "f77blas" hardcoded in several places...
Only in the parts related to ATLAS, because the ATLAS-generated BLAS libraries are named this.
The gentoo-science group has set up the math library ebuilds to create symlinks in /usr/lib, which can be changed to point to different external libraries (the blas libraries created by the blas-atlas ebuild are located at /usr/lib/blas/atlas/libblas.*). The thinking is that one could easily switch from using ATLAS to ACML, for example. site.cfg offers an opportunity to override the names of the ATLAS libraries, but I maybe this is misleading: # For overriding the names of the atlas libraries: atlas_libs = lapack, blas, cblas, atlas Darren
On Friday 11 November 2005 4:08 pm, Darren Dale wrote:
On Friday 11 November 2005 03:16 pm, Stephen Walton wrote:
Darren Dale wrote:
Well, in my case, editing site.cfg alone does not work, because my fortran blas libraries are named "blas" instead of "f77blas". system_info.py has "f77blas" hardcoded in several places...
Only in the parts related to ATLAS, because the ATLAS-generated BLAS libraries are named this.
The gentoo-science group has set up the math library ebuilds to create symlinks in /usr/lib, which can be changed to point to different external libraries (the blas libraries created by the blas-atlas ebuild are located at /usr/lib/blas/atlas/libblas.*). The thinking is that one could easily switch from using ATLAS to ACML, for example. site.cfg offers an opportunity to override the names of the ATLAS libraries, but I maybe this is misleading:
# For overriding the names of the atlas libraries: atlas_libs = lapack, blas, cblas, atlas
Just to follow up on this, here is my site.cfg: ____________________________________ [DEFAULT] library_dirs = /usr/lib include_dirs = /usr/include:/usr/include/atlas [atlas] atlas_libs = lapack, blas, cblas, atlas [fftw] fftw_libs = dfftw, drfftw, sfftw, srfftw fftw_opt_libs = dfftw_threads, drfftw_threads, sfftw_threads, srfftw_threads ____________________________________ I get the following messages when I build scipy (not scipy_core) on gentoo: Atlas (http://math-atlas.sourceforge.net/) libraries not found. Directories to search for the libraries can be specified in the scipy_distutils/site.cfg file (section [atlas]) or by setting the ATLAS environment variable. warnings.warn(AtlasNotFoundError.__doc__) And when I test scipy, I get warnings like **************************************************************** WARNING: clapack module is empty ----------- See scipy/INSTALL.txt for troubleshooting. Notes: * If atlas library is not found by scipy/system_info.py, then scipy uses flapack instead of clapack. **************************************************************** Now, if I edit system_info.py and replace every 'f77blas' with 'blas', this problem goes away. Darren
On Sunday 20 November 2005 09:49, Darren Dale wrote:
On Friday 11 November 2005 4:08 pm, Darren Dale wrote:
On Friday 11 November 2005 03:16 pm, Stephen Walton wrote:
Darren Dale wrote:
Well, in my case, editing site.cfg alone does not work, because my fortran blas libraries are named "blas" instead of "f77blas". system_info.py has "f77blas" hardcoded in several places...
I just reviewed the gentoo ebuild for numpy. This naming issue is solved in the gentoo ebuild, which is appropriate since they're using a non-standard naming convention. Darren
participants (3)
-
Darren Dale -
Roman Stanchak -
Stephen Walton