[Scipy-tickets] [SciPy] #1523: another Arpack crash on OS X python 2.7, 64-bit

SciPy Trac scipy-tickets@scipy....
Fri Oct 7 16:41:48 CDT 2011


#1523: another Arpack crash on OS X python 2.7, 64-bit
---------------------------------+------------------------------------------
 Reporter:  rgommers             |       Owner:  wnbell
     Type:  defect               |      Status:  new   
 Priority:  highest              |   Milestone:  0.10.0
Component:  scipy.sparse.linalg  |     Version:  0.9.0 
 Keywords:  arpack, segfault     |  
---------------------------------+------------------------------------------

Comment(by rgommers):

 Compiled again with
 {{{
 export PATH="/Users/rgommers/Code/tmp/gpp42temp:${PATH}"
 export BLAS=/Users/rgommers/Downloads/lapack-3.3.1/libblas.a
 export LAPACK=/Users/rgommers/Downloads/lapack-3.3.1/liblapack.a
 export ATLAS='None'
 python2.7 setup.py build_ext -i
 }}}
 The Netlib BLAS/LAPACK seem to be picked up:
 {{{
 Replacing _lib_names[0]=='lapack' with 'lapack'
   FOUND:
     libraries = ['lapack']
     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


 gcc-4.2: scipy/sparse/linalg/eigen/arpack/_arpackmodule.c
 compiling Fortran sources
 Fortran f77 compiler: /usr/local/bin/gfortran -Wall -ffixed-form -fno-
 second-underscore -arch i686 -arch x86_64 -fPIC -O3 -funroll-loops
 Fortran f90 compiler: /usr/local/bin/gfortran -Wall -fno-second-underscore
 -arch i686 -arch x86_64 -fPIC -O3 -funroll-loops
 Fortran fix compiler: /usr/local/bin/gfortran -Wall -ffixed-form -fno-
 second-underscore -Wall -fno-second-underscore -arch i686 -arch x86_64
 -fPIC -O3 -funroll-loops
 compile options: '-DNO_ATLAS_INFO=1 -Ibuild/src.macosx-10.6-intel-2.7
 -I/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-
 packages/numpy/core/include
 -I/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7 -c'
 gfortran:f77: scipy/sparse/linalg/eigen/arpack/_arpack-f2pywrappers.f
 /usr/local/bin/gfortran -Wall -arch i686 -arch x86_64 -Wall -undefined
 dynamic_lookup -bundle
 build/temp.macosx-10.6-intel-2.7/scipy/sparse/linalg/eigen/arpack/_arpackmodule.o
 build/temp.macosx-10.6-intel-2.7/build/src.macosx-10.6-intel-2.7/fortranobject.o
 build/temp.macosx-10.6-intel-2.7/scipy/sparse/linalg/eigen/arpack/_arpack-
 f2pywrappers.o -L/Users/rgommers/Downloads/lapack-3.3.1
 -Lbuild/temp.macosx-10.6-intel-2.7 -larpack_scipy -llapack -lblas
 -lgfortran -o scipy/sparse/linalg/eigen/arpack/_arpack.so
 building 'scipy.sparse.sparsetools._csr' extension
 compiling C++ sources
 C compiler: c++ -fno-strict-aliasing -fno-common -dynamic -arch i386 -arch
 x86_64 -g -O2 -DNDEBUG -g -O3

 creating build/temp.macosx-10.6-intel-2.7/scipy/sparse/sparsetools
 compile options: '-D__STDC_FORMAT_MACROS=1
 -I/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-
 packages/numpy/core/include
 -I/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7 -c'
 c++: scipy/sparse/sparsetools/csr_wrap.cxx
 In file included from scipy/sparse/sparsetools/py3k.h:23,
                  from scipy/sparse/sparsetools/csr_wrap.cxx:2835:
 /Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-
 packages/numpy/core/include/numpy/npy_3kcompat.h: In function ‘PyObject*
 npy_PyFile_OpenFile(PyObject*, char*)’:
 /Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-
 packages/numpy/core/include/numpy/npy_3kcompat.h:258: warning: deprecated
 conversion from string constant to ‘char*’
 In file included from scipy/sparse/sparsetools/py3k.h:23,
                  from scipy/sparse/sparsetools/csr_wrap.cxx:2835:
 /Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-
 packages/numpy/core/include/numpy/npy_3kcompat.h: In function ‘PyObject*
 npy_PyFile_OpenFile(PyObject*, char*)’:
 /Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-
 packages/numpy/core/include/numpy/npy_3kcompat.h:258: warning: deprecated
 conversion from string constant to ‘char*’
 c++ -arch i386 -arch x86_64 -isysroot / -g -bundle -undefined
 dynamic_lookup -arch i386 -arch x86_64 -isysroot / -g
 build/temp.macosx-10.6-intel-2.7/scipy/sparse/sparsetools/csr_wrap.o
 -Lbuild/temp.macosx-10.6-intel-2.7 -o scipy/sparse/sparsetools/_csr.so
 }}}
 However:
 {{{
 $ otool -L _arpack.so
 _arpack.so:
 /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)
 }}}
 No idea why that happens. Anyway, moving on to the crash:
 {{{
 .. done
 SSSSSSSSSSS...........F......F.....FF.E...FEF.E.E...E........E...E..F.F.FEEE.E..E...................................................................F.......E.EFF.E.F..EF.E...F......F.........EEF...EE..E............................................................
 Program received signal EXC_BAD_ACCESS, Could not access memory.
 Reason: KERN_INVALID_ADDRESS at address: 0x0000000000000003
 0x00007fff82f24857 in cladiv_ ()
 (gdb) bt
 #0  0x00007fff82f24857 in cladiv_ ()
 #1  0x0000000101d7045f in wcladiv_ ()
 #2  0x0000000101d68aa4 in clahqr_ ()
 #3  0x0000000101d139e2 in cneigh_ ()
 #4  0x0000000101d121db in cnaup2_ ()
 #5  0x0000000101d13411 in cnaupd_ ()
 #6  0x0000000101d09468 in f2py_rout__arpack_cnaupd (capi_self=<value
 temporarily unavailable, due to optimizations>, capi_args=<value
 temporarily unavailable, due to optimizations>, capi_keywds=<value
 temporarily unavailable, due to optimizations>, f2py_func=0x101d12f30
 <cnaupd_>) at scipy/sparse/linalg/eigen/arpack/_arpackmodule.c:3374
 #7  0x000000010000c9f2 in PyObject_Call ()
 #8  0x00000001000be813 in PyEval_EvalFrameEx ()
 #9  0x00000001000c20de in PyEval_EvalFrameEx ()
 #10 0x00000001000c2f49 in PyEval_EvalCodeEx ()
 #11 0x00000001000c0d8a in PyEval_EvalFrameEx ()
 #12 0x00000001000c2f49 in PyEval_EvalCodeEx ()
 #13 0x000000010003dd80 in function_call ()
 #14 0x000000010000c9f2 in PyObject_Call ()
 #15 0x00000001000bd75c in PyEval_EvalFrameEx ()
 #16 0x00000001000c2f49 in PyEval_EvalCodeEx ()
 #17 0x000000010003dd80 in function_call ()
 #18 0x000000010000c9f2 in PyObject_Call ()
 #19 0x00000001000bd75c in PyEval_EvalFrameEx ()
 #20 0x00000001000c20de in PyEval_EvalFrameEx ()
 #21 0x00000001000c2f49 in PyEval_EvalCodeEx ()
 #22 0x000000010003dd80 in function_call ()
 #23 0x000000010000c9f2 in PyObject_Call ()
 #24 0x00000001000bd75c in PyEval_EvalFrameEx ()
 #25 0x00000001000c2f49 in PyEval_EvalCodeEx ()
 #26 0x000000010003dd80 in function_call ()
 #27 0x000000010000c9f2 in PyObject_Call ()
 #28 0x000000010001eebb in instancemethod_call ()
 #29 0x000000010000c9f2 in PyObject_Call ()
 #30 0x0000000100077eba in slot_tp_call ()
 #31 0x000000010000c9f2 in PyObject_Call ()
 #32 0x00000001000be813 in PyEval_EvalFrameEx ()
 #33 0x00000001000c20de in PyEval_EvalFrameEx ()
 #34 0x00000001000c2f49 in PyEval_EvalCodeEx ()
 #35 0x000000010003dd80 in function_call ()
 #36 0x000000010000c9f2 in PyObject_Call ()
 #37 0x00000001000bd75c in PyEval_EvalFrameEx ()
 #38 0x00000001000c2f49 in PyEval_EvalCodeEx ()
 #39 0x000000010003dd80 in function_call ()
 #40 0x000000010000c9f2 in PyObject_Call ()
 #41 0x000000010001eebb in instancemethod_call ()
 #42 0x000000010000c9f2 in PyObject_Call ()
 #43 0x0000000100077eba in slot_tp_call ()
 #44 0x000000010000c9f2 in PyObject_Call ()
 #45 0x00000001000be813 in PyEval_EvalFrameEx ()
 #46 0x00000001000c2f49 in PyEval_EvalCodeEx ()
 #47 0x000000010003dd80 in function_call ()
 #48 0x000000010000c9f2 in PyObject_Call ()
 #49 0x00000001000bd75c in PyEval_EvalFrameEx ()
 #50 0x00000001000c2f49 in PyEval_EvalCodeEx ()
 #51 0x000000010003dd80 in function_call ()
 #52 0x000000010000c9f2 in PyObject_Call ()
 #53 0x000000010001eebb in instancemethod_call ()
 #54 0x000000010000c9f2 in PyObject_Call ()
 #55 0x0000000100077eba in slot_tp_call ()
 #56 0x000000010000c9f2 in PyObject_Call ()
 #57 0x00000001000be813 in PyEval_EvalFrameEx ()
 #58 0x00000001000c2f49 in PyEval_EvalCodeEx ()
 #59 0x000000010003dd80 in function_call ()
 #60 0x000000010000c9f2 in PyObject_Call ()
 #61 0x00000001000bd75c in PyEval_EvalFrameEx ()
 #62 0x00000001000c2f49 in PyEval_EvalCodeEx ()
 #63 0x000000010003dd80 in function_call ()
 #64 0x000000010000c9f2 in PyObject_Call ()
 #65 0x000000010001eebb in instancemethod_call ()
 #66 0x000000010000c9f2 in PyObject_Call ()
 #67 0x0000000100077eba in slot_tp_call ()
 #68 0x000000010000c9f2 in PyObject_Call ()
 #69 0x00000001000be813 in PyEval_EvalFrameEx ()
 #70 0x00000001000c2f49 in PyEval_EvalCodeEx ()
 #71 0x000000010003dd80 in function_call ()
 #72 0x000000010000c9f2 in PyObject_Call ()
 #73 0x00000001000bd75c in PyEval_EvalFrameEx ()
 #74 0x00000001000c2f49 in PyEval_EvalCodeEx ()
 #75 0x000000010003dd80 in function_call ()
 #76 0x000000010000c9f2 in PyObject_Call ()
 #77 0x000000010001eebb in instancemethod_call ()
 #78 0x000000010000c9f2 in PyObject_Call ()
 #79 0x0000000100077eba in slot_tp_call ()
 #80 0x000000010000c9f2 in PyObject_Call ()
 #81 0x00000001000be813 in PyEval_EvalFrameEx ()
 #82 0x00000001000c2f49 in PyEval_EvalCodeEx ()
 #83 0x000000010003dd80 in function_call ()
 #84 0x000000010000c9f2 in PyObject_Call ()
 #85 0x00000001000bd75c in PyEval_EvalFrameEx ()
 #86 0x00000001000c2f49 in PyEval_EvalCodeEx ()
 #87 0x000000010003dd80 in function_call ()
 #88 0x000000010000c9f2 in PyObject_Call ()
 #89 0x000000010001eebb in instancemethod_call ()
 #90 0x000000010000c9f2 in PyObject_Call ()
 #91 0x0000000100077eba in slot_tp_call ()
 #92 0x000000010000c9f2 in PyObject_Call ()
 #93 0x00000001000be813 in PyEval_EvalFrameEx ()
 #94 0x00000001000c2f49 in PyEval_EvalCodeEx ()
 #95 0x000000010003dd80 in function_call ()
 #96 0x000000010000c9f2 in PyObject_Call ()
 #97 0x00000001000bd75c in PyEval_EvalFrameEx ()
 #98 0x00000001000c2f49 in PyEval_EvalCodeEx ()
 #99 0x000000010003dd80 in function_call ()
 #100 0x000000010000c9f2 in PyObject_Call ()
 #101 0x000000010001eebb in instancemethod_call ()
 #102 0x000000010000c9f2 in PyObject_Call ()
 #103 0x0000000100077eba in slot_tp_call ()
 #104 0x000000010000c9f2 in PyObject_Call ()
 #105 0x00000001000be813 in PyEval_EvalFrameEx ()
 #106 0x00000001000c2f49 in PyEval_EvalCodeEx ()
 #107 0x000000010003dd80 in function_call ()
 #108 0x000000010000c9f2 in PyObject_Call ()
 #109 0x00000001000bd75c in PyEval_EvalFrameEx ()
 #110 0x00000001000c2f49 in PyEval_EvalCodeEx ()
 #111 0x000000010003dd80 in function_call ()
 #112 0x000000010000c9f2 in PyObject_Call ()
 #113 0x000000010001eebb in instancemethod_call ()
 #114 0x000000010000c9f2 in PyObject_Call ()
 #115 0x0000000100077eba in slot_tp_call ()
 #116 0x000000010000c9f2 in PyObject_Call ()
 #117 0x00000001000be813 in PyEval_EvalFrameEx ()
 #118 0x00000001000c2f49 in PyEval_EvalCodeEx ()
 #119 0x000000010003dd80 in function_call ()
 #120 0x000000010000c9f2 in PyObject_Call ()
 #121 0x00000001000bd75c in PyEval_EvalFrameEx ()
 #122 0x00000001000c2f49 in PyEval_EvalCodeEx ()
 #123 0x000000010003dd80 in function_call ()
 #124 0x000000010000c9f2 in PyObject_Call ()
 #125 0x000000010001eebb in instancemethod_call ()
 #126 0x000000010000c9f2 in PyObject_Call ()
 #127 0x0000000100077eba in slot_tp_call ()
 #128 0x000000010000c9f2 in PyObject_Call ()
 #129 0x00000001000be813 in PyEval_EvalFrameEx ()
 #130 0x00000001000c20de in PyEval_EvalFrameEx ()
 #131 0x00000001000c20de in PyEval_EvalFrameEx ()
 #132 0x00000001000c2f49 in PyEval_EvalCodeEx ()
 #133 0x000000010003dd80 in function_call ()
 #134 0x000000010000c9f2 in PyObject_Call ()
 #135 0x000000010001eebb in instancemethod_call ()
 #136 0x000000010000c9f2 in PyObject_Call ()
 #137 0x00000001000bd75c in PyEval_EvalFrameEx ()
 #138 0x00000001000c2f49 in PyEval_EvalCodeEx ()
 #139 0x000000010003dd80 in function_call ()
 #140 0x000000010000c9f2 in PyObject_Call ()
 #141 0x000000010001eebb in instancemethod_call ()
 #142 0x000000010000c9f2 in PyObject_Call ()
 #143 0x0000000100077ae8 in slot_tp_init ()
 #144 0x0000000100074fc5 in type_call ()
 #145 0x000000010000c9f2 in PyObject_Call ()
 #146 0x00000001000be813 in PyEval_EvalFrameEx ()
 #147 0x00000001000c2f49 in PyEval_EvalCodeEx ()
 #148 0x00000001000c0d8a in PyEval_EvalFrameEx ()
 #149 0x00000001000c2f49 in PyEval_EvalCodeEx ()
 #150 0x00000001000c3066 in PyEval_EvalCode ()
 #151 0x00000001000e83d7 in PyRun_StringFlags ()
 #152 0x00000001000e84c1 in PyRun_SimpleStringFlags ()
 #153 0x00000001000fe129 in Py_Main ()
 #154 0x0000000100000f14 in dyld_stub_strlen ()
 }}}
 There is a wrapper for cladiv in ARPACK/FWRAPPERS.  Looking at how it's
 used by arpack:
 {{{
 $ grin LADIV
 ./eigen/arpack/ARPACK/LAPACK/clahqr.f:
   107 :       COMPLEX            WCLADIV
   108 :       EXTERNAL           CLANHS, SLAMCH, WCLADIV
   224 :                T = T - WCLADIV( U, ( X+Y ) )
 ./eigen/arpack/ARPACK/LAPACK/zlahqr.f:
   107 :       COMPLEX*16         WZLADIV
   108 :       EXTERNAL           ZLANHS, DLAMCH, WZLADIV
   224 :                T = T - WZLADIV( U, ( X+Y ) )
 }}}
 This is still very similar to what's discussed at
 http://www.macresearch.org/lapackblas-fortran-106

 See #725 for history of adding the wrapper - this was done before 64-bit
 OS X was available though. On 32-bit I don't have any problems.

 Is there something odd about either the wrapper or the z/clahqr.f
 functions in ARPACK/LAPACK?

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


More information about the Scipy-tickets mailing list