Re: [Numpy-discussion] "Reference count error detected" bug appears with multithreading (OpenMP & TBB)

2012-01-18 Thread Robert Kern
On Wed, Jan 18, 2012 at 16:14, Malcolm Reynolds wrote: >> >> I suspect that you are obtaining the numpy object (1 Py_INCREF) before >> you split into multiple threads but releasing them in each thread >> (multiple Py_DECREFs). This is probably being hidden from you by the >> boost.python interface

Re: [Numpy-discussion] "Reference count error detected" bug appears with multithreading (OpenMP & TBB)

2012-01-18 Thread Malcolm Reynolds
> > I suspect that you are obtaining the numpy object (1 Py_INCREF) before > you split into multiple threads but releasing them in each thread > (multiple Py_DECREFs). This is probably being hidden from you by the > boost.python interface and/or the boost::detail::sp_counted_impl_p<> > smart(ish) p

Re: [Numpy-discussion] "Reference count error detected" bug appears with multithreading (OpenMP & TBB)

2012-01-18 Thread Robert Kern
On Wed, Jan 18, 2012 at 14:59, Malcolm Reynolds wrote: > Hi, > > I've built a system which allocates numpy arrays and processes them in > C++ code (this is because I'm building a native code module using > boost.python and it makes sense to use numpy data storage to then deal > with outputs in pyt

[Numpy-discussion] "Reference count error detected" bug appears with multithreading (OpenMP & TBB)

2012-01-18 Thread Malcolm Reynolds
Hi, I've built a system which allocates numpy arrays and processes them in C++ code (this is because I'm building a native code module using boost.python and it makes sense to use numpy data storage to then deal with outputs in python, without having to do any copying). Everything seems fine excep