[Numpy-discussion] Complex matrix seg fault

Jonathan Tu jhtu@princeton....
Fri Feb 4 08:13:29 CST 2011


Hi,

When I run the following code, I get a seg fault on certain cluster nodes, but not others:

>>> import numpy as N
>>> A = N.random.rand(262144,10)+1j*N.random.rand(262144,10)
>>> x = N.random.rand(262144,)
>>> d, res, rank, s = N.linalg.lstsq( A, x )

My numpy is configured as such:

lapack_opt_info:
    libraries = ['mkl_lapack', 'mkl_intel_lp64', 'mkl_intel_thread', 'mkl_core', 'mkl_def', 'mkl_mc', 'iomp5', 'pthread']
    library_dirs = ['/home/jhtu/local/lib/mkl_links']
    define_macros = [('SCIPY_MKL_H', None)]
    include_dirs = ['/opt/intel/Compiler/11.1/072/mkl/include']
blas_opt_info:
    libraries = ['mkl_intel_lp64', 'mkl_intel_thread', 'mkl_core', 'mkl_def', 'mkl_mc', 'iomp5', 'pthread']
    library_dirs = ['/home/jhtu/local/lib/mkl_links']
    define_macros = [('SCIPY_MKL_H', None)]
    include_dirs = ['/opt/intel/Compiler/11.1/072/mkl/include']
lapack_mkl_info:
    libraries = ['mkl_lapack', 'mkl_intel_lp64', 'mkl_intel_thread', 'mkl_core', 'mkl_def', 'mkl_mc', 'iomp5', 'pthread']
    library_dirs = ['/home/jhtu/local/lib/mkl_links']
    define_macros = [('SCIPY_MKL_H', None)]
    include_dirs = ['/opt/intel/Compiler/11.1/072/mkl/include']
blas_mkl_info:
    libraries = ['mkl_intel_lp64', 'mkl_intel_thread', 'mkl_core', 'mkl_def', 'mkl_mc', 'iomp5', 'pthread']
    library_dirs = ['/home/jhtu/local/lib/mkl_links']
    define_macros = [('SCIPY_MKL_H', None)]
    include_dirs = ['/opt/intel/Compiler/11.1/072/mkl/include']
mkl_info:
    libraries = ['mkl_intel_lp64', 'mkl_intel_thread', 'mkl_core', 'mkl_def', 'mkl_mc', 'iomp5', 'pthread']
    library_dirs = ['/home/jhtu/local/lib/mkl_links']
    define_macros = [('SCIPY_MKL_H', None)]
    include_dirs = ['/opt/intel/Compiler/11.1/072/mkl/include']

All unit tests pass except the following, but I was told (by this mailing list) that this shouldn't be an issue:

======================================================================
FAIL: test_special_values (test_umath_complex.TestClog)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/jhtu/local/lib/python2.7/site-packages/numpy/testing/decorators.py", line 215, in knownfailer
    return f(*args, **kwargs)
  File "/home/jhtu/local/lib/python2.7/site-packages/numpy/core/tests/test_umath_complex.py", line 312, in test_special_values
    assert_almost_equal(np.log(np.conj(xa[i])), np.conj(np.log(xa[i])))
  File "/home/jhtu/local/lib/python2.7/site-packages/numpy/testing/utils.py", line 443, in assert_almost_equal
    raise AssertionError(msg)
AssertionError: 
Arrays are not almost equal
 ACTUAL: array([-inf+3.14159265j])
 DESIRED: array([-inf-3.14159265j])

----------------------------------------------------------------------
Ran 2648 tests in 15.852s

FAILED (KNOWNFAIL=4, SKIP=1, failures=1)
<nose.result.TextTestResult run=2648 errors=0 failures=1>

Anyone have ideas why this would fail on some nodes but not others?  (I mean the code snippet fails on some nodes.  The above unit test always fails.)






Thanks,



Jonathan Tu




More information about the NumPy-Discussion mailing list