[SciPy-user] scipy.test errors (generic ld filter, loadmat case callnest)

Stefan van der Walt stefan at sun.ac.za
Thu Sep 14 17:38:15 CDT 2006


Hi Matthew

On Thu, Sep 14, 2006 at 10:38:46PM +0100, Matthew Brett wrote:
> > > (The ld filter error remains, but has been discussed elsewhere.)
> >
> > I am getting that error too on an x86_64 machine.  Has it in fact been
> > discussed elsewhere?  I think the thread you pointed to was just the
> > error report wasn't it?
> 
> Actually I've appended a test script that reproduces it; the first
> call to ndimage.generic_filter1d works, but the second (in my script:
> identical) call generates a memory error, only on my x86_64 machine:

<snip script>

> Has anyone got any tips on how I might go about debugging this?
> Sorry, I am a novice at debugging extension code.

Could you please run this through valgrind?

To use valgrind, I do the following:

1. Generate a suppression file.  This file tells valgrind which memory
   errors are expected.  Since the latest numpy testsuite seems to be
   free of those gremlins (let's hold thumbs), you can generate the
   suppressions by doing:

$ valgrind --gen-suppressions=all python -c 'import numpy; numpy.test()' 2>&1 | grep -v '==' > valgrind.supp

   Just check valgrind.supp over to make sure it doesn't contain any
   python errors or other garbage.  You only need to generate this
   file once.

2. Run valgrind on the test script.  I have the following in a file,
   valgrind-py, that I got from Albert:

valgrind \
               --tool=memcheck \
               --leak-check=yes \
               --error-limit=no \
               --suppressions=valgrind-python.supp \
               --num-callers=10 \
               -v \
               python $*

so that I can simply run

$ valgrind-py <python-filename>

The resulting errors should point us in the right direction!

Thanks for your effort.
Stéfan


More information about the SciPy-user mailing list