introduction to hpc
TRANSCRIPT
Introduction to HPCInstructors: Goar Sanchez
1
Roadmap today
Intro01
Modules02
Slurm03
Exercises04
Roadmap today
Intro01
Modules02
Slurm03
Exercises04
Kay: Login & Compute Nodes
Computing nodes
kay.ichec.ie
4
Login nodes
Roadmap today
Intro01
Modules02
Slurm03
Exercises04
6
▪ Modules allow access to certain software, compilers, etc. in Kay▪ Prevent mismatch or interference with other libraries▪ Allow using different versions of a program/compiler/etc.▪ Access to python and conda environments
Modules
Module load
7
Syntax: module [command] arguments▪ module: shows all options▪ module av/avail: shows modules available in the system▪ module load name: loads name▪ module unload name : unloads name▪ module list: lists all modules currently loaded▪ module purge: unload all modules
Let’s do it live…
Modules
Roadmap today
Intro01
Modules02
Slurm03
Exercises04
Slurm Manager
9
GpuQ PhiQDevQ ProdQ ShmemQ
Queues
Workflow
10
Workflow
submission.job
input files
Slurm file
output.log
slurm.log Slurm output
Software Output
Slurm sends to the software
Software does the operation,back to SlurmSlurm sends back to the user
1User submit job
2
34
Workflow
11
Workflow1
2
34
Slurm Submission file
12
Slurm file
Slurm file#!/bin/bash
#Slurm flags#SBATCH --partition=CourseDevQ#SBATCH --reservation=SOHPCCourse#SBATCH --nodes=1#SBATCH --time=00:30:00#SBATCH --job-name=test#SBATCH --account=course #SBATCH --output=slurm.log#SBATCH [email protected]#SBATCH --mail-type=BEGIN,END
cd $SLURM_SUBMIT_DIR
#Load module
module load XXXXX
#do something
test.job
Slurm Submission file
13
Slurm file
Slurm file#!/bin/bash
#Slurm flags#SBATCH --partition=CourseDevQ#SBATCH --reservation=SOHPCCourse#SBATCH --nodes=1#SBATCH --time=00:30:00#SBATCH --job-name=myjob#SBATCH --account=course#SBATCH --output=slurm.log#SBATCH [email protected]#SBATCH --mail-type=BEGIN,END
cd $SLURM_SUBMIT_DIR
#Load compiler’s module
module load gcc/8.3.1
#compile the programg++ -o helloworld.o hello_world.cpp
test.job
Submit a job
14
Submission
Slurm file
test.jobtype: sbatch test.job
Hints: • You need 1 slurm file per job• You need all the necessary input files
Slurm Manager
15
Control
Slurm file
Description Command
Queue Status sinfo
Submit Job sbatch job.sh
Check Job Status squeue -u $USER
Cancel Job scancel 123213
Check Project Account Balance mybalance
Roadmap today
Intro01
Modules02
Slurm03
Exercises04
Exercises
17
• Load modules• Load any module• Load an intel module• Load another intel module. What
happens?• List all modules loaded
• Unload modules• Load any module• Unload the same module• Load several modules and unload
them one by one• Load several modules and purge
them
• Additional exercise• Load a compiler• Compile a hello_world program
(choose your preferred language)
• Fill the gaps• Go to the folder ~/slurm/exercises • Fill the gaps in the submission scripts
• Find the error• Go to the folder ~/slurm/errors• Read the script• Find the error• If not, try to run the script and see.
• Compilers• Go to the folder ~/slurm/compilers• Read the script• Load the proper compiler and compile
Getting Help
18
Frequently Asked Questionshttps://www.ichec.ie/academic/national-hpc/FAQ
Documentationhttps://www.ichec.ie/academic/national-hpc/documentation
Helpdeskhttps://www.ichec.ie/academic/national-hpc/user-support