Online MPI
ARCHER, the UK's national supercomputing service offers training in software development and high-performance computing to scientists and researchers across the UK.
ARCHER courses are offered free of charge to all academics.
Message-Passing Programming with MPI
The world's largest supercomputers are used almost exclusively to run applications which are parallelised using Message Passing. This course covers all the basic knowledge required to write parallel programs using this programming model, and is directly applicable to almost every parallel computer architecture.
Parallel programming by definition involves co-operation between processors to solve a common problem. The programmer has to define the tasks that will be executed by the processors, and also how these tasks are to synchronise and exchange data with one another. In the message-passing model the tasks are separate processes that communicate and synchronise by explicitly sending each other messages. All these parallel operations are performed via calls to some message-passing interface that is entirely responsible for interfacing with the physical communication network linking the actual processors together. This course uses the de facto standard for message passing, the Message Passing Interface (MPI). It covers point-to-point communication, non-blocking operations, derived datatypes, virtual topologies, collective communication and general design issues.
Trainer
Oliver Brown
Oliver is an Applications Developer at EPCC, and is involved in
several technical training courses, including Message-Passing
Programming and Software Development.
Format
This online course will run over four sessions on Wednesday afternoons, starting on Wed 20th February, then 27th Febrary, 6th March, with the last session on Wed 20th March (skipping the week 13th March).
We will be using Blackboard Collaborate for the course, which is very simple to use and entirely browser-based.
Collaborate usually works without problems with modern browsers, but Chrome is recommended. Links will appear below each session, further down this page.
Attendees will register for the course in the usual way at www.archer.ac.uk/training/.
Computing requirements
All attendees will need their own desktop or laptop, and you may find it most convenient if you can compile and run MPI programs on your own machine or log on to a local system with which you are already familiar.
If you are logging on to an external system then you will need to have an ssh client installed which comes as default for Linux and Mac systems.
Linux users should open a command-line terminal and use ssh from the command line.
Mac can open the Mac termimal application and use ssh from the command line. However, to display graphics from Cirrus you will also need to install Xquartz. Xquartz provides its own terminal called "Xterm": if you have problems displaying graphics when using the Mac terminal, try logging in using ssh from within this Xterm.
Windows users should install MobaXterm which provides ssh access, a Unix graphics client and a drag-and-drop file browser.
We will provide accounts on one of our systems, Cirrus, for all attendees who register in advance at www.archer.ac.uk/training/.
Installing MPI locally
Note that all registered users will be given access to Cirrus systems. Although having MPI installed on your laptop will be convenient, do not worry if these instructions do not work for you.
Linux
You should install the GNU compilers and a couple of MPI packages, e.g. for Ubuntu:
user@ubuntu$ sudo apt-get install gcc user@ubuntu$ sudo apt-get install openmpi-bin user@ubuntu$ sudo apt-get install libopenmpi-dev
Mac
Mac users need to install compilers form the Xcode developer package. It is easiest to install MPI using the Homebrew package manager. Here are Instructions on how to install Xcode and Homebrew
Now install OpenMPI:
user@mac$ brew install open-mpi
Windows
Microsoft do supply a version of MPI for Windows.
However, we recommend that Windows users access the Cirrus system using MobaXterm (see above).
Course Chat page
Chat pageThe Chat page is a live collaborative online document which we will use to share links, information and comments. All course participants are encouraged to contribute.
Timetable
Week 1 (Wed 20th Feb)
Unless otherwise indicated all material is Copyright © EPCC, The University of Edinburgh, and is only made available for private study.
Here is the Exercise Sheet for this course. Note that it may contain examples that are not covered in this online version of the MPI course - see below the timetable for complete copies of all the material.
Here is the tar file MPP-Templates.tar that has some useful code examples and Makefiles.
Although it is always best to try and write your own answers to the exercises, here is a tar file containing simple solutions.
- 14:00 Welcome and overview
- 14:10 Short online survey of participants: Log in anonymously to the Socrative quiz pages by entering "HPCQUIZ" as the "Room Name".
- 14:15 Message-Passing Concepts
- 15:00 Break
- Here are simple test programs in C, C++ and Fortran.
- 15:30 MPI Programs
- 16:15 Practical: Compiling and running an MPI program
- 16:30 Close
Week 1 Video
Week 2 (Wed 27th Feb)
Unless otherwise indicated all material is Copyright © EPCC, The University of Edinburgh, and is only made available for private study.
- 14:00 Point-to-point communication
- 14:45 Practical: Calculating Pi
- 15:00 Break
- 15:30 Communicators, tags and modes
- 16:30 Close
Week 2 Video
Week 3 (Wed 6th Mar)
Unless otherwise indicated all material is Copyright © EPCC, The University of Edinburgh, and is only made available for private study.
- 14:00 MPI Quiz: Log in anonymously to socrative by entering "HPCQUIZ" as the "Room Name".
or you can use the Socrative Student app on Android or iOS devices. - 14:45 Pi solution
- 15:00 Break
- 15:30 Pi solution (continued)
- 15:45 Non-blocking communication
- 16:15 Practical: Message round a ring
- 16:30 Close
Week 3 Video
Week 4 (Wed 20th Mar)
Unless otherwise indicated all material is Copyright © EPCC, The University of Edinburgh, and is only made available for private study.
- 14:00 Ring solution
- 14:30 Collective communication
- 15:00 Break
- 15:30 Collective communication (continued)
- 15:45 Practical: Collective communication
- 16:00 General Q&A
- 16:30 Close
Week 4 Video
Material
Unless otherwise indicated all material is Copyright © EPCC, The University of Edinburgh, and is only made available for private study.
All the slides etc. are linked in from the timetable above.
The material comes from the standard ARCHER MPI course, although this online version is slightly shorter. Slides etc. from the most recent full run are available at http://www.archer.ac.uk/training/course-material/2017/09/mpi-york/. Videos from a run in 2014 are available at https://www.youtube.com/playlist?list=PL1b57Q937PoslcIozHf7UMIkfMHQQLVQe
Support
Although it will be possible for attendees to follow the course sitting in their office, we want to explore ways to help them by providing a network of support from ARCHER Champions.
We are therefore looking for volunteers to give additional support during the practical sessions. This could take any of the following forms:
- arranging a room at your home institution where people can attend as a group and therefore get peer support for the exercises;
- hands-on support to attendees in the room, e.g. with logging on and running jobs, or providing MPI expertise if possible;
- being available for the days between the sessions to answer questions, either face-to-face or online.
A room with a large TV and a laptop with wifi access should be sufficient to host the course.
There will be MPI experts from EPCC available online throughout the course, but we were hoping to enable as many issues as possible to be dealt with locally.
Getting involved
If you are interested in supporting the course then please email [email protected] and I will add you to our mailing list.
Questions?
If you have any questions please contact the ARCHER Helpdesk.