Skip to content
Snippets Groups Projects
Commit 70c1e0a4 authored by Dirk Pleiter's avatar Dirk Pleiter
Browse files

First update for 2022 school

parent 7829993a
Branches
No related tags found
No related merge requests found
# PDC Summer School 2021: General Instructions for the MPI Labs # PDC Summer School 2022: General Instructions for the MPI Labs
## Where to run ## Where to run
The exercises will be run on PDC's cluster [Tegner](https://www.pdc.kth.se/hpc-services/computing-systems/tegner-1.737437): The exercises will be run on PDC's supercomputer [Dardel](https://www.pdc.kth.se/hpc-services/computing-systems/dardel-1.1043529):
``` ```
tegner.pdc.kth.se dardel.pdc.kth.se
``` ```
## How to login ## How to login
To access PDC's systems you need an account at PDC. Check the [instructions for obtaining an account](https://www.pdc.kth.se/support/documents/getting_access/get_access.html#apply-via-pdc-webpage). To access PDC's systems you need an account at PDC. Check the [instructions for obtaining an account](https://www.pdc.kth.se/support/documents/getting_access/get_access.html#apply-via-pdc-webpage).
Once you have an account, you can follow the [instructions on how to connect from various operating systems](https://www.pdc.kth.se/support/documents/login/login.html). Once you have an account, you can follow the Quick Start for Dardel instructions for [how to log in](https://www.pdc.kth.se/support/documents/basics/quickstartdardel.html#how-to-log-in).
Related to the Kerberos-based authentication environment, please check the [Kerberos commands documentation](https://www.pdc.kth.se/support/documents/login/login.html#general-information-about-kerberos) ## More about the environment on Dardel
## More about the environment on Tegner Software, which is not available by default, needs to be loaded as a [module](https://www.pdc.kth.se/support/documents/basics/quickstartdardel.html#the-lmod-module-system) 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``.
Software, which is not available by default, needs to be loaded as a [module](https://www.pdc.kth.se/support/documents/run_jobs/job_scheduling.html#accessing-software) at login. Use ``module avail`` to get a list of available modules. The following modules are of interest for this lab exercises: To setup the development environment see: [Compilers and Libraries on Dardel](https://www.pdc.kth.se/support/documents/software_development/development_dardel.html).
- Different versions of OpenMPI based on different versions of the GNU compiler suite (``openmpi/*``) The home directories on Dardel are provided through a Lustre service. See the page [Data Management](https://www.pdc.kth.se/support/documents/data_management/data_management.html) for more information.
For more information see the [software development documentation page](https://www.pdc.kth.se/support/documents/software_development/development.html). To use the Dardel compute nodes you have to use the resource manager as described here: [How to Run jobs](https://www.pdc.kth.se/support/documents/run_jobs/job_scheduling.html).
Home directories are provided through an OpenAFS services. See the [AFS data management page](https://www.pdc.kth.se/support/documents/data_management/afs.html) for more information. ## Compiling MPI programs on Dardel
To use the Tegner compute nodes you have to submit [SLURM batch jobs](https://www.pdc.kth.se/support/documents/run_jobs/queueing_jobs.html) or run [SLURM interactive jobs](https://www.pdc.kth.se/support/documents/run_jobs/run_interactively.html). The following shell commands show a simple example on how to compile an MPI program using the GNU compilers:
## Compiling MPI programs on Tegner
The following shell commands show a simple example on how to compile an MPI program using Fortran, C or C++:
``` ```
module load gcc/8.2.0 ml PDC
module load openmpi/4.0-gcc-8.2 ml cpe/21.11
mpif90 my_prog.f90 ml PrgEnv-gnu
mpicc my_prog.c cc my_prog.c
mpicxx my_prog.cc CC my_prog.cpp
ftn my_prog.f90
``` ```
## Running MPI programs ## Running MPI programs
...@@ -46,18 +42,19 @@ mpicxx my_prog.cc ...@@ -46,18 +42,19 @@ mpicxx my_prog.cc
First it is necessary to book a node for interactive use: First it is necessary to book a node for interactive use:
``` ```
salloc -A <allocation-name> -N 1 -t 1:0:0 salloc -A <allocation-name> -p main -N 1 -t 1:0:0
``` ```
You might also need to specify a reservation by adding the flag `--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: Then the mpirun command is used to launch an MPI application:
``` ```
mpirun -n 24 ./example.x mpirun -n 128 ./example.x
``` ```
In this example we will start 24 MPI tasks (there are 24 cores per node on the Tegner Thin nodes). In this example we will start 128 MPI tasks (there are 128 cores per node on all Dardel compute nodes).
## MPI Exercises ## MPI Exercises
......
# PDC Summer School 2021: MPI Lab 1 # PDC Summer School 2022: MPI Lab 1
## Introduction ## Introduction
......
# PDC Summer School 2021: MPI Lab 2 # PDC Summer School 2022: MPI Lab 2
## Introduction ## Introduction
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment