[NumPy-Tickets] [NumPy] #1364: segfault in numpy.dot for large arrays
NumPy Trac
numpy-tickets@scipy....
Sun Jan 17 16:31:24 CST 2010
#1364: segfault in numpy.dot for large arrays
--------------------------+-------------------------------------------------
Reporter: QuestionMark | Owner: somebody
Type: defect | Status: new
Priority: normal | Milestone: 1.4.0
Component: Other | Version: 1.3.0
Keywords: |
--------------------------+-------------------------------------------------
Hello,
I've encountered a segfault in numpy when trying to compute a dot product
for two arrays - see code below. The problem only seems to occur when the
arrays reach a certain size. I'm using Numpy version 1.3.0, installed via
macports, on a 2.33 GHz Intel Core2 Duo Macbook Pro.
Example code:
import numpy as N
print 'Demonstration of Numpy Bug:'
print 'loading X (random numbers)'
SzList = [10,20,30,40,50,60,70,80,90,100]
for Sz in SzList:
print 'X size = %d,%d'%(300,Sz)
X = N.random.rand(300,Sz)
Y = N.random.rand(300,3)
print 'Attempting dot product of X and Y'
N.dot(X.T,Y)
print 'Finished without bug.'
Result (run through gdb):
(There were a number of warnings like this - so many that they went off
the top of the screen and I couldn't copy them all. This was typical of
the warnings.)
Reading symbols for shared libraries warning: Could not find object file
"/opt/local/var/macports/build_opt_local_var_macports_sources_rsync.macports.org_release_ports_lang_python26/work/Python-2.6.4/build/temp.macosx-10.5-i386-2.6/opt/local/var/macports/build_opt_local_var_macports_sources_rsync.macports.org_release
_ports_lang_python26/work/Python-2.6.4/Modules/_collectionsmodule.o" - no
debug information available for
"/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_lang_python26/work/Python-2.6.4/Modules/_collectionsmodule.c".
. done
Demonstration of Numpy Bug:
loading X (random numbers)
X size = 300,10
Attempting dot product of X and Y
Finished without bug.
X size = 300,20
Attempting dot product of X and Y
Finished without bug.
X size = 300,30
Attempting dot product of X and Y
Finished without bug.
X size = 300,40
Attempting dot product of X and Y
Finished without bug.
X size = 300,50
Attempting dot product of X and Y
Finished without bug.
X size = 300,60
Attempting dot product of X and Y
Program received signal EXC_BAD_ACCESS, Could not access memory.
Reason: 13 at address: 0x00000000
[Switching to process 55933 thread 0x117]
0x01038884 in ATL_dupMBmm0_2_0_b0 ()
Help please (and thanks!),
Mark
--
Ticket URL: <http://projects.scipy.org/numpy/ticket/1364>
NumPy <http://projects.scipy.org/numpy>
My example project
More information about the NumPy-Tickets
mailing list