[SciPy-user] shared memory machines

Gael Varoquaux gael.varoquaux@normalesup....
Sun Feb 8 18:00:46 CST 2009


On Fri, Feb 06, 2009 at 10:22:53PM +0100, Sturla Molden wrote:
>
> Ok, so this is approximately what I had in mind for Windows. It is a named 
> mutex and shared memory that is pickled by name (given that I read the 
> Python manuals on pickling extension objects correctly...)
>
> It still lacks an ndarray subclass that is pickled without making a copy of 
> the buffer, and also a malloc similar to multiprocessing.
>
> And similar Cython code has to be written for posix...

OK, I've given it try, but it seems that my sheer incompetence on these
matters is about to be revealed. Running the attached test code, I get a
bus error. The output of test.py is:

{'/c0aa50edb5a04371b8414ef16a49a4fa': (3070545920L, 409600)}
Buffer created
Array created
3070545920
[1]    9882 bus error  python test.py

I am quite clueless as to where this comes from (I can see different
posibilities) and how to debug this.

Once again, this is from sheer incompetence, but I have never mmaped
files throught the C API, and my days of C, especially memory allocation
in C, are very far.

I am posting this on the mailing list hoping that someone will have an
idea as to what I am doing wrong. Once this work, we can start looking at
making this clean to have posix and windows implementations work
together.

Gaël
-------------- next part --------------
A non-text attachment was scrubbed...
Name: shared_arrays.zip
Type: application/x-zip-compressed
Size: 9628 bytes
Desc: not available
Url : http://projects.scipy.org/pipermail/scipy-user/attachments/20090209/5e265035/attachment.bin 


More information about the SciPy-user mailing list