[Scipy-tickets] [SciPy] #1472: sparse.isolve solvers segfault in test suite

SciPy Trac scipy-tickets@scipy....
Thu Aug 18 09:04:40 CDT 2011


#1472: sparse.isolve solvers segfault in test suite
---------------------------------+------------------------------------------
 Reporter:  rgommers             |       Owner:  pv    
     Type:  defect               |      Status:  new   
 Priority:  high                 |   Milestone:  0.10.0
Component:  scipy.sparse.linalg  |     Version:  0.9.0 
 Keywords:  gmres                |  
---------------------------------+------------------------------------------

Comment(by rgommers):

 Neither a site.cfg nor the BLAS/LAPACK env-vars get rid of Accelerate, due
 to the line
 {{{
 sys.platform=='darwin' and not os.environ.get('ATLAS',None):
 }}}
 in distutils/system_info.py.  Also found a bug there, this makes no sense
 at all:
 {{{
 if get_platform()[-4:] == 'i386':
     intel = 1
 else:
     intel = 0
 }}}
 After jumping that hurdle, linking against the shiny new netlib versions
 seems to work:
 {{{
 blas_info:
 ('BLAS INFO:\n', {'libraries': ['blas'], 'library_dirs':
 ['/Users/rgommers/Downloads/lapack-3.3.1']})
   FOUND:
     libraries = ['blas']
     library_dirs = ['/Users/rgommers/Downloads/lapack-3.3.1']
     language = f77

   FOUND:
     libraries = ['lapack', 'blas']
     library_dirs = ['/Users/rgommers/Downloads/lapack-3.3.1']
     define_macros = [('NO_ATLAS_INFO', 1)]
     language = f77
 }}}
 Then {{{numpy.test('full')}}} completes without failures.  The scipy tests
 still crash in the same place. In addition, there are a number of failures
 in the Arpack tests before the crash that don't occur when building
 against Accelerate:
 {{{
 test_arpack.test_symmetric_modes(True, <gen-symmetric>, 'd', 2, 'BE',
 None, None, <function asarray at 0x20c8c70>, None, 'normal') ... ok
 test_arpack.test_hermitian_modes(True, <std-hermitian>, 'F', 2, 'LM',
 None, 0.5, <class 'scipy.sparse.csr.csr_matrix'>) ... ERROR
 test_arpack.test_hermitian_modes(True, <std-hermitian>, 'F', 2, 'LM',
 None, None, <class 'scipy.sparse.csr.csr_matrix'>) ... ERROR
 test_arpack.test_hermitian_modes(True, <std-hermitian>, 'F', 2, 'LM',
 None, 0.5, <function aslinearoperator at 0xef4baf0>) ... ERROR
 test_arpack.test_hermitian_modes(True, <std-hermitian>, 'F', 2, 'LM',
 None, None, <function aslinearoperator at 0xef4baf0>) ... ERROR
 test_arpack.test_hermitian_modes(True, <std-hermitian>, 'F', 2, 'LM',
 None, 0.5, <function asarray at 0x20c8c70>) ... ERROR
 test_arpack.test_hermitian_modes(True, <std-hermitian>, 'F', 2, 'LM',
 None, None, <function asarray at 0x20c8c70>) ... ERROR
 test_arpack.test_hermitian_modes(True, <std-hermitian>, 'F', 2, 'SM',
 None, 0.5, <class 'scipy.sparse.csr.csr_matrix'>) ... ERROR
 test_arpack.test_hermitian_modes(True, <std-hermitian>, 'F', 2, 'SM',
 None, None, <class 'scipy.sparse.csr.csr_matrix'>) ... ERROR
 test_arpack.test_hermitian_modes(True, <std-hermitian>, 'F', 2, 'SM',
 None, 0.5, <function aslinearoperator at 0xef4baf0>) ... ERROR
 test_arpack.test_hermitian_modes(True, <std-hermitian>, 'F', 2, 'SM',
 None, None, <function aslinearoperator at 0xef4baf0>) ... ERROR
 test_arpack.test_hermitian_modes(True, <std-hermitian>, 'F', 2, 'SM',
 None, 0.5, <function asarray at 0x20c8c70>) ... ERROR
 test_arpack.test_hermitian_modes(True, <std-hermitian>, 'F', 2, 'SM',
 None, None, <function asarray at 0x20c8c70>) ... ERROR
 test_arpack.test_hermitian_modes(True, <std-hermitian>, 'F', 2, 'LA',
 None, 0.5, <class 'scipy.sparse.csr.csr_matrix'>) ... ERROR
 test_arpack.test_hermitian_modes(True, <std-hermitian>, 'F', 2, 'LA',
 None, None, <class 'scipy.sparse.csr.csr_matrix'>) ... ERROR
 test_arpack.test_hermitian_modes(True, <std-hermitian>, 'F', 2, 'LA',
 None, 0.5, <function aslinearoperator at 0xef4baf0>) ... ERROR
 test_arpack.test_hermitian_modes(True, <std-hermitian>, 'F', 2, 'LA',
 None, None, <function aslinearoperator at 0xef4baf0>) ... ERROR
 test_arpack.test_hermitian_modes(True, <std-hermitian>, 'F', 2, 'LA',
 None, 0.5, <function asarray at 0x20c8c70>) ... ERROR
 test_arpack.test_hermitian_modes(True, <std-hermitian>, 'F', 2, 'LA',
 None, None, <function asarray at 0x20c8c70>) ... ERROR
 test_arpack.test_hermitian_modes(True, <std-hermitian>, 'F', 2, 'SA',
 None, 0.5, <class 'scipy.sparse.csr.csr_matrix'>) ... ERROR
 test_arpack.test_hermitian_modes(True, <std-hermitian>, 'F', 2, 'SA',
 None, None, <class 'scipy.sparse.csr.csr_matrix'>) ... ERROR
 test_arpack.test_hermitian_modes(True, <std-hermitian>, 'F', 2, 'SA',
 None, 0.5, <function aslinearoperator at 0xef4baf0>) ... ERROR
 test_arpack.test_hermitian_modes(True, <std-hermitian>, 'F', 2, 'SA',
 None, None, <function aslinearoperator at 0xef4baf0>) ... ERROR
 test_arpack.test_hermitian_modes(True, <std-hermitian>, 'F', 2, 'SA',
 None, 0.5, <function asarray at 0x20c8c70>) ... ERROR
 test_arpack.test_hermitian_modes(True, <std-hermitian>, 'F', 2, 'SA',
 None, None, <function asarray at 0x20c8c70>) ... ERROR
 test_arpack.test_hermitian_modes(True, <std-hermitian>, 'D', 2, 'LM',
 None, 0.5, <class 'scipy.sparse.csr.csr_matrix'>) ... ok
 test_arpack.test_hermitian_modes(True, <std-hermitian>, 'D', 2, 'LM',
 None, None, <class 'scipy.sparse.csr.csr_matrix'>) ... ok
 test_arpack.test_hermitian_modes(True, <std-hermitian>, 'D', 2, 'LM',
 None, 0.5, <function aslinearoperator at 0xef4baf0>) ... ok
 test_arpack.test_hermitian_modes(True, <std-hermitian>, 'D', 2, 'LM',
 None, None, <function aslinearoperator at 0xef4baf0>) ... ok
 test_arpack.test_hermitian_modes(True, <std-hermitian>, 'D', 2, 'LM',
 None, 0.5, <function asarray at 0x20c8c70>) ... ok
 test_arpack.test_hermitian_modes(True, <std-hermitian>, 'D', 2, 'LM',
 None, None, <function asarray at 0x20c8c70>) ... ok
 test_arpack.test_hermitian_modes(True, <std-hermitian>, 'D', 2, 'SM',
 None, 0.5, <class 'scipy.sparse.csr.csr_matrix'>) ... ok
 test_arpack.test_hermitian_modes(True, <std-hermitian>, 'D', 2, 'SM',
 None, None, <class 'scipy.sparse.csr.csr_matrix'>) ... ok
 test_arpack.test_hermitian_modes(True, <std-hermitian>, 'D', 2, 'SM',
 None, 0.5, <function aslinearoperator at 0xef4baf0>) ... ok
 test_arpack.test_hermitian_modes(True, <std-hermitian>, 'D', 2, 'SM',
 None, None, <function aslinearoperator at 0xef4baf0>) ... ok
 test_arpack.test_hermitian_modes(True, <std-hermitian>, 'D', 2, 'SM',
 None, 0.5, <function asarray at 0x20c8c70>) ... ok
 test_arpack.test_hermitian_modes(True, <std-hermitian>, 'D', 2, 'SM',
 None, None, <function asarray at 0x20c8c70>) ... ok
 test_arpack.test_hermitian_modes(True, <std-hermitian>, 'D', 2, 'LA',
 None, 0.5, <class 'scipy.sparse.csr.csr_matrix'>) ... ok
 test_arpack.test_hermitian_modes(True, <std-hermitian>, 'D', 2, 'LA',
 None, None, <class 'scipy.sparse.csr.csr_matrix'>) ... ok
 test_arpack.test_hermitian_modes(True, <std-hermitian>, 'D', 2, 'LA',
 None, 0.5, <function aslinearoperator at 0xef4baf0>) ... ok
 test_arpack.test_hermitian_modes(True, <std-hermitian>, 'D', 2, 'LA',
 None, None, <function aslinearoperator at 0xef4baf0>) ... ok
 test_arpack.test_hermitian_modes(True, <std-hermitian>, 'D', 2, 'LA',
 None, 0.5, <function asarray at 0x20c8c70>) ... ok
 test_arpack.test_hermitian_modes(True, <std-hermitian>, 'D', 2, 'LA',
 None, None, <function asarray at 0x20c8c70>) ... ok
 test_arpack.test_hermitian_modes(True, <std-hermitian>, 'D', 2, 'SA',
 None, 0.5, <class 'scipy.sparse.csr.csr_matrix'>) ... ok
 test_arpack.test_hermitian_modes(True, <std-hermitian>, 'D', 2, 'SA',
 None, None, <class 'scipy.sparse.csr.csr_matrix'>) ... ok
 test_arpack.test_hermitian_modes(True, <std-hermitian>, 'D', 2, 'SA',
 None, 0.5, <function aslinearoperator at 0xef4baf0>) ... ok
 test_arpack.test_hermitian_modes(True, <std-hermitian>, 'D', 2, 'SA',
 None, None, <function aslinearoperator at 0xef4baf0>) ... ok
 test_arpack.test_hermitian_modes(True, <std-hermitian>, 'D', 2, 'SA',
 None, 0.5, <function asarray at 0x20c8c70>) ... ok
 test_arpack.test_hermitian_modes(True, <std-hermitian>, 'D', 2, 'SA',
 None, None, <function asarray at 0x20c8c70>) ... ok
 test_arpack.test_hermitian_modes(True, <gen-hermitian>, 'F', 2, 'LM',
 None, 0.5, <class 'scipy.sparse.csr.csr_matrix'>) ... Segmentation fault
 }}}

 However, a sanity check reveals:
 {{{
 $ otool -L scipy/sparse/linalg/eigen/arpack/_arpack.so
 scipy/sparse/linalg/eigen/arpack/_arpack.so (architecture ppc):
 /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libLAPACK.dylib
 (compatibility version 1.0.0, current version 219.0.0)
 /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libBLAS.dylib
 (compatibility version 1.0.0, current version 219.0.0)
         /usr/local/lib/libgfortran.2.dylib (compatibility version 3.0.0,
 current version 3.0.0)
         /usr/local/lib/libgcc_s.1.dylib (compatibility version 1.0.0,
 current version 1.0.0)
         /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current
 version 125.2.11)
 scipy/sparse/linalg/eigen/arpack/_arpack.so (architecture i386):
 /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libLAPACK.dylib
 (compatibility version 1.0.0, current version 219.0.0)
 /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libBLAS.dylib
 (compatibility version 1.0.0, current version 219.0.0)
         /usr/local/lib/libgfortran.2.dylib (compatibility version 3.0.0,
 current version 3.0.0)
         /usr/local/lib/libgcc_s.1.dylib (compatibility version 1.0.0,
 current version 1.0.0)
         /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current
 version 125.2.11)
 }}}
 Searching the build log shows that Accelerate/vecLib are not used.
 @%#@£*@& ????

-- 
Ticket URL: <http://projects.scipy.org/scipy/ticket/1472#comment:23>
SciPy <http://www.scipy.org>
SciPy is open-source software for mathematics, science, and engineering.


More information about the Scipy-tickets mailing list