numpy.linalg.svd reaches a segmentation fault only on a large matrix. For example:
import numpy
u, w, v = numpy.linalg.svd(numpy.random.randn(10004, 565) + 1j * numpy.random.randn(10004, 565), full_matrices = False)
is fine. But
u, w, v = numpy.linalg.svd(numpy.random.randn(10004, 566) + 1j * numpy.random.randn(10004, 566), full_matrices = False)
causes a segmentation fault on Mac OS X Lion. I did a gdb run:
Program received signal EXC_BAD_ACCESS, Could not access memory.
Reason: KERN_INVALID_ADDRESS at address: 0x000000011d7c5540
0x00007fff8e3e2e7b in zgePack_A_ConjTran_Unaligned ()
(gdb) bt
#0 0x00007fff8e3e2e7b in zgePack_A_ConjTran_Unaligned ()
#1 0x00007fff8e3e25f1 in zgemm_repack_Unaligned ()
#2 0x00007fff8e3e1d8e in APL_zgemm ()
#3 0x00007fff8e04b6c1 in cblas_zgemm ()
#4 0x00007fff8decca65 in zgemm_ ()
#5 0x00007fff92be5fa9 in zlarfb_ ()
#6 0x00007fff92c4f164 in zunmqr_ ()
#7 0x00007fff92c4cf9a in zunmbr_ ()
#8 0x00007fff92b6bfb3 in zgesdd_ ()
#9 0x00000001010e2bfd in lapack_lite_zgesdd ()
#10 0x00000001000a3feb in PyEval_EvalFrameEx ()
#11 0x00000001000a72a7 in PyEval_EvalCodeEx ()
#12 0x00000001000a7458 in fast_function ()
#13 0x00000001000a409d in PyEval_EvalFrameEx ()
#14 0x00000001000a72a7 in PyEval_EvalCodeEx ()
#15 0x00000001000a7326 in PyEval_EvalCode ()
#16 0x00000001000c5c09 in PyRun_StringFlags ()
#17 0x00000001000c6bc3 in PyRun_SimpleStringFlags ()
#18 0x00000001000d9e32 in Py_Main ()
#19 0x0000000100000f14 in dyld_stub_strlen ()
This is a brand new Mac Pro. I have never run program this large on this machine.
Original ticket http://projects.scipy.org/numpy/ticket/2157 on 2012-06-12 by trac user renz, assigned to atmention:pv.
numpy.linalg.svd reaches a segmentation fault only on a large matrix. For example:
is fine. But
causes a segmentation fault on Mac OS X Lion. I did a gdb run:
This is a brand new Mac Pro. I have never run program this large on this machine.