[Numpy-discussion] numarray and ATLAS
Francesc Alted
falted at pytables.org
Fri Oct 15 10:07:40 EDT 2004
Hi,
Despite de fact that some errors arise, I've checked the numarray version
linked against ATLAS, and it seems like it doesn't get the expected ATLAS
boost:
>>> import timeit
>>> t1 = timeit.Timer("m3=numarray.dot(m1,m2)", "import numarray;dim1=500;m1=numarray.arange(dim1*dim1,shape=(dim1,dim1), type=numarray.Float32);m2=numarray.arange(dim1*dim1,shape=(dim1,dim1), type=numarray.Float32)")
>>> t1.repeat(3,10)
[3.7274820804595947, 3.8542821407318115, 3.7117569446563721]
However, Numeric seems to get it:
>>> t3 = timeit.Timer("m3=Numeric.dot(m1,m2)", "import Numeric;dim1=500;m1=Numeric.arange(dim1*dim1, typecode='f');Numeric.reshape(m1, (dim1,dim1));m2=Numeric.arange(dim1*dim1,typecode='f');Numeric.reshape(m2,(dim1,dim1))")
>>> t3.repeat(3,10)
[0.0093162059783935547, 0.0096318721771240234, 0.0092968940734863281]
i.e. almost 300 faster than numarray
Anyone is getting the acceleration boost with numarray & ATLAS?
Cheers,
A Divendres 15 Octubre 2004 13:18, Francesc Alted va escriure:
> Hi,
>
> Perhaps this is a too recurrent subject, but I'm having problems when
> making numarray to use ATLAS instead of the mini-lapack included.
>
> I've installed ATLAS 3.6.0 on my pentium IV machine. I've made it a
> completely featured LAPACK by following the instructions in:
>
> http://math-atlas.sourceforge.net/errata.html#completelp
>
> and I'm pretty sure that the resulting library works. Now, after exporting
> USE_LAPACK and set the appropiate directory for lapack_dirs in addons.py,
> the compilation went well (however, I can see that lapack_litemodule.c is
> still being compiled, and I don't know if that's normal or not). The command
> I've used to install is:
>
> $ python setup.py install --gencode --home=/users/exp/alted/bin-i686
>
> And the error that happens during the test phase follows:
>
> $ python
> Python 2.3.4 (#1, Jul 22 2004, 20:47:54)
> [GCC 3.3.2 20031022 (Red Hat Linux 3.3.2-1)] on linux2
> Type "help", "copyright", "credits" or "license" for more information.
> >>> import numarray.testall as testall
> >>> testall.test()
> numarray: ((0, 1199), (0, 1199))
> numarray.records: (0, 48)
> numarray.strings: (0, 176)
> numarray.memmap: (0, 82)
> numarray.objects: (0, 105)
> numarray.memorytest: (0, 16)
> numarray.examples.convolve: ((0, 20), (0, 20), (0, 20), (0, 20))
> numarray.convolve: (0, 52)
> Traceback (most recent call last):
> File "<stdin>", line 1, in ?
> File "/users/exp/alted/bin-i686/lib/python/numarray/testall.py", line 24, in test
> result = eval(p+".test()")
> File "<string>", line 0, in ?
> File "/users/exp/alted/bin-i686/lib/python/numarray/fft/FFT.py", line 326, in test
> import dtest
> File "/users/exp/alted/bin-i686/lib/python/numarray/fft/dtest.py", line 238, in ?
> import numarray.random_array as random_array
> File "/users/exp/alted/bin-i686/lib/python/numarray/random_array/__init__.py", line 7, in ?
> from RandomArray2 import *
> File "/users/exp/alted/bin-i686/lib/python/numarray/random_array/RandomArray2.py", line 3, in ?
> import numarray.linear_algebra as linalg
> File "/users/exp/alted/bin-i686/lib/python/numarray/linear_algebra/__init__.py", line 1, in ?
> from LinearAlgebra2 import *
> File "/users/exp/alted/bin-i686/lib/python/numarray/linear_algebra/LinearAlgebra2.py", line 23, in ?
> import lapack_lite2
> ImportError:
> /users/exp/alted/bin-i686/lib/python/numarray/linear_algebra/lapack_lite2.so:
> undefined symbol: dgesdd_
>
> I've checked that dgesdd symbol exists on my liblapack.a:
>
> $ strings ~/bin-i686/lib/atlas/liblapack.a | grep dgesdd
> dgesdd.o/ 1097832195 2514 515 100644 13788 `
>
> but not a dgesdd_, as you can see.
>
> I'm missing something?
>
--
Francesc Alted
More information about the NumPy-Discussion
mailing list