[SciPy-User] scipy.test() causes segmentation fault for test_lobpcg

hannah story645 at gmail.com
Wed Feb 16 14:49:14 EST 2011


Hi,
I'm getting the exact same bug and I'm running the dev versions of
numpy and scipy, using atlas-3.9.23, lapack-3.2.2, and amd and umfpack
(from SuiteSparse-3.6.0), compiled with gfortran, built using
python2.7, on RHEL Server 5.5 (Tikanga). If you change n for
test_Elastic rod and and test_MikotaPair, then it just fails cleanly
and will go on to complete the rest of the tests with:
OK (KNOWNFAIL=12, SKIP=41)
<nose.result.TextTestResult run=4771 errors=0 failures=0>
So I'd suggest that you use scipy and remember to be careful with
lobpcg.
I've had some seemingly random seqfaults when trying to calculate
eigenvalues, so it also may be due to how the eigenvalue is
calculated. (Or it's a RHEL bug, or some combination thereof)

According to the core dump, the code segfaults due to atlas:
http://pastebin.com/zy0RnUCK


On Dec 25 2010, 9:51 pm, "Ryota Tomioka" <ryo... at gmx.de> wrote:
> Dear Scipy users,
>
> I have recently installed numpy 1.5.1rc1 and
> scipy 0.8.0 on a CentOS 5.5 server. ATLAS was
> compiled with gfortran and I also specified gfortran
> for the installation of both numpy and scipy.
>
> numpy.test() ran without trouble, but scipy.test()
> crashed due to segmentation fault and this was in
> test_lobpcg.test_ElasticRod.
>
> In order to reproduce the result I copied /usr/local/lib/python2.6/site-packages/scipy/sparse/linalg/eigen/lobpcg/tests/test_lobpcg.py
> to my home directory and did the following.
>
> [ryotat at cyprus ~]$ python
> Python 2.6.6 (r266:84292, Nov 19 2010, 22:23:00)
> [GCC 4.1.2 20080704 (Red Hat 4.1.2-48)] on linux2
> Type "help", "copyright", "credits" or "license" for more information.>>> from test_lobpcg import *
> >>> A,B=ElasticRod(100)
> >>> compare_solutions(A,B,100)
> >>> compare_solutions(A,B,80)
> >>> compare_solutions(A,B,40)
> >>> compare_solutions(A,B,30)
> >>> compare_solutions(A,B,22)
> >>> compare_solutions(A,B,21)
> >>> compare_solutions(A,B,20)
>
> Segmentation fault
>
> So it seems to happen only around m=20. m=10 did not cause
> segmentation fault but resulted in
>
> AssertionError:
> Arrays are not almost equal
>
> To see it in more detail, I tried
>
> >>> A,B=ElasticRod(100)
> >>> m=20
> >>> n=A.shape[0]
> >>> numpy.random.seed(0)
> >>> V=rand(n,m)
> >>> X=linalg.orth(V)
> >>> eigs,vecs=lobpcg(A,X,B=B,tol=1e-5,maxiter=30,verbosityLevel=10)
>
> Solving generalized eigenvalue problem with preconditioning
>
> matrix size 100
> block size 20
>
> No constraints
>
> iteration 0
> [ True  True  True  True  True  True  True  True  True  True  True  True  True  True  True
>   True  True  True  True  True]
> current block size: 20
> eigenvalue: [  1.785e+12   1.586e+12   1.356e+12   1.330e+12   1.212e+12   1.155e+12   1.080e+12
>    9.149e+11   8.272e+11   8.229e+11   7.664e+11   6.941e+11   6.769e+11   5.848e+11
>    5.553e+11   4.994e+11   4.283e+11   3.813e+11   3.537e+11   1.058e+10]
> residual norms: [  7.223e+10   6.780e+10   7.145e+10   7.305e+10   6.290e+10   7.085e+10   6.539e+10
>    5.466e+10   6.137e+10   5.374e+10   5.809e+10   5.725e+10   5.375e+10   5.334e+10
>    5.052e+10   4.746e+10   4.176e+10   3.650e+10   3.283e+10   6.905e+09]
> Segmentation fault
>
> Does anyone experienced something similar? Or could anyone suggest
> where I should look into?
>
> Thanks,Ryota
>
> --
> Empfehlen Sie GMX DSL Ihren Freunden und Bekannten und wir
> belohnen Sie mit bis zu 100,- Euro!https://freundschaftswerbung.gmx.de
> _______________________________________________
> SciPy-User mailing list
> SciPy-U... at scipy.orghttp://mail.scipy.org/mailman/listinfo/scipy-user



More information about the SciPy-User mailing list