[SciPy-user] OS X users - Please try multiple scipy.test() runs

Dominique Orban dominique.orban@gmail....
Thu Sep 27 13:52:08 CDT 2007


On 9/27/07, Tom Loredo <loredo@astro.cornell.edu> wrote:
>
> Hi folks-
>
> I just reported some strange scipy crashes I've experienced on my
> MacBook running OS X Tiger & Python 2.5.1.  I'd like to find out
> more about the conditions producing the crash.  If OS X users
> could do the following simple test and report the results, it
> would be very helpful.  Please also report details about your
> platform (machine, OS version, Python, numpy & scipy versions).
>
> All you have to do is start Python, import scipy, and run
> scipy.test() *multiple times*:
>
> >>> import scipy
> >>> scipy.test()
>
> [snip]
>
> >>> scipy.test()
>
> and so on, up to 10 times.  For me, with Python-2.5.1, numpy-1.0.3.1,
> and scipy-0.6.0, right after install I get a crash at the 10th time.
> Subsequent attempts (with new Python invocations) give crashes earlier
> and earlier.  Eventually the crash is fully reproducible at the
> 3rd scipy.test(), always crashing here:
>
>   Found 42 tests for scipy.lib.lapack
>   Found 41 tests for scipy.linalg.basic
> <module 'scipy.linalg.fblas' from
> '/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/scipy/linalg/fblas.so'>
> Segmentation fault
>
> I get similar crashes with scipy-0.5.2.1, but the conditions are not
> reproducible.
>
> On a G4 (PPC) machine running Py-2.4.4 and scipy-0.5.2.1, I don't
> get any crashes (I ran scipy.test() 12 times in a row).
>
> Your help would be appreciated in sorting out the conditions under
> which such crashes happen.
>
> Thanks,
> Tom
>
> PS:  For the curious, I was led to this somewhat accidentally,
> due to problems with linalg I'm experiencing under RHEL 5 and
> another user is experiencing with FC4.  I was trying to see if
> the problems were platform-specific.

I don't have any crash after 20 calls to scipy.test() from within
Ipython. My config is:

In [21]: scipy.__version__
Out[21]: '0.7.0.dev3369'

In [22]: import numpy
In [23]: numpy.__version__
Out[23]: '1.0.4.dev3964'

In [24]: scipy.__config__.show()
amd_info:
    libraries = ['amd']
    library_dirs = ['/Users/dpo/local/lib']
    define_macros = [('SCIPY_AMD_H', None)]
    swig_opts = ['-I/Users/dpo/local/LinearAlgebra/UMFPACK/AMD/Include']
    include_dirs = ['/Users/dpo/local/LinearAlgebra/UMFPACK/AMD/Include']

umfpack_info:
    libraries = ['umfpack', 'amd']
    library_dirs = ['/Users/dpo/local/lib']
    define_macros = [('SCIPY_UMFPACK_H', None), ('SCIPY_AMD_H', None)]
    swig_opts =
['-I/Users/dpo/local/LinearAlgebra/UMFPACK/UMFPACK/Include',
'-I/Users/dpo/local/LinearAlgebra/UMFPACK/AMD/Include']
    include_dirs =
['/Users/dpo/local/LinearAlgebra/UMFPACK/UMFPACK/Include',
'/Users/dpo/local/LinearAlgebra/UMFPACK/AMD/Include']

lapack_opt_info:
    extra_link_args = ['-Wl,-framework', '-Wl,Accelerate']
    extra_compile_args = ['-msse3']
    define_macros = [('NO_ATLAS_INFO', 3)]

blas_opt_info:
    extra_link_args = ['-Wl,-framework', '-Wl,Accelerate']
    extra_compile_args = ['-msse3',
'-I/System/Library/Frameworks/vecLib.framework/Headers']
    define_macros = [('NO_ATLAS_INFO', 3)]

djbfft_info:
  NOT AVAILABLE

fftw3_info:
    libraries = ['fftw3']
    library_dirs = ['/usr/local/lib']
    define_macros = [('SCIPY_FFTW3_H', None)]
    include_dirs = ['/usr/local/include']

mkl_info:
  NOT AVAILABLE

I compiled SciPy from svn with gcc 4.3.0 and gfortran 4.2.0. The
machine is an Intel MacBook Pro with OSX 10.4.10.

In scipy.test() I always get an error in the test module for the
single-precision complex dot products in the fblas wrapper. The return
value is meaningless:

Traceback (most recent call last):
  File "/Users/dpo/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/scipy/lib/blas/tests/test_blas.py",
line 76, in check_dot
    assert_almost_equal(f([3j,-4,3-4j],[2,3,1]),-9+2j)
  File "/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/numpy/testing/utils.py",
line 156, in assert_almost_equal
    assert round(abs(desired - actual),decimal) == 0, msg
AssertionError:
Items are not equal:
 ACTUAL: 1.6841453353081064e-36j
 DESIRED: (-9+2j)

Given the return value 1.6841453353081064e-36j, I am not surprised
that segfaults occur in that module. Reports on that error are rampant
in the mailing list, but it seems nobody has been bothered enough to
look into it. The double precision complex dot product functions
return the correct result, though, so it might just be a casting
issue.

Dominique


More information about the SciPy-user mailing list