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

Ryota Tomioka ryotat at gmx.de
Sat Dec 25 21:51:46 EST 2010


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



More information about the SciPy-User mailing list