<html><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div><p align="">Hello,
</p><p align="">
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 running Leopard (OSX 10.5.8). I've posted this as a bug on the numpy page, where I was told it might have to do with my ATLAS installation (version 3.8.3_1, also installed via macports). Has anyone run into anything like this before? </p><p align="">Cheers,</p><p align="">Mark</p><p align=""><br></p><p align=""><br></p><p align=""><b><span class="Apple-style-span" style="text-decoration: underline;">
Example code: 
</span></b></p><p align="">
import numpy as N </p><p align="">print 'Demonstration of Numpy Bug:' </p><p align="">print 'loading X (random numbers)' </p><p align="">SzList = [10,20,30,40,50,60,70,80,90,100] </p><p align="">for Sz in SzList:
</p><p align=""><span class="Apple-tab-span" style="white-space:pre">   </span>print 'X size = %d,%d'%(300,Sz) </p><p align=""><span class="Apple-tab-span" style="white-space:pre"> </span>X = N.random.rand(300,Sz)
Y = N.random.rand(300,3) </p><p align=""><span class="Apple-tab-span" style="white-space:pre">     </span>print 'Attempting dot product of X and Y' </p><p align=""><span class="Apple-tab-span" style="white-space:pre">       </span>N.dot(X.T,Y)
print 'Finished without bug.'</p><p align=""><br></p><p align=""><b><span class="Apple-style-span" style="text-decoration: underline;">Result (run through gdb):</span></b></p><p align=""> (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.)
</p><p align="">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".
</p><p align="">
. done</p><p align="">Demonstration of Numpy Bug:</p><p align="">loading X (random numbers)</p><p align="">X size = 300,10</p><p align="">Attempting dot product of X and Y</p><p align="">Finished without bug.</p><p align="">X size = 300,20</p><p align="">Attempting dot product of X and Y</p><p align="">Finished without bug.</p><p align="">X size = 300,30</p><p align="">Attempting dot product of X and Y</p><p align="">Finished without bug.</p><p align="">X size = 300,40</p><p align="">Attempting dot product of X and Y</p><p align="">Finished without bug.</p><p align="">X size = 300,50</p><p align="">Attempting dot product of X and Y</p><p align="">Finished without bug.</p><p align="">X size = 300,60</p><p align="">Attempting dot product of X and Y</p><p align=""><br></p><p align="">Program received signal EXC_BAD_ACCESS, Could not access memory.</p><p align="">Reason: 13 at address: 0x00000000</p><p align="">[Switching to process 56005 thread 0x117]</p><p align="">0x01038884 in ATL_dupMBmm0_2_0_b0 ()</p><br></div></body></html>