[SciPy-Dev] scipy.test bails with segmentation error

Bruce Southey bsouthey at gmail.com
Fri Apr 30 10:23:18 EDT 2010


On 04/30/2010 07:20 AM, hannes wrote:
> Dear Pauli, below the results.
>
> getting factors of real matrix ... SKIP: Skipping test: test_real_lu
> UMFPACK appears not to be compiled
> Prefactorize (with UMFPACK) matrix for solving with multiple rhs ...
> SKIP: Skipping test: test_factorized_umfpack
> UMFPACK appears not to be compiled
> Prefactorize matrix for solving with multiple rhs ... SKIP: Skipping
> test: test_factorized_without_umfpack
> UMFPACK appears not to be compiled
> Solve with UMFPACK: double precision complex ... SKIP: Skipping test:
> test_solve_complex_umfpack
> UMFPACK appears not to be compiled
> Solve: single precision complex ... SKIP: Skipping test:
> test_solve_complex_without_umfpack
> UMFPACK appears not to be compiled
> Solve with UMFPACK: double precision, sparse rhs ... SKIP: Skipping
> test: test_solve_sparse_rhs
> UMFPACK appears not to be compiled
> Solve with UMFPACK: double precision ... SKIP: Skipping test:
> test_solve_umfpack
> UMFPACK appears not to be compiled
> Solve: single precision ... SKIP: Skipping test:
> test_solve_without_umfpack
> UMFPACK appears not to be compiled
> test_singular (test_linsolve.TestLinsolve) ... ok
> test_twodiags (test_linsolve.TestLinsolve) ... ok
> test_linsolve.TestSplu.test_lu_refcount ... ok
> test_linsolve.TestSplu.test_spilu_nnz0 ... ok
> test_linsolve.TestSplu.test_spilu_smoketest ... ok
> test_linsolve.TestSplu.test_splu_basic ... ok
> test_linsolve.TestSplu.test_splu_nnz0 ... ok
> test_linsolve.TestSplu.test_splu_perm ... Segmentation fault
>
>
> Hannes
>
>
>
>
>
>
>
> On Fri, 2010-04-30 at 08:26 +0000, Pauli Virtanen wrote:
>    
>> scipy.test(verbose=2)
>>      
> _______________________________________________
> SciPy-Dev mailing list
> SciPy-Dev at scipy.org
> http://mail.scipy.org/mailman/listinfo/scipy-dev
>    
Hi,
I am also seeing this on Linux python 2.6 64-bit.

In the tests/test_linsolve.py, what should be:
lu.perm_r and lu.perm_c?
Where is the splu() of a csc_matrix?
lu = splu(a_)

the type is <type 'numpy.ndarray'>
But I get a segmentation fault (given below) if I try to print one of 
them. The nnz and shape print okay.
I get the same crash if I do:
print getattr(lu,'perm_r')

Bruce

 >>> import numpy.random as random
 >>> from numpy.testing import *
 >>>
 >>> from scipy.linalg import norm, inv
 >>> from scipy.sparse import spdiags, SparseEfficiencyWarning, csc_matrix
 >>> from scipy.sparse.linalg.dsolve import spsolve, use_solver, splu, spilu
 >>> n = 30
 >>> a = random.random((n, n))
 >>> a[a < 0.95] = 0
 >>> a += 4*eye(n)
 >>> a_ = csc_matrix(a)
 >>> lu = splu(a_)
 >>> print lu.shape
(30, 30)
 >>> type(lu.perm_c)
<type 'numpy.ndarray'>
 >>> print lu.perm_c

Program received signal SIGSEGV, Segmentation fault.
0x000000306a286b85 in memcpy () from /lib64/libc.so.6
(gdb) bt
#0  0x000000306a286b85 in memcpy () from /lib64/libc.so.6
#1  0x00007ffff1cf66bd in PyArray_Concatenate (op=0x0, axis=<value 
optimized out>) at /usr/include/bits/string3.h:52
#2  0x00007ffff1cf67d2 in array_concatenate 
(__NPY_UNUSED_TAGGEDdummy=<value optimized out>, args=<value optimized 
out>, kwds=<value optimized out>)
     at numpy/core/src/multiarray/multiarraymodule.c:1811
#3  0x00000030808dd9dc in PyEval_EvalFrameEx () from 
/usr/lib64/libpython2.6.so.1.0
#4  0x00000030808de204 in PyEval_EvalFrameEx () from 
/usr/lib64/libpython2.6.so.1.0
#5  0x00000030808df3dd in PyEval_EvalCodeEx () from 
/usr/lib64/libpython2.6.so.1.0
#6  0x00000030808dd78c in PyEval_EvalFrameEx () from 
/usr/lib64/libpython2.6.so.1.0
#7  0x00000030808df3dd in PyEval_EvalCodeEx () from 
/usr/lib64/libpython2.6.so.1.0
#8  0x00000030808dd78c in PyEval_EvalFrameEx () from 
/usr/lib64/libpython2.6.so.1.0
#9  0x00000030808df3dd in PyEval_EvalCodeEx () from 
/usr/lib64/libpython2.6.so.1.0
#10 0x000000308086dfef in ?? () from /usr/lib64/libpython2.6.so.1.0
#11 0x0000003080843e93 in PyObject_Call () from 
/usr/lib64/libpython2.6.so.1.0
#12 0x00000030808d7a03 in PyEval_CallObjectWithKeywords () from 
/usr/lib64/libpython2.6.so.1.0
#13 0x00007ffff1cba234 in array_str (self=<value optimized out>) at 
numpy/core/src/multiarray/arrayobject.c:393
#14 0x000000308088489b in _PyObject_Str () from 
/usr/lib64/libpython2.6.so.1.0
#15 0x000000308088498a in PyObject_Str () from 
/usr/lib64/libpython2.6.so.1.0
#16 0x0000003080884b22 in ?? () from /usr/lib64/libpython2.6.so.1.0
#17 0x0000003080867278 in PyFile_WriteObject () from 
/usr/lib64/libpython2.6.so.1.0
#18 0x00000030808dbe6b in PyEval_EvalFrameEx () from 
/usr/lib64/libpython2.6.so.1.0
#19 0x00000030808df3dd in PyEval_EvalCodeEx () from 
/usr/lib64/libpython2.6.so.1.0
#20 0x00000030808df4b2 in PyEval_EvalCode () from 
/usr/lib64/libpython2.6.so.1.0
#21 0x00000030808fa55c in ?? () from /usr/lib64/libpython2.6.so.1.0
#22 0x00000030808fbefe in PyRun_InteractiveOneFlags () from 
/usr/lib64/libpython2.6.so.1.0
#23 0x00000030808fc0fe in PyRun_InteractiveLoopFlags () from 
/usr/lib64/libpython2.6.so.1.0
#24 0x00000030808fc20c in PyRun_AnyFileExFlags () from 
/usr/lib64/libpython2.6.so.1.0
#25 0x000000308090833d in Py_Main () from /usr/lib64/libpython2.6.so.1.0
#26 0x000000306a21ed2d in __libc_start_main () from /lib64/libc.so.6
#27 0x0000000000400649 in _start ()
(gdb)









More information about the SciPy-Dev mailing list