Re: [Numpy-discussion] Long-standing issue with using numpy in embedded CPython

2012-09-25 Thread Aron Ahmadia
Can you expand a bit? Are you trying to disable threads at compile-time or at run-time? Which threaded functionality are you trying to disable? Are you using numpy as a computational library with multiple threads making calls into its functions? I think NPY_ALLOW_THREADS is for interacting with

Re: [Numpy-discussion] Long-standing issue with using numpy in embedded CPython

2012-09-25 Thread Raphael de Feraudy
Yang Zhang gmail.com> writes: > > > I'm curious how to disable threads in numpy (not an ideal solution). > > Googling seems to point me to setting NPY_ALLOW_THREADS to > > 0somewhere. > > Anyone? > It's appearing to me I had to face this very issue, which I reported @Numpy TRAC : http://p

Re: [Numpy-discussion] Long-standing issue with using numpy in embedded CPython

2011-12-10 Thread Vicente Sole
Hi Peter, The obsolete link was not deliberate. It was the first reference I found via google. Best regards, Armando Quoting Peter CYC : > Hi Armando, > > No comment on the Java thing ;-) > > However, > http://www.opengda.org/documentation/manuals/Diamond_SciSoft_Python_Guide/8.18/content

Re: [Numpy-discussion] Long-standing issue with using numpy in embedded CPython

2011-12-09 Thread Peter CYC
Hi Armando, No comment on the Java thing ;-) However, http://www.opengda.org/documentation/manuals/Diamond_SciSoft_Python_Guide/8.18/contents.html is more up-to-date and we are on github too: https://github.com/DiamondLightSource Peter On 9 December 2011 13:05, Vicente Sole wrote: > Quoting

Re: [Numpy-discussion] Long-standing issue with using numpy in embedded CPython

2011-12-09 Thread Pierre Haessig
Le 09/12/2011 15:00, Robert Kern a écrit : Using multiprocessing is fine. That starts up multiple interpreters in *different* processes. Yang is using a non-Python program that embeds the CPython interpreter and starts up multiple copies of it in the same process. Ok, now I think I understand. I

Re: [Numpy-discussion] Long-standing issue with using numpy in embedded CPython

2011-12-09 Thread Robert Kern
On Fri, Dec 9, 2011 at 13:18, Pierre Haessig wrote: > Le 09/12/2011 09:31, Robert Kern a écrit : >> We have some global state >> that we need to keep, and this gets interfered with in a multiple >> interpreter environment. > I recently got interested in multiprocessing computation with numpy and >

Re: [Numpy-discussion] Long-standing issue with using numpy in embedded CPython

2011-12-09 Thread Pierre Haessig
Le 09/12/2011 09:31, Robert Kern a écrit : > We have some global state > that we need to keep, and this gets interfered with in a multiple > interpreter environment. I recently got interested in multiprocessing computation with numpy and now I get scare by your statement ! Please don't tell me it

Re: [Numpy-discussion] Long-standing issue with using numpy in embedded CPython

2011-12-09 Thread Vicente Sole
Quoting Robert Kern : > On Fri, Dec 9, 2011 at 11:00, Yang Zhang wrote: > >> Thanks for the clarification.  Alas.  So is there no simple workaround >> to making numpy work in environments such as Jepp? > > I don't think so, no. > It is far from being an optimal solution (in fact I dislike it) bu

Re: [Numpy-discussion] Long-standing issue with using numpy in embedded CPython

2011-12-09 Thread Robert Kern
On Fri, Dec 9, 2011 at 11:00, Yang Zhang wrote: > Thanks for the clarification.  Alas.  So is there no simple workaround > to making numpy work in environments such as Jepp? I don't think so, no. -- Robert Kern "I have come to believe that the whole world is an enigma, a harmless enigma that

Re: [Numpy-discussion] Long-standing issue with using numpy in embedded CPython

2011-12-09 Thread Yang Zhang
On Fri, Dec 9, 2011 at 12:31 AM, Robert Kern wrote: > On Thu, Dec 8, 2011 at 23:15, Yang Zhang wrote: >> On Tue, Oct 4, 2011 at 12:05 PM, Yang Zhang wrote: >>> On Tue, Oct 4, 2011 at 1:28 AM, Robin wrote: On Mon, Oct 3, 2011 at 9:42 PM, Yang Zhang wrote: > It turns out that there's a

Re: [Numpy-discussion] Long-standing issue with using numpy in embedded CPython

2011-12-09 Thread Robert Kern
On Thu, Dec 8, 2011 at 23:15, Yang Zhang wrote: > On Tue, Oct 4, 2011 at 12:05 PM, Yang Zhang wrote: >> On Tue, Oct 4, 2011 at 1:28 AM, Robin wrote: >>> On Mon, Oct 3, 2011 at 9:42 PM, Yang Zhang wrote: It turns out that there's a long-standing problem in numpy that prevents it from b

Re: [Numpy-discussion] Long-standing issue with using numpy in embedded CPython

2011-12-08 Thread Yang Zhang
On Tue, Oct 4, 2011 at 12:05 PM, Yang Zhang wrote: > On Tue, Oct 4, 2011 at 1:28 AM, Robin wrote: >> On Mon, Oct 3, 2011 at 9:42 PM, Yang Zhang wrote: >>> It turns out that there's a long-standing problem in numpy that >>> prevents it from being used in embedded CPython environments: >> >> Just

Re: [Numpy-discussion] Long-standing issue with using numpy in embedded CPython

2011-10-04 Thread Yang Zhang
On Tue, Oct 4, 2011 at 1:28 AM, Robin wrote: > On Mon, Oct 3, 2011 at 9:42 PM, Yang Zhang wrote: >> It turns out that there's a long-standing problem in numpy that >> prevents it from being used in embedded CPython environments: > > Just wanted to make the point for reference that in general Nump

Re: [Numpy-discussion] Long-standing issue with using numpy in embedded CPython

2011-10-04 Thread Robin
On Mon, Oct 3, 2011 at 9:42 PM, Yang Zhang wrote: > It turns out that there's a long-standing problem in numpy that > prevents it from being used in embedded CPython environments: Just wanted to make the point for reference that in general Numpy does work fine in (non-threaded) embedded CPython s

Re: [Numpy-discussion] Long-standing issue with using numpy in embedded CPython

2011-10-03 Thread Olivier Delalleau
As far as a workaround in concerned, that scipy archive post says you can disable threads in numpy. Sorry can't help more, I don't know much about how to bypass such GIL issues. -=- Olivier 2011/10/3 Yang Zhang > It turns out that there's a long-standing problem in numpy that > prevents it from

[Numpy-discussion] Long-standing issue with using numpy in embedded CPython

2011-10-03 Thread Yang Zhang
It turns out that there's a long-standing problem in numpy that prevents it from being used in embedded CPython environments: http://stackoverflow.com/questions/7592565/when-embedding-cpython-in-java-why-does-this-hang/7630992#7630992 http://mail.scipy.org/pipermail/numpy-discussion/2009-July/0440