[SciPy-user] General parallel processing question

Anand Patil anand at soe.ucsc.edu
Thu Nov 16 23:13:10 CST 2006


Hi again everyone,

Say I have two objects A and B. A's member functions _occasionally_ want 
to call the member functions of B, and vice versa. Both A and B have to 
do a lot of work between calls to each other's member functions.

I'd like to push B off to a new process, but be able to program as if it 
were still in the same process as A. That is, I'd like to be able to 
call B's member functions from A without having to teach A how to do 
interprocess communication.

The solution I've been thinking of is to write 'avatar' objects that 
represent objects living in different processes and know how to pass 
member function calls along to their 'true selves' (probably using 
mpi4py and/or IPython1, but I haven't worked out the details yet). If A 
lives in process 0 and B gets pushed to process 1, I would create an 
avatar of B in process 0 and one of A in process 1.

That scheme would get kind of klunky, though. Has anyone thought about/ 
dealt with this situation before?

Thanks,
Anand


More information about the SciPy-user mailing list