Re: [Numpy-discussion] numpy/Windows shared arrays between processes?

2007-10-11 Thread David Cournapeau
Matthieu Brucher wrote: The 2.6 seems to use VC 2005 Express, I don't know about py3000(?), with associated upgrade issues. But what if the next MS compiler has again broken libc implementation ? (Incidently, VS2005 was not used for python2.5 for even more broken

Re: [Numpy-discussion] numpy/Windows shared arrays between processes?

2007-10-11 Thread Matthieu Brucher
I don't what he meant by a broken libc, if it is the fact that there is a lot of deprecated standard functions, I don't call it broken (besides, this deprecation follows a technical paper that describe the new safe functions, although it does not deprecate these functions). If

Re: [Numpy-discussion] numpy/Windows shared arrays between processes?

2007-10-10 Thread Ray S
Thanks all: At 10:00 AM 10/10/2007, Robert Kern wrote: Something like the following should suffice (untested, though I've done similar things with ctypes before): I tested, successfully: nFromAddress.py def fromaddress(address, dtype, shape, strides=None): Create a numpy array from an

Re: [Numpy-discussion] numpy/Windows shared arrays between processes?

2007-10-10 Thread David Cournapeau
Ray S wrote: Thanks all: At 10:00 AM 10/10/2007, Robert Kern wrote: Something like the following should suffice (untested, though I've done similar things with ctypes before): I tested, successfully: nFromAddress.py def fromaddress(address, dtype, shape, strides=None): Create

Re: [Numpy-discussion] numpy/Windows shared arrays between processes?

2007-10-09 Thread Sebastian Haase
Hi! I was in fact experimenting with this. The solution seemed to lie in simple memmap as it is implemented in Windows: import numpy as N def arrSharedMemory(shape, dtype, tag=PriithonSharedMemory): Windows only ! share memory between different processes if same `tag` is used.

Re: [Numpy-discussion] numpy/Windows shared arrays between processes?

2007-10-09 Thread David Cournapeau
Sebastian Haase wrote: Hi! I was in fact experimenting with this. The solution seemed to lie in simple memmap as it is implemented in Windows: import numpy as N def arrSharedMemory(shape, dtype, tag=PriithonSharedMemory): Windows only ! share memory between different

Re: [Numpy-discussion] numpy/Windows shared arrays between processes?

2007-10-09 Thread Sebastian Haase
On 10/9/07, David Cournapeau [EMAIL PROTECTED] wrote: Sebastian Haase wrote: Hi! I was in fact experimenting with this. The solution seemed to lie in simple memmap as it is implemented in Windows: import numpy as N def arrSharedMemory(shape, dtype, tag=PriithonSharedMemory):

Re: [Numpy-discussion] numpy/Windows shared arrays between processes?

2007-10-09 Thread Ray Schumacher
At 05:22 AM 10/9/2007, David Cournapeau wrote: Could not this be because you compiled the posh sources with a compiler/runtime which is different than the other extensions and python interpreter ? It definitely was - since my 2.4 wanted the free 7.1 compiler, I (and anyone else who didn't

Re: [Numpy-discussion] numpy/Windows shared arrays between processes?

2007-10-09 Thread Sebastian Haase
On 10/9/07, Ray Schumacher [EMAIL PROTECTED] wrote: At 05:22 AM 10/9/2007, David Cournapeau wrote: Could not this be because you compiled the posh sources with a compiler/runtime which is different than the other extensions and python interpreter ? It definitely was - since my 2.4 wanted the

Re: [Numpy-discussion] numpy/Windows shared arrays between processes?

2007-10-09 Thread Ray S
On 10/9/07, Sebastian Haase replied: Did you find that locks or semaphores were needed? Maybe that's why it crashed ;-) !? But for simple use it seems fine. I just did some code (below) that does read/write to the array AFAP, and there is no crash, or any other issue (Win2000, py2.4,

[Numpy-discussion] numpy/Windows shared arrays between processes?

2007-10-08 Thread Ray S
Is anyone sharing arrays between processes on Windows? I tried compiling the posh sources (once, so far) with the new MS toolkit and failed... What other solutions are in use? Have a second process create an array view from an address would suffice for this particular purpose. I could pass the