[SciPy-dev] new core, Itanium/Intel compiler probs
Arnd Baecker
arnd.baecker at web.de
Mon Dec 5 09:57:13 CST 2005
More details on some of the failures:
> ======================================================================
> FAIL: check_nd (scipy.base.index_tricks.test_index_tricks.test_grid)
> ----------------------------------------------------------------------
> Traceback (most recent call last):
> File
> "/home/baecker/python/newscipy/lib/python2.4/site-packages/scipy/base/tests/test_index_tricks.py",
> line 30, in check_nd
> assert_array_almost_equal(c[0][-1,:],ones(10,'d'),11)
> File
> "/home/baecker/python//newscipy/lib/python2.4/site-packages/scipy/test/testing.py",
> line 758, in assert_array_almost_equal
> assert cond,\
> AssertionError:
> Arrays are not almost equal (mismatch 100.0%):
> Array 1: [-0.555555555556 -0.555555555556 -0.555555555556
> -0.555555555556
> -0.555555555556 -0.555555555556 -0.555555555556 -0.555...
> Array 2: [ 1. 1. 1. 1. 1. 1. 1. 1. 1. 1.]
In [1]: from scipy import *
In [2]: c = mgrid[-1:1:10j,-2:2:10j]
In [3]: c[1][:,-1]
Out[3]:
array([-0.66666667, -0.22222222, 0.22222222, 0.66666667, 1.11111111,
1.55555556, 2. , 2.44444444, 2.88888889, 3.33333333])
In [4]: 2*ones(10,'d')
Out[4]: array([ 2., 2., 2., 2., 2., 2., 2., 2., 2., 2.])
Interestingly, c contains values >2 ?!:
In [5]: c
Out[5]:
array([[[-1. , -1. , -1. , -1. , -1. ,
-1. , -1. , -1. , -1. , -1. ],
[-0.77777778, -0.77777778, -0.77777778, -0.77777778, -0.77777778,
-0.77777778, -0.77777778, -0.77777778, -0.77777778, -0.77777778],
[-0.55555556, -0.55555556, -0.55555556, -0.55555556, -0.55555556,
-0.55555556, -0.55555556, -0.55555556, -0.55555556, -0.55555556],
[-0.33333333, -0.33333333, -0.33333333, -0.33333333, -0.33333333,
-0.33333333, -0.33333333, -0.33333333, -0.33333333, -0.33333333],
[-0.11111111, -0.11111111, -0.11111111, -0.11111111, -0.11111111,
-0.11111111, -0.11111111, -0.11111111, -0.11111111, -0.11111111],
[ 0.11111111, 0.11111111, 0.11111111, 0.11111111, 0.11111111,
0.11111111, 0.11111111, 0.11111111, 0.11111111, 0.11111111],
[ 0.33333333, 0.33333333, 0.33333333, 0.33333333, 0.33333333,
0.33333333, 0.33333333, 0.33333333, 0.33333333, 0.33333333],
[ 0.55555556, 0.55555556, 0.55555556, 0.55555556, 0.55555556,
0.55555556, 0.55555556, 0.55555556, 0.55555556, 0.55555556],
[ 0.77777778, 0.77777778, 0.77777778, 0.77777778, 0.77777778,
0.77777778, 0.77777778, 0.77777778, 0.77777778, 0.77777778],
[ 1. , 1. , 1. , 1. , 1. ,
1. , 1. , 1. , 1. , 1.
]],
[[-2. , -1.55555556, -1.11111111, -1.55555556, -1.11111111,
-1.55555556, -1.11111111, -1.55555556, -1.11111111, -0.66666667],
[-2. , -1.55555556, -1.11111111, -1.11111111, -0.66666667,
-1.11111111, -0.66666667, -1.11111111, -0.66666667, -0.22222222],
[-2. , -1.55555556, -1.11111111, -0.66666667, -0.22222222,
-0.66666667, -0.22222222, -0.66666667, -0.22222222, 0.22222222],
[-2. , -1.55555556, -1.11111111, -0.22222222, 0.22222222,
-0.22222222, 0.22222222, -0.22222222, 0.22222222, 0.66666667],
[-2. , -1.55555556, -1.11111111, 0.22222222, 0.66666667,
0.22222222, 0.66666667, 0.22222222, 0.66666667, 1.11111111],
[-2. , -1.55555556, -1.11111111, 0.66666667, 1.11111111,
0.66666667, 1.11111111, 0.66666667, 1.11111111, 1.55555556],
[-2. , -1.55555556, -1.11111111, 1.11111111, 1.55555556,
1.11111111, 1.55555556, 1.11111111, 1.55555556, 2. ],
[-2. , -1.55555556, -1.11111111, 1.55555556, 2. ,
1.55555556, 2. , 1.55555556, 2. , 2.44444444],
[-2. , -1.55555556, -1.11111111, 2. , 2.44444444,
2. , 2.44444444, 2. , 2.44444444, 2.88888889],
[-2. , -1.55555556, -1.11111111, 2.44444444, 2.88888889,
2.44444444, 2.88888889, 2.44444444, 2.88888889,
3.33333333]]])
So mgrid seems to be working incorrectly here?
> ======================================================================
> FAIL: check_basic
> (scipy.base.function_base.test_function_base.test_cumprod)
> ----------------------------------------------------------------------
> Traceback (most recent call last):
> File
> "/home/baecker/python/newscipy/lib/python2.4/site-packages/scipy/base/tests/test_function_base.py",
> line 163, in check_basic
> 1320, 6600, 26400],ctype))
> File
> "/home/baecker/python//newscipy/lib/python2.4/site-packages/scipy/test/testing.py",
> line 733, in assert_array_equal
> assert cond,\
> AssertionError:
> Arrays are not equal (mismatch 57.1428571429%):
> Array 1: [ 1. 2. 20. 0. 0. 0. 0.]
> Array 2: [ 1.0000000000000000e+00 2.0000000000000000e+00
> 2.0000000000000000e+01
> 2.2000000000000000e+02 1.32000000000000...
In [1]: from scipy import *
Importing test to scipy
Importing base to scipy
Importing basic to scipy
In [2]:
In [2]: ba = [1,2,10,11,6,5,4]
In [3]: for ctype in [float32,float64]:
...: a = array(ba,ctype)
...: print ctype
...: print cumprod(a),array([1, 2, 20, 220,1320, 6600,
26400],ctype)
...:
<type 'float32_arrtype'>
[ 1.00000000e+00 2.00000000e+00 2.00000000e+01 3.58916033e-38
2.15349620e-37 2.40609112e-37 9.62436448e-37] [ 1.00000000e+00
2.00000000e+00 2.00000000e+01 2.20000000e+02
1.32000000e+03 6.60000000e+03 2.64000000e+04]
<type 'float64_arrtype'>
[ 1. 2. 20. 0. 0. 0. 0.] [ 1.00000000e+00 2.00000000e+00
2.00000000e+01 2.20000000e+02
1.32000000e+03 6.60000000e+03 2.64000000e+04]
repeated calls give different numbers ...
> ======================================================================
> FAIL: check_basic
> (scipy.base.function_base.test_function_base.test_cumsum)
> ----------------------------------------------------------------------
> Traceback (most recent call last):
> File
> "/home/baecker/python/newscipy/lib/python2.4/site-packages/scipy/base/tests/test_function_base.py",
> line 122, in check_basic
> assert_array_equal(cumsum(a), array([1,3,13,24,30,35,39],ctype))
> File
> "/home/baecker/python//newscipy/lib/python2.4/site-packages/scipy/test/testing.py",
> line 733, in assert_array_equal
> assert cond,\
> AssertionError:
> Arrays are not equal (mismatch 57.1428571429%):
> Array 1: [ 1. 3. 13. 11. 17. 5. 9.]
> Array 2: [ 1. 3. 13. 24. 30. 35. 39.]
This is a nasty one - I can only trigger it with the following:
In [1]: from scipy import *
Importing test to scipy
Importing base to scipy
Importing basic to scipy
In [2]: ba = [1,2,10,11,6,5,4]
In [3]: for ctype in [uint32,float32,float64]:
...: print ctype
...: a = array(ba,ctype)
...: print cumsum(a), array([1,3,13,24,30,35,39],ctype)
...:
<type 'uint32_arrtype'>
[ 1 3 13 24 30 35 39] [ 1 3 13 24 30 35 39]
<type 'float32_arrtype'>
[ 1. 3. 13. 11. 17. 5. 9.] [ 1. 3. 13. 24. 30. 35. 39.]
<type 'float64_arrtype'>
[ 1.00000000e+000 3.00000000e+000 1.30000000e+001 2.68156159e+154
2.68156159e+154 5.00000000e+000 9.00000000e+000] [ 1. 3. 13.
24. 30. 35. 39.]
Leaving out either uint32 or float32 does not show the problem ...
> ======================================================================
> FAIL: Test add, sum, product.
> ----------------------------------------------------------------------
> Traceback (most recent call last):
> File
> "/home/baecker/python/newscipy/lib/python2.4/site-packages/scipy/base/tests/test_ma.py",
> line 163, in check_testAddSumProd
> self.failUnless (eq(scipy.add.accumulate(x), add.accumulate(x)))
> AssertionError
The failing test boils down to:
In [1]: import scipy
Importing test to scipy
Importing base to scipy
Importing basic to scipy
In [2]: from scipy import pi
In [3]:
In [3]: x=scipy.array([1.,1.,1.,-2., pi/2.0, 4., 5., -10., 10., 1., 2.,
3.])
In [4]: scipy.add.accumulate(x)
Out[4]:
array([ 1.00000000e+000, 2.00000000e+000, 3.00000000e+000,
2.68156159e+154, 2.68156159e+154, 2.68156159e+154,
2.68156159e+154, 2.68156159e+154, 2.68156159e+154,
2.68156159e+154, 2.68156159e+154, 2.68156159e+154])
In [5]: scipy.base.ma.add.accumulate(x)
Out[5]:
array([ 1. 2. 3. -2. -0.42920367
4. 9.
-10. 0. 1. 3. 6. ])
In [6]: scipy.base.ma.add.accumulate(x)
Out[6]:
array([ 1. 2. 3. -2. -0.42920367
4. 9.
-10. 0. 1. 3. 6. ])
In [7]: scipy.base.ma.add.accumulate(x)
Out[7]:
array([ 1. 2. 3. -2. -0.42920367
4. 9.
-10. 0. 1. 3. 6. ])
In [8]: scipy.base.ma.add.accumulate(x)
Out[8]:
array([ 1. 2. 3. -2. -0.42920367
4. 9.
-10. 0. 1. 3. 6. ])
In [9]: scipy.base.ma.add.accumulate(x)
Out[9]:
array([ 1.00000000e+000 2.00000000e+000 3.00000000e+000
7.89614591e+150
7.89614591e+150 4.00000000e+000 9.00000000e+000 8.23900140e+015
8.23900140e+015 1.71130458e+059 1.71130458e+059 1.71130458e+059])
In [10]: scipy.base.ma.add.accumulate(x)
Out[10]:
array([ 1.00000000e+000 2.00000000e+000 3.00000000e+000
7.89614591e+150
7.89614591e+150 2.08399685e+064 2.08399685e+064 8.23900250e+015
8.23900250e+015 1.71130458e+059 1.71130458e+059 1.71130458e+059])
In [11]: scipy.add.accumulate(x)
Out[11]:
array([ 1. , 2. , 3. , -2. ,
-0.42920367, 4. , 9. , -10. ,
0. , 1. , 3. , 6. ])
In [12]: scipy.add.accumulate(x)
Out[12]:
array([ 1. , 2. , 3. , -2. ,
-0.42920367, 4. , 9. , -10. ,
0. , 1. , 3. , 6. ])
In [13]: scipy.add.accumulate(x)
Out[13]:
array([ 1.00000000e+000, 2.00000000e+000, 3.00000000e+000,
2.68156159e+154, 2.68156159e+154, 4.00000000e+000,
9.00000000e+000, -1.00000000e+001, 0.00000000e+000,
1.00000000e+000, 3.00000000e+000, 6.00000000e+000])
I hope this helps a bit.
Best,
Arnd
More information about the Scipy-dev
mailing list