[SciPy-dev] scipy and ATLAS (in)dependency

Pearu Peterson pearu at scipy.org
Sat Oct 9 17:00:13 CDT 2004


Today I was reading "Special Session: Making Python attractive to 
General Scientists (Harrington, Greenfield)" notes in


and I was a bit surprised on one of the conclusions that maybe ATLAS 
optimization should be undone due to difficulties in building ATLAS.

Though, IMHO, building recent versions of ATLAS libraries is not difficult 
at all on Linux platforms and not even on MS Windows (there are 
step-by-step instructions available on Scipy site), it just may be a very
time consuming process ;).
It's not even an issue for Mac as Scipy uses its vecLib framework.
I can't say much on the situation on other unix platforms such as irix, 
sun, etc due to the lack of access to such platforms. But most of current 
and potential Scipy users are either on MS Windows, Linux, or Mac anyway..

But that was not the point I was surprised on. It was acctually the fact 
that people seem to be unaware of the possibility to build Scipy without
ATLAS dependency by using Fortran sources of BLAS and LAPACK libraries.
Let me stress that nothing in Scipy requires specifically ATLAS libraries, 
the corresponding interface in scipy.linalg is smart enough to pick up 
ATLAS optimized routines when available and use Fortran BLAS/LAPACK 
routines when they are not.

My point is that there is (almost) nothing to do to "undo ATLAS 
optimization" in Scipy. ATLAS is optional already. However, when ATLAS is 
not available then Scipy needs BLAS/LAPACK libraries that currently must 
be provided by the system or users must download them from Netlib. I think 
that BLAS/LAPACK libraries are the only external libraries that Scipy 
currently depends on.

To get rid of this dependency, I'd suggest include the sources of 
BLAS/LAPACK libraries to Scipy, and use them silently when optimized 
BLAS/LAPACK libraries are not available. This would be very similar to 
scipy.fftpack that silently uses Fortran fftpack sources when FFTW 
libraries are not found.

Just wanted to clear some things up..

More information about the Scipy-dev mailing list