Hi, I've compiled scipy_core and scipy from the current (yesterday, Rev 1502) svn versions. I'm running Mac OS X 10.4.3, with a fink-installed python2.4. The new scipy builds and installs just fine, and all the unit tests I tried worked fine. However, I get a Bus Error from the following simple program: =================================================== import scipy import scipy.io print 'Opening test.dat for writing' outfile = open('test.dat', mode='wb') a = scipy.arange(1024.0,dtype='f') print 'Writing array' scipy.io.fwrite(outfile, 1024, a, 'f') print 'Closing file' outfile.close() print 'Opening test.dat for reading' infile = open('test.dat', mode='rb') print 'Reading chunk' tmpchunk = scipy.io.fread(infile, 1024, 'f') print 'Done :',tmpchunk[0:10] =================================================== Here is the run:
mcxr2 : 192>python2.4 freadtest.py Opening test.dat for writing Writing array Closing file Opening test.dat for reading Reading chunk Bus error
The written file looks fine...
mcxr2 : 193>od -f test.dat |head 0000000 0.000000e+00 1.000000e+00 2.000000e+00 3.000000e+00 0000020 4.000000e+00 5.000000e+00 6.000000e+00 7.000000e+00 0000040 8.000000e+00 9.000000e+00 1.000000e+01 1.100000e+01 0000060 1.200000e+01 1.300000e+01 1.400000e+01 1.500000e+01 0000100 1.600000e+01 1.700000e+01 1.800000e+01 1.900000e+01 0000120 2.000000e+01 2.100000e+01 2.200000e+01 2.300000e+01 0000140 2.400000e+01 2.500000e+01 2.600000e+01 2.700000e+01 0000160 2.800000e+01 2.900000e+01 3.000000e+01 3.100000e+01 0000200 3.200000e+01 3.300000e+01 3.400000e+01 3.500000e+01 0000220 3.600000e+01 3.700000e+01 3.800000e+01 3.900000e+01
Cheers, -- Paul -- Dr. Paul S. Ray E-mail: Paul.Ray@nrl.navy.mil Naval Research Laboratory WWW : http://xweb.nrl.navy.mil/ personnel/paulr/ Code 7655 Phone : (202) 404-1619 Washington, DC 20375 AIM : NRLPSR
Paul Ray wrote:
Hi,
I've compiled scipy_core and scipy from the current (yesterday, Rev 1502) svn versions. I'm running Mac OS X 10.4.3, with a fink-installed python2.4. The new scipy builds and installs just fine, and all the unit tests I tried worked fine. However, I get a Bus Error from the following simple program:
I get a segfault on Fedora Core 4 from Paul's program. It looks like numpyio_fromfile needs some attention?
Paul Ray wrote:
Hi,
I've compiled scipy_core and scipy from the current (yesterday, Rev 1502) svn versions. I'm running Mac OS X 10.4.3, with a fink-installed python2.4. The new scipy builds and installs just fine, and all the unit tests I tried worked fine. However, I get a Bus Error from the following simple program: =================================================== import scipy import scipy.io
print 'Opening test.dat for writing' outfile = open('test.dat', mode='wb') a = scipy.arange(1024.0,dtype='f') print 'Writing array' scipy.io.fwrite(outfile, 1024, a, 'f') print 'Closing file' outfile.close()
print 'Opening test.dat for reading' infile = open('test.dat', mode='rb') print 'Reading chunk' tmpchunk = scipy.io.fread(infile, 1024, 'f') print 'Done :',tmpchunk[0:10]
Thanks for catching this. It was a faulty DECREF of the data-type descriptor (new feature added in the past two weeks) which should have been XDECREF. There were actually a few more fixes to data-type descriptors needed. They are objects now and should be reference counted. I checked in the changes. The file was reading and writing fine, the problem happened right before returning when a NULL pointer was being DECREF'd. -Travis
On Dec 29, 2005, at 2:29 PM, Travis Oliphant wrote:
Thanks for catching this. It was a faulty DECREF of the data-type descriptor (new feature added in the past two weeks) which should have been XDECREF. There were actually a few more fixes to data-type descriptors needed. They are objects now and should be reference counted. I checked in the changes. The file was reading and writing fine, the problem happened right before returning when a NULL pointer was being DECREF'd.
Wonderful. The problem is now fixed. I'm very much looking forward to released versions of scipy_core and scipy so that I can stop living on the bleeding edge with the svn versions. This will make it much easier to maintain consistent versions of scipy on different machines used by different developers. Thanks for all the hard work! I think I'll go buy a copy of the book now. Cheers, -- Paul -- Dr. Paul S. Ray E-mail: Paul.Ray@nrl.navy.mil Naval Research Laboratory WWW : http://xweb.nrl.navy.mil/ personnel/paulr/ Code 7655 Phone : (202) 404-1619 Washington, DC 20375 AIM : NRLPSR
participants (3)
-
Paul Ray -
Stephen Walton -
Travis Oliphant