[IPython-user] Initializing MPI

Stefan Seefeld seefeld@sympatico...
Thu Nov 12 10:47:09 CST 2009


I have been developing a C++ library which is using MPI internally. I 
have also written Python wrappers for it, so I can call into it from a 
normal Python script.
Now I'd like to use the library via ipython. Specifically, I'e like to 
be able to use parallel ipython (using ipcluster), load my extension 
module into all engines, then run it. I have been trying to figure out 
how to initialize MPI to make that work. I have read 
which suggests to use mpi4py.
I have done that, and all appears to be working fine. However, given 
that I don't actually need mpi4py for anything but initialization, I 
wonder whether I can't simply call MPI_Init() myself (as I would do when 
using my library in a stand-alone application).

Thus my question: Is there a way to initialize MPI that does not involve 
mpi4py ? (The above document states:

"We highly recommend just using mpi4py as it takes care of most of these 
problems. If you want to do something different, let us know and we can 
help you get started.",

which I'd like to take advantage now. :-) )

Many thanks,


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

More information about the IPython-user mailing list