[SciPy-dev] Building newscipy against non-atlas blas/lapack libraries
Nils Wagner
nwagner at mecha.uni-stuttgart.de
Mon Nov 7 03:40:48 EST 2005
Pearu Peterson wrote:
>On Sun, 6 Nov 2005, Nils Wagner wrote:
>
>
>>Hi Pearu,
>>
>>Which tests will exactly fail ?
>>
>>I have used
>>
>> export BLAS_SRC=~/src/blas
>> export LAPACK_SRC=~/src/lapack
>> mkdir $BLAS_SRC
>> cd $BLAS_SRC
>> wget http://www.netlib.org/blas/blas.tgz
>> tar xzf blas.tgz
>>
>> cd $LAPACK_SRC/..
>> wget http://www.netlib.org/lapack/lapack.tgz
>> tar xzf lapack.tgz
>>
>> export BLAS=None
>> export LAPACK=None
>> export ATLAS=None
>>
>>I have already reported the bugs with respect to this approach.
>>
>
>Using LAPACK_SRC approuch will not work as some LAPACK source files need
>to be compiled without optimization flags but currently scipy.distutils
>does not support switching off optimization for certain files. Using
>`config_fc --noopt` would switch off optimization for all Fortran sources.
>
>So, you need to build at least LAPACK library manually, see `Building
>the LAPACK library` section in
>
> http://www.scipy.org/documentation/buildatlas4scipy.txt
>
>Pearu
>
>_______________________________________________
>Scipy-dev mailing list
>Scipy-dev at scipy.net
>http://www.scipy.net/mailman/listinfo/scipy-dev
>
Pearu,
Following your advice, I have build the LAPACK library from scratch
using OPTS = -O2.
/home/nwagner> echo $LAPACK
/var/tmp/LAPACK/lapack_LINUX.a
/home/nwagner> echo $LAPACK_SRC
LAPACK_SRC: Undefined variable.
/home/nwagner> echo $BLAS_SRC
/var/tmp/src/blas
Now scipy.test(10,10) yields one error
======================================================================
FAIL: check_nils (scipy.linalg.matfuncs.test_matfuncs.test_signm)
----------------------------------------------------------------------
Traceback (most recent call last):
File
"/usr/local/lib/python2.4/site-packages/scipy/linalg/tests/test_matfuncs.py",
line 44, in check_nils
assert_array_almost_equal(r,cr)
File "/usr/local/lib/python2.4/site-packages/scipy/test/testing.py",
line 735, in assert_array_almost_equal
assert cond,\
AssertionError:
Arrays are not almost equal (mismatch 100.0%):
Array 1: [[ -5.2848319e-01 +3.8543597e+00j -6.2440787e+01
+6.0410538e+00j
2.7508638e+01 +1.3623836e+01j 5.9339443e+00 +3.4...
Array 2: [[ 11.9493333 -2.2453333 15.3173333 21.6533333
-2.2453333]
[ -3.8426667 0.4986667 -4.5906667 -7.1866667 0.498...
----------------------------------------------------------------------
Ran 1331 tests in 179.443s
FAILED (failures=1)
0.4.3.1440
0.4.2_1422
The repeated computation of logm(A) yields different results, but for
what reason ?
See the imaginary part -9.91687203e+00j in the last loop.
>>> A
array([[ 3.1, 0. ],
[ 0. , 3.1]])
>>> linalg.logm(A)
array([[ 1.13140211e+000, 1.49230383e-269],
[ 0.00000000e+000, 1.13140211e+000]])
>>> linalg.logm(A)
array([[ 1.13140211e+000, 1.33902098e-270],
[ 0.00000000e+000, 1.13140211e+000]])
>>> linalg.logm(A)
array([[ 1.13140211e+000, 1.62403951e-270],
[ 0.00000000e+000, 1.13140211e+000]])
>>> linalg.logm(A)
array([[ 1.13140211e+000, -2.19984796e-269],
[ 0.00000000e+000, 1.13140211e+000]])
>>> linalg.logm(A)
array([[ 1.13140211 +0.00000000e+00j, 0. -9.91687203e+00j],
[ 0. +0.00000000e+00j, 1.13140211 +0.00000000e+00j]])
Any pointer how to resolve these problems ?
Newscipy should work without ATLAS.
Nils
More information about the SciPy-Dev
mailing list