Installing MPI for Python

The Message Passing Interface (MPI) (see http://en.wikipedia.org/wiki/Message_Passing_Interface) is a standard protocol developed by experts to work on a broad assortment of distributed machines. Originally, in the '90s, MPI was used to write programs in Fortran and C. MPI is independent of hardware and programming languages. MPI functions include the send and receive operations, MapReduce functionality, and synchronization. MPI has point-to-point functions involving two processors and operations involving all processors. MPI has bindings for several programming languages, including Python. Download MPI from http://www.open-mpi.org/software/ompi/v1.8/ 1.8.1. MPI 1.8.1 was the latest MPI version at the time of writing. We can check on the website whether there is a newer version available. Installing MPI can take a while (nearly 30 minutes). The following are the commands involved, assuming that we install it in the /usr/local directory:

$ ./configure --prefix=/usr/local
$ make all
$ sudo make install

Install Python bindings for MPI as follows:

$ pip install mpi4py
$ pip freeze|grep mpi4py
mpi4py==1.3.1
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
52.15.80.101