[SciPy-dev] Another segfault

Nils Wagner nwagner at mecha.uni-stuttgart.de
Thu Mar 2 09:05:58 CST 2006


Nils Wagner wrote:
> Hi all,
>
> I have no idea why this test results in a segfault. Maybe its a compiler
> issue ? (g77 versus gfortran)
>
> I have installed numpy/scipy via
>
> python setup.py config_fc --fcompiler=gnu95 install
>
>   
>>>> import sparse_test.py
>>>>         
> Use minimum degree ordering on A'+A.
>
> Program received signal SIGSEGV, Segmentation fault.
> [Switching to Thread 16384 (LWP 2632)]
> 0x00002aaab23e50b3 in dpivotL (jcol=0, u=1, usepr=0x7fffffb2a204,
> perm_r=0xa0fa40, iperm_r=0x816b50, iperm_c=0x9ffed0,
>     pivrow=0x7fffffb2a210, Glu=0x9a0ac0, stat=0xffffffffab80bb68) at
> dpivotL.c:120
> 120             perm_r[*pivrow] = jcol;
> (gdb) bt
> #0  0x00002aaab23e50b3 in dpivotL (jcol=0, u=1, usepr=0x7fffffb2a204,
> perm_r=0xa0fa40, iperm_r=0x816b50, iperm_c=0x9ffed0,
>     pivrow=0x7fffffb2a210, Glu=0x9a0ac0, stat=0xffffffffab80bb68) at
> dpivotL.c:120
> #1  0x00002aaab23dadd0 in dgstrf (options=<value optimized out>,
> A=0x7fffffb2a330, drop_tol=<value optimized out>,
>     relax=<value optimized out>, panel_size=10, etree=<value optimized
> out>, work=<value optimized out>, lwork=10549824,
>     perm_c=0x945350, perm_r=0xa0fa40, L=0x2aaab508c7d0,
> U=0x2aaab508c7f0, stat=0x7fffffb2a310, info=0x7fffffb2a35c)
>     at dgstrf.c:310
> #2  0x00002aaab23bdb4b in newSciPyLUObject (A=0x7fffffb2a3f0,
> diag_pivot_thresh=1, drop_tol=0, relax=1, panel_size=10,
>     permc_spec=2, intype=<value optimized out>) at _superluobject.c:372
> #3  0x00002aaab23bc9ba in Py_dgstrf (self=<value optimized out>,
> args=<value optimized out>, keywds=<value optimized out>)
>     at _dsuperlumodule.c:187
> #4  0x00002aaaaac5496a in PyEval_EvalFrame (f=0xace630) at ceval.c:3547
> #5  0x00002aaaaac55404 in PyEval_EvalCodeEx (co=0x2aaaae7e01f0,
> globals=<value optimized out>,
>     locals=<value optimized out>, args=0x5, argcount=1, kws=0x506698,
> kwcount=0, defs=0x2aaaae7cef08, defcount=5,
>     closure=0x0) at ceval.c:2730
> #6  0x00002aaaaac53aba in PyEval_EvalFrame (f=0x506500) at ceval.c:3640
> #7  0x00002aaaaac55404 in PyEval_EvalCodeEx (co=0x2aaaaab23b90,
> globals=<value optimized out>,
>     locals=<value optimized out>, args=0x0, argcount=0, kws=0x0,
> kwcount=0, defs=0x0, defcount=0, closure=0x0)
>     at ceval.c:2730
> #8  0x00002aaaaac556d2 in PyEval_EvalCode (co=<value optimized out>,
> globals=<value optimized out>,
>     locals=<value optimized out>) at ceval.c:484
> #9  0x00002aaaaac67cc7 in PyImport_ExecCodeModuleEx (name=0x7fffffb2b370
> "sparse_test", co=0x2aaaaab23b90,
>     pathname=<value optimized out>) at import.c:619
> #10 0x00002aaaaac68e3d in load_source_module (name=0x7fffffb2b370
> "sparse_test", pathname=0x7fffffb2aeb0 "sparse_test.py",
>     fp=<value optimized out>) at import.c:893
> #11 0x00002aaaaac6a854 in import_submodule (mod=0x2aaaaadbee30,
> subname=0x7fffffb2b370 "sparse_test",
>     fullname=0x7fffffb2b370 "sparse_test") at import.c:2250
> #12 0x00002aaaaac6aa72 in load_next (mod=0x2aaaaadbee30,
> altmod=0x2aaaaadbee30, p_name=<value optimized out>,
>     buf=0x7fffffb2b370 "sparse_test", p_buflen=0x7fffffb2b78c) at
> import.c:2070
> #13 0x00002aaaaac6af07 in PyImport_ImportModuleEx (name=0x2aaaaaae0360
> "\002", globals=0x2aaaaaae0384,
>     locals=<value optimized out>, fromlist=0x2aaaaadbee30) at import.c:1905
> #14 0x00002aaaaac47d73 in builtin___import__ (self=<value optimized
> out>, args=<value optimized out>) at bltinmodule.c:45
>
> Any suggestion how to resolve this problem ?
>
> Nils
>
>   
> ------------------------------------------------------------------------
>
> from scipy import *
> from scipy.sparse import *
> n = 20
> A = csc_matrix((n,n))
> x = rand(n)
> #
> # Segmentation fault for complex entries
> #
> y = rand(n-1)+1j*rand(n-1)
> r = rand(n)
> for i in range(len(x)):
>    A[i,i] = x[i]
> for i in range(len(y)):
>    A[i,i+1] = y[i]
>    A[i+1,i] = conjugate(y[i])
> xx = sparse.lu_factor(A).solve(r)
>   
> ------------------------------------------------------------------------
>
> _______________________________________________
> Scipy-dev mailing list
> Scipy-dev at scipy.net
> http://www.scipy.net/mailman/listinfo/scipy-dev
>   
I have disabled ATLAS
and recompiled numpy/scipy from scratch using g77 instead of gfortran.
The segfault w.r.t. sparse_test.py persists but the problem w.r.t.
to quadtest.py vanishes.

Nils





More information about the Scipy-dev mailing list