[SciPy-Dev] memory corruption when running scipy 0.8 test suite

Christoph Gohlke cgohlke@uci....
Wed Jul 14 13:33:36 CDT 2010



On 7/14/2010 3:54 AM, Pauli Virtanen wrote:
> Wed, 14 Jul 2010 03:47:07 -0700, Christoph Gohlke wrote:
> [clip]
>> Finally, the "Real-valued Bessel domains", test_twodiags
>> (test_linsolve.TestLinsolve), and
>> test_linsolve.TestSplu.test_spilu_smoketest errors and failures
>> disappear when I run the scipy tests with the -O flag, which tells
>> Python to optimize generated bytecode:
>>
>> python -O -c"import scipy;scipy.test()" ->  4 failures
>>
>> python -c "import scipy;scipy.test()" ->  1 error, 6 failures
>
> It also tells Python to remove all of the "assert" statements, which
> effectively removes some of the tests.

I forgot that.

>
> Recommendation for using "assert" is maybe not the best of ideas in Nose,
> and we should probably avoid that...
>
> The airye stuff comes from Amos, and the nan failures either indicate
> issues with compilation of the Fortran codes, or (less likely) in the
> wrappers.
>
> [clip]
>> In the process of deleting *.pyo files and reinstalling other MKL
>> dependent packages, the mysterious 64-bit ndimage/dsyevr failure also
>> vanished.
>
> So SuperLU still fails with MKL, but MKL causes no other additional
> failures?

Unfortunately, now the ndimage/dsyevr failure reappeared even on a clean 
installation.

The ODR and QMR failures below might also be due to MKL.

Would you be interested in a patch for linking SuperLU against CBLAS?

>
> Could you re-paste the errors+failures that you see in a "clean"
> installation?
>

Sure, sorry for the confusion. This is the output of a scipy.test() run 
without PYTHONOPTIMIZE on a clean minimal 32-bit installation. Numpy and 
scipy include the latest fixes from svn and SuperLU is linked against CBLAS:

Running unit tests for scipy
NumPy version 1.4.1
NumPy is installed in X:\python26\lib\site-packages\numpy
SciPy version 0.8.0.dev6609
SciPy is installed in X:\python26\lib\site-packages\scipy
Python version 2.6.5 (r265:79096, Mar 19 2010, 21:48:26) [MSC v.1500 32 
bit (Intel)]
nose version 0.11.3
................................................................................
................................................................................
......................................K.........................................
................................................................................
....K..K........................................................................
................................................................................
................................................................................
................................................................................
................................................................................
................................................................................
................................................................................
.........................................SSSSSS......SSSSSS......SSSS...........
....................................................S...........................
................................................................................
................................................................................
...................K............................................................
................................................................................
................................................................................
................................................................................
................................................................................
................................................................................
................................................................................
..........................................................FFF...................
................................................................................
................................................................................
................................................................................
...............................................................SSSSSSSSSSS.E..F.
.........K.........F............................................................
.................................................................K..............
.................................................K..............................
................................................................................
...........................................KK...................................
................................................................................
................................................................................
................................................................................
................................................................................
....................................K.K.........................................
................................................................................
................................................................................
................................................................................
................................................................................
..........K........K.........SSSSSS.............................................
................................................................................
................................................................................
................................................................................
................................................................................
................................................................................
...................................................................S............
................................................................................
................................................................................
................................................................................
................................................................................
................................................................................
.............................................................error 
removing c:\u
sers\gohlke\appdata\local\temp\tmpaqkoypcat_test: 
c:\users\gohlke\appdata\local\
temp\tmpaqkoypcat_test: The directory is not empty
................................................................................
..................
======================================================================
ERROR: test_twodiags (test_linsolve.TestLinsolve)
----------------------------------------------------------------------
Traceback (most recent call last):
   File 
"X:\python26\lib\site-packages\scipy\sparse\linalg\dsolve\tests\test_linsolve.py", 
line 39, in test_twodiags
     assert( norm(b - Asp*x) < 10 * cond_A * eps )
   File "X:\python26\lib\site-packages\scipy\linalg\misc.py", line 9, in 
norm
     return np.linalg.norm(np.asarray_chkfinite(a), ord=ord)
   File "X:\python26\lib\site-packages\numpy\lib\function_base.py", line 
586, inasarray_chkfinite
     raise ValueError, "array must not contain infs or NaNs"
ValueError: array must not contain infs or NaNs

======================================================================
FAIL: test_lorentz (test_odr.TestODR)
----------------------------------------------------------------------
Traceback (most recent call last):
   File "X:\python26\lib\site-packages\scipy\odr\tests\test_odr.py", 
line 292, in
  test_lorentz
     3.7798193600109009e+00]),
   File "X:\python26\lib\site-packages\numpy\testing\utils.py", line 
765, in assert_array_almost_equal
     header='Arrays are not almost equal')
   File "X:\python26\lib\site-packages\numpy\testing\utils.py", line 
609, in assert_array_compare
     raise AssertionError(msg)
AssertionError:
Arrays are not almost equal

(mismatch 100.0%)
  x: array([  1.00000000e+03,   1.00000000e-01,   3.80000000e+00])
  y: array([  1.43067808e+03,   1.33905090e-01,   3.77981936e+00])

======================================================================
FAIL: test_multi (test_odr.TestODR)
----------------------------------------------------------------------
Traceback (most recent call last):
   File "X:\python26\lib\site-packages\scipy\odr\tests\test_odr.py", 
line 188, in test_multi
     0.5101147161764654,  0.5173902330489161]),
   File "X:\python26\lib\site-packages\numpy\testing\utils.py", line 
765, in assert_array_almost_equal
     header='Arrays are not almost equal')
   File "X:\python26\lib\site-packages\numpy\testing\utils.py", line 
609, in assert_array_compare
     raise AssertionError(msg)
AssertionError:
Arrays are not almost equal

(mismatch 100.0%)
  x: array([ 4. ,  2. ,  7. ,  0.4,  0.5])
  y: array([ 4.37998803,  2.43330576,  8.00288459,  0.51011472, 
0.51739023])

======================================================================
FAIL: test_pearson (test_odr.TestODR)
----------------------------------------------------------------------
Traceback (most recent call last):
   File "X:\python26\lib\site-packages\scipy\odr\tests\test_odr.py", 
line 235, in test_pearson
     np.array([ 5.4767400299231674, -0.4796082367610305]),
   File "X:\python26\lib\site-packages\numpy\testing\utils.py", line 
765, in assert_array_almost_equal
     header='Arrays are not almost equal')
   File "X:\python26\lib\site-packages\numpy\testing\utils.py", line 
609, in assert_array_compare
     raise AssertionError(msg)
AssertionError:
Arrays are not almost equal

(mismatch 100.0%)
  x: array([ 1.,  1.])
  y: array([ 5.47674003, -0.47960824])

======================================================================
FAIL: test_linsolve.TestSplu.test_spilu_smoketest
----------------------------------------------------------------------
Traceback (most recent call last):
   File "X:\python26\lib\site-packages\nose\case.py", line 186, in runTest
     self.test(*self.arg)
   File 
"X:\python26\lib\site-packages\scipy\sparse\linalg\dsolve\tests\test_linsolve.py", 
line 63, in test_spilu_smoketest
     assert abs(x - r).max() < 1e-2
AssertionError

======================================================================
FAIL: Check that QMR works with left and right preconditioners
----------------------------------------------------------------------
Traceback (most recent call last):
   File 
"X:\python26\lib\site-packages\scipy\sparse\linalg\isolve\tests\test_iterative.py", 
line 178, in test_leftright_precond
     assert_equal(info,0)
   File "X:\python26\lib\site-packages\numpy\testing\utils.py", line 
309, in assert_equal
     raise AssertionError(msg)
AssertionError:
Items are not equal:
  ACTUAL: 1
  DESIRED: 0

----------------------------------------------------------------------
Ran 4399 tests in 36.788s

FAILED (KNOWNFAIL=13, SKIP=35, errors=1, failures=5)



On a clean 64-bit installation I also get the ndimage/dsyevr memory 
corruption (?) failure:

======================================================================
FAIL: extrema 3
----------------------------------------------------------------------
Traceback (most recent call last):
   File 
"X:\python26-x64\lib\site-packages\scipy\ndimage\tests\test_ndimage.py", 
line 3149, in test_extrema03
     self.failUnless(numpy.all(output1[2]  == output4))
AssertionError



And on my 32-bit development installation I still get the airye failure, 
but only when run in the context of scipy.test():

======================================================================
FAIL: Real-valued Bessel domains
----------------------------------------------------------------------
Traceback (most recent call last):
   File 
"X:\python26\lib\site-packages\scipy\special\tests\test_basic.py", line 
1691, in test_ticket_854
     assert not isnan(airye(-1)[2:4]).any(), airye(-1)
AssertionError: (nan, nan, nan, nan)



Thank you for all the help. This work should also help improve the scipy 
package in EPD, which shows most of the test failures I see.

--
Christoph


More information about the SciPy-Dev mailing list