[SciPy-dev] numpy - dot problem

Arnd Baecker arnd.baecker at web.de
Fri Jan 6 09:00:43 CST 2006


Hi,

I have a weird problem which shows up indirectly
in the tests of signm of scipy.

After digging for quite a while (finally leading to funm
and slice ;-), this short example demonstrates the problem

  import numpy
  a1=numpy.array([], dtype=numpy.complex128)
  a2=numpy.array([], dtype=numpy.complex128)
  numpy.dot(a1,a2)

On an opteron, I get a nice
  Out[10]: 0j
(no idea if this is the right result, but that's not the problem)

But on an Itanium2 machine I get:

In [1]: import numpy
In [2]: numpy.__version__
Out[2]: '0.9.3.1842'
In [3]: numpy.test(10)
Ran 179 tests in 1.591s
In [4]: a1=numpy.array([], dtype=numpy.complex128)
In [5]: a2=numpy.array([], dtype=numpy.complex128)
In [6]: numpy.dot(a1,a2)
Out[6]: (2.681561587629943e+154+2.6815615859888243e+154j)

Repeated calls give different numbers
In [8]: numpy.dot(a1,a2)
Out[8]: (2.6815615885274171e+154+2.6815615859888243e+154j)

Clearly, this is not correct.

I could not find anything suspicious in the build log...

What should I do next on this one ?

Best,

Arnd

P.S.:
-  gcc-3.4.5
- no BLAS library (no MKL, ATLAS, SCLS, ACML ...)

The build log shows:

gcc options: '-pthread -fno-strict-aliasing -DNDEBUG -g -O3 -Wall
-Wstrict-prototypes -fPIC'
compile options: '-Inumpy/core/include -Ibuild/src/numpy/core
-Inumpy/core/src -Inumpy/lib/../core/include
-I/home/baecker/python2/include/python2.4 -c'
gcc: build/src/numpy/core/src/_sortmodule.c
/tmp/ccS5CjIG.s: Assembler messages:
/tmp/ccS5CjIG.s:39713: Warning: Additional NOP may be necessary to
workaround Itanium processor A/B step errata
/tmp/ccS5CjIG.s:39852: Warning: Additional NOP may be necessary to
workaround Itanium processor A/B step errata
gcc -pthread -shared
build/temp.linux-ia64-2.4/build/src/numpy/core/src/_sortmodule.o -lm -o
build/lib.linux-ia64-2.4/numpy/core/_sort.so
building 'numpy.lib._compiled_base' extension

but that is irrelevant here, I suppose.




More information about the Scipy-dev mailing list