[IPython-user] Initializing MPI

Brian Granger ellisonbg.net@gmail....
Thu Nov 12 22:15:22 CST 2009


OK, I can certainly live with having to use mpi4py in the short term. I just
want to avoid an additional dependency. (In particular as Fedora provides
SciPy and IPython packages, but no mpi4py, making it a little hard for end
users to set up their machine.)

>
> I'm still wondering what options I need to pass to MPI_Init(). I tried
> running MPI_Init, passing the content of sys.argv through. But that had the
> effect that all of my module instances reported the same rank '0', which
> seems to imply they all had no knowledge of each other. I figure to tell
> them about the other processes, and set up the channels, requires some
> argument to MPI_Init(), which would normally be provided by mpirun, but
> which I can't find any traces of in sys.argv.
>
>
It really depends on what MPI implementation you are using.  Which are you
using?  Modern ones like openmpi and mpich2 are really flexible.  Older MPi
implementations actual require recompiling the Python binary with MPI.  If
you need that mpi4py can do that, or at least show you how.

When I doubt, I always look at how mpi4py is doing it:

http://www.google.com/codesearch?q=MPI_init+package%3Ahttp%3A%2F%2Fmpi4py
\.googlecode\.com&origq=MPI_init&btnG=Search+Trunk

Let me know what mpi implementation you are using though.

cheers,

Brian



> Thanks,
>        Stefan
>
>
> --
>
>      ...ich hab' noch einen Koffer in Berlin...
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.scipy.org/pipermail/ipython-user/attachments/20091112/34231618/attachment.html 


More information about the IPython-user mailing list