PDC Summer School 2022: General Instructions for the MPI Labs
Where to run
The exercises will be run on PDC's supercomputer Dardel:
dardel.pdc.kth.se
How to login
To access PDC's systems you need an account at PDC. Check the instructions for obtaining an account.
Once you have an account, you can follow the Quick Start for Dardel instructions for how to log in.
More about the environment on Dardel
Software, which is not available by default, needs to be loaded as a module at login. Use ml avail
to get a list of available modules. Many software modules become available after loading the latest PDC module using ml PDC
.
To setup the development environment see: Compilers and Libraries on Dardel.
The home directories on Dardel are provided through a Lustre service. See the page Data Management for more information.
To use the Dardel compute nodes you have to use the resource manager as described here: How to Run jobs.
Compiling MPI programs on Dardel
The following shell commands show a simple example on how to compile an MPI program using the GNU compilers:
ml PDC/21.11
ml PrgEnv-gnu
cc my_prog.c
CC my_prog.cpp
ftn my_prog.f90
Running MPI programs
First it is necessary to book a node for interactive use:
salloc -p shared --nodes=1 --ntasks=16 -t 0:30:00 -A edu22.summer --reservation=<name-of-reservation>
You might also need to specify a reservation by adding the flag --reservation=<name-of-reservation>
.
For the 2022 PDC Summer School the reservation name is summer-<date>
, where date
is to be provided in the format YYYY-MM-DD
, e.g. summer-2022-08-16
.
Then the mpirun command is used to launch an MPI application:
srun -n 16 ./example.x
In this example we will start 16 MPI tasks.
MPI Exercises
- MPI Lab 1: Program Structure and Point-to-Point Communication in MPI
- MPI Lab 2: MPI I/O and MPI performance