introduction to hpc

18
Introduction to HPC Instructors: Goar Sanchez 1

Upload: others

Post on 14-Apr-2022

6 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Introduction to HPC

Introduction to HPCInstructors: Goar Sanchez

1

Page 2: Introduction to HPC

Roadmap today

Intro01

Modules02

Slurm03

Exercises04

Page 3: Introduction to HPC

Roadmap today

Intro01

Modules02

Slurm03

Exercises04

Page 4: Introduction to HPC

Kay: Login & Compute Nodes

Computing nodes

kay.ichec.ie

4

Login nodes

Page 5: Introduction to HPC

Roadmap today

Intro01

Modules02

Slurm03

Exercises04

Page 6: Introduction to HPC

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

Page 7: Introduction to HPC

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

Page 8: Introduction to HPC

Roadmap today

Intro01

Modules02

Slurm03

Exercises04

Page 9: Introduction to HPC

Slurm Manager

9

GpuQ PhiQDevQ ProdQ ShmemQ

Queues

Page 10: Introduction to HPC

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

Page 11: Introduction to HPC

Workflow

11

Workflow1

2

34

Page 12: Introduction to HPC

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

Page 13: Introduction to HPC

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

Page 14: Introduction to HPC

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

Page 15: Introduction to HPC

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

Page 16: Introduction to HPC

Roadmap today

Intro01

Modules02

Slurm03

Exercises04

Page 17: Introduction to HPC

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

Page 18: Introduction to HPC

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