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

Robert Kern robert.kern at gmail.com
Fri Dec 9 09:00:00 EST 2011

On Fri, Dec 9, 2011 at 13:18, Pierre Haessig <pierre.haessig at crans.org> 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
> now I get scare by your statement !
> Please don't tell me it is unsafe to launch multiple jobs (for instance
> with multiprocressing's Pool.map) just doing some ndarray arithmetic !
> That's why I'd like to understand better the issue raised by Yang. For
> instance, what does exactly "multiple CPython interpreters" stands for ?

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.

Robert Kern

"I have come to believe that the whole world is an enigma, a harmless
enigma that is made terrible by our own mad attempt to interpret it as
though it had an underlying truth."
  -- Umberto Eco

More information about the NumPy-Discussion mailing list