MPI lecture notes
A practical course in parallel programming with the Message Passing Interface, in seven chapters. Every chapter comes with complete C programs that compile with any MPI library, their real output, and exercises.
- 01Getting started with MPIThe message-passing model, the six calls every program uses, and how to compile and run your first MPI program.
- 02Point-to-point communicationSending and receiving messages, the message envelope, the four send modes, deadlocks, non-blocking communication and measuring latency and bandwidth.
- 03Collective communicationBroadcast, reduce, scatter, gather and their all-to-all variants: the operations that involve every process in a communicator, with a parallel pi and a vector normalisation.
- 04Derived datatypesDescribe non-contiguous data such as matrix columns and C structs to MPI, so it can be sent without copying it into a buffer first.
- 05Communicators and virtual topologiesCreate sub-communicators with MPI_Comm_split, and describe a process grid with Cartesian topologies so MPI finds your neighbours.
- 06One-sided communicationRemote memory access with windows, MPI_Put, MPI_Get and MPI_Accumulate, and the synchronisation rules that make them correct.
- 07Parallel I/O with MPI-IOWrite and read one shared file from many processes: file handles, offsets, file views, and why collective I/O matters on parallel file systems.