Parallelizing code with MPI in IPython

Message Passing Interface (MPI) is a standardized communication protocol for parallel systems. It is used in many parallel computing applications to exchange data between nodes. MPI has a high barrier to entry, but it is very efficient and powerful.

IPython's parallel computing system has been designed from the ground up to work with MPI. If you are new to MPI, it is a good idea to start using it from IPython. If you are an experienced MPI user, you will find that IPython integrates seamlessly with your parallel application.

In this recipe, we will see how to use MPI with IPython through a very simple example.

Getting ready

To use MPI with IPython, you need:

  • A standard MPI implementation such as OpenMPI available ...

Get IPython Interactive Computing and Visualization Cookbook now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.