[SciPy-User] Use of MPI in extension modules

Stefan Seefeld seefeld@sympatico...
Wed Nov 11 11:01:47 CST 2009


I have a rather basic question about using (C++) extension modules with 
ipython. Sorry if this is the wrong list for this.

I'm working on a signal & image processing library that uses MPI 
internally. I'd like to provide a Python interface to it, so I can 
integrate it into SciPy. With 'normal' Python this all works nicely.
Just recently I have started to consider parallelism, i.e. I want to use 
the library's internal parallelism, by running it with ipython in parallel.
My assumption was that all the engines started via 'ipcluster mpiexec 
..." would already have MPI_Init called, and thus, my extension modules 
would merely share the global MPI state with the Python interpreter.
That doesn't seem to be the case, as I either see all my module 
instances report rank 0, or, if I don't call MPI_Init, get a failure on 
the first MPI call I do.

Can anybody help ? Do I need to initialize MPI myself in my extension 
module ?
Any pointers are highly appreciated.



       ...ich hab' noch einen Koffer in Berlin...

More information about the SciPy-User mailing list