Introduction to “Running jobs on HPC systems”¶
- Welcome page and syllabus: https://uppmax.github.io/NAISS_Slurm/index.html
- Link also in the House symbol at the top of the page.
Learning outcomes
- Cluster architecture
- Login/compute nodes
- Cores, nodes, GPUs
- Memory
- Node local storage
- Global storage system
- Concepts of a job scheduler
- why it is needed
- basic priniples how it works
- sbatch with options for CPU job scripts
- sample job scripts
- Basic jobs
- I/O intensive jobs
- OpenMP and MPI jobs
- Job arrays
- Simple example for task farming
- increasing the memory per task / memory hungry jobs
- running on GPUs
- job monitoring, job efficiency
- how to find optimal sbatch options
Login info, project number, project directory¶
Project number and project directory¶
Warning
This part is only relevant for people attending the course. It should be ignored if you are doing it as self-study later.
Tetralith at NSC
- For the course on 25th November a reservation has to be used after login, run the following command after login:
hpc_usereservation slurm-training - Project ID:
naiss2025-22-934 - Project storage:
/proj/courses-fall-2025/users
Dardel at PDC
- Project ID:
naiss2025-22-934 - Project storage:
/cfs/klemming/projects/supr/courses-fall-2025
Alvis at C3SE
- Project ID:
naiss2025-22-934 - Project storage:
/mimer/NOBACKUP/groups/courses-fall-2025
Kebnekaise at HPC2N
- Project ID:
hpc2n2025-151 - Project storage:
/proj/nobackup/fall-courses
Cosmos at LUNARC
- Project ID:
Pelle at UPPMAX
- Project ID:
- Project storage:
Hint
If you are at a centre that does not have a course project and/or you do not know what your project id is, you can use the command projinfo which works at all centres.
You can also find the project id in SUPR, if you are a member of a project. See the page for Active Projects You Belong To.
Login info¶
- You will not need a graphical user interface for this course.
- Even so, if you do not have a preferred SSH client, we recomment using ThinLinc
Connection info
- Login to the system you are using (Tetralith/Dardel, other Swedish HPC system)
- Connection info for some Swedish HPC systems - use the one you have access to:
- SSH:
ssh <user>@tetralith.nsc.liu.se - ThinLinc:
- Server:
tetralith.nsc.liu.se - Username:
<your-nsc-username> - Password:
<your-nsc-password>
- Server:
- Note that you need to setup TFA to use NSC!
- SSH:
ssh <user>@dardel.pdc.kth.se - ThinLinc:
- Server:
dardel-vnc.pdc.kth.se - Username:
<your-pdc-username> - Password:
<your-pdc-password>
- Server:
- Note that you need to setup SSH keys or kerberos in order to login to PDC!
- SSH:
ssh <user>@alvis1.c3se.chalmers.seorssh <user>@alvis2.c3se.chalmers.se - Remote Desktop Protocol (RDP):
- Server:
alvis1.c3se.chalmers.seoralvis2.c3se.chalmers.se - Username:
<your-c3se-username> - Password:
<your-c3se-username>
- Server:
- OpenOndemand portal:
- Put
https://alvis.c3se.chalmers.sein browser address bar - Put
<your-c3se-username>and<your-c3se-password>in the login box
- Put
- Note that Alvis is accessible via SUNET networks (i.e. most Swedish university networks). If you are not on one of those networks you need to use a VPN - preferrably your own Swedish university VPN. If this is not possible, contact
support@chalmers.seand ask to be added to the Chalmers’s eduVPN.
- SSH:
ssh <user>@kebnekaise.hpc2n.umu.se - ThinLinc:
- Server:
kebnekaise-tl.hpc2n.umu.se - Username:
<your-hpc2n-username> - Password:
<yout-hpc2n-password>
- Server:
- ThinLinc Webaccess:
- Put
https://kebnekaise-tl.hpc2n.umu.se:300/in browser address bar - Put
<your-hpc2n-username>and<your-hpc2n-password>in th e login box that opens and clickLogin
- Put
- Open OnDemand:
https://portal.hpc2n.umu.se
- SSH:
ssh <user>@pelle.uppmax.uu.se - ThinLinc:
- Server:
pelle-gui.uppmax.uu.se - Username:
<your-uppmax-username> - Password:
<your-uppmax-password>
- Server:
- Note that you have to setup TFA for Uppmax.
- SSH:
ssh <user>@cosmos.lunarc.lu.se - ThinLinc:
- Server:
cosmos-dt.lunarc.lu.se - Username:
<your-lunarc-username> - Password:
<your-lunarc-password>
- Server:
- Note that you need to setup TFA (PocketPass) to use LUNARC’s systems!
Schedule¶
| Time | Topic | Activity | Teacher |
|---|---|---|---|
| 9:00 - 9:05 | Intro to course | Lecture | RP |
| 9:05 - 9.25 | Intro to clusters | Lecture | RP |
| 9:25 - 9:40 | Batch system concepts / job scheduling | Lecture | JH |
| 9:40 - 10:20 | Intro to Slurm (sbatch, squeue, scontrol, …) | Lecture+type along | BB |
| 10:20 - 10:35 | BREAK | ||
| 10:35 - 11:45 | Additional sample scripts, including job arrays, task farms??? | JH, BB | |
| - | Job monitoring and efficiency | Self-reading material | |
| 11:45 - 12:00 | Summary |
Prepare the exercise environment¶
It is now time to login and download the exercises.
- Login to your cluster. You find login info for several Swedish HPC clusters here.
- Create a directory to work in:
mkdir cluster-intro - Fetch the exercises tarball:
wget https://github.com/UPPMAX/NAISS_Slurm/raw/refs/heads/main/exercises.tar.gz - Unpack the tarball:
tar zxvf exercises.tar.gz - You will get a directory
exercises. Go into it:cd exercises - You will find some sub directories for most of the Swedish HPC centres.
- Change to the directory of your cluster. If it is not listed, pick “other”.
- There should be various batch script examples (and some .py, .f90 and .c files for the test scripts).