Riccardo added the comment: Great, i solved trying to avoid calls to python code in parallel regions. Thanks for pointing me in right direction, i wasn’t thinking at all to the GIL, i was convinced i had tryed everything and that it was a bug..
Regards On 10 Sep 2014, at 05:50, Stefan Behnel <rep...@bugs.python.org> wrote: > > Stefan Behnel added the comment: > > Agreed that it's not a bug in CPython, but my guess is that it's not a bug in > NumPy either. The C function you call (which IIRC creates a new NumPy array) > almost certainly needs the GIL to protect it against race conditions, and > since you mentioned OpenMP, you most likely released the GIL. So, just > re-acquire the GIL around the call (and make sure you don't have any other > threading problems in your code). > > ---------- > nosy: +scoder > > _______________________________________ > Python tracker <rep...@bugs.python.org> > <http://bugs.python.org/issue22373> > _______________________________________ ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue22373> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com