Re: [Numpy-discussion] Numpy.dot segmentation fault

2010-01-18 Thread Mark Lescroart
Hi David (et al),

Thanks for the reply. The version of ATLAS I was using was v3.8.3_1,  
installed via MacPorts, compiled and built on my machine with a gcc4.3  
compiler. I uninstalled numpy 1.4 and ATLAS, re-installed (i.e., re- 
compiled) the same version (3.8.3_1), re-installed numpy (for  
python2.6, version 1.4), and got the same bug.

I don't know if this means that there's something fundamentally wrong  
with the version of ATLAS on MacPorts (probably less likely) or  
something wrong with the way my system is configured (probably more  
likely). If anyone can give me any more insight into how to test my  
installation of ATLAS, I would be much obliged (I read through a fair  
bit of the ATLAS installation notes on the ATLAS sourceforge page, and  
could not figure out how to run the whole test suite ).

If possible, I would like to solve this problem within Macports (and  
thus not with the Accelerate framework). I am using numpy mostly  
through the pyMVPA package for fMRI multi-voxel analysis, and the  
pyMVPA package depends on a number of other libraries, and the mess of  
dependencies is most easily managed within the framework of Macports.

Cheers,

Mark

On Jan 17, 2010, at 8:38 PM, David Cournapeau wrote:

 Mark Lescroart wrote:
 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.

 Your atlas is most likely broken. You will have to double-check how  
 you
 built it, and maybe run the whole test suite (as indicated in the  
 ATLAS
 installation notes).

 Note that you can use the Accelerate framework on mac os x, this is  
 much
 easier to get numpy working on mac,

 cheers,

 David
 ___
 NumPy-Discussion mailing list
 NumPy-Discussion@scipy.org
 http://mail.scipy.org/mailman/listinfo/numpy-discussion

___
NumPy-Discussion mailing list
NumPy-Discussion@scipy.org
http://mail.scipy.org/mailman/listinfo/numpy-discussion


[Numpy-discussion] Numpy.dot segmentation fault

2010-01-17 Thread Mark Lescroart

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 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?


Cheers,

Mark





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: 0x

[Switching to process 56005 thread 0x117]

0x01038884 in ATL_dupMBmm0_2_0_b0 ()


___
NumPy-Discussion mailing list
NumPy-Discussion@scipy.org
http://mail.scipy.org/mailman/listinfo/numpy-discussion