[SciPy-Dev] memory corruption when running scipy 0.8 test suite
Christoph Gohlke
cgohlke at uci.edu
Sat Jul 17 05:48:24 EDT 2010
On 7/12/2010 6:11 PM, Christoph Gohlke wrote:
> Dear SciPy developers,
>
> I am trying to fix the errors and failures reported in the thread
> "[SciPy-User] many test failures on windows 64"
> <http://mail.scipy.org/pipermail/scipy-user/2010-July/025961.html>. Most
> of the issues seem specific for the msvc9/MKL build of scipy 0.8. I am
> now down to 1 error and 6 failures (from 16 errors and 9 failures).
>
>
> The following failure in ndimage does not appear when ndimage.test() is
> run out of context of scipy.test()
>
> FAIL: extrema 3
> ----------------------------------------------------------------------
> Traceback (most recent call last):
> File "C:\Python26\lib\site-packages\scipy\ndimage\tests\test_ndimage.py",
> line 3149, in test_extrema03
> self.failUnless(numpy.all(output1[2] == output4))
> AssertionError
>
>
> The output1[2] array contains a NaN in the first position. If I disable
> the following dsyevr related tests in
> scipy.lib.lapack.tests.test_esv.py, all ndimage tests pass. Could this
> be a memory corruption issue in MKL? Besides the ndimage failure,
> scipy.lib.lapack seems to work and passes all tests. Also, this artifact
> only happens or surfaces on the 64-bit build.
>
I could reduce this failure to the following:
In [1]: import numpy
In [2]: from scipy.lib.lapack.flapack import dsyevr
In [3]: numpy.mod(1., 1)
Out[3]: 0.0
In [4]: dsyevr(numpy.array([[1,2,3],[2,2,3],[3,3,6]]))
Out[4]:
(array([-0.66992434, 0.48769389, 9.18223045]),
array([[ 0.87881028, -0.25679224, 0.40218185],
[-0.432995 , -0.78333614, 0.44598186],
[-0.20051889, 0.56607617, 0.79959361]]),
0)
In [5]: numpy.mod(1., 1)
Out[5]: nan # <--- wrong
In [6]: numpy.mod(1., 1)
Out[6]: 0.0
The first call to numpy.mod() after calling dsyevr() returns a wrong
result (NaN). The output of dsyevr is correct. Numpy.mod returns the
correct result when using a slightly different input matrix for dsyevr,
e.g. [[1,2,3],[2,1,3],[3,3,6]].
--
Christoph
More information about the SciPy-Dev
mailing list