Skip to content

bwoshea/ACRES_MPI_tutorial

Repository files navigation

ACRES MPI tutorial

Author: Brian O'Shea, [email protected] (CMSE and Physics+Astronomy)

MPI tutorial for the MSU ACRES REU

This tutorial requires use of Python 3 and mpi4py, which is the set of Python bindings to the Message Passing Interface (MPI) library. The HPCC does not have mpi4py installed, but you can load up a version of Python that includes mpi4py by first logging onto one of the development nodes of the HPCC (e.g., dev-intel16, dev-intel18, dev-amd20), and then typing the following at the command prompt:

source ~oshea/python_MPI_setup.sh

This shell script will unload the system Python modules and will load up the Anaconda python distribution with Python 3.8, NumPy, Matplotlib, SciPy, and many other packages, as well as mpi4py. (You can see what this script actually does by typing cat ~oshea/python_MPI_setup.sh .)

If you want to install the Anaconda Python distribution and mpi4py in your own home directory on the HPCC, there is a file called INSTALLATION.md in this repository.

Look at the examples in the directory mpi_examples, which are heavily annotated to explain what they are doing. You can run them on the development nodes with:

mpirun -np 4 python my_example_script.py

where -np 4 means to use 4 MPI tasks (this can be changed, but people often choose to use powers of two).

Before the tutorial

  1. Watch this video that introduces the components of a computer.
  2. Read through the file supercomputing_and_MPI_notes.pdf, which is included in this repository.

Really important links

mpi4py examples (GitHub repository) -- very useful mpi4py examples!

mpi4py website

mpi4py documentation

Livermore Parallel Computing tutorial

Livermore MPI tutorial (C++/Fortran)

Introduction to Scientific Computing book by Victor Eijkhout at TACC

Parallel Programming in MPI and OpenMP, also by Victor Eijkhout


About

MPI tutorial for the MSU ACRES REU

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published