[SciPy-User] Parallel code

Sturla Molden sturla@molden...
Mon Nov 30 07:37:41 CST 2009


Robin skrev:
> If it is read only and you are on a platform with fork (ie not
> windows) that multiprocessing is great for this sort of situation...
> as long as the data is loaded before the fork, all the children canread it fine 

On a system with a copy-on-write optimized os.fork (i.e. almost anything 
but Cygwin), no shared memory are needed for shared read-only access.

Anonymous shared memory (multiprocessing.Array) will work on Windows as 
well, as handles can be inherited. This must be instantiated prior to 
process creation.

Named shared memory can be used for read-write access to shared memory 
created before of after forking.


Sturla


More information about the SciPy-User mailing list