5. Supporting Software

Objective

Install Open MPI and ‘mpi4py’

Now that Slurm is installed, we need ways to program in a parallel clustered fashion. The Message Passing Interface (MPI) is a standardized and portable standard that’s designed to function on parallel computing architectures for C, C++, and Fortran. Additionally, there are packages available that extend this to other languages, such as Python.

Install Open MPI on Head Node

References: Open MPI

Open MPI is an open source implementation of the Message Passing Interface(MPI) standard developed and maintained by a consortium of academic, research, and industry parnters. It is commonly available on a lot of clusters.

While it’s possible to install the binary release from the distribution repository, this is a rapidly evolving field, and as such, it’s recommended to build it from source. Furthermore, since we are using slurm, building openmpi with slurm allows a number of integrations the standalone binary lacks. Finally, manually building also allows us to place the binaries in a location accessible to all nodes, that way we only need to install once.

(Optional) Install mpi4py on Head Node

Resources: mpi4py, pip, gzip, tar, python

mpi4py gives Python the ability to exploit MPI and makes Python practical for cluster computing. Since we won’t have direct access to the web, pip will not be available, and we will need to manually build and install mpi4py.

The source files have already been downloaded and are located under /apps/src/mpi4py. Extract the files:

gzip -d mpi4py*.tar.gz
tar -xf mpi4py*.tar

Now go into the directory that was just created and build mpi4py:

python setup.py build

This will take a while. Once it completes, install using sudo:

sudo python setup.py install