[SciPy-dev] segmentation fault in latest cvs using scipy.test()

Pearu Peterson pearu at scipy.org
Tue Nov 30 03:29:49 CST 2004



On Tue, 30 Nov 2004, Nils Wagner wrote:

>> Which test crashes python, check_syevd or check_heevd?
>> 
> Python 2.3.3 (#1, Apr  6 2004, 01:47:39)
> [GCC 3.3.3 (SuSE Linux)] on linux2
> Type "help", "copyright", "credits" or "license" for more information.
>>>> import scipy
>>>> scipy.lib.lapack.test(verbosity=10)
>  !! No test file 'test_flapack.py' found for <module 
> 'scipy.lib.lapack.flapack' from '...es/scipy/lib/lapack/flapack.so'>
>  !! No test file 'test_clapack.py' found for <module 
> 'scipy.lib.lapack.clapack' from '...es/scipy/lib/lapack/clapack.so'>
> Found 6 tests for scipy.lib.lapack
>  !! No test file 'test_calc_lwork.py' found for <module 
> 'scipy.lib.lapack.calc_lwork' from '...scipy/lib/lapack/calc_lwork.so'>
> Found 0 tests for __main__
> check_gebal (scipy.lib.lapack.test_lapack.test_flapack_simple) ... ok
> check_gehrd (scipy.lib.lapack.test_lapack.test_flapack_simple) ... ok
> Segmentation fault

Now try

scipy.lib.lapack.flapack.zheev([[1,2,3],[2,2,3],[3,3,6]])
scipy.lib.lapack.flapack.zheevd([[1,2,3],[2,2,3],[3,3,6]])
scipy.lib.lapack.flapack.cheev([[1,2,3],[2,2,3],[3,3,6]])
scipy.lib.lapack.flapack.cheevd([[1,2,3],[2,2,3],[3,3,6]])
scipy.lib.lapack.flapack.dsyev([[1,2,3],[2,2,3],[3,3,6]])
scipy.lib.lapack.flapack.dsyevd([[1,2,3],[2,2,3],[3,3,6]])
scipy.lib.lapack.flapack.ssyev([[1,2,3],[2,2,3],[3,3,6]])
scipy.lib.lapack.flapack.ssyevd([[1,2,3],[2,2,3],[3,3,6]])

Which one is causing python crash? And which one is not?

If they do, then build lib.lapack package against Fortran BLAS/LAPACK 
libraries and try the tests again. Here are basic steps (fix the paths 
in BLAS_SRC and LAPACK_SRC to your setup):

$ cd Lib/lib/lapack
$ rm -rf build
$ ATLAS=None BLAS=None LAPACK=None BLAS_SRC=~/src/blas \
    LAPACK_SRC=~/src/LAPACK/ python setup_lapack.py build
$ python tests/test_lapack.py -v 10

If you still get a crash, build lib.lapack without optimization:

$ rm -rf build
$ ATLAS=None BLAS=None LAPACK=None BLAS_SRC=~/src/blas \
    LAPACK_SRC=~/src/LAPACK/ python setup_lapack.py build config_fc --noopt
$ python tests/test_lapack.py -v 10

If this works then we are dealing with gcc optimization bug.


HTH,
Pearu




More information about the Scipy-dev mailing list