404
+ +Page not found
+ + +diff --git a/.nojekyll b/.nojekyll new file mode 100644 index 00000000..e69de29b diff --git a/404.html b/404.html new file mode 100644 index 00000000..8f371dcf --- /dev/null +++ b/404.html @@ -0,0 +1,148 @@ + + +
+ + + + +Page not found
+ + +\begin{block}{} + \justify +\begin{small} +Figuring out how to link +\end{small} + \end{block}
+\begin{block}{} + \begin{itemize} + \item Intel and Intel MKL linking: \ +\begin{tiny} +\texttt{https://software.intel.com/en-us/articles/intel-mkl-link-line-advisor} +\end{tiny} + \item GCC, etc. \textbf{Use buildenv} + \begin{itemize} + \item After loading a compiler toolchain, load \texttt{‘buildenv’} and use \texttt{‘ml show buildenv’} to get useful linking info + \item Example, foss (add relevant version): \ +\vspace{2mm} + \texttt{ml foss/version} \ + \texttt{ml buildenv} \ + \texttt{ml show buildenv} +\vspace{2mm} +\item Using the environment variable (prefaced with $) for linking is highly recommended! + \item You have to load the buildenv module in order to use the environment variable for linking! + \end{itemize} + \end{itemize} + \end{block} +}
+\frame{\frametitle{The Batch System (SLURM)}
+\begin{block}{} + \begin{itemize} + \item Large/long/parallel jobs \textbf{must} be run through the batch system + \item SLURM is an Open Source job scheduler, which provides three key functions + \begin{itemize} + \item Keeps track of available system resources + \item Enforces local system resource usage and job scheduling policies + \item Manages a job queue, distributing work across resources according to policies + \end{itemize} + \item In order to run a batch job, you need to create and submit a +SLURM submit file (also called a batch submit file, a batch +script, or a job script). +\item Guides and documentation at: http://www.hpc2n.umu.se/support + \end{itemize} + \end{block} +}
+\frame{\frametitle{The Batch System}\framesubtitle{Accounting, Compute nodes, Kebnekaise}
+\begin{block}{} + \begin{small} + Here the Skylake nodes are used as an example. The only difference for the Broadwell nodes is that it would say 128G instead of 192G per node. + \end{small} + \end{block}
+\begin{block}{} +\begin{center} +\includegraphics[width=9cm]{figures/Allocation-Kebnekaise-thin_skylake.png} +\end{center} + \end{block} +}
+\frame{\frametitle{The Batch System}\framesubtitle{Accounting, largemem nodes, Kebnekaise}
+\begin{block}{} +\begin{center} +\includegraphics[width=10cm]{figures/Allocation-Kebnekaise-largemem_v3.png} +\end{center} + \end{block} +}
+\frame{\frametitle{The Batch System}\framesubtitle{Accounting, K80 GPU nodes, Kebnekaise.}
+\begin{block}{}
+\begin{footnotesize}
+ The K80 GPU cards have 2 onboard compute engines (GK210 chips). Most GPU nodes have 2 K80s, placed together as 14 cores + 1 K80/socket. 4 GPU nodes have 4 K80 GPU cards.
+\end{footnotesize}
+
\end{block}
+\begin{block}{} +\begin{center} +\includegraphics[width=5.8cm]{figures/K80-GPUs.png} +\end{center} + \end{block} +}
+\frame{\frametitle{The Batch System}\framesubtitle{Accounting, V100 GPU nodes, Kebnekaise.}
+\begin{block}{}
+\begin{scriptsize}
+ Each V100 GPU accelerator card has 1 onboard compute engine (GV100 chip). They are placed together as 14 cores + 1 V100 on a socket (28 cores, 2 V100s per node).
+\end{scriptsize}
+
\end{block}
+\begin{block}{} +\begin{center} +\includegraphics[width=6.8cm]{figures/V100-allocation-new.png} +\end{center} + \end{block} +}
+\frame{\frametitle{The Batch System}\framesubtitle{Accounting, A100 GPU nodes, Kebnekaise.}
+\begin{block}{}
+\begin{scriptsize}
+ Each A100 GPU accelerator card has 1 onboard compute engine. The AMD Zen3 nodes have 2 CPUs sockets with 24 cores each, for a total of 48 cores, and 2 NVidia A100 GPUs. They are placed together as 24 cores + 1 A100 on a socket.
+\end{scriptsize}
+
\end{block}
+\begin{block}{} +\begin{center} +\includegraphics[width=6.8cm]{figures/A100-allocation.png} +\end{center} + \end{block} +}
+\frame{\frametitle{The Batch System (SLURM)}\framesubtitle{Useful Commands}
+\begin{block}{}
+ \begin{itemize}
+ \begin{footnotesize}
+ \item Submit job: \texttt{sbatch \(<\)jobscript\(>\)}
+ \item Get list of your jobs: \texttt{squeue -u \(<\)username\(>\)}
+ \item \texttt{srun \(<\)commands for your job/program\(>\)}
+ \item Check on a specific job: \texttt{scontrol show job \(<\)job id\(>\)}
+ \item Delete a specific job: \texttt{scancel \(<\)job id\(>\)}
+ \item Delete all your own jobs: \texttt{scancel -u \(<\)user\(>\)}
+ \item More detailed info about jobs: \
+ \end{footnotesize}
+ \begin{scriptsize}
+ \texttt{sacct -l -j \(<\)jobid\(>\) -o jobname,NTasks,nodelist,MaxRSS,MaxVMSize…}
+ \end{scriptsize}
+ \begin{itemize}
+ \begin{footnotesize}
+ \item More flags can be found with \texttt{man sacct}
+ \item The output will be \textbf{very} wide. To view, use \
+ \texttt{sacct -l -j ....... | less -S} \
+ (makes it sideways scrollable, using the left/right arrow key)
+ \end{footnotesize}
+ \end{itemize}
+ \begin{footnotesize}
+ \item Web url with graphical info about a job: \texttt{job-usage \(<\)job-id\(>\)}
+ \end{footnotesize}
+ \end{itemize}
+ Use \texttt{man sbatch, man srun, man ....} for more information
+ \end{block}
+}
\frame{\frametitle{The Batch System (SLURM)}\framesubtitle{Job Output}
+\begin{block}{} + \begin{itemize} + \item Output and errors in: \ +\texttt{slurm-\(<\)job id\(>\).out} + \item Look at it with vi, nano, emacs, cat, less… + \item To get output and error files split up, you can give these flags in the submit script: \ +\texttt{#SBATCH –error=job.\%J.err} \ +\texttt{#SBATCH –output=job.\%J.out} + \end{itemize} + \end{block} +}
+\frame{\frametitle{The Batch System (SLURM)}\framesubtitle{Using different parts of Kebnekaise}
+\begin{block}{} + \begin{scriptsize} + \begin{itemize} + \item Use the ‘fat’ nodes by adding this flag to your script: \ + \texttt{#SBATCH -p largemem} (separate resource) \ + \item Specifying Intel Broadwell, Intel Skylake, or AMD Zen3 CPUs: \ + \texttt{#SBATCH –constraint=broadwell} \ + or \ + \texttt{#SBATCH –constraint=skylake} \ + or \ + \texttt{#SBATCH –constraint=zen3} \ + \item Using the GPU nodes (separate resource): \ + \texttt{#SBATCH –gres=gpu:\(<\)type-of-card\(>\):x} where \(<\)type-of-card\(>\) is either k80, v100, or a100 and x = 1, 2, or 4 (4 only for K80). \ + \begin{itemize} + \begin{scriptsize} + \item In the case of the A100 GPU nodes, you also need to add a partition \ + \texttt{#SBATCH -p amd_gpu} + \end{scriptsize} + \end{itemize} + \item Use the AMD login node for correct modules and compilers for AMD Zen3 and A100 nodes: \ \texttt{kebnekaise-amd-tl.hpc2n.umu.se} or \\texttt{kebnekaise-amd.hpc2n.umu.se} + \end{itemize} + More on https://www.hpc2n.umu.se/documentation/guides/using_kebnekaise + \end{scriptsize} + \end{block} + }
+\frame{\frametitle{The Batch System (SLURM)}\framesubtitle{Simple example, serial}
+\begin{block}{} + \justify +\begin{footnotesize} +Example: Serial job on Kebnekaise, compiler toolchain ‘foss’ +\end{footnotesize} + \end{block}
+\begin{block}{} +\begin{footnotesize} +\texttt{#!/bin/bash} \ +\texttt{# Project id - change to your own after the course!} \ +\texttt{#SBATCH -A hpc2n2023-132} \ +\texttt{# Asking for 1 core} \ +\texttt{#SBATCH -n 1} \ +\texttt{# Asking for a walltime of 5 min} \ +\texttt{#SBATCH –time=00:05:00} \ +\vspace{3mm} +\texttt{# Purge modules before loading new ones in a script. } \ +\texttt{ml purge > /dev/null 2>\&1} \ +\texttt{ml foss/2021b} \ +\vspace{3mm} +\texttt{./my_serial_program} +\end{footnotesize} + \end{block}
+\begin{block}{} + \justify +\begin{footnotesize} +Submit with: \ +\texttt{sbatch \(<\)jobscript\(>\)} +\end{footnotesize} + \end{block}
+}
+\frame{\frametitle{The Batch System (SLURM)}\framesubtitle{Example, MPI C program}
+\begin{block}{} + \begin{footnotesize} + \texttt{#include \(<\)stdio.h\(>\)} \ +\texttt{#include \(<\)mpi.h\(>\)} \ +\vspace{3mm} +\texttt{int main (int argc, char *argv[]) {} \ +\vspace{3mm} +\texttt{int myrank, size;} \ +\vspace{3mm} +\texttt{MPI_Init(\&argc, \&argv);} \ +\texttt{MPI_Comm_rank(MPI_COMM_WORLD, \&myrank);} \ +\texttt{MPI_Comm_size(MPI_COMM_WORLD, \&size);} \ +\vspace{3mm} +\texttt{printf(“Processor \%d of \%d: Hello World!\textbackslash n”, myrank, size);} \ +\vspace{3mm} +\texttt{MPI_Finalize();} +\vspace{3mm} +\texttt{}} + \end{footnotesize} + \end{block}
+}
+\frame{\frametitle{The Batch System (SLURM)}\framesubtitle{Simple example, parallel}
+\begin{block}{} + \justify + \begin{footnotesize} + Example: MPI job on Kebnekaise, compiler toolchain ‘foss’ + \end{footnotesize} +\end{block}
+\begin{block}{} +\begin{footnotesize} +\texttt{#!/bin/bash} \ +\texttt{#SBATCH -A hpc2n2023-132} \ +\texttt{#SBATCH -n 14} \ +\texttt{#SBATCH –time=00:05:00} \ +\texttt{##SBATCH –exclusive} \ +\texttt{#SBATCH –reservation=intro-gpu} \ +\vspace{3mm} +\texttt{module purge > /dev/null 2>\&1} \ +\texttt{ml foss/2021b} \ +\vspace{3mm} +\texttt{srun ./my_parallel_program} +\end{footnotesize} + \end{block}
+}
+\begin{frame}[fragile]\frametitle{The Batch System (SLURM)}\framesubtitle{Simple example, output}
+\begin{block}{} + \justify +Example: Output from a MPI job on Kebnekaise, run on 14 cores (one NUMA island) + \end{block}
+\begin{block}{} +\begin{tiny} +\begin{verbatim} +b-an01 [~/slurm]$ cat slurm-15952.out
+Processor 12 of 14: Hello World! +Processor 5 of 14: Hello World! +Processor 9 of 14: Hello World! +Processor 4 of 14: Hello World! +Processor 11 of 14: Hello World! +Processor 13 of 14: Hello World! +Processor 0 of 14: Hello World! +Processor 1 of 14: Hello World! +Processor 2 of 14: Hello World! +Processor 3 of 14: Hello World! +Processor 6 of 14: Hello World! +Processor 7 of 14: Hello World! +Processor 8 of 14: Hello World! +Processor 10 of 14: Hello World! +\end{verbatim} +\end{tiny} + \end{block}
+\end{frame}
+\frame{\frametitle{The Batch System (SLURM)}\framesubtitle{Starting more than one serial job in the same submit file}
+\begin{block}{} +\begin{small} +\texttt{#!/bin/bash} \ +\texttt{#SBATCH -A hpc2n2023-132} \ +\texttt{#SBATCH -n 5} \ +\texttt{#SBATCH –time=00:15:00} \ +\vspace{3mm} +\texttt{module purge > /dev/null 2>\&1} \ +\texttt{ml foss/2021b} \ +\vspace{3mm} +\texttt{srun -n 1 ./job1.batch \&} \ +\texttt{srun -n 1 ./job2.batch \&} \ +\texttt{srun -n 1 ./job3.batch \&} \ +\texttt{srun -n 1 ./job4.batch \&} \ +\texttt{srun -n 1 ./job5.batch } \ +\texttt{wait} \ +\end{small} + \end{block}
+}
+\frame{\frametitle{The Batch System (SLURM)}\framesubtitle{Multiple Parallel Jobs Sequentially}
+\begin{block}{} +\begin{scriptsize} +\texttt{#!/bin/bash} \ +\texttt{#SBATCH -A hpc2n2023-132} \ +\texttt{#SBATCH -c 28} \ +\texttt{# Remember to ask for enough time for all jobs to complete} \ +\texttt{#SBATCH –time=02:00:00} \ +\vspace{3mm} +\texttt{module purge > /dev/null 2>\&1} \ +\texttt{ml foss/2021b} \ +\vspace{3mm} +\texttt{# Here 14 tasks with 2 cores per task. Output to file.} \ +\texttt{# Not needed if your job creates output in a file} \ +\texttt{# I also copy the output somewhere else and then run} \ +\texttt{# another executable…} \ +\vspace{3mm} +\texttt{srun -n 14 -c 2 ./a.out > myoutput1 2>\&1} \ +\texttt{cp myoutput1 /pfs/nobackup/home/u/username/mydatadir} \ +\texttt{srun -n 14 -c 2 ./b.out > myoutput2 2>\&1} \ +\texttt{cp myoutput2 /pfs/nobackup/home/u/username/mydatadir} \ +\texttt{srun -n 14 -c 2 ./c.out > myoutput3 2>\&1} \ +\texttt{cp myoutput3 /pfs/nobackup/home/u/username/mydatadir} \ +\end{scriptsize} + \end{block}
+}
+\frame{\frametitle{The Batch System (SLURM)}\framesubtitle{Multiple Parallel Jobs Simultaneously}
+\begin{block}{} +\begin{footnotesize} +\texttt{#!/bin/bash} \ +\texttt{#SBATCH -A hpc2n2023-132} \ +\texttt{# Total number of cores the jobs need} \ +\texttt{#SBATCH -n 56} \ +\texttt{# Remember to ask for enough time for all of the jobs to} \ +\texttt{# complete, even the longest} \ +\texttt{#SBATCH –time=02:00:00} \ +\vspace{3mm} +\texttt{module purge > /dev/null 2>\&1} \ +\texttt{ml foss/2021b} \ +\vspace{3mm} +\texttt{srun -n 14 –cpu_bind=cores ./a.out \&} \ +\texttt{srun -n 28 –cpu_bind=cores ./b.out \&} \ +\texttt{srun -n 14 –cpu_bind=cores ./c.out \&} \ +\texttt{…} \ +\texttt{wait} \ +\end{footnotesize} + \end{block}
+}
+\frame{\frametitle{The Batch System (SLURM)}\framesubtitle{GPU Job - V100}
+\begin{block}{} +\begin{footnotesize} +\texttt{#!/bin/bash} \ +\texttt{#SBATCH -A hpc2n2023-132} \ +\texttt{# Expected time for job to complete} \ +\texttt{#SBATCH –time=00:10:00} \ +\texttt{# Number of GPU cards needed. Here asking for 2 V100 cards} \ +\texttt{#SBATCH –gres=v100:2} \ +\vspace{3mm} +\texttt{module purge > /dev/null 2>\&1} \ +\texttt{# Change to modules needed for your program} \ +\texttt{ml fosscuda/2021b} \ +\vspace{3mm} +\texttt{./my-cuda-program} \ +\end{footnotesize} + \end{block}
+}
+\frame{\frametitle{The Batch System (SLURM)}\framesubtitle{GPU Job - A100}
+\begin{block}{} +\begin{footnotesize} +\texttt{#!/bin/bash} \ +\texttt{#SBATCH -A hpc2n2023-132} \ +\texttt{# Expected time for job to complete} \ +\texttt{#SBATCH –time=00:10:00} \ +\texttt{# Adding the partition for the A100 GPUs} \ +\texttt{#SBATCH -p amd_gpu} \ +\texttt{# Number of GPU cards needed. Here asking for 2 A100 cards} \ +\texttt{#SBATCH –gres=a100:2} \ +\vspace{3mm} +\texttt{module purge > /dev/null 2>\&1} \ +\texttt{# Change to modules needed for your software - remember to login} \ +\texttt{# to kebnekaise-amd.hpc2n.umu.se or} \ +\texttt{# kebnekaise-amd-tl.hpc2n.umu.se login node to see availability} \ +\texttt{ml CUDA/11.7.0} \ +\vspace{3mm} +\texttt{./my-cuda-program} \ +\end{footnotesize} + \end{block}
+}
+\frame{\frametitle{Important information}
+\begin{block}{} + \begin{itemize} + \begin{small} + \item The course project has the following project ID: hpc2n2023-132 + \item In order to use it in a batch job, add this to the batch script: + \begin{itemize} + \begin{small} + \item #SBATCH -A hpc2n2023-132 + \end{small} + \end{itemize} + \item There is a reservation with one A100 GPU node reserved for the course, in order to let us run small GPU examples without having to wait for too long. The reservation also is for one Broadwell CPU node. + \item The reservation is ONLY valid during the course: + \begin{itemize} + \begin{small} + \item intro-gpu \ (add with #SBATCH –reservation=intro-gpu) + \end{small} + \item To use the reservation with the A100 GPU node, also add \texttt{#SBATCH -p amd_gpu} and \texttt{#SBATCH –gres=a100:x (for x=1,2)}. + \end{itemize} + \item We have a storage project linked to the compute project. It is hpc2n2023-132. You find it in /proj/nobackup/hpc2n2023-132. Remember to create your own directory under it. + \end{small} + \end{itemize} + \end{block}
+}
+\frame{\frametitle{Questions and support}
+\begin{block}{} + \textbf{Questions?} Now: Ask me or one of the other support or application experts present.
+\vspace{0.5cm}
+OR
+\vspace{0.5cm}
+
+\begin{itemize}
+\item Documentation: \texttt{https://www.hpc2n.umu.se/support}
+\item Support questions to: \texttt{https://supr.naiss.se/support/} or \texttt{support@hpc2n.umu.se}
+\end{itemize}
+
\end{block}
+}
+\end{document}
+ +Objectives
+There are compilers available for Fortran 77, Fortran 90, Fortran 95, C, and C++. The compilers can produce both general-purpose code and architecture-specific optimized code to improve performance (loop-level optimizations, inter-procedural analysis and cache optimizations).
+Note
+You need to load a compiler suite (and possibly libraries, depending on what you need) before you can compile and link.
+Use ml av
to get a list of available compiler toolchains
as mentioned in the modules - compiler toolchains section.
You load a compiler toolchain the same way you load any other module. They are always available directly, without the need to load prerequisites first.
+Example: Loading foss/2023b
+This compiler toolchain contains: GCC/13.2.0
, BLAS
(with LAPACK
, ScaLAPACK
, and FFTW
.
b-an01 [~]$ ml foss/2023b
+b-an01 [~]$ ml
+
+Currently Loaded Modules:
+ 1) snicenvironment (S) 7) numactl/2.0.16 13) libevent/2.1.12 19) FlexiBLAS/3.3.1
+ 2) systemdefault (S) 8) XZ/5.4.4 14) UCX/1.15.0 20) FFTW/3.3.10
+ 3) GCCcore/13.2.0 9) libxml2/2.11.5 15) PMIx/4.2.6 21) FFTW.MPI/3.3.10
+ 4) zlib/1.2.13 10) libpciaccess/0.17 16) UCC/1.2.0 22) ScaLAPACK/2.2.0-fb
+ 5) binutils/2.40 11) hwloc/2.9.2 17) OpenMPI/4.1.6 23) foss/2023b
+ 6) GCC/13.2.0 12) OpenSSL/1.1 18) OpenBLAS/0.3.24
+
+ Where:
+ S: Module is Sticky, requires --force to unload or purge
+
+
+
+b-an01 [~]$
+
Language | +Compiler name | +MPI | +
---|---|---|
Fortran77 | +gfortran | +mpif77 | +
Fortran90 | +gfortran | +mpif90 | +
Fortran95 | +gfortran | +N/A | +
C | +gcc | +mpicc | +
C++ | +g++ | +mpiCC | +
Example: compiling hello.c
+You can find the file hello.c
in the exercises directory, in the subdirectory “simple”. Or you can download it here: <a href=”
Compiling with Intel +Language Compiler name MPI +Fortran77 ifort mpiifort +Fortran90 ifort mpiifort +Fortran95 ifort N/A +C icc mpiicc +C++ icpc mpiicc
+Using a compiler toolchain by itself is possible but requires a fair bit of manual work, figuring out which paths to add to -I or -L ifor including files and libraries, and similar.
+
To make life as a software builder easier there is a special module available, buildenv, that can be loaded on top of any toolchain. If it is missing for some toolchain, send a mail to support@hpc2n.umu.se and let us know.
+This module defines a large number of environment variables with the relevant settings for the used toolchain. Among other things it sets CC, CXX, F90, FC, MPICC, MPICXX, MPIF90, CFLAGS, FFLAGS, and much more.
+To see all of them, after loading a toolchain do:
+ml show buildenv
+Depending on the software one can use these environment variables to set related makefile variables or cmake defines, or just use them for guidelines on what to use in makefiles etc.
+Exactly how to use them depends on the softwares build system.
+\justify
+
\begin{small} +Figuring out how to link +\end{small} + \end{block}
+\begin{block}{} + \begin{itemize} + \item Intel and Intel MKL linking: \ +\begin{tiny} +\texttt{https://software.intel.com/en-us/articles/intel-mkl-link-line-advisor} +\end{tiny} + \item GCC, etc. \textbf{Use buildenv} + \begin{itemize} + \item After loading a compiler toolchain, load \texttt{‘buildenv’} and use \texttt{‘ml show buildenv’} to get useful linking info + \item Example, foss (add relevant version): \ +\vspace{2mm} + \texttt{ml foss/version} \ + \texttt{ml buildenv} \ + \texttt{ml show buildenv} +\vspace{2mm} +\item Using the environment variable (prefaced with $) for linking is highly recommended! + \item You have to load the buildenv module in order to use the environment variable for linking! + \end{itemize} + \end{itemize} + \end{block} +}
+\frame{\frametitle{The Batch System (SLURM)}
+\begin{block}{} + \begin{itemize} + \item Large/long/parallel jobs \textbf{must} be run through the batch system + \item SLURM is an Open Source job scheduler, which provides three key functions + \begin{itemize} + \item Keeps track of available system resources + \item Enforces local system resource usage and job scheduling policies + \item Manages a job queue, distributing work across resources according to policies + \end{itemize} + \item In order to run a batch job, you need to create and submit a +SLURM submit file (also called a batch submit file, a batch +script, or a job script). +\item Guides and documentation at: http://www.hpc2n.umu.se/support + \end{itemize} + \end{block} +}
+\frame{\frametitle{The Batch System}\framesubtitle{Accounting, Compute nodes, Kebnekaise}
+\begin{block}{} + \begin{small} + Here the Skylake nodes are used as an example. The only difference for the Broadwell nodes is that it would say 128G instead of 192G per node. + \end{small} + \end{block}
+\begin{block}{} +\begin{center} +\includegraphics[width=9cm]{figures/Allocation-Kebnekaise-thin_skylake.png} +\end{center} + \end{block} +}
+\frame{\frametitle{The Batch System}\framesubtitle{Accounting, largemem nodes, Kebnekaise}
+\begin{block}{} +\begin{center} +\includegraphics[width=10cm]{figures/Allocation-Kebnekaise-largemem_v3.png} +\end{center} + \end{block} +}
+\frame{\frametitle{The Batch System}\framesubtitle{Accounting, K80 GPU nodes, Kebnekaise.}
+\begin{block}{}
+\begin{footnotesize}
+ The K80 GPU cards have 2 onboard compute engines (GK210 chips). Most GPU nodes have 2 K80s, placed together as 14 cores + 1 K80/socket. 4 GPU nodes have 4 K80 GPU cards.
+\end{footnotesize}
+
\end{block}
+\begin{block}{} +\begin{center} +\includegraphics[width=5.8cm]{figures/K80-GPUs.png} +\end{center} + \end{block} +}
+\frame{\frametitle{The Batch System}\framesubtitle{Accounting, V100 GPU nodes, Kebnekaise.}
+\begin{block}{}
+\begin{scriptsize}
+ Each V100 GPU accelerator card has 1 onboard compute engine (GV100 chip). They are placed together as 14 cores + 1 V100 on a socket (28 cores, 2 V100s per node).
+\end{scriptsize}
+
\end{block}
+\begin{block}{} +\begin{center} +\includegraphics[width=6.8cm]{figures/V100-allocation-new.png} +\end{center} + \end{block} +}
+\frame{\frametitle{The Batch System}\framesubtitle{Accounting, A100 GPU nodes, Kebnekaise.}
+\begin{block}{}
+\begin{scriptsize}
+ Each A100 GPU accelerator card has 1 onboard compute engine. The AMD Zen3 nodes have 2 CPUs sockets with 24 cores each, for a total of 48 cores, and 2 NVidia A100 GPUs. They are placed together as 24 cores + 1 A100 on a socket.
+\end{scriptsize}
+
\end{block}
+\begin{block}{} +\begin{center} +\includegraphics[width=6.8cm]{figures/A100-allocation.png} +\end{center} + \end{block} +}
+\frame{\frametitle{The Batch System (SLURM)}\framesubtitle{Useful Commands}
+\begin{block}{}
+ \begin{itemize}
+ \begin{footnotesize}
+ \item Submit job: \texttt{sbatch \(<\)jobscript\(>\)}
+ \item Get list of your jobs: \texttt{squeue -u \(<\)username\(>\)}
+ \item \texttt{srun \(<\)commands for your job/program\(>\)}
+ \item Check on a specific job: \texttt{scontrol show job \(<\)job id\(>\)}
+ \item Delete a specific job: \texttt{scancel \(<\)job id\(>\)}
+ \item Delete all your own jobs: \texttt{scancel -u \(<\)user\(>\)}
+ \item More detailed info about jobs: \
+ \end{footnotesize}
+ \begin{scriptsize}
+ \texttt{sacct -l -j \(<\)jobid\(>\) -o jobname,NTasks,nodelist,MaxRSS,MaxVMSize…}
+ \end{scriptsize}
+ \begin{itemize}
+ \begin{footnotesize}
+ \item More flags can be found with \texttt{man sacct}
+ \item The output will be \textbf{very} wide. To view, use \
+ \texttt{sacct -l -j ....... | less -S} \
+ (makes it sideways scrollable, using the left/right arrow key)
+ \end{footnotesize}
+ \end{itemize}
+ \begin{footnotesize}
+ \item Web url with graphical info about a job: \texttt{job-usage \(<\)job-id\(>\)}
+ \end{footnotesize}
+ \end{itemize}
+ Use \texttt{man sbatch, man srun, man ....} for more information
+ \end{block}
+}
\frame{\frametitle{The Batch System (SLURM)}\framesubtitle{Job Output}
+\begin{block}{} + \begin{itemize} + \item Output and errors in: \ +\texttt{slurm-\(<\)job id\(>\).out} + \item Look at it with vi, nano, emacs, cat, less… + \item To get output and error files split up, you can give these flags in the submit script: \ +\texttt{#SBATCH –error=job.\%J.err} \ +\texttt{#SBATCH –output=job.\%J.out} + \end{itemize} + \end{block} +}
+\frame{\frametitle{The Batch System (SLURM)}\framesubtitle{Using different parts of Kebnekaise}
+\begin{block}{} + \begin{scriptsize} + \begin{itemize} + \item Use the ‘fat’ nodes by adding this flag to your script: \ + \texttt{#SBATCH -p largemem} (separate resource) \ + \item Specifying Intel Broadwell, Intel Skylake, or AMD Zen3 CPUs: \ + \texttt{#SBATCH –constraint=broadwell} \ + or \ + \texttt{#SBATCH –constraint=skylake} \ + or \ + \texttt{#SBATCH –constraint=zen3} \ + \item Using the GPU nodes (separate resource): \ + \texttt{#SBATCH –gres=gpu:\(<\)type-of-card\(>\):x} where \(<\)type-of-card\(>\) is either k80, v100, or a100 and x = 1, 2, or 4 (4 only for K80). \ + \begin{itemize} + \begin{scriptsize} + \item In the case of the A100 GPU nodes, you also need to add a partition \ + \texttt{#SBATCH -p amd_gpu} + \end{scriptsize} + \end{itemize} + \item Use the AMD login node for correct modules and compilers for AMD Zen3 and A100 nodes: \ \texttt{kebnekaise-amd-tl.hpc2n.umu.se} or \\texttt{kebnekaise-amd.hpc2n.umu.se} + \end{itemize} + More on https://www.hpc2n.umu.se/documentation/guides/using_kebnekaise + \end{scriptsize} + \end{block} + }
+\frame{\frametitle{The Batch System (SLURM)}\framesubtitle{Simple example, serial}
+\begin{block}{} + \justify +\begin{footnotesize} +Example: Serial job on Kebnekaise, compiler toolchain ‘foss’ +\end{footnotesize} + \end{block}
+\begin{block}{} +\begin{footnotesize} +\texttt{#!/bin/bash} \ +\texttt{# Project id - change to your own after the course!} \ +\texttt{#SBATCH -A hpc2n2023-132} \ +\texttt{# Asking for 1 core} \ +\texttt{#SBATCH -n 1} \ +\texttt{# Asking for a walltime of 5 min} \ +\texttt{#SBATCH –time=00:05:00} \ +\vspace{3mm} +\texttt{# Purge modules before loading new ones in a script. } \ +\texttt{ml purge > /dev/null 2>\&1} \ +\texttt{ml foss/2021b} \ +\vspace{3mm} +\texttt{./my_serial_program} +\end{footnotesize} + \end{block}
+\begin{block}{} + \justify +\begin{footnotesize} +Submit with: \ +\texttt{sbatch \(<\)jobscript\(>\)} +\end{footnotesize} + \end{block}
+}
+\frame{\frametitle{The Batch System (SLURM)}\framesubtitle{Example, MPI C program}
+\begin{block}{} + \begin{footnotesize} + \texttt{#include \(<\)stdio.h\(>\)} \ +\texttt{#include \(<\)mpi.h\(>\)} \ +\vspace{3mm} +\texttt{int main (int argc, char *argv[]) {} \ +\vspace{3mm} +\texttt{int myrank, size;} \ +\vspace{3mm} +\texttt{MPI_Init(\&argc, \&argv);} \ +\texttt{MPI_Comm_rank(MPI_COMM_WORLD, \&myrank);} \ +\texttt{MPI_Comm_size(MPI_COMM_WORLD, \&size);} \ +\vspace{3mm} +\texttt{printf(“Processor \%d of \%d: Hello World!\textbackslash n”, myrank, size);} \ +\vspace{3mm} +\texttt{MPI_Finalize();} +\vspace{3mm} +\texttt{}} + \end{footnotesize} + \end{block}
+}
+\frame{\frametitle{The Batch System (SLURM)}\framesubtitle{Simple example, parallel}
+\begin{block}{} + \justify + \begin{footnotesize} + Example: MPI job on Kebnekaise, compiler toolchain ‘foss’ + \end{footnotesize} +\end{block}
+\begin{block}{} +\begin{footnotesize} +\texttt{#!/bin/bash} \ +\texttt{#SBATCH -A hpc2n2023-132} \ +\texttt{#SBATCH -n 14} \ +\texttt{#SBATCH –time=00:05:00} \ +\texttt{##SBATCH –exclusive} \ +\texttt{#SBATCH –reservation=intro-gpu} \ +\vspace{3mm} +\texttt{module purge > /dev/null 2>\&1} \ +\texttt{ml foss/2021b} \ +\vspace{3mm} +\texttt{srun ./my_parallel_program} +\end{footnotesize} + \end{block}
+}
+\begin{frame}[fragile]\frametitle{The Batch System (SLURM)}\framesubtitle{Simple example, output}
+\begin{block}{} + \justify +Example: Output from a MPI job on Kebnekaise, run on 14 cores (one NUMA island) + \end{block}
+\begin{block}{} +\begin{tiny} +\begin{verbatim} +b-an01 [~/slurm]$ cat slurm-15952.out
+Processor 12 of 14: Hello World! +Processor 5 of 14: Hello World! +Processor 9 of 14: Hello World! +Processor 4 of 14: Hello World! +Processor 11 of 14: Hello World! +Processor 13 of 14: Hello World! +Processor 0 of 14: Hello World! +Processor 1 of 14: Hello World! +Processor 2 of 14: Hello World! +Processor 3 of 14: Hello World! +Processor 6 of 14: Hello World! +Processor 7 of 14: Hello World! +Processor 8 of 14: Hello World! +Processor 10 of 14: Hello World! +\end{verbatim} +\end{tiny} + \end{block}
+\end{frame}
+\frame{\frametitle{The Batch System (SLURM)}\framesubtitle{Starting more than one serial job in the same submit file}
+\begin{block}{} +\begin{small} +\texttt{#!/bin/bash} \ +\texttt{#SBATCH -A hpc2n2023-132} \ +\texttt{#SBATCH -n 5} \ +\texttt{#SBATCH –time=00:15:00} \ +\vspace{3mm} +\texttt{module purge > /dev/null 2>\&1} \ +\texttt{ml foss/2021b} \ +\vspace{3mm} +\texttt{srun -n 1 ./job1.batch \&} \ +\texttt{srun -n 1 ./job2.batch \&} \ +\texttt{srun -n 1 ./job3.batch \&} \ +\texttt{srun -n 1 ./job4.batch \&} \ +\texttt{srun -n 1 ./job5.batch } \ +\texttt{wait} \ +\end{small} + \end{block}
+}
+\frame{\frametitle{The Batch System (SLURM)}\framesubtitle{Multiple Parallel Jobs Sequentially}
+\begin{block}{} +\begin{scriptsize} +\texttt{#!/bin/bash} \ +\texttt{#SBATCH -A hpc2n2023-132} \ +\texttt{#SBATCH -c 28} \ +\texttt{# Remember to ask for enough time for all jobs to complete} \ +\texttt{#SBATCH –time=02:00:00} \ +\vspace{3mm} +\texttt{module purge > /dev/null 2>\&1} \ +\texttt{ml foss/2021b} \ +\vspace{3mm} +\texttt{# Here 14 tasks with 2 cores per task. Output to file.} \ +\texttt{# Not needed if your job creates output in a file} \ +\texttt{# I also copy the output somewhere else and then run} \ +\texttt{# another executable…} \ +\vspace{3mm} +\texttt{srun -n 14 -c 2 ./a.out > myoutput1 2>\&1} \ +\texttt{cp myoutput1 /pfs/nobackup/home/u/username/mydatadir} \ +\texttt{srun -n 14 -c 2 ./b.out > myoutput2 2>\&1} \ +\texttt{cp myoutput2 /pfs/nobackup/home/u/username/mydatadir} \ +\texttt{srun -n 14 -c 2 ./c.out > myoutput3 2>\&1} \ +\texttt{cp myoutput3 /pfs/nobackup/home/u/username/mydatadir} \ +\end{scriptsize} + \end{block}
+}
+\frame{\frametitle{The Batch System (SLURM)}\framesubtitle{Multiple Parallel Jobs Simultaneously}
+\begin{block}{} +\begin{footnotesize} +\texttt{#!/bin/bash} \ +\texttt{#SBATCH -A hpc2n2023-132} \ +\texttt{# Total number of cores the jobs need} \ +\texttt{#SBATCH -n 56} \ +\texttt{# Remember to ask for enough time for all of the jobs to} \ +\texttt{# complete, even the longest} \ +\texttt{#SBATCH –time=02:00:00} \ +\vspace{3mm} +\texttt{module purge > /dev/null 2>\&1} \ +\texttt{ml foss/2021b} \ +\vspace{3mm} +\texttt{srun -n 14 –cpu_bind=cores ./a.out \&} \ +\texttt{srun -n 28 –cpu_bind=cores ./b.out \&} \ +\texttt{srun -n 14 –cpu_bind=cores ./c.out \&} \ +\texttt{…} \ +\texttt{wait} \ +\end{footnotesize} + \end{block}
+}
+\frame{\frametitle{The Batch System (SLURM)}\framesubtitle{GPU Job - V100}
+\begin{block}{} +\begin{footnotesize} +\texttt{#!/bin/bash} \ +\texttt{#SBATCH -A hpc2n2023-132} \ +\texttt{# Expected time for job to complete} \ +\texttt{#SBATCH –time=00:10:00} \ +\texttt{# Number of GPU cards needed. Here asking for 2 V100 cards} \ +\texttt{#SBATCH –gres=v100:2} \ +\vspace{3mm} +\texttt{module purge > /dev/null 2>\&1} \ +\texttt{# Change to modules needed for your program} \ +\texttt{ml fosscuda/2021b} \ +\vspace{3mm} +\texttt{./my-cuda-program} \ +\end{footnotesize} + \end{block}
+}
+\frame{\frametitle{The Batch System (SLURM)}\framesubtitle{GPU Job - A100}
+\begin{block}{} +\begin{footnotesize} +\texttt{#!/bin/bash} \ +\texttt{#SBATCH -A hpc2n2023-132} \ +\texttt{# Expected time for job to complete} \ +\texttt{#SBATCH –time=00:10:00} \ +\texttt{# Adding the partition for the A100 GPUs} \ +\texttt{#SBATCH -p amd_gpu} \ +\texttt{# Number of GPU cards needed. Here asking for 2 A100 cards} \ +\texttt{#SBATCH –gres=a100:2} \ +\vspace{3mm} +\texttt{module purge > /dev/null 2>\&1} \ +\texttt{# Change to modules needed for your software - remember to login} \ +\texttt{# to kebnekaise-amd.hpc2n.umu.se or} \ +\texttt{# kebnekaise-amd-tl.hpc2n.umu.se login node to see availability} \ +\texttt{ml CUDA/11.7.0} \ +\vspace{3mm} +\texttt{./my-cuda-program} \ +\end{footnotesize} + \end{block}
+}
+\frame{\frametitle{Important information}
+\begin{block}{} + \begin{itemize} + \begin{small} + \item The course project has the following project ID: hpc2n2023-132 + \item In order to use it in a batch job, add this to the batch script: + \begin{itemize} + \begin{small} + \item #SBATCH -A hpc2n2023-132 + \end{small} + \end{itemize} + \item There is a reservation with one A100 GPU node reserved for the course, in order to let us run small GPU examples without having to wait for too long. The reservation also is for one Broadwell CPU node. + \item The reservation is ONLY valid during the course: + \begin{itemize} + \begin{small} + \item intro-gpu \ (add with #SBATCH –reservation=intro-gpu) + \end{small} + \item To use the reservation with the A100 GPU node, also add \texttt{#SBATCH -p amd_gpu} and \texttt{#SBATCH –gres=a100:x (for x=1,2)}. + \end{itemize} + \item We have a storage project linked to the compute project. It is hpc2n2023-132. You find it in /proj/nobackup/hpc2n2023-132. Remember to create your own directory under it. + \end{small} + \end{itemize} + \end{block}
+}
+\frame{\frametitle{Questions and support}
+\begin{block}{} + \textbf{Questions?} Now: Ask me or one of the other support or application experts present.
+\vspace{0.5cm}
+OR
+\vspace{0.5cm}
+
+\begin{itemize}
+\item Documentation: \texttt{https://www.hpc2n.umu.se/support}
+\item Support questions to: \texttt{https://supr.naiss.se/support/} or \texttt{support@hpc2n.umu.se}
+\end{itemize}
+
\end{block}
+}
+\end{document}
+ +Objectives
++ | Project storage | +$HOME | +/scratch | +
---|---|---|---|
Recommended for batch jobs |
+Yes | +No (size) | +Yes | +
Backed up | +No | +Yes | +No | +
Accessible by batch system |
+Yes | +Yes | +Yes (node only) | +
Performance | +High | +High | +Medium | +
Default readability | +Group only | +Owner | +Owner | +
Permissions management |
+chmod, chgrp, ACL | +chmod, chgrp, ACL | +N/A for batch jobs | +
Notes | +Storage your group get allocated through the storage projects |
+Your home-directory | +Per node | +
This is your home-directory (pointed to by the $HOME
variable). It has a quota limit of 25GB per default. Your home directory is backed up regularly.
Note
+Since the home directory is quite small, it should not be used for most production jobs. These should instead be run from project storage directories.
+To find the path to your home directory, either run pwd
just after logging in, or do the following:
Project storage is where a project’s members have the majority of their storage. It is applied for through SUPR, as a storage project. While storage projects needs to be applied for separately, they are usually linked to a compute project.
+This is where you should keep your data and run your batch jobs from. It offers high performance when accessed from the nodes making it suitable for storage that are to be accessed from parallel jobs, and your home directory (usually) has too little space.
+Project storage is located below /proj/nobackup/
in the directory name selected during the creation of the proposal.
Note
+The project storage is not intended for permanent storage and there is NO BACKUP of /proj/nobackup
.
/proj/nobackup/NAME-YOU-PICKED
Exercise
+Go to the course project storage and create a subdirectory for yourself.
+Now is a good time to prepare the course material and download the exercises. The easiest way to do so is by cloning the whole intro-course repository from GitHub.
+Exercise
+/proj/nobackup/intro-hpc2n
git clone https://github.com/hpc2n/intro-course.git
You will get a directory called intro-course
. Below it you will find a directory called “exercises” where the majority of the exercises for the batch system section is located.
The size of the storage depends on the allocation. There are small, medium, and large storage projects, each with their own requirements. You can read about this on SUPR. The quota limits are specific for the project as such, there are no user level quotas on that space.
+Our recommendation is that you use the project storage instead of /scratch
when working on Compute nodes or Login nodes.
On the computers at HPC2N there is a directory called /scratch
. It is a small local area split between the users using the node and it can be used for saving (temporary) files you create or need during your computations. Please do not save files in /scratch
you don’t need when not running jobs on the machine, and please make sure your job removes any temporary files it creates.
Note
+When anybody need more space than available on /scratch
, we will remove the oldest/largest files without any notices.
More information about the file system, as well as archiving and compressing files, at the HPC2N documentation about File Systems.
+Keypoints
+/home/u/username
and is pointed to by the environment variable $HOME
./proj/nobackup/NAME-YOU-PICKED
/proj/nobackup/intro-hpc2n
.This material
+Here you will find the content of the workshop “Introduction to Kebnekaise”.
+You can download the markdown files for the presentation as well as the exercises from https://github.com/hpc2n/intro-course
+git clone https://github.com/hpc2n/intro-course.git
in a terminal windowSome useful links:
+Prerequisites
+Content
+Application examples (batch system)
+This course will consist of lectures and type-alongs, as well as a few exercises where you get to try out what you have just learned.
+Instructors
+Time | +Topic | +Activity | +
---|---|---|
11:15 | +Welcome+Syllabus | ++ |
11:25 | +Introduction to Kebnekaise and HPC2N | +Lecture | +
11:45 | +Logging in & editors | +Lecture+exercise | +
11:55 | +The File System | +Lecture+code along | +
12:15 | +LUNCH BREAK | ++ |
13:15 | +The Module System | +Lecture+code along | +
13:35 | +Compiling, compiler tool chains | +Lecture+code along+exercise | +
13:50 | +The Batch System | +Lecture+code along | +
14:10 | +Simple Examples | +Lecture+exercises | +
14:45 | +COFFEE BREAK | ++ |
15:00 | +Application Examples | +Lecture+code along+exercises | +
16:40 | +Questions+Summary | ++ |
17:00 | +END OF COURSE | ++ |
+ +
+Note
+High Performance Computing Center North (HPC2N) is
+HPC2N provides state-of-the-art resources and expertise:
+Primary objective
+To raise the national and local level of HPC competence and transfer HPC knowledge and technology to new users in academia and industry.
+HPC2N is hosted by:
++
Partners:
++ + +
+Funded mainly by Umeå University, with contributions from the other HPC2N partners.
+Involved in several projects and collaborations:
++ +
++ +
++
+Management:
+Application experts:
+Others:
+System and support:
+The current supercomputer at HPC2N. It is a very heterogeneous system.
+Kebnekaise will be continuosly upgraded, as old hardware gets retired.
+Kebnekaise have CPU-only, GPU enabled and large memory nodes.
+The CPU-only nodes are:
+The GPU enabled nodes are:
+The large memory nodes are:
+Basically four types of storage are available at HPC2N:
+/home/X/Xyz
, $HOME
, ~
/proj/nobackup/abc
$SNIC_TMP
Also
+Compute projects
+To use Kebnekaise, you must be a member of a compute project.
+A compute project contains a certain amount of storage. If more storage is required, you must be a member of a storage project.
+Note
+As Kebnekaise is a local cluster, you need to be affiliated with UmU, IRF, SLU, Miun, or LTU to use it.
+Projects are applied for through SUPR (https://supr.naiss.se).
+I will cover more details in a later section, where we go more into detail about HPC2N and Kebnekaise.
+What is HPC?
+High Performance Computing (definition)
+“High Performance Computing most generally refers to the practice of aggregating computing power in a way that delivers much higher performance than one could get out of a typical desktop computer or workstation in order to solve large problems in science, engineering, or business.”
+ +A problem can be large for two main reasons:
+The former can be remedied by increasing the performance
+The latter by adding more memory / storage
+Two memory models are relevant for HPC:
+
+
The programming model changes when we aim for extra performance and/or memory:
+Complexity grows when we aim for extra performance and/or memory/storage:
+When you have your account, you can login to Kebnekaise. This can be done with any number of SSH clients or with ThinLinc (the easiest option if you need a graphical interface).
+Objectives
+Note
+kebnekaise.hpc2n.umu.se
kebnekaise-tl.hpc2n.umu.se
https://kebnekaise-tl.hpc2n.umu.se:300/
In addition, there is a login node for the AMD-based nodes. We will talk more about this later: kebnekaise-amd.hpc2n.umu.se
. For ThinLinc access: kebnekaise-amd-tl.hpc2n.umu.se
ThinLinc is recommended for this course
+ThinLinc: a cross-platform remote desktop server from Cendio AB. Especially useful when you need software with a graphical interface.
+This is what we recommend you use for this course, unless you have a preferred SSH client.
+kebnekaise-tl.hpc2n.umu.se
. Enter your username.
+Exercise
+Login to Kebnekaise.
+You get your first, temporary HPC2N password from this page: HPC2N passwords.
+That page can also be used to reset your HPC2N password if you have forgotten it.
+Note that you are authenticating through SUPR, using that service’s login credentials!
+Warning
+The HPC2N password and the SUPR password are separate! The HPC2N password and your university/department password are also separate!
+Exercise: Change your password after first login
+ONLY do this if you have logged in for the first time/is still using the termporary password you got from the HPC2N password reset service!
+Changing password is done using the passwd command:
+ +Use a good password that combines letters of different case. Do not use dictionary words. Avoid using the same password that you also use in other places.
+It will first ask for your current password. Type in that and press enter. Then type in the new password, enter, and repeat. You have changed the password.
+We are not going to transfer any files as part of this course, but you may have to do so as part of your workflow when using Kebnekaise (or another HPC centre) for your research.
+SCP (Secure CoPy) is a simple way of transferring files between two machines that use the SSH (Secure SHell) protocol. You may use SCP to connect to any system where you have SSH (log-in) access.
+These examples show how to use scp from the command-line. Graphical programs exists for doing scp transfer.
+The command-lone scp program should already be installed.
+Remote to local
+Transfer a file from Kebnekaise to your local system, while on your local system
+ +Local to remote
+Transfer a local file to Kebnekaise, while on your local system
+ +Recursive directory copy from a local system to a remote system
+The directory sourcedirectory
is here copied as a subdirectory to somedir
SFTP (SSH File Transfer Protocol or sometimes called Secure File Transfer Protocol) is a network protocol that provides file transfer over a reliable data stream.
+SFTP is a command -line program on most Unix, Linux, and Mac OS X systems. It is also available as a protocol choice in some graphical file transfer programs.
+Example: From a local system to a remote system
+enterprise-d [~]$ sftp user@kebnekaise.hpc2n.umu.se
+Connecting to kebnekaise.hpc2n.umu.se...
+user@kebnekaise.hpc2n.umu.se's password:
+sftp> put file.c C/file.c
+Uploading file.c to /home/u/user/C/file.c
+file.c 100% 1 0.0KB/s 00:00
+sftp> put -P irf.png pic/
+Uploading irf.png to /home/u/user/pic/irf.png
+irf.png 100% 2100 2.1KB/s 00:00
+sftp>
+
Here you need to download a client: WinSCP, FileZilla (sftp), PSCP/PSFTP, …
+You can transfer with sftp or scp.
+There is documentation in HPC2N’s documentation pages for Windows file transfers.
+Since the editors on a Linux system are different to those you may be familiar with from Windows or macOS, here follows a short overview.
+There are command-line editors and graphical editors. If you are connecting with a regular SSH client, it will be simplest to use a command-line editor. If you are using ThinLinc, you can use command-line editors or graphical editors as you want.
+These are all good editors for using on the command line:
+ +They are all installed on Kebnekaise.
+Of these, vi/vim
as well as emacs
are probably the most powerful, though the latter is better in a GUI environment. The easiest editor to use if you are not familiar with any of them is nano
.
Nano
+nano FILENAME
on the command line and press Enter
. FILENAME
is whatever you want to call your file.FILENAME
is a file that already exists, nano
will open the file. If it dows not exist, it will be created.^
before the letter-commands means you should press CTRL
and then the letter (while keeping CTRL
down).CTRL
and then x
while holding CTRL
down (this is written CTRL-x
or ^x
). nano
will ask you if you want to save the content of the buffer to the file. After that it will exit.There is a manual for nano
here.
If you are connecting with ThinLinc, you will be presented with a graphical user interface (GUI).
+From there you can either
+Applications
-> System Tools
-> MATE Terminal
) Applications
-> Accessories
. This gives several editor options, of which these have a graphical interface:If you are not familiar with any of these, a good recommendation would be to use Text Editor/gedit
.
Text Editor/gedit
+gedit
”: Applications
-> Accessories
-> Text Editor
.Open
” in the top menu.Save
” in the menu.Find
” and “Find and Replace
”.Keypoints
+Objectives
+Most programs are accessed by first loading them as a ‘module’.
+Modules are:
+module spider
or ml spider
module spider MODULE
or ml spider MODULE
module spider MODULE/VERSION
or ml spider MODULE/VERSION
module avail
or ml av
module list
or ml
module load MODULE
or ml MODULE
module load MODULE/VERSION
or ml MODULE/VERSION
module unload MODULE
or ml -MODULE
ml show MODULE
or module show MODULE
module purge
or ml purge
Hint
+Code-along!
+b-an01 [~]$ ml spider Python
+
+---------------------------------------------------------------------------------------------------------
+ Python:
+---------------------------------------------------------------------------------------------------------
+ Description:
+ Python is a programming language that lets you work more quickly and integrate your systems more effectively.
+
+ Versions:
+ Python/2.7.15
+ Python/2.7.16
+ Python/2.7.18-bare
+ Python/2.7.18
+ Python/3.7.2
+ Python/3.7.4
+ Python/3.8.2
+ Python/3.8.6
+ Python/3.9.5-bare
+ Python/3.9.5
+ Python/3.9.6-bare
+ Python/3.9.6
+ Python/3.10.4-bare
+ Python/3.10.4
+ Python/3.10.8-bare
+ Python/3.10.8
+ Python/3.11.3
+ Python/3.11.5
+ Other possible modules matches:
+ Biopython Boost.Python Brotli-python GitPython IPython Python-bundle-PyPI flatbuffers-python ...
+
+---------------------------------------------------------------------------------------------------------
+ To find other possible module matches execute:
+
+ $ module -r spider '.*Python.*'
+
+---------------------------------------------------------------------------------------------------------
+ For detailed information about a specific "Python" package (including how to load the modules) use the module's full name.
+ Note that names that have a trailing (E) are extensions provided by other modules.
+ For example:
+
+ $ module spider Python/3.11.5
+---------------------------------------------------------------------------------------------------------
+
+
+
+b-an01 [~]$
+
b-an01 [~]$ ml spider Python/3.11.5
+
+---------------------------------------------------------------------------------------------------------
+ Python: Python/3.11.5
+---------------------------------------------------------------------------------------------------------
+ Description:
+ Python is a programming language that lets you work more quickly and integrate your systems more effectively.
+
+ You will need to load all module(s) on any one of the lines below before the "Python/3.11.5" module is available to load.
+
+ GCCcore/13.2.0
+
+ This module provides the following extensions:
+
+ flit_core/3.9.0 (E), packaging/23.2 (E), pip/23.2.1 (E), setuptools-scm/8.0.4 (E), setuptools/68.2.2 (E), tomli/2.0.1 (E), typing_extensions/4.8.0 (E), wheel/0.41.2 (E)
+
+ Help:
+ Description
+ ===========
+ Python is a programming language that lets you work more quickly and integrate your systems more effectively.
+
+ More information
+ ================
+ - Homepage: https://python.org/
+
+
+ Included extensions
+ ===================
+ flit_core-3.9.0, packaging-23.2, pip-23.2.1, setuptools-68.2.2, setuptools-
+ scm-8.0.4, tomli-2.0.1, typing_extensions-4.8.0, wheel-0.41.2
+
+
+
+
+
+b-an01 [~]$
+
Here we also show the loaded module before and after the load. For illustration, we use first ml
and then module list
:
b-an01 [~]$ ml
+
+Currently Loaded Modules:
+ 1) snicenvironment (S) 2) systemdefault (S)
+
+ Where:
+ S: Module is Sticky, requires --force to unload or purge
+
+
+
+b-an01 [~]$ module load GCCcore/13.2.0 Python/3.11.5
+b-an01 [~]$ module list
+
+Currently Loaded Modules:
+ 1) snicenvironment (S) 4) zlib/1.2.13 7) ncurses/6.4 10) SQLite/3.43.1 13) OpenSSL/1.1
+ 2) systemdefault (S) 5) binutils/2.40 8) libreadline/8.2 11) XZ/5.4.4 14) Python/3.11.5
+ 3) GCCcore/13.2.0 6) bzip2/1.0.8 9) Tcl/8.6.13 12) libffi/3.4.4
+
+ Where:
+ S: Module is Sticky, requires --force to unload or purge
+
+
+
+b-an01 [~]$
+
Python/3.11.5
In this example we unload the module Python/3.11.5
, but not the prerequisite GCCcore/13.2.0
. We also look at the output of module list
before and after.
b-an01 [~]$ module list
+
+Currently Loaded Modules:
+ 1) snicenvironment (S) 4) zlib/1.2.13 7) ncurses/6.4 10) SQLite/3.43.1 13) OpenSSL/1.1
+ 2) systemdefault (S) 5) binutils/2.40 8) libreadline/8.2 11) XZ/5.4.4 14) Python/3.11.5
+ 3) GCCcore/13.2.0 6) bzip2/1.0.8 9) Tcl/8.6.13 12) libffi/3.4.4
+
+ Where:
+ S: Module is Sticky, requires --force to unload or purge
+
+
+b-an01 [~]$ ml unload Python/3.11.5
+b-an01 [~]$ module list
+
+Currently Loaded Modules:
+ 1) snicenvironment (S) 2) systemdefault (S) 3) GCCcore/13.2.0
+
+ Where:
+ S: Module is Sticky, requires --force to unload or purge
+
+
+
+b-an01 [~]$
+
As you can see, the prerequisite did not get unloaded. This is on purpose, because you may have other things loaded which uses the prerequisite.
+module purge
except the ‘sticky’ modules (some needed things for the environment)First we load some modules. Here Python 3.11.5, SciPy-bundle, and prerequisites for them. We also do module list
after loading the modules and after using module purge
.
b-an01 [~]$ ml GCC/13.2.0
+b-an01 [~]$ ml Python/3.11.5 ml SciPy-bundle/2023.11
+b-an01 [~]$ ml list
+
+Currently Loaded Modules:
+ 1) snicenvironment (S) 7) bzip2/1.0.8 13) libffi/3.4.4 19) cffi/1.15.1
+ 2) systemdefault (S) 8) ncurses/6.4 14) OpenSSL/1.1 20) cryptography/41.0.5
+ 3) GCCcore/13.2.0 9) libreadline/8.2 15) Python/3.11.5 21) virtualenv/20.24.6
+ 4) zlib/1.2.13 10) Tcl/8.6.13 16) OpenBLAS/0.3.24 22) Python-bundle-PyPI/2023.10
+ 5) binutils/2.40 11) SQLite/3.43.1 17) FlexiBLAS/3.3.1 23) pybind11/2.11.1
+ 6) GCC/13.2.0 12) XZ/5.4.4 18) FFTW/3.3.10 24) SciPy-bundle/2023.11
+
+ Where:
+ S: Module is Sticky, requires --force to unload or purge
+
+
+
+b-an01 [~]$ ml purge
+The following modules were not unloaded:
+ (Use "module --force purge" to unload all):
+
+ 1) snicenvironment 2) systemdefault
+b-an01 [~]$ ml list
+
+Currently Loaded Modules:
+ 1) snicenvironment (S) 2) systemdefault (S)
+
+ Where:
+ S: Module is Sticky, requires --force to unload or purge
+
+
+
+b-an01 [~]$
+
Note
+module load
on the same line. Or you can do them one at a time, as you want.GCC/13.2.0
and Python/3.11.5
. You can now do ml av
to see which versions of other modules you want to load, say SciPy-bundle, are compatible. If you know the name of the module you want, you can even start writing module load SciPy-bundle/
and press TAB
- the system will then autocomplete to the compatible one(s). Compiler toolchains load bundles of software making up a complete environment for compiling/using a specific prebuilt software. Includes some/all of: compiler suite, MPI, BLAS, LAPACK, ScaLapack, FFTW, CUDA.
+Some currently available toolchains (check ml av
for versions and full, updated list):
Keypoints
+module load MODULE
module unload MODULE
module purge
module spider
module spider MODULE
module spider MODULE/VERSION
module list
More information
+Note
+In order to have an account at HPC2N, you need to be a member of a compute project.
+You can either join a project or apply for one yourself (if you fulfill the requirements).
+There are both storage projects and compute projects. The storage projects are for when the amount of storage included with the compute project is not enough.
+Kebnekaise is only open for local project requests!
+Apply for compute projects in SUPR.
+Info
+After applying on SUPR, the project(s) will be reviewed.
+
+
+2. Pick a compute project to link:
+
+3. Showing linked projects:
+
+4. Members of the storage project after linking:
+
When you have a project / have become member of a project, you can apply for an account at HPC2N. This is done in SUPR, under “Accounts”: https://supr.naiss.se/account/.
+Your account request will be processed within a week. You will then get an email with information about logging in and links to getting started information.
+More information on the account process can be found on HPC2N’s documentation pages: https://www.hpc2n.umu.se/documentation/access-and-accounts/users
+ +' + escapeHtml(summary) +'
' + noResultsText + '
'); + } +} + +function doSearch () { + var query = document.getElementById('mkdocs-search-query').value; + if (query.length > min_search_length) { + if (!window.Worker) { + displayResults(search(query)); + } else { + searchWorker.postMessage({query: query}); + } + } else { + // Clear results for short queries + displayResults([]); + } +} + +function initSearch () { + var search_input = document.getElementById('mkdocs-search-query'); + if (search_input) { + search_input.addEventListener("keyup", doSearch); + } + var term = getSearchTermFromLocation(); + if (term) { + search_input.value = term; + doSearch(); + } +} + +function onWorkerMessage (e) { + if (e.data.allowSearch) { + initSearch(); + } else if (e.data.results) { + var results = e.data.results; + displayResults(results); + } else if (e.data.config) { + min_search_length = e.data.config.min_search_length-1; + } +} + +if (!window.Worker) { + console.log('Web Worker API not supported'); + // load index in main thread + $.getScript(joinUrl(base_url, "search/worker.js")).done(function () { + console.log('Loaded worker'); + init(); + window.postMessage = function (msg) { + onWorkerMessage({data: msg}); + }; + }).fail(function (jqxhr, settings, exception) { + console.error('Could not load worker.js'); + }); +} else { + // Wrap search in a web worker + var searchWorker = new Worker(joinUrl(base_url, "search/worker.js")); + searchWorker.postMessage({init: true}); + searchWorker.onmessage = onWorkerMessage; +} diff --git a/search/search_index.json b/search/search_index.json new file mode 100644 index 00000000..c3bf89a8 --- /dev/null +++ b/search/search_index.json @@ -0,0 +1 @@ +{"config":{"indexing":"full","lang":["en"],"min_search_length":3,"prebuild_index":false,"separator":"[\\s\\-]+"},"docs":[{"location":"","text":"Welcome to the course: Introduction to Kebnekaise \u00b6 This material Here you will find the content of the workshop \u201cIntroduction to Kebnekaise\u201d. You can download the markdown files for the presentation as well as the exercises from https://github.com/hpc2n/intro-course Click the gren \u201cCode\u201d button Either copy the url for the repo under HTTPS and do git clone https://github.com/hpc2n/intro-course.git in a terminal window OR pick \u201cDownload zip\u201d to get a zip file with the content. Some useful links: Documentation about Linux at HPC2N: https://docs.hpc2n.umu.se/tutorials/linuxguide/ Get started guide: https://docs.hpc2n.umu.se/tutorials/quickstart/ Documentation pages at HPC2N: https://docs.hpc2n.umu.se/ Prerequisites Basic knowledge about Linux (if you need a refresher, you could take the course \u201cIntroduction to Linux\u201d which runs immediately before this course. Info and registration here: https://www.hpc2n.umu.se/events/courses/2024/fall/intro-linux . An account at SUPR and at HPC2N. You should have already been contacted about getting these if you did not have them already. Content This course aims to give a brief, but comprehensive introduction to Kebnekaise. You will learn about HPC2N, HPC, and Kebnekaise hardware How to use our systems: Logging in & editors The File System The Module System Compiling and linking The Batch System Simple examples (batch system) Application examples (batch system) This course will consist of lectures and type-alongs, as well as a few exercises where you get to try out what you have just learned. Instructors Birgitte Bryds\u00f6, HPC2N Pedro Ojeda May, HPC2N Preliminary schedule \u00b6 Time Topic Activity 11:15 Welcome+Syllabus 11:25 Introduction to Kebnekaise and HPC2N Lecture 11:45 Logging in & editors Lecture+exercise 11:55 The File System Lecture+code along 12:15 LUNCH BREAK 13:15 The Module System Lecture+code along 13:35 Compiling, compiler tool chains Lecture+code along+exercise 13:50 The Batch System Lecture+code along 14:10 Simple Examples Lecture+exercises 14:45 COFFEE BREAK 15:00 Application Examples Lecture+code along+exercises 16:40 Questions+Summary 17:00 END OF COURSE","title":"Home"},{"location":"#welcome__to__the__course__introduction__to__kebnekaise","text":"This material Here you will find the content of the workshop \u201cIntroduction to Kebnekaise\u201d. You can download the markdown files for the presentation as well as the exercises from https://github.com/hpc2n/intro-course Click the gren \u201cCode\u201d button Either copy the url for the repo under HTTPS and do git clone https://github.com/hpc2n/intro-course.git in a terminal window OR pick \u201cDownload zip\u201d to get a zip file with the content. Some useful links: Documentation about Linux at HPC2N: https://docs.hpc2n.umu.se/tutorials/linuxguide/ Get started guide: https://docs.hpc2n.umu.se/tutorials/quickstart/ Documentation pages at HPC2N: https://docs.hpc2n.umu.se/ Prerequisites Basic knowledge about Linux (if you need a refresher, you could take the course \u201cIntroduction to Linux\u201d which runs immediately before this course. Info and registration here: https://www.hpc2n.umu.se/events/courses/2024/fall/intro-linux . An account at SUPR and at HPC2N. You should have already been contacted about getting these if you did not have them already. Content This course aims to give a brief, but comprehensive introduction to Kebnekaise. You will learn about HPC2N, HPC, and Kebnekaise hardware How to use our systems: Logging in & editors The File System The Module System Compiling and linking The Batch System Simple examples (batch system) Application examples (batch system) This course will consist of lectures and type-alongs, as well as a few exercises where you get to try out what you have just learned. Instructors Birgitte Bryds\u00f6, HPC2N Pedro Ojeda May, HPC2N","title":"Welcome to the course: Introduction to Kebnekaise"},{"location":"#preliminary__schedule","text":"Time Topic Activity 11:15 Welcome+Syllabus 11:25 Introduction to Kebnekaise and HPC2N Lecture 11:45 Logging in & editors Lecture+exercise 11:55 The File System Lecture+code along 12:15 LUNCH BREAK 13:15 The Module System Lecture+code along 13:35 Compiling, compiler tool chains Lecture+code along+exercise 13:50 The Batch System Lecture+code along 14:10 Simple Examples Lecture+exercises 14:45 COFFEE BREAK 15:00 Application Examples Lecture+code along+exercises 16:40 Questions+Summary 17:00 END OF COURSE","title":"Preliminary schedule"},{"location":"batch/","text":"Compiling and Linking with Libraries \u00b6 \\begin{block}{} \\justify \\begin{small} Figuring out how to link \\end{small} \\end{block} \\begin{block}{} \\begin{itemize} \\item Intel and Intel MKL linking: \\ \\begin{tiny} \\texttt{https://software.intel.com/en-us/articles/intel-mkl-link-line-advisor} \\end{tiny} \\item GCC, etc. \\textbf{Use buildenv} \\begin{itemize} \\item After loading a compiler toolchain, load \\texttt{\u2018buildenv\u2019} and use \\texttt{\u2018ml show buildenv\u2019} to get useful linking info \\item Example, foss (add relevant version): \\ \\vspace{2mm} \\texttt{ml foss/version} \\ \\texttt{ml buildenv} \\ \\texttt{ml show buildenv} \\vspace{2mm} \\item Using the environment variable (prefaced with $) for linking is highly recommended! \\item You have to load the buildenv module in order to use the environment variable for linking! \\end{itemize} \\end{itemize} \\end{block} } \\frame{\\frametitle{The Batch System (SLURM)} \\begin{block}{} \\begin{itemize} \\item Large/long/parallel jobs \\textbf{must} be run through the batch system \\item SLURM is an Open Source job scheduler, which provides three key functions \\begin{itemize} \\item Keeps track of available system resources \\item Enforces local system resource usage and job scheduling policies \\item Manages a job queue, distributing work across resources according to policies \\end{itemize} \\item In order to run a batch job, you need to create and submit a SLURM submit file (also called a batch submit file, a batch script, or a job script). \\item Guides and documentation at: http://www.hpc2n.umu.se/support \\end{itemize} \\end{block} } \\frame{\\frametitle{The Batch System}\\framesubtitle{Accounting, Compute nodes, Kebnekaise} \\begin{block}{} \\begin{small} Here the Skylake nodes are used as an example. The only difference for the Broadwell nodes is that it would say 128G instead of 192G per node. \\end{small} \\end{block} \\begin{block}{} \\begin{center} \\includegraphics[width=9cm]{figures/Allocation-Kebnekaise-thin_skylake.png} \\end{center} \\end{block} } \\frame{\\frametitle{The Batch System}\\framesubtitle{Accounting, largemem nodes, Kebnekaise} \\begin{block}{} \\begin{center} \\includegraphics[width=10cm]{figures/Allocation-Kebnekaise-largemem_v3.png} \\end{center} \\end{block} } \\frame{\\frametitle{The Batch System}\\framesubtitle{Accounting, K80 GPU nodes, Kebnekaise.} \\begin{block}{} \\begin{footnotesize} The K80 GPU cards have 2 onboard compute engines (GK210 chips). Most GPU nodes have 2 K80s, placed together as 14 cores + 1 K80/socket. 4 GPU nodes have 4 K80 GPU cards. \\end{footnotesize} \\end{block} \\begin{block}{} \\begin{center} \\includegraphics[width=5.8cm]{figures/K80-GPUs.png} \\end{center} \\end{block} } \\frame{\\frametitle{The Batch System}\\framesubtitle{Accounting, V100 GPU nodes, Kebnekaise.} \\begin{block}{} \\begin{scriptsize} Each V100 GPU accelerator card has 1 onboard compute engine (GV100 chip). They are placed together as 14 cores + 1 V100 on a socket (28 cores, 2 V100s per node). \\end{scriptsize} \\end{block} \\begin{block}{} \\begin{center} \\includegraphics[width=6.8cm]{figures/V100-allocation-new.png} \\end{center} \\end{block} } \\frame{\\frametitle{The Batch System}\\framesubtitle{Accounting, A100 GPU nodes, Kebnekaise.} \\begin{block}{} \\begin{scriptsize} Each A100 GPU accelerator card has 1 onboard compute engine. The AMD Zen3 nodes have 2 CPUs sockets with 24 cores each, for a total of 48 cores, and 2 NVidia A100 GPUs. They are placed together as 24 cores + 1 A100 on a socket. \\end{scriptsize} \\end{block} \\begin{block}{} \\begin{center} \\includegraphics[width=6.8cm]{figures/A100-allocation.png} \\end{center} \\end{block} } \\frame{\\frametitle{The Batch System (SLURM)}\\framesubtitle{Useful Commands} \\begin{block}{} \\begin{itemize} \\begin{footnotesize} \\item Submit job: \\texttt{sbatch \\(<\\) jobscript \\(>\\) } \\item Get list of your jobs: \\texttt{squeue -u \\(<\\) username \\(>\\) } \\item \\texttt{srun \\(<\\) commands for your job/program \\(>\\) } \\item Check on a specific job: \\texttt{scontrol show job \\(<\\) job id \\(>\\) } \\item Delete a specific job: \\texttt{scancel \\(<\\) job id \\(>\\) } \\item Delete all your own jobs: \\texttt{scancel -u \\(<\\) user \\(>\\) } \\item More detailed info about jobs: \\ \\end{footnotesize} \\begin{scriptsize} \\texttt{sacct -l -j \\(<\\) jobid \\(>\\) -o jobname,NTasks,nodelist,MaxRSS,MaxVMSize\u2026} \\end{scriptsize} \\begin{itemize} \\begin{footnotesize} \\item More flags can be found with \\texttt{man sacct} \\item The output will be \\textbf{very} wide. To view, use \\ \\texttt{sacct -l -j ....... | less -S} \\ (makes it sideways scrollable, using the left/right arrow key) \\end{footnotesize} \\end{itemize} \\begin{footnotesize} \\item Web url with graphical info about a job: \\texttt{job-usage \\(<\\) job-id \\(>\\) } \\end{footnotesize} \\end{itemize} Use \\texttt{man sbatch, man srun, man ....} for more information \\end{block} } \\frame{\\frametitle{The Batch System (SLURM)}\\framesubtitle{Job Output} \\begin{block}{} \\begin{itemize} \\item Output and errors in: \\ \\texttt{slurm- \\(<\\) job id \\(>\\) .out} \\item Look at it with vi, nano, emacs, cat, less\u2026 \\item To get output and error files split up, you can give these flags in the submit script: \\ \\texttt{#SBATCH \u2013error=job.\\%J.err} \\ \\texttt{#SBATCH \u2013output=job.\\%J.out} \\end{itemize} \\end{block} } \\frame{\\frametitle{The Batch System (SLURM)}\\framesubtitle{Using different parts of Kebnekaise} \\begin{block}{} \\begin{scriptsize} \\begin{itemize} \\item Use the \u2018fat\u2019 nodes by adding this flag to your script: \\ \\texttt{#SBATCH -p largemem} (separate resource) \\ \\item Specifying Intel Broadwell, Intel Skylake, or AMD Zen3 CPUs: \\ \\texttt{#SBATCH \u2013constraint=broadwell} \\ or \\ \\texttt{#SBATCH \u2013constraint=skylake} \\ or \\ \\texttt{#SBATCH \u2013constraint=zen3} \\ \\item Using the GPU nodes (separate resource): \\ \\texttt{#SBATCH \u2013gres=gpu: \\(<\\) type-of-card \\(>\\) :x} where \\(<\\) type-of-card \\(>\\) is either k80, v100, or a100 and x = 1, 2, or 4 (4 only for K80). \\ \\begin{itemize} \\begin{scriptsize} \\item In the case of the A100 GPU nodes, you also need to add a partition \\ \\texttt{#SBATCH -p amd_gpu} \\end{scriptsize} \\end{itemize} \\item Use the AMD login node for correct modules and compilers for AMD Zen3 and A100 nodes: \\ \\texttt{kebnekaise-amd-tl.hpc2n.umu.se} or \\\\texttt{kebnekaise-amd.hpc2n.umu.se} \\end{itemize} More on https://www.hpc2n.umu.se/documentation/guides/using_kebnekaise \\end{scriptsize} \\end{block} } \\frame{\\frametitle{The Batch System (SLURM)}\\framesubtitle{Simple example, serial} \\begin{block}{} \\justify \\begin{footnotesize} Example: Serial job on Kebnekaise, compiler toolchain \u2018foss\u2019 \\end{footnotesize} \\end{block} \\begin{block}{} \\begin{footnotesize} \\texttt{#!/bin/bash} \\ \\texttt{# Project id - change to your own after the course!} \\ \\texttt{#SBATCH -A hpc2n2023-132} \\ \\texttt{# Asking for 1 core} \\ \\texttt{#SBATCH -n 1} \\ \\texttt{# Asking for a walltime of 5 min} \\ \\texttt{#SBATCH \u2013time=00:05:00} \\ \\vspace{3mm} \\texttt{# Purge modules before loading new ones in a script. } \\ \\texttt{ml purge > /dev/null 2>\\&1} \\ \\texttt{ml foss/2021b} \\ \\vspace{3mm} \\texttt{./my_serial_program} \\end{footnotesize} \\end{block} \\begin{block}{} \\justify \\begin{footnotesize} Submit with: \\ \\texttt{sbatch \\(<\\) jobscript \\(>\\) } \\end{footnotesize} \\end{block} } \\frame{\\frametitle{The Batch System (SLURM)}\\framesubtitle{Example, MPI C program} \\begin{block}{} \\begin{footnotesize} \\texttt{#include \\(<\\) stdio.h \\(>\\) } \\ \\texttt{#include \\(<\\) mpi.h \\(>\\) } \\ \\vspace{3mm} \\texttt{int main (int argc, char *argv[]) {} \\ \\vspace{3mm} \\texttt{int myrank, size;} \\ \\vspace{3mm} \\texttt{MPI_Init(\\&argc, \\&argv);} \\ \\texttt{MPI_Comm_rank(MPI_COMM_WORLD, \\&myrank);} \\ \\texttt{MPI_Comm_size(MPI_COMM_WORLD, \\&size);} \\ \\vspace{3mm} \\texttt{printf(\u201cProcessor \\%d of \\%d: Hello World!\\textbackslash n\u201d, myrank, size);} \\ \\vspace{3mm} \\texttt{MPI_Finalize();} \\vspace{3mm} \\texttt{}} \\end{footnotesize} \\end{block} } \\frame{\\frametitle{The Batch System (SLURM)}\\framesubtitle{Simple example, parallel} \\begin{block}{} \\justify \\begin{footnotesize} Example: MPI job on Kebnekaise, compiler toolchain \u2018foss\u2019 \\end{footnotesize} \\end{block} \\begin{block}{} \\begin{footnotesize} \\texttt{#!/bin/bash} \\ \\texttt{#SBATCH -A hpc2n2023-132} \\ \\texttt{#SBATCH -n 14} \\ \\texttt{#SBATCH \u2013time=00:05:00} \\ \\texttt{##SBATCH \u2013exclusive} \\ \\texttt{#SBATCH \u2013reservation=intro-gpu} \\ \\vspace{3mm} \\texttt{module purge > /dev/null 2>\\&1} \\ \\texttt{ml foss/2021b} \\ \\vspace{3mm} \\texttt{srun ./my_parallel_program} \\end{footnotesize} \\end{block} } \\begin{frame}[fragile]\\frametitle{The Batch System (SLURM)}\\framesubtitle{Simple example, output} \\begin{block}{} \\justify Example: Output from a MPI job on Kebnekaise, run on 14 cores (one NUMA island) \\end{block} \\begin{block}{} \\begin{tiny} \\begin{verbatim} b-an01 [~/slurm]$ cat slurm-15952.out Processor 12 of 14: Hello World! Processor 5 of 14: Hello World! Processor 9 of 14: Hello World! Processor 4 of 14: Hello World! Processor 11 of 14: Hello World! Processor 13 of 14: Hello World! Processor 0 of 14: Hello World! Processor 1 of 14: Hello World! Processor 2 of 14: Hello World! Processor 3 of 14: Hello World! Processor 6 of 14: Hello World! Processor 7 of 14: Hello World! Processor 8 of 14: Hello World! Processor 10 of 14: Hello World! \\end{verbatim} \\end{tiny} \\end{block} \\end{frame} \\frame{\\frametitle{The Batch System (SLURM)}\\framesubtitle{Starting more than one serial job in the same submit file} \\begin{block}{} \\begin{small} \\texttt{#!/bin/bash} \\ \\texttt{#SBATCH -A hpc2n2023-132} \\ \\texttt{#SBATCH -n 5} \\ \\texttt{#SBATCH \u2013time=00:15:00} \\ \\vspace{3mm} \\texttt{module purge > /dev/null 2>\\&1} \\ \\texttt{ml foss/2021b} \\ \\vspace{3mm} \\texttt{srun -n 1 ./job1.batch \\&} \\ \\texttt{srun -n 1 ./job2.batch \\&} \\ \\texttt{srun -n 1 ./job3.batch \\&} \\ \\texttt{srun -n 1 ./job4.batch \\&} \\ \\texttt{srun -n 1 ./job5.batch } \\ \\texttt{wait} \\ \\end{small} \\end{block} } \\frame{\\frametitle{The Batch System (SLURM)}\\framesubtitle{Multiple Parallel Jobs Sequentially} \\begin{block}{} \\begin{scriptsize} \\texttt{#!/bin/bash} \\ \\texttt{#SBATCH -A hpc2n2023-132} \\ \\texttt{#SBATCH -c 28} \\ \\texttt{# Remember to ask for enough time for all jobs to complete} \\ \\texttt{#SBATCH \u2013time=02:00:00} \\ \\vspace{3mm} \\texttt{module purge > /dev/null 2>\\&1} \\ \\texttt{ml foss/2021b} \\ \\vspace{3mm} \\texttt{# Here 14 tasks with 2 cores per task. Output to file.} \\ \\texttt{# Not needed if your job creates output in a file} \\ \\texttt{# I also copy the output somewhere else and then run} \\ \\texttt{# another executable\u2026} \\ \\vspace{3mm} \\texttt{srun -n 14 -c 2 ./a.out > myoutput1 2>\\&1} \\ \\texttt{cp myoutput1 /pfs/nobackup/home/u/username/mydatadir} \\ \\texttt{srun -n 14 -c 2 ./b.out > myoutput2 2>\\&1} \\ \\texttt{cp myoutput2 /pfs/nobackup/home/u/username/mydatadir} \\ \\texttt{srun -n 14 -c 2 ./c.out > myoutput3 2>\\&1} \\ \\texttt{cp myoutput3 /pfs/nobackup/home/u/username/mydatadir} \\ \\end{scriptsize} \\end{block} } \\frame{\\frametitle{The Batch System (SLURM)}\\framesubtitle{Multiple Parallel Jobs Simultaneously} \\[\\begin{footnotesize} Make sure you ask for enough cores that all jobs can run at the same time, and have enough memory. Of course, this will also work for serial jobs - just remove the srun from the command line. \\end{footnotesize}\\] \\begin{block}{} \\begin{footnotesize} \\texttt{#!/bin/bash} \\ \\texttt{#SBATCH -A hpc2n2023-132} \\ \\texttt{# Total number of cores the jobs need} \\ \\texttt{#SBATCH -n 56} \\ \\texttt{# Remember to ask for enough time for all of the jobs to} \\ \\texttt{# complete, even the longest} \\ \\texttt{#SBATCH \u2013time=02:00:00} \\ \\vspace{3mm} \\texttt{module purge > /dev/null 2>\\&1} \\ \\texttt{ml foss/2021b} \\ \\vspace{3mm} \\texttt{srun -n 14 \u2013cpu_bind=cores ./a.out \\&} \\ \\texttt{srun -n 28 \u2013cpu_bind=cores ./b.out \\&} \\ \\texttt{srun -n 14 \u2013cpu_bind=cores ./c.out \\&} \\ \\texttt{\u2026} \\ \\texttt{wait} \\ \\end{footnotesize} \\end{block} } \\frame{\\frametitle{The Batch System (SLURM)}\\framesubtitle{GPU Job - V100} \\begin{block}{} \\begin{footnotesize} \\texttt{#!/bin/bash} \\ \\texttt{#SBATCH -A hpc2n2023-132} \\ \\texttt{# Expected time for job to complete} \\ \\texttt{#SBATCH \u2013time=00:10:00} \\ \\texttt{# Number of GPU cards needed. Here asking for 2 V100 cards} \\ \\texttt{#SBATCH \u2013gres=v100:2} \\ \\vspace{3mm} \\texttt{module purge > /dev/null 2>\\&1} \\ \\texttt{# Change to modules needed for your program} \\ \\texttt{ml fosscuda/2021b} \\ \\vspace{3mm} \\texttt{./my-cuda-program} \\ \\end{footnotesize} \\end{block} } \\frame{\\frametitle{The Batch System (SLURM)}\\framesubtitle{GPU Job - A100} \\begin{block}{} \\begin{footnotesize} \\texttt{#!/bin/bash} \\ \\texttt{#SBATCH -A hpc2n2023-132} \\ \\texttt{# Expected time for job to complete} \\ \\texttt{#SBATCH \u2013time=00:10:00} \\ \\texttt{# Adding the partition for the A100 GPUs} \\ \\texttt{#SBATCH -p amd_gpu} \\ \\texttt{# Number of GPU cards needed. Here asking for 2 A100 cards} \\ \\texttt{#SBATCH \u2013gres=a100:2} \\ \\vspace{3mm} \\texttt{module purge > /dev/null 2>\\&1} \\ \\texttt{# Change to modules needed for your software - remember to login} \\ \\texttt{# to kebnekaise-amd.hpc2n.umu.se or} \\ \\texttt{# kebnekaise-amd-tl.hpc2n.umu.se login node to see availability} \\ \\texttt{ml CUDA/11.7.0} \\ \\vspace{3mm} \\texttt{./my-cuda-program} \\ \\end{footnotesize} \\end{block} } \\frame{\\frametitle{Important information} \\begin{block}{} \\begin{itemize} \\begin{small} \\item The course project has the following project ID: hpc2n2023-132 \\item In order to use it in a batch job, add this to the batch script: \\begin{itemize} \\begin{small} \\item #SBATCH -A hpc2n2023-132 \\end{small} \\end{itemize} \\item There is a reservation with one A100 GPU node reserved for the course, in order to let us run small GPU examples without having to wait for too long. The reservation also is for one Broadwell CPU node. \\item The reservation is ONLY valid during the course: \\begin{itemize} \\begin{small} \\item intro-gpu \\ (add with #SBATCH \u2013reservation=intro-gpu) \\end{small} \\item To use the reservation with the A100 GPU node, also add \\texttt{#SBATCH -p amd_gpu} and \\texttt{#SBATCH \u2013gres=a100:x (for x=1,2)}. \\end{itemize} \\item We have a storage project linked to the compute project. It is hpc2n2023-132. You find it in /proj/nobackup/hpc2n2023-132. Remember to create your own directory under it. \\end{small} \\end{itemize} \\end{block} } \\frame{\\frametitle{Questions and support} \\begin{block}{} \\textbf{Questions?} Now: Ask me or one of the other support or application experts present. \\vspace{0.5cm} OR \\vspace{0.5cm} \\begin{itemize} \\item Documentation: \\texttt{https://www.hpc2n.umu.se/support} \\item Support questions to: \\texttt{https://supr.naiss.se/support/} or \\texttt{support@hpc2n.umu.se} \\end{itemize} \\end{block} } \\end{document}","title":"The Batch System"},{"location":"batch/#compiling__and__linking__with__libraries","text":"\\begin{block}{} \\justify \\begin{small} Figuring out how to link \\end{small} \\end{block} \\begin{block}{} \\begin{itemize} \\item Intel and Intel MKL linking: \\ \\begin{tiny} \\texttt{https://software.intel.com/en-us/articles/intel-mkl-link-line-advisor} \\end{tiny} \\item GCC, etc. \\textbf{Use buildenv} \\begin{itemize} \\item After loading a compiler toolchain, load \\texttt{\u2018buildenv\u2019} and use \\texttt{\u2018ml show buildenv\u2019} to get useful linking info \\item Example, foss (add relevant version): \\ \\vspace{2mm} \\texttt{ml foss/version} \\ \\texttt{ml buildenv} \\ \\texttt{ml show buildenv} \\vspace{2mm} \\item Using the environment variable (prefaced with $) for linking is highly recommended! \\item You have to load the buildenv module in order to use the environment variable for linking! \\end{itemize} \\end{itemize} \\end{block} } \\frame{\\frametitle{The Batch System (SLURM)} \\begin{block}{} \\begin{itemize} \\item Large/long/parallel jobs \\textbf{must} be run through the batch system \\item SLURM is an Open Source job scheduler, which provides three key functions \\begin{itemize} \\item Keeps track of available system resources \\item Enforces local system resource usage and job scheduling policies \\item Manages a job queue, distributing work across resources according to policies \\end{itemize} \\item In order to run a batch job, you need to create and submit a SLURM submit file (also called a batch submit file, a batch script, or a job script). \\item Guides and documentation at: http://www.hpc2n.umu.se/support \\end{itemize} \\end{block} } \\frame{\\frametitle{The Batch System}\\framesubtitle{Accounting, Compute nodes, Kebnekaise} \\begin{block}{} \\begin{small} Here the Skylake nodes are used as an example. The only difference for the Broadwell nodes is that it would say 128G instead of 192G per node. \\end{small} \\end{block} \\begin{block}{} \\begin{center} \\includegraphics[width=9cm]{figures/Allocation-Kebnekaise-thin_skylake.png} \\end{center} \\end{block} } \\frame{\\frametitle{The Batch System}\\framesubtitle{Accounting, largemem nodes, Kebnekaise} \\begin{block}{} \\begin{center} \\includegraphics[width=10cm]{figures/Allocation-Kebnekaise-largemem_v3.png} \\end{center} \\end{block} } \\frame{\\frametitle{The Batch System}\\framesubtitle{Accounting, K80 GPU nodes, Kebnekaise.} \\begin{block}{} \\begin{footnotesize} The K80 GPU cards have 2 onboard compute engines (GK210 chips). Most GPU nodes have 2 K80s, placed together as 14 cores + 1 K80/socket. 4 GPU nodes have 4 K80 GPU cards. \\end{footnotesize} \\end{block} \\begin{block}{} \\begin{center} \\includegraphics[width=5.8cm]{figures/K80-GPUs.png} \\end{center} \\end{block} } \\frame{\\frametitle{The Batch System}\\framesubtitle{Accounting, V100 GPU nodes, Kebnekaise.} \\begin{block}{} \\begin{scriptsize} Each V100 GPU accelerator card has 1 onboard compute engine (GV100 chip). They are placed together as 14 cores + 1 V100 on a socket (28 cores, 2 V100s per node). \\end{scriptsize} \\end{block} \\begin{block}{} \\begin{center} \\includegraphics[width=6.8cm]{figures/V100-allocation-new.png} \\end{center} \\end{block} } \\frame{\\frametitle{The Batch System}\\framesubtitle{Accounting, A100 GPU nodes, Kebnekaise.} \\begin{block}{} \\begin{scriptsize} Each A100 GPU accelerator card has 1 onboard compute engine. The AMD Zen3 nodes have 2 CPUs sockets with 24 cores each, for a total of 48 cores, and 2 NVidia A100 GPUs. They are placed together as 24 cores + 1 A100 on a socket. \\end{scriptsize} \\end{block} \\begin{block}{} \\begin{center} \\includegraphics[width=6.8cm]{figures/A100-allocation.png} \\end{center} \\end{block} } \\frame{\\frametitle{The Batch System (SLURM)}\\framesubtitle{Useful Commands} \\begin{block}{} \\begin{itemize} \\begin{footnotesize} \\item Submit job: \\texttt{sbatch \\(<\\) jobscript \\(>\\) } \\item Get list of your jobs: \\texttt{squeue -u \\(<\\) username \\(>\\) } \\item \\texttt{srun \\(<\\) commands for your job/program \\(>\\) } \\item Check on a specific job: \\texttt{scontrol show job \\(<\\) job id \\(>\\) } \\item Delete a specific job: \\texttt{scancel \\(<\\) job id \\(>\\) } \\item Delete all your own jobs: \\texttt{scancel -u \\(<\\) user \\(>\\) } \\item More detailed info about jobs: \\ \\end{footnotesize} \\begin{scriptsize} \\texttt{sacct -l -j \\(<\\) jobid \\(>\\) -o jobname,NTasks,nodelist,MaxRSS,MaxVMSize\u2026} \\end{scriptsize} \\begin{itemize} \\begin{footnotesize} \\item More flags can be found with \\texttt{man sacct} \\item The output will be \\textbf{very} wide. To view, use \\ \\texttt{sacct -l -j ....... | less -S} \\ (makes it sideways scrollable, using the left/right arrow key) \\end{footnotesize} \\end{itemize} \\begin{footnotesize} \\item Web url with graphical info about a job: \\texttt{job-usage \\(<\\) job-id \\(>\\) } \\end{footnotesize} \\end{itemize} Use \\texttt{man sbatch, man srun, man ....} for more information \\end{block} } \\frame{\\frametitle{The Batch System (SLURM)}\\framesubtitle{Job Output} \\begin{block}{} \\begin{itemize} \\item Output and errors in: \\ \\texttt{slurm- \\(<\\) job id \\(>\\) .out} \\item Look at it with vi, nano, emacs, cat, less\u2026 \\item To get output and error files split up, you can give these flags in the submit script: \\ \\texttt{#SBATCH \u2013error=job.\\%J.err} \\ \\texttt{#SBATCH \u2013output=job.\\%J.out} \\end{itemize} \\end{block} } \\frame{\\frametitle{The Batch System (SLURM)}\\framesubtitle{Using different parts of Kebnekaise} \\begin{block}{} \\begin{scriptsize} \\begin{itemize} \\item Use the \u2018fat\u2019 nodes by adding this flag to your script: \\ \\texttt{#SBATCH -p largemem} (separate resource) \\ \\item Specifying Intel Broadwell, Intel Skylake, or AMD Zen3 CPUs: \\ \\texttt{#SBATCH \u2013constraint=broadwell} \\ or \\ \\texttt{#SBATCH \u2013constraint=skylake} \\ or \\ \\texttt{#SBATCH \u2013constraint=zen3} \\ \\item Using the GPU nodes (separate resource): \\ \\texttt{#SBATCH \u2013gres=gpu: \\(<\\) type-of-card \\(>\\) :x} where \\(<\\) type-of-card \\(>\\) is either k80, v100, or a100 and x = 1, 2, or 4 (4 only for K80). \\ \\begin{itemize} \\begin{scriptsize} \\item In the case of the A100 GPU nodes, you also need to add a partition \\ \\texttt{#SBATCH -p amd_gpu} \\end{scriptsize} \\end{itemize} \\item Use the AMD login node for correct modules and compilers for AMD Zen3 and A100 nodes: \\ \\texttt{kebnekaise-amd-tl.hpc2n.umu.se} or \\\\texttt{kebnekaise-amd.hpc2n.umu.se} \\end{itemize} More on https://www.hpc2n.umu.se/documentation/guides/using_kebnekaise \\end{scriptsize} \\end{block} } \\frame{\\frametitle{The Batch System (SLURM)}\\framesubtitle{Simple example, serial} \\begin{block}{} \\justify \\begin{footnotesize} Example: Serial job on Kebnekaise, compiler toolchain \u2018foss\u2019 \\end{footnotesize} \\end{block} \\begin{block}{} \\begin{footnotesize} \\texttt{#!/bin/bash} \\ \\texttt{# Project id - change to your own after the course!} \\ \\texttt{#SBATCH -A hpc2n2023-132} \\ \\texttt{# Asking for 1 core} \\ \\texttt{#SBATCH -n 1} \\ \\texttt{# Asking for a walltime of 5 min} \\ \\texttt{#SBATCH \u2013time=00:05:00} \\ \\vspace{3mm} \\texttt{# Purge modules before loading new ones in a script. } \\ \\texttt{ml purge > /dev/null 2>\\&1} \\ \\texttt{ml foss/2021b} \\ \\vspace{3mm} \\texttt{./my_serial_program} \\end{footnotesize} \\end{block} \\begin{block}{} \\justify \\begin{footnotesize} Submit with: \\ \\texttt{sbatch \\(<\\) jobscript \\(>\\) } \\end{footnotesize} \\end{block} } \\frame{\\frametitle{The Batch System (SLURM)}\\framesubtitle{Example, MPI C program} \\begin{block}{} \\begin{footnotesize} \\texttt{#include \\(<\\) stdio.h \\(>\\) } \\ \\texttt{#include \\(<\\) mpi.h \\(>\\) } \\ \\vspace{3mm} \\texttt{int main (int argc, char *argv[]) {} \\ \\vspace{3mm} \\texttt{int myrank, size;} \\ \\vspace{3mm} \\texttt{MPI_Init(\\&argc, \\&argv);} \\ \\texttt{MPI_Comm_rank(MPI_COMM_WORLD, \\&myrank);} \\ \\texttt{MPI_Comm_size(MPI_COMM_WORLD, \\&size);} \\ \\vspace{3mm} \\texttt{printf(\u201cProcessor \\%d of \\%d: Hello World!\\textbackslash n\u201d, myrank, size);} \\ \\vspace{3mm} \\texttt{MPI_Finalize();} \\vspace{3mm} \\texttt{}} \\end{footnotesize} \\end{block} } \\frame{\\frametitle{The Batch System (SLURM)}\\framesubtitle{Simple example, parallel} \\begin{block}{} \\justify \\begin{footnotesize} Example: MPI job on Kebnekaise, compiler toolchain \u2018foss\u2019 \\end{footnotesize} \\end{block} \\begin{block}{} \\begin{footnotesize} \\texttt{#!/bin/bash} \\ \\texttt{#SBATCH -A hpc2n2023-132} \\ \\texttt{#SBATCH -n 14} \\ \\texttt{#SBATCH \u2013time=00:05:00} \\ \\texttt{##SBATCH \u2013exclusive} \\ \\texttt{#SBATCH \u2013reservation=intro-gpu} \\ \\vspace{3mm} \\texttt{module purge > /dev/null 2>\\&1} \\ \\texttt{ml foss/2021b} \\ \\vspace{3mm} \\texttt{srun ./my_parallel_program} \\end{footnotesize} \\end{block} } \\begin{frame}[fragile]\\frametitle{The Batch System (SLURM)}\\framesubtitle{Simple example, output} \\begin{block}{} \\justify Example: Output from a MPI job on Kebnekaise, run on 14 cores (one NUMA island) \\end{block} \\begin{block}{} \\begin{tiny} \\begin{verbatim} b-an01 [~/slurm]$ cat slurm-15952.out Processor 12 of 14: Hello World! Processor 5 of 14: Hello World! Processor 9 of 14: Hello World! Processor 4 of 14: Hello World! Processor 11 of 14: Hello World! Processor 13 of 14: Hello World! Processor 0 of 14: Hello World! Processor 1 of 14: Hello World! Processor 2 of 14: Hello World! Processor 3 of 14: Hello World! Processor 6 of 14: Hello World! Processor 7 of 14: Hello World! Processor 8 of 14: Hello World! Processor 10 of 14: Hello World! \\end{verbatim} \\end{tiny} \\end{block} \\end{frame} \\frame{\\frametitle{The Batch System (SLURM)}\\framesubtitle{Starting more than one serial job in the same submit file} \\begin{block}{} \\begin{small} \\texttt{#!/bin/bash} \\ \\texttt{#SBATCH -A hpc2n2023-132} \\ \\texttt{#SBATCH -n 5} \\ \\texttt{#SBATCH \u2013time=00:15:00} \\ \\vspace{3mm} \\texttt{module purge > /dev/null 2>\\&1} \\ \\texttt{ml foss/2021b} \\ \\vspace{3mm} \\texttt{srun -n 1 ./job1.batch \\&} \\ \\texttt{srun -n 1 ./job2.batch \\&} \\ \\texttt{srun -n 1 ./job3.batch \\&} \\ \\texttt{srun -n 1 ./job4.batch \\&} \\ \\texttt{srun -n 1 ./job5.batch } \\ \\texttt{wait} \\ \\end{small} \\end{block} } \\frame{\\frametitle{The Batch System (SLURM)}\\framesubtitle{Multiple Parallel Jobs Sequentially} \\begin{block}{} \\begin{scriptsize} \\texttt{#!/bin/bash} \\ \\texttt{#SBATCH -A hpc2n2023-132} \\ \\texttt{#SBATCH -c 28} \\ \\texttt{# Remember to ask for enough time for all jobs to complete} \\ \\texttt{#SBATCH \u2013time=02:00:00} \\ \\vspace{3mm} \\texttt{module purge > /dev/null 2>\\&1} \\ \\texttt{ml foss/2021b} \\ \\vspace{3mm} \\texttt{# Here 14 tasks with 2 cores per task. Output to file.} \\ \\texttt{# Not needed if your job creates output in a file} \\ \\texttt{# I also copy the output somewhere else and then run} \\ \\texttt{# another executable\u2026} \\ \\vspace{3mm} \\texttt{srun -n 14 -c 2 ./a.out > myoutput1 2>\\&1} \\ \\texttt{cp myoutput1 /pfs/nobackup/home/u/username/mydatadir} \\ \\texttt{srun -n 14 -c 2 ./b.out > myoutput2 2>\\&1} \\ \\texttt{cp myoutput2 /pfs/nobackup/home/u/username/mydatadir} \\ \\texttt{srun -n 14 -c 2 ./c.out > myoutput3 2>\\&1} \\ \\texttt{cp myoutput3 /pfs/nobackup/home/u/username/mydatadir} \\ \\end{scriptsize} \\end{block} } \\frame{\\frametitle{The Batch System (SLURM)}\\framesubtitle{Multiple Parallel Jobs Simultaneously} \\[\\begin{footnotesize} Make sure you ask for enough cores that all jobs can run at the same time, and have enough memory. Of course, this will also work for serial jobs - just remove the srun from the command line. \\end{footnotesize}\\] \\begin{block}{} \\begin{footnotesize} \\texttt{#!/bin/bash} \\ \\texttt{#SBATCH -A hpc2n2023-132} \\ \\texttt{# Total number of cores the jobs need} \\ \\texttt{#SBATCH -n 56} \\ \\texttt{# Remember to ask for enough time for all of the jobs to} \\ \\texttt{# complete, even the longest} \\ \\texttt{#SBATCH \u2013time=02:00:00} \\ \\vspace{3mm} \\texttt{module purge > /dev/null 2>\\&1} \\ \\texttt{ml foss/2021b} \\ \\vspace{3mm} \\texttt{srun -n 14 \u2013cpu_bind=cores ./a.out \\&} \\ \\texttt{srun -n 28 \u2013cpu_bind=cores ./b.out \\&} \\ \\texttt{srun -n 14 \u2013cpu_bind=cores ./c.out \\&} \\ \\texttt{\u2026} \\ \\texttt{wait} \\ \\end{footnotesize} \\end{block} } \\frame{\\frametitle{The Batch System (SLURM)}\\framesubtitle{GPU Job - V100} \\begin{block}{} \\begin{footnotesize} \\texttt{#!/bin/bash} \\ \\texttt{#SBATCH -A hpc2n2023-132} \\ \\texttt{# Expected time for job to complete} \\ \\texttt{#SBATCH \u2013time=00:10:00} \\ \\texttt{# Number of GPU cards needed. Here asking for 2 V100 cards} \\ \\texttt{#SBATCH \u2013gres=v100:2} \\ \\vspace{3mm} \\texttt{module purge > /dev/null 2>\\&1} \\ \\texttt{# Change to modules needed for your program} \\ \\texttt{ml fosscuda/2021b} \\ \\vspace{3mm} \\texttt{./my-cuda-program} \\ \\end{footnotesize} \\end{block} } \\frame{\\frametitle{The Batch System (SLURM)}\\framesubtitle{GPU Job - A100} \\begin{block}{} \\begin{footnotesize} \\texttt{#!/bin/bash} \\ \\texttt{#SBATCH -A hpc2n2023-132} \\ \\texttt{# Expected time for job to complete} \\ \\texttt{#SBATCH \u2013time=00:10:00} \\ \\texttt{# Adding the partition for the A100 GPUs} \\ \\texttt{#SBATCH -p amd_gpu} \\ \\texttt{# Number of GPU cards needed. Here asking for 2 A100 cards} \\ \\texttt{#SBATCH \u2013gres=a100:2} \\ \\vspace{3mm} \\texttt{module purge > /dev/null 2>\\&1} \\ \\texttt{# Change to modules needed for your software - remember to login} \\ \\texttt{# to kebnekaise-amd.hpc2n.umu.se or} \\ \\texttt{# kebnekaise-amd-tl.hpc2n.umu.se login node to see availability} \\ \\texttt{ml CUDA/11.7.0} \\ \\vspace{3mm} \\texttt{./my-cuda-program} \\ \\end{footnotesize} \\end{block} } \\frame{\\frametitle{Important information} \\begin{block}{} \\begin{itemize} \\begin{small} \\item The course project has the following project ID: hpc2n2023-132 \\item In order to use it in a batch job, add this to the batch script: \\begin{itemize} \\begin{small} \\item #SBATCH -A hpc2n2023-132 \\end{small} \\end{itemize} \\item There is a reservation with one A100 GPU node reserved for the course, in order to let us run small GPU examples without having to wait for too long. The reservation also is for one Broadwell CPU node. \\item The reservation is ONLY valid during the course: \\begin{itemize} \\begin{small} \\item intro-gpu \\ (add with #SBATCH \u2013reservation=intro-gpu) \\end{small} \\item To use the reservation with the A100 GPU node, also add \\texttt{#SBATCH -p amd_gpu} and \\texttt{#SBATCH \u2013gres=a100:x (for x=1,2)}. \\end{itemize} \\item We have a storage project linked to the compute project. It is hpc2n2023-132. You find it in /proj/nobackup/hpc2n2023-132. Remember to create your own directory under it. \\end{small} \\end{itemize} \\end{block} } \\frame{\\frametitle{Questions and support} \\begin{block}{} \\textbf{Questions?} Now: Ask me or one of the other support or application experts present. \\vspace{0.5cm} OR \\vspace{0.5cm} \\begin{itemize} \\item Documentation: \\texttt{https://www.hpc2n.umu.se/support} \\item Support questions to: \\texttt{https://supr.naiss.se/support/} or \\texttt{support@hpc2n.umu.se} \\end{itemize} \\end{block} } \\end{document}","title":"Compiling and Linking with Libraries"},{"location":"compilers/","text":"Compiling and Linking with Libraries \u00b6 Objectives Learn about the compilers at HPC2N How to load the compiler toolchains How to use the compilers What are the popular flags How to link with libraries. Installed compilers \u00b6 There are compilers available for Fortran 77, Fortran 90, Fortran 95, C, and C++. The compilers can produce both general-purpose code and architecture-specific optimized code to improve performance (loop-level optimizations, inter-procedural analysis and cache optimizations). Loading compilers \u00b6 Note You need to load a compiler suite (and possibly libraries, depending on what you need) before you can compile and link. Use ml av to get a list of available compiler toolchains as mentioned in the modules - compiler toolchains section. You load a compiler toolchain the same way you load any other module. They are always available directly, without the need to load prerequisites first. Example: Loading foss/2023b This compiler toolchain contains: GCC/13.2.0 , BLAS (with LAPACK , ScaLAPACK , and FFTW . b-an01 [ ~ ] $ ml foss/2023b b-an01 [ ~ ] $ ml Currently Loaded Modules: 1 ) snicenvironment ( S ) 7 ) numactl/2.0.16 13 ) libevent/2.1.12 19 ) FlexiBLAS/3.3.1 2 ) systemdefault ( S ) 8 ) XZ/5.4.4 14 ) UCX/1.15.0 20 ) FFTW/3.3.10 3 ) GCCcore/13.2.0 9 ) libxml2/2.11.5 15 ) PMIx/4.2.6 21 ) FFTW.MPI/3.3.10 4 ) zlib/1.2.13 10 ) libpciaccess/0.17 16 ) UCC/1.2.0 22 ) ScaLAPACK/2.2.0-fb 5 ) binutils/2.40 11 ) hwloc/2.9.2 17 ) OpenMPI/4.1.6 23 ) foss/2023b 6 ) GCC/13.2.0 12 ) OpenSSL/1.1 18 ) OpenBLAS/0.3.24 Where: S: Module is Sticky, requires --force to unload or purge b-an01 [ ~ ] $ Compiling \u00b6 Compiling with GCC \u00b6 Language Compiler name MPI Fortran77 gfortran mpif77 Fortran90 gfortran mpif90 Fortran95 gfortran N/A C gcc mpicc C++ g++ mpiCC Example: compiling hello.c You can find the file hello.c in the exercises directory, in the subdirectory \u201csimple\u201d. Or you can download it here: \\) } \\item Get list of your jobs: \\texttt{squeue -u \\(<\\) username \\(>\\) } \\item \\texttt{srun \\(<\\) commands for your job/program \\(>\\) } \\item Check on a specific job: \\texttt{scontrol show job \\(<\\) job id \\(>\\) } \\item Delete a specific job: \\texttt{scancel \\(<\\) job id \\(>\\) } \\item Delete all your own jobs: \\texttt{scancel -u \\(<\\) user \\(>\\) } \\item More detailed info about jobs: \\ \\end{footnotesize} \\begin{scriptsize} \\texttt{sacct -l -j \\(<\\) jobid \\(>\\) -o jobname,NTasks,nodelist,MaxRSS,MaxVMSize\u2026} \\end{scriptsize} \\begin{itemize} \\begin{footnotesize} \\item More flags can be found with \\texttt{man sacct} \\item The output will be \\textbf{very} wide. To view, use \\ \\texttt{sacct -l -j ....... | less -S} \\ (makes it sideways scrollable, using the left/right arrow key) \\end{footnotesize} \\end{itemize} \\begin{footnotesize} \\item Web url with graphical info about a job: \\texttt{job-usage \\(<\\) job-id \\(>\\) } \\end{footnotesize} \\end{itemize} Use \\texttt{man sbatch, man srun, man ....} for more information \\end{block} } \\frame{\\frametitle{The Batch System (SLURM)}\\framesubtitle{Job Output} \\begin{block}{} \\begin{itemize} \\item Output and errors in: \\ \\texttt{slurm- \\(<\\) job id \\(>\\) .out} \\item Look at it with vi, nano, emacs, cat, less\u2026 \\item To get output and error files split up, you can give these flags in the submit script: \\ \\texttt{#SBATCH \u2013error=job.\\%J.err} \\ \\texttt{#SBATCH \u2013output=job.\\%J.out} \\end{itemize} \\end{block} } \\frame{\\frametitle{The Batch System (SLURM)}\\framesubtitle{Using different parts of Kebnekaise} \\begin{block}{} \\begin{scriptsize} \\begin{itemize} \\item Use the \u2018fat\u2019 nodes by adding this flag to your script: \\ \\texttt{#SBATCH -p largemem} (separate resource) \\ \\item Specifying Intel Broadwell, Intel Skylake, or AMD Zen3 CPUs: \\ \\texttt{#SBATCH \u2013constraint=broadwell} \\ or \\ \\texttt{#SBATCH \u2013constraint=skylake} \\ or \\ \\texttt{#SBATCH \u2013constraint=zen3} \\ \\item Using the GPU nodes (separate resource): \\ \\texttt{#SBATCH \u2013gres=gpu: \\(<\\) type-of-card \\(>\\) :x} where \\(<\\) type-of-card \\(>\\) is either k80, v100, or a100 and x = 1, 2, or 4 (4 only for K80). \\ \\begin{itemize} \\begin{scriptsize} \\item In the case of the A100 GPU nodes, you also need to add a partition \\ \\texttt{#SBATCH -p amd_gpu} \\end{scriptsize} \\end{itemize} \\item Use the AMD login node for correct modules and compilers for AMD Zen3 and A100 nodes: \\ \\texttt{kebnekaise-amd-tl.hpc2n.umu.se} or \\\\texttt{kebnekaise-amd.hpc2n.umu.se} \\end{itemize} More on https://www.hpc2n.umu.se/documentation/guides/using_kebnekaise \\end{scriptsize} \\end{block} } \\frame{\\frametitle{The Batch System (SLURM)}\\framesubtitle{Simple example, serial} \\begin{block}{} \\justify \\begin{footnotesize} Example: Serial job on Kebnekaise, compiler toolchain \u2018foss\u2019 \\end{footnotesize} \\end{block} \\begin{block}{} \\begin{footnotesize} \\texttt{#!/bin/bash} \\ \\texttt{# Project id - change to your own after the course!} \\ \\texttt{#SBATCH -A hpc2n2023-132} \\ \\texttt{# Asking for 1 core} \\ \\texttt{#SBATCH -n 1} \\ \\texttt{# Asking for a walltime of 5 min} \\ \\texttt{#SBATCH \u2013time=00:05:00} \\ \\vspace{3mm} \\texttt{# Purge modules before loading new ones in a script. } \\ \\texttt{ml purge > /dev/null 2>\\&1} \\ \\texttt{ml foss/2021b} \\ \\vspace{3mm} \\texttt{./my_serial_program} \\end{footnotesize} \\end{block} \\begin{block}{} \\justify \\begin{footnotesize} Submit with: \\ \\texttt{sbatch \\(<\\) jobscript \\(>\\) } \\end{footnotesize} \\end{block} } \\frame{\\frametitle{The Batch System (SLURM)}\\framesubtitle{Example, MPI C program} \\begin{block}{} \\begin{footnotesize} \\texttt{#include \\(<\\) stdio.h \\(>\\) } \\ \\texttt{#include \\(<\\) mpi.h \\(>\\) } \\ \\vspace{3mm} \\texttt{int main (int argc, char *argv[]) {} \\ \\vspace{3mm} \\texttt{int myrank, size;} \\ \\vspace{3mm} \\texttt{MPI_Init(\\&argc, \\&argv);} \\ \\texttt{MPI_Comm_rank(MPI_COMM_WORLD, \\&myrank);} \\ \\texttt{MPI_Comm_size(MPI_COMM_WORLD, \\&size);} \\ \\vspace{3mm} \\texttt{printf(\u201cProcessor \\%d of \\%d: Hello World!\\textbackslash n\u201d, myrank, size);} \\ \\vspace{3mm} \\texttt{MPI_Finalize();} \\vspace{3mm} \\texttt{}} \\end{footnotesize} \\end{block} } \\frame{\\frametitle{The Batch System (SLURM)}\\framesubtitle{Simple example, parallel} \\begin{block}{} \\justify \\begin{footnotesize} Example: MPI job on Kebnekaise, compiler toolchain \u2018foss\u2019 \\end{footnotesize} \\end{block} \\begin{block}{} \\begin{footnotesize} \\texttt{#!/bin/bash} \\ \\texttt{#SBATCH -A hpc2n2023-132} \\ \\texttt{#SBATCH -n 14} \\ \\texttt{#SBATCH \u2013time=00:05:00} \\ \\texttt{##SBATCH \u2013exclusive} \\ \\texttt{#SBATCH \u2013reservation=intro-gpu} \\ \\vspace{3mm} \\texttt{module purge > /dev/null 2>\\&1} \\ \\texttt{ml foss/2021b} \\ \\vspace{3mm} \\texttt{srun ./my_parallel_program} \\end{footnotesize} \\end{block} } \\begin{frame}[fragile]\\frametitle{The Batch System (SLURM)}\\framesubtitle{Simple example, output} \\begin{block}{} \\justify Example: Output from a MPI job on Kebnekaise, run on 14 cores (one NUMA island) \\end{block} \\begin{block}{} \\begin{tiny} \\begin{verbatim} b-an01 [~/slurm]$ cat slurm-15952.out Processor 12 of 14: Hello World! Processor 5 of 14: Hello World! Processor 9 of 14: Hello World! Processor 4 of 14: Hello World! Processor 11 of 14: Hello World! Processor 13 of 14: Hello World! Processor 0 of 14: Hello World! Processor 1 of 14: Hello World! Processor 2 of 14: Hello World! Processor 3 of 14: Hello World! Processor 6 of 14: Hello World! Processor 7 of 14: Hello World! Processor 8 of 14: Hello World! Processor 10 of 14: Hello World! \\end{verbatim} \\end{tiny} \\end{block} \\end{frame} \\frame{\\frametitle{The Batch System (SLURM)}\\framesubtitle{Starting more than one serial job in the same submit file} \\begin{block}{} \\begin{small} \\texttt{#!/bin/bash} \\ \\texttt{#SBATCH -A hpc2n2023-132} \\ \\texttt{#SBATCH -n 5} \\ \\texttt{#SBATCH \u2013time=00:15:00} \\ \\vspace{3mm} \\texttt{module purge > /dev/null 2>\\&1} \\ \\texttt{ml foss/2021b} \\ \\vspace{3mm} \\texttt{srun -n 1 ./job1.batch \\&} \\ \\texttt{srun -n 1 ./job2.batch \\&} \\ \\texttt{srun -n 1 ./job3.batch \\&} \\ \\texttt{srun -n 1 ./job4.batch \\&} \\ \\texttt{srun -n 1 ./job5.batch } \\ \\texttt{wait} \\ \\end{small} \\end{block} } \\frame{\\frametitle{The Batch System (SLURM)}\\framesubtitle{Multiple Parallel Jobs Sequentially} \\begin{block}{} \\begin{scriptsize} \\texttt{#!/bin/bash} \\ \\texttt{#SBATCH -A hpc2n2023-132} \\ \\texttt{#SBATCH -c 28} \\ \\texttt{# Remember to ask for enough time for all jobs to complete} \\ \\texttt{#SBATCH \u2013time=02:00:00} \\ \\vspace{3mm} \\texttt{module purge > /dev/null 2>\\&1} \\ \\texttt{ml foss/2021b} \\ \\vspace{3mm} \\texttt{# Here 14 tasks with 2 cores per task. Output to file.} \\ \\texttt{# Not needed if your job creates output in a file} \\ \\texttt{# I also copy the output somewhere else and then run} \\ \\texttt{# another executable\u2026} \\ \\vspace{3mm} \\texttt{srun -n 14 -c 2 ./a.out > myoutput1 2>\\&1} \\ \\texttt{cp myoutput1 /pfs/nobackup/home/u/username/mydatadir} \\ \\texttt{srun -n 14 -c 2 ./b.out > myoutput2 2>\\&1} \\ \\texttt{cp myoutput2 /pfs/nobackup/home/u/username/mydatadir} \\ \\texttt{srun -n 14 -c 2 ./c.out > myoutput3 2>\\&1} \\ \\texttt{cp myoutput3 /pfs/nobackup/home/u/username/mydatadir} \\ \\end{scriptsize} \\end{block} } \\frame{\\frametitle{The Batch System (SLURM)}\\framesubtitle{Multiple Parallel Jobs Simultaneously} \\[\\begin{footnotesize} Make sure you ask for enough cores that all jobs can run at the same time, and have enough memory. Of course, this will also work for serial jobs - just remove the srun from the command line. \\end{footnotesize}\\] \\begin{block}{} \\begin{footnotesize} \\texttt{#!/bin/bash} \\ \\texttt{#SBATCH -A hpc2n2023-132} \\ \\texttt{# Total number of cores the jobs need} \\ \\texttt{#SBATCH -n 56} \\ \\texttt{# Remember to ask for enough time for all of the jobs to} \\ \\texttt{# complete, even the longest} \\ \\texttt{#SBATCH \u2013time=02:00:00} \\ \\vspace{3mm} \\texttt{module purge > /dev/null 2>\\&1} \\ \\texttt{ml foss/2021b} \\ \\vspace{3mm} \\texttt{srun -n 14 \u2013cpu_bind=cores ./a.out \\&} \\ \\texttt{srun -n 28 \u2013cpu_bind=cores ./b.out \\&} \\ \\texttt{srun -n 14 \u2013cpu_bind=cores ./c.out \\&} \\ \\texttt{\u2026} \\ \\texttt{wait} \\ \\end{footnotesize} \\end{block} } \\frame{\\frametitle{The Batch System (SLURM)}\\framesubtitle{GPU Job - V100} \\begin{block}{} \\begin{footnotesize} \\texttt{#!/bin/bash} \\ \\texttt{#SBATCH -A hpc2n2023-132} \\ \\texttt{# Expected time for job to complete} \\ \\texttt{#SBATCH \u2013time=00:10:00} \\ \\texttt{# Number of GPU cards needed. Here asking for 2 V100 cards} \\ \\texttt{#SBATCH \u2013gres=v100:2} \\ \\vspace{3mm} \\texttt{module purge > /dev/null 2>\\&1} \\ \\texttt{# Change to modules needed for your program} \\ \\texttt{ml fosscuda/2021b} \\ \\vspace{3mm} \\texttt{./my-cuda-program} \\ \\end{footnotesize} \\end{block} } \\frame{\\frametitle{The Batch System (SLURM)}\\framesubtitle{GPU Job - A100} \\begin{block}{} \\begin{footnotesize} \\texttt{#!/bin/bash} \\ \\texttt{#SBATCH -A hpc2n2023-132} \\ \\texttt{# Expected time for job to complete} \\ \\texttt{#SBATCH \u2013time=00:10:00} \\ \\texttt{# Adding the partition for the A100 GPUs} \\ \\texttt{#SBATCH -p amd_gpu} \\ \\texttt{# Number of GPU cards needed. Here asking for 2 A100 cards} \\ \\texttt{#SBATCH \u2013gres=a100:2} \\ \\vspace{3mm} \\texttt{module purge > /dev/null 2>\\&1} \\ \\texttt{# Change to modules needed for your software - remember to login} \\ \\texttt{# to kebnekaise-amd.hpc2n.umu.se or} \\ \\texttt{# kebnekaise-amd-tl.hpc2n.umu.se login node to see availability} \\ \\texttt{ml CUDA/11.7.0} \\ \\vspace{3mm} \\texttt{./my-cuda-program} \\ \\end{footnotesize} \\end{block} } \\frame{\\frametitle{Important information} \\begin{block}{} \\begin{itemize} \\begin{small} \\item The course project has the following project ID: hpc2n2023-132 \\item In order to use it in a batch job, add this to the batch script: \\begin{itemize} \\begin{small} \\item #SBATCH -A hpc2n2023-132 \\end{small} \\end{itemize} \\item There is a reservation with one A100 GPU node reserved for the course, in order to let us run small GPU examples without having to wait for too long. The reservation also is for one Broadwell CPU node. \\item The reservation is ONLY valid during the course: \\begin{itemize} \\begin{small} \\item intro-gpu \\ (add with #SBATCH \u2013reservation=intro-gpu) \\end{small} \\item To use the reservation with the A100 GPU node, also add \\texttt{#SBATCH -p amd_gpu} and \\texttt{#SBATCH \u2013gres=a100:x (for x=1,2)}. \\end{itemize} \\item We have a storage project linked to the compute project. It is hpc2n2023-132. You find it in /proj/nobackup/hpc2n2023-132. Remember to create your own directory under it. \\end{small} \\end{itemize} \\end{block} } \\frame{\\frametitle{Questions and support} \\begin{block}{} \\textbf{Questions?} Now: Ask me or one of the other support or application experts present. \\vspace{0.5cm} OR \\vspace{0.5cm} \\begin{itemize} \\item Documentation: \\texttt{https://www.hpc2n.umu.se/support} \\item Support questions to: \\texttt{https://supr.naiss.se/support/} or \\texttt{support@hpc2n.umu.se} \\end{itemize} \\end{block} } \\end{document}","title":"Compiling"},{"location":"compilers/#compiling__and__linking__with__libraries","text":"Objectives Learn about the compilers at HPC2N How to load the compiler toolchains How to use the compilers What are the popular flags How to link with libraries.","title":"Compiling and Linking with Libraries"},{"location":"compilers/#installed__compilers","text":"There are compilers available for Fortran 77, Fortran 90, Fortran 95, C, and C++. The compilers can produce both general-purpose code and architecture-specific optimized code to improve performance (loop-level optimizations, inter-procedural analysis and cache optimizations).","title":"Installed compilers"},{"location":"compilers/#loading__compilers","text":"Note You need to load a compiler suite (and possibly libraries, depending on what you need) before you can compile and link. Use ml av to get a list of available compiler toolchains as mentioned in the modules - compiler toolchains section. You load a compiler toolchain the same way you load any other module. They are always available directly, without the need to load prerequisites first. Example: Loading foss/2023b This compiler toolchain contains: GCC/13.2.0 , BLAS (with LAPACK , ScaLAPACK , and FFTW . b-an01 [ ~ ] $ ml foss/2023b b-an01 [ ~ ] $ ml Currently Loaded Modules: 1 ) snicenvironment ( S ) 7 ) numactl/2.0.16 13 ) libevent/2.1.12 19 ) FlexiBLAS/3.3.1 2 ) systemdefault ( S ) 8 ) XZ/5.4.4 14 ) UCX/1.15.0 20 ) FFTW/3.3.10 3 ) GCCcore/13.2.0 9 ) libxml2/2.11.5 15 ) PMIx/4.2.6 21 ) FFTW.MPI/3.3.10 4 ) zlib/1.2.13 10 ) libpciaccess/0.17 16 ) UCC/1.2.0 22 ) ScaLAPACK/2.2.0-fb 5 ) binutils/2.40 11 ) hwloc/2.9.2 17 ) OpenMPI/4.1.6 23 ) foss/2023b 6 ) GCC/13.2.0 12 ) OpenSSL/1.1 18 ) OpenBLAS/0.3.24 Where: S: Module is Sticky, requires --force to unload or purge b-an01 [ ~ ] $","title":"Loading compilers"},{"location":"compilers/#compiling","text":"","title":"Compiling"},{"location":"compilers/#compiling__with__gcc","text":"Language Compiler name MPI Fortran77 gfortran mpif77 Fortran90 gfortran mpif90 Fortran95 gfortran N/A C gcc mpicc C++ g++ mpiCC Example: compiling hello.c You can find the file hello.c in the exercises directory, in the subdirectory \u201csimple\u201d. Or you can download it here: \\) } \\item Get list of your jobs: \\texttt{squeue -u \\(<\\) username \\(>\\) } \\item \\texttt{srun \\(<\\) commands for your job/program \\(>\\) } \\item Check on a specific job: \\texttt{scontrol show job \\(<\\) job id \\(>\\) } \\item Delete a specific job: \\texttt{scancel \\(<\\) job id \\(>\\) } \\item Delete all your own jobs: \\texttt{scancel -u \\(<\\) user \\(>\\) } \\item More detailed info about jobs: \\ \\end{footnotesize} \\begin{scriptsize} \\texttt{sacct -l -j \\(<\\) jobid \\(>\\) -o jobname,NTasks,nodelist,MaxRSS,MaxVMSize\u2026} \\end{scriptsize} \\begin{itemize} \\begin{footnotesize} \\item More flags can be found with \\texttt{man sacct} \\item The output will be \\textbf{very} wide. To view, use \\ \\texttt{sacct -l -j ....... | less -S} \\ (makes it sideways scrollable, using the left/right arrow key) \\end{footnotesize} \\end{itemize} \\begin{footnotesize} \\item Web url with graphical info about a job: \\texttt{job-usage \\(<\\) job-id \\(>\\) } \\end{footnotesize} \\end{itemize} Use \\texttt{man sbatch, man srun, man ....} for more information \\end{block} } \\frame{\\frametitle{The Batch System (SLURM)}\\framesubtitle{Job Output} \\begin{block}{} \\begin{itemize} \\item Output and errors in: \\ \\texttt{slurm- \\(<\\) job id \\(>\\) .out} \\item Look at it with vi, nano, emacs, cat, less\u2026 \\item To get output and error files split up, you can give these flags in the submit script: \\ \\texttt{#SBATCH \u2013error=job.\\%J.err} \\ \\texttt{#SBATCH \u2013output=job.\\%J.out} \\end{itemize} \\end{block} } \\frame{\\frametitle{The Batch System (SLURM)}\\framesubtitle{Using different parts of Kebnekaise} \\begin{block}{} \\begin{scriptsize} \\begin{itemize} \\item Use the \u2018fat\u2019 nodes by adding this flag to your script: \\ \\texttt{#SBATCH -p largemem} (separate resource) \\ \\item Specifying Intel Broadwell, Intel Skylake, or AMD Zen3 CPUs: \\ \\texttt{#SBATCH \u2013constraint=broadwell} \\ or \\ \\texttt{#SBATCH \u2013constraint=skylake} \\ or \\ \\texttt{#SBATCH \u2013constraint=zen3} \\ \\item Using the GPU nodes (separate resource): \\ \\texttt{#SBATCH \u2013gres=gpu: \\(<\\) type-of-card \\(>\\) :x} where \\(<\\) type-of-card \\(>\\) is either k80, v100, or a100 and x = 1, 2, or 4 (4 only for K80). \\ \\begin{itemize} \\begin{scriptsize} \\item In the case of the A100 GPU nodes, you also need to add a partition \\ \\texttt{#SBATCH -p amd_gpu} \\end{scriptsize} \\end{itemize} \\item Use the AMD login node for correct modules and compilers for AMD Zen3 and A100 nodes: \\ \\texttt{kebnekaise-amd-tl.hpc2n.umu.se} or \\\\texttt{kebnekaise-amd.hpc2n.umu.se} \\end{itemize} More on https://www.hpc2n.umu.se/documentation/guides/using_kebnekaise \\end{scriptsize} \\end{block} } \\frame{\\frametitle{The Batch System (SLURM)}\\framesubtitle{Simple example, serial} \\begin{block}{} \\justify \\begin{footnotesize} Example: Serial job on Kebnekaise, compiler toolchain \u2018foss\u2019 \\end{footnotesize} \\end{block} \\begin{block}{} \\begin{footnotesize} \\texttt{#!/bin/bash} \\ \\texttt{# Project id - change to your own after the course!} \\ \\texttt{#SBATCH -A hpc2n2023-132} \\ \\texttt{# Asking for 1 core} \\ \\texttt{#SBATCH -n 1} \\ \\texttt{# Asking for a walltime of 5 min} \\ \\texttt{#SBATCH \u2013time=00:05:00} \\ \\vspace{3mm} \\texttt{# Purge modules before loading new ones in a script. } \\ \\texttt{ml purge > /dev/null 2>\\&1} \\ \\texttt{ml foss/2021b} \\ \\vspace{3mm} \\texttt{./my_serial_program} \\end{footnotesize} \\end{block} \\begin{block}{} \\justify \\begin{footnotesize} Submit with: \\ \\texttt{sbatch \\(<\\) jobscript \\(>\\) } \\end{footnotesize} \\end{block} } \\frame{\\frametitle{The Batch System (SLURM)}\\framesubtitle{Example, MPI C program} \\begin{block}{} \\begin{footnotesize} \\texttt{#include \\(<\\) stdio.h \\(>\\) } \\ \\texttt{#include \\(<\\) mpi.h \\(>\\) } \\ \\vspace{3mm} \\texttt{int main (int argc, char *argv[]) {} \\ \\vspace{3mm} \\texttt{int myrank, size;} \\ \\vspace{3mm} \\texttt{MPI_Init(\\&argc, \\&argv);} \\ \\texttt{MPI_Comm_rank(MPI_COMM_WORLD, \\&myrank);} \\ \\texttt{MPI_Comm_size(MPI_COMM_WORLD, \\&size);} \\ \\vspace{3mm} \\texttt{printf(\u201cProcessor \\%d of \\%d: Hello World!\\textbackslash n\u201d, myrank, size);} \\ \\vspace{3mm} \\texttt{MPI_Finalize();} \\vspace{3mm} \\texttt{}} \\end{footnotesize} \\end{block} } \\frame{\\frametitle{The Batch System (SLURM)}\\framesubtitle{Simple example, parallel} \\begin{block}{} \\justify \\begin{footnotesize} Example: MPI job on Kebnekaise, compiler toolchain \u2018foss\u2019 \\end{footnotesize} \\end{block} \\begin{block}{} \\begin{footnotesize} \\texttt{#!/bin/bash} \\ \\texttt{#SBATCH -A hpc2n2023-132} \\ \\texttt{#SBATCH -n 14} \\ \\texttt{#SBATCH \u2013time=00:05:00} \\ \\texttt{##SBATCH \u2013exclusive} \\ \\texttt{#SBATCH \u2013reservation=intro-gpu} \\ \\vspace{3mm} \\texttt{module purge > /dev/null 2>\\&1} \\ \\texttt{ml foss/2021b} \\ \\vspace{3mm} \\texttt{srun ./my_parallel_program} \\end{footnotesize} \\end{block} } \\begin{frame}[fragile]\\frametitle{The Batch System (SLURM)}\\framesubtitle{Simple example, output} \\begin{block}{} \\justify Example: Output from a MPI job on Kebnekaise, run on 14 cores (one NUMA island) \\end{block} \\begin{block}{} \\begin{tiny} \\begin{verbatim} b-an01 [~/slurm]$ cat slurm-15952.out Processor 12 of 14: Hello World! Processor 5 of 14: Hello World! Processor 9 of 14: Hello World! Processor 4 of 14: Hello World! Processor 11 of 14: Hello World! Processor 13 of 14: Hello World! Processor 0 of 14: Hello World! Processor 1 of 14: Hello World! Processor 2 of 14: Hello World! Processor 3 of 14: Hello World! Processor 6 of 14: Hello World! Processor 7 of 14: Hello World! Processor 8 of 14: Hello World! Processor 10 of 14: Hello World! \\end{verbatim} \\end{tiny} \\end{block} \\end{frame} \\frame{\\frametitle{The Batch System (SLURM)}\\framesubtitle{Starting more than one serial job in the same submit file} \\begin{block}{} \\begin{small} \\texttt{#!/bin/bash} \\ \\texttt{#SBATCH -A hpc2n2023-132} \\ \\texttt{#SBATCH -n 5} \\ \\texttt{#SBATCH \u2013time=00:15:00} \\ \\vspace{3mm} \\texttt{module purge > /dev/null 2>\\&1} \\ \\texttt{ml foss/2021b} \\ \\vspace{3mm} \\texttt{srun -n 1 ./job1.batch \\&} \\ \\texttt{srun -n 1 ./job2.batch \\&} \\ \\texttt{srun -n 1 ./job3.batch \\&} \\ \\texttt{srun -n 1 ./job4.batch \\&} \\ \\texttt{srun -n 1 ./job5.batch } \\ \\texttt{wait} \\ \\end{small} \\end{block} } \\frame{\\frametitle{The Batch System (SLURM)}\\framesubtitle{Multiple Parallel Jobs Sequentially} \\begin{block}{} \\begin{scriptsize} \\texttt{#!/bin/bash} \\ \\texttt{#SBATCH -A hpc2n2023-132} \\ \\texttt{#SBATCH -c 28} \\ \\texttt{# Remember to ask for enough time for all jobs to complete} \\ \\texttt{#SBATCH \u2013time=02:00:00} \\ \\vspace{3mm} \\texttt{module purge > /dev/null 2>\\&1} \\ \\texttt{ml foss/2021b} \\ \\vspace{3mm} \\texttt{# Here 14 tasks with 2 cores per task. Output to file.} \\ \\texttt{# Not needed if your job creates output in a file} \\ \\texttt{# I also copy the output somewhere else and then run} \\ \\texttt{# another executable\u2026} \\ \\vspace{3mm} \\texttt{srun -n 14 -c 2 ./a.out > myoutput1 2>\\&1} \\ \\texttt{cp myoutput1 /pfs/nobackup/home/u/username/mydatadir} \\ \\texttt{srun -n 14 -c 2 ./b.out > myoutput2 2>\\&1} \\ \\texttt{cp myoutput2 /pfs/nobackup/home/u/username/mydatadir} \\ \\texttt{srun -n 14 -c 2 ./c.out > myoutput3 2>\\&1} \\ \\texttt{cp myoutput3 /pfs/nobackup/home/u/username/mydatadir} \\ \\end{scriptsize} \\end{block} } \\frame{\\frametitle{The Batch System (SLURM)}\\framesubtitle{Multiple Parallel Jobs Simultaneously} \\[\\begin{footnotesize} Make sure you ask for enough cores that all jobs can run at the same time, and have enough memory. Of course, this will also work for serial jobs - just remove the srun from the command line. \\end{footnotesize}\\] \\begin{block}{} \\begin{footnotesize} \\texttt{#!/bin/bash} \\ \\texttt{#SBATCH -A hpc2n2023-132} \\ \\texttt{# Total number of cores the jobs need} \\ \\texttt{#SBATCH -n 56} \\ \\texttt{# Remember to ask for enough time for all of the jobs to} \\ \\texttt{# complete, even the longest} \\ \\texttt{#SBATCH \u2013time=02:00:00} \\ \\vspace{3mm} \\texttt{module purge > /dev/null 2>\\&1} \\ \\texttt{ml foss/2021b} \\ \\vspace{3mm} \\texttt{srun -n 14 \u2013cpu_bind=cores ./a.out \\&} \\ \\texttt{srun -n 28 \u2013cpu_bind=cores ./b.out \\&} \\ \\texttt{srun -n 14 \u2013cpu_bind=cores ./c.out \\&} \\ \\texttt{\u2026} \\ \\texttt{wait} \\ \\end{footnotesize} \\end{block} } \\frame{\\frametitle{The Batch System (SLURM)}\\framesubtitle{GPU Job - V100} \\begin{block}{} \\begin{footnotesize} \\texttt{#!/bin/bash} \\ \\texttt{#SBATCH -A hpc2n2023-132} \\ \\texttt{# Expected time for job to complete} \\ \\texttt{#SBATCH \u2013time=00:10:00} \\ \\texttt{# Number of GPU cards needed. Here asking for 2 V100 cards} \\ \\texttt{#SBATCH \u2013gres=v100:2} \\ \\vspace{3mm} \\texttt{module purge > /dev/null 2>\\&1} \\ \\texttt{# Change to modules needed for your program} \\ \\texttt{ml fosscuda/2021b} \\ \\vspace{3mm} \\texttt{./my-cuda-program} \\ \\end{footnotesize} \\end{block} } \\frame{\\frametitle{The Batch System (SLURM)}\\framesubtitle{GPU Job - A100} \\begin{block}{} \\begin{footnotesize} \\texttt{#!/bin/bash} \\ \\texttt{#SBATCH -A hpc2n2023-132} \\ \\texttt{# Expected time for job to complete} \\ \\texttt{#SBATCH \u2013time=00:10:00} \\ \\texttt{# Adding the partition for the A100 GPUs} \\ \\texttt{#SBATCH -p amd_gpu} \\ \\texttt{# Number of GPU cards needed. Here asking for 2 A100 cards} \\ \\texttt{#SBATCH \u2013gres=a100:2} \\ \\vspace{3mm} \\texttt{module purge > /dev/null 2>\\&1} \\ \\texttt{# Change to modules needed for your software - remember to login} \\ \\texttt{# to kebnekaise-amd.hpc2n.umu.se or} \\ \\texttt{# kebnekaise-amd-tl.hpc2n.umu.se login node to see availability} \\ \\texttt{ml CUDA/11.7.0} \\ \\vspace{3mm} \\texttt{./my-cuda-program} \\ \\end{footnotesize} \\end{block} } \\frame{\\frametitle{Important information} \\begin{block}{} \\begin{itemize} \\begin{small} \\item The course project has the following project ID: hpc2n2023-132 \\item In order to use it in a batch job, add this to the batch script: \\begin{itemize} \\begin{small} \\item #SBATCH -A hpc2n2023-132 \\end{small} \\end{itemize} \\item There is a reservation with one A100 GPU node reserved for the course, in order to let us run small GPU examples without having to wait for too long. The reservation also is for one Broadwell CPU node. \\item The reservation is ONLY valid during the course: \\begin{itemize} \\begin{small} \\item intro-gpu \\ (add with #SBATCH \u2013reservation=intro-gpu) \\end{small} \\item To use the reservation with the A100 GPU node, also add \\texttt{#SBATCH -p amd_gpu} and \\texttt{#SBATCH \u2013gres=a100:x (for x=1,2)}. \\end{itemize} \\item We have a storage project linked to the compute project. It is hpc2n2023-132. You find it in /proj/nobackup/hpc2n2023-132. Remember to create your own directory under it. \\end{small} \\end{itemize} \\end{block} } \\frame{\\frametitle{Questions and support} \\begin{block}{} \\textbf{Questions?} Now: Ask me or one of the other support or application experts present. \\vspace{0.5cm} OR \\vspace{0.5cm} \\begin{itemize} \\item Documentation: \\texttt{https://www.hpc2n.umu.se/support} \\item Support questions to: \\texttt{https://supr.naiss.se/support/} or \\texttt{support@hpc2n.umu.se} \\end{itemize} \\end{block} } \\end{document}","title":"Build environment"},{"location":"filesystem/","text":"The File System \u00b6 Objectives Learn about the file system on Kebnekaise Find the project storage for this course and create your own subdirectory Overview \u00b6 Project storage $HOME /scratch Recommended for batch jobs Yes No (size) Yes Backed up No Yes No Accessible by batch system Yes Yes Yes (node only) Performance High High Medium Default readability Group only Owner Owner Permissions management chmod, chgrp, ACL chmod, chgrp, ACL N/A for batch jobs Notes Storage your group get allocated through the storage projects Your home-directory Per node $HOME \u00b6 This is your home-directory (pointed to by the $HOME variable). It has a quota limit of 25GB per default. Your home directory is backed up regularly. Note Since the home directory is quite small, it should not be used for most production jobs. These should instead be run from project storage directories. To find the path to your home directory, either run pwd just after logging in, or do the following: b-an01 [ ~/store ] $ cd b-an01 [ ~ ] $ pwd /home/u/username b-an01 [ ~ ] $ Project storage \u00b6 Project storage is where a project\u2019s members have the majority of their storage. It is applied for through SUPR, as a storage project. While storage projects needs to be applied for separately, they are usually linked to a compute project. This is where you should keep your data and run your batch jobs from. It offers high performance when accessed from the nodes making it suitable for storage that are to be accessed from parallel jobs, and your home directory (usually) has too little space. Project storage is located below /proj/nobackup/ in the directory name selected during the creation of the proposal. Note The project storage is not intended for permanent storage and there is NO BACKUP of /proj/nobackup . Using project storage \u00b6 If you have a storage project, you should use that to run your jobs. You (your PI) will either choose a directory name when you/they apply for the storage project or get the project id as default name. The location of the storage project in the file system is /proj/nobackup/NAME-YOU-PICKED Since the storage project is shared between all users of the project, you should go to that directory and create a subdirectory for your things, which you will then be using.- For this course the storage is in /proj/nobackup/intro-hpc2n Exercise Go to the course project storage and create a subdirectory for yourself. Now is a good time to prepare the course material and download the exercises. The easiest way to do so is by cloning the whole intro-course repository from GitHub. Exercise Go to the subdirectory you created under /proj/nobackup/intro-hpc2n Clone the repository for the course: git clone https://github.com/hpc2n/intro-course.git You will get a directory called intro-course . Below it you will find a directory called \u201cexercises\u201d where the majority of the exercises for the batch system section is located. Quota \u00b6 The size of the storage depends on the allocation. There are small, medium, and large storage projects, each with their own requirements. You can read about this on SUPR. The quota limits are specific for the project as such, there are no user level quotas on that space. /scratch \u00b6 Our recommendation is that you use the project storage instead of /scratch when working on Compute nodes or Login nodes. On the computers at HPC2N there is a directory called /scratch . It is a small local area split between the users using the node and it can be used for saving (temporary) files you create or need during your computations. Please do not save files in /scratch you don\u2019t need when not running jobs on the machine, and please make sure your job removes any temporary files it creates. Note When anybody need more space than available on /scratch , we will remove the oldest/largest files without any notices. More information about the file system, as well as archiving and compressing files, at the HPC2N documentation about File Systems . Keypoints When you login to Kebnekaise, you will end up in your home-directory. Your home-directory is in /home/u/username and is pointed to by the environment variable $HOME . Your project storage is located in /proj/nobackup/NAME-YOU-PICKED For this course it is /proj/nobackup/intro-hpc2n . The project storage is NOT backed up. You should run the batch jobs from your project storage.","title":"The File System"},{"location":"filesystem/#the__file__system","text":"Objectives Learn about the file system on Kebnekaise Find the project storage for this course and create your own subdirectory","title":"The File System"},{"location":"filesystem/#overview","text":"Project storage $HOME /scratch Recommended for batch jobs Yes No (size) Yes Backed up No Yes No Accessible by batch system Yes Yes Yes (node only) Performance High High Medium Default readability Group only Owner Owner Permissions management chmod, chgrp, ACL chmod, chgrp, ACL N/A for batch jobs Notes Storage your group get allocated through the storage projects Your home-directory Per node","title":"Overview"},{"location":"filesystem/#home","text":"This is your home-directory (pointed to by the $HOME variable). It has a quota limit of 25GB per default. Your home directory is backed up regularly. Note Since the home directory is quite small, it should not be used for most production jobs. These should instead be run from project storage directories. To find the path to your home directory, either run pwd just after logging in, or do the following: b-an01 [ ~/store ] $ cd b-an01 [ ~ ] $ pwd /home/u/username b-an01 [ ~ ] $","title":"$HOME"},{"location":"filesystem/#project__storage","text":"Project storage is where a project\u2019s members have the majority of their storage. It is applied for through SUPR, as a storage project. While storage projects needs to be applied for separately, they are usually linked to a compute project. This is where you should keep your data and run your batch jobs from. It offers high performance when accessed from the nodes making it suitable for storage that are to be accessed from parallel jobs, and your home directory (usually) has too little space. Project storage is located below /proj/nobackup/ in the directory name selected during the creation of the proposal. Note The project storage is not intended for permanent storage and there is NO BACKUP of /proj/nobackup .","title":"Project storage"},{"location":"filesystem/#using__project__storage","text":"If you have a storage project, you should use that to run your jobs. You (your PI) will either choose a directory name when you/they apply for the storage project or get the project id as default name. The location of the storage project in the file system is /proj/nobackup/NAME-YOU-PICKED Since the storage project is shared between all users of the project, you should go to that directory and create a subdirectory for your things, which you will then be using.- For this course the storage is in /proj/nobackup/intro-hpc2n Exercise Go to the course project storage and create a subdirectory for yourself. Now is a good time to prepare the course material and download the exercises. The easiest way to do so is by cloning the whole intro-course repository from GitHub. Exercise Go to the subdirectory you created under /proj/nobackup/intro-hpc2n Clone the repository for the course: git clone https://github.com/hpc2n/intro-course.git You will get a directory called intro-course . Below it you will find a directory called \u201cexercises\u201d where the majority of the exercises for the batch system section is located.","title":"Using project storage"},{"location":"filesystem/#quota","text":"The size of the storage depends on the allocation. There are small, medium, and large storage projects, each with their own requirements. You can read about this on SUPR. The quota limits are specific for the project as such, there are no user level quotas on that space.","title":"Quota"},{"location":"filesystem/#scratch","text":"Our recommendation is that you use the project storage instead of /scratch when working on Compute nodes or Login nodes. On the computers at HPC2N there is a directory called /scratch . It is a small local area split between the users using the node and it can be used for saving (temporary) files you create or need during your computations. Please do not save files in /scratch you don\u2019t need when not running jobs on the machine, and please make sure your job removes any temporary files it creates. Note When anybody need more space than available on /scratch , we will remove the oldest/largest files without any notices. More information about the file system, as well as archiving and compressing files, at the HPC2N documentation about File Systems . Keypoints When you login to Kebnekaise, you will end up in your home-directory. Your home-directory is in /home/u/username and is pointed to by the environment variable $HOME . Your project storage is located in /proj/nobackup/NAME-YOU-PICKED For this course it is /proj/nobackup/intro-hpc2n . The project storage is NOT backed up. You should run the batch jobs from your project storage.","title":"/scratch"},{"location":"intro/","text":"Introduction to HPC2N, Kebnekaise and HPC \u00b6 Welcome page and syllabus: https://hpc2n.github.io/intro-linux/index.html Also link at the House symbol at the top of the page. HPC2N \u00b6 Note High Performance Computing Center North (HPC2N) is a competence center for Scientific and Parallel Computing part of National Academic Infrastructure for Super\u00adcomputing in Sweden (NAISS) HPC2N provides state-of-the-art resources and expertise: Scalable and parallel HPC Large-scale storage facilities (Project storage (Lustre), SweStore, Tape) Grid and cloud computing (WLCG NT1, Swedish Science Cloud) National Data Science Node in \u201dEpidemiology and Biology of Infections\u201d (DDLS) Software for e-Science applications All levels of user support Primary, advanced, dedicated Application Experts (AEs) Primary objective To raise the national and local level of HPC competence and transfer HPC knowledge and technology to new users in academia and industry. HPC2N partners \u00b6 HPC2N is hosted by: Partners: HPC2N funding and collaborations \u00b6 Funded mainly by Ume\u00e5 University , with contributions from the other HPC2N partners . Involved in several projects and collaborations : HPC2N training and other services \u00b6 User support (primary, advanced, dedicated) Research group meetings @ UmU Also at the partner sites Online \u201cHPC2N fika\u201d User training and education program 0.5 \u2013 5 days; ready-to-run exercises Introduction to Linux, 16 September 2024 Introduction to HPC2N and Kebnekaise, 16 September 2024 Parallel programming and tools (OpenMP, MPI, debugging, perf. analyzers, Matlab, R, MD simulation, ML, GPU, \u2026) Basic Singularity, 16 October 2024 Introduction to running R, Python, Julia, and Matlab in HPC, 22-25 October 2024 Introduction to Git, 25-29 November 2024 Using Python in an HPC environment, 5-6 December 2024 Updated list: https://www.hpc2n.umu.se/events/courses Workshops and seminars NGSSC / SeSE & university courses HPC2N personnel \u00b6 Management: Paolo Bientinesi, director Bj\u00f6rn Torkelsson, deputy director Lena Hellman, administrator Application experts: Jerry Eriksson Pedro Ojeda May Birgitte Bryds\u00f6 \u00c5ke Sandgren Others: Mikael R\u00e4nnar (WLCG coord) Research Engineers under DDLS, HPC2N/SciLifeLab Paul Dulaud, System Developer, IT Abdullah Aziz, Data Engineer Data Steward System and support: Erik Andersson Birgitte Bryds\u00f6 Niklas Edmundsson (Tape coord) My Karlsson Roger Oscarsson \u00c5ke Sandgren Mattias Wadenstein (NeIC, Tier1) Lars Viklund HPC2N application experts \u00b6 HPC2N provides advanced and dedicated support in the form of Application Experts (AEs) : Jerry Eriksson: Profiling, Machine learning (DNN), MPI, OpenMP, OpenACC Pedro Ojeda May: Molecular dynamics, Profiling, QM/MM, NAMD, Amber, Gromacs, GAUSSIAN, R, Python \u00c5ke Sandgren: General high level programming assistance, VASP, Gromacs, Amber Birgitte Bryds\u00f6: General HPC, R, Python Contact through regular support HPC2N users by discipline \u00b6 Users from several scientific disciplines: Biosciences and medicine Chemistry Computing science Engineering Materials science Mathematics and statistics Physics including space physics ML, DL, and other AI HPC2N users by discipline, largest users \u00b6 Users from several scientific disciplines: Biosciences and medicine Chemistry Computing science Engineering Materials science Mathematics and statistics Physics including space physics Machine learning and artificial intelligence (several new projects) HPC2N users by software \u00b6 Kebnekaise \u00b6 The current supercomputer at HPC2N. It is a very heterogeneous system. Named after a massif (contains some of Sweden\u2019s highest mountain peaks) Kebnekaise was delivered by Lenovo and installed during the summer 2016 Opened up for general availability on November 7, 2016 In 2018, Kebnekaise was extended with 52 Intel Xeon Gold 6132 (Skylake) nodes, as well as 10 NVidian V100 (Volta) GPU nodes In 2023, Kebnekaise was extended with 2 dual NVIDIA A100 GPU nodes one many-core AMD Zen3 CPU node Kebnekaise will be continuosly upgraded, as old hardware gets retired. In 2024 Kebnekaise was extended with 2 Dual socket GPU-nodes: Lenovo ThinkSystem SR675 V3 2 x AMD EPYC 9454 48C 290W 2.75GHz Processor 768GB [24x 32GB TruDDR5 4800MHz RDIMM-A] 1 x 3.84TB Read Intensive NVMe PCIe 4.0 x4 HS SSD 1 x NVIDIA H100 SXM5 700W 80G HBM3 GPU Board 10 dual-socket GPU-nodes: ThinkSystem SR665 V3 2 x AMD EPYC 9254 24C 200W 2.9GHz Processor 384GB [24x 16GB TruDDR5 4800MHz RDIMM-A] 1 x 1.92TB Read Intensive NVMe PCIe 5.0 x4 HS SSD 2 x NVIDIA L40S 48GB PCIe Gen4 Passive GPU 8 dual-socket CPU only: ThinkSystem SR645 V3 2 x AMD EPYC 9754 128C 360W 2.25GHz Processor 768GB [24x 32GB TruDDR5 4800MHz RDIMM-A] 1 x 1 3.84TB Read Intensive NVMe PCIe 4.0 x4 HS SSD Current hardware in Kebnekaise \u00b6 Kebnekaise have CPU-only, GPU enabled and large memory nodes. The CPU-only nodes are: 2 x 14 core Intel broadwell 4460 MB memory / core 48 nodes Total of 41.6 TFlops/s 2 x 14 core Intel skylake 6785 MB memory / core 52 nodes Total of 87 TFlops/s 2 x 64 core AMD zen3 8020 MB / core 1 node Total of 11 TFlops/s 2 x 128 core AMD zen4 2516 MB / core 8 nodes Total of 216 TFlops/s The GPU enabled nodes are: 2 x 14 core Intel broadwell 9000 MB memory / core 2 x Nvidia A40 4 nodes Total of 83 TFlops/s 2 x 14 core Intel skylake 6785 MB memory / core 2 x Nvidia V100 10 nodes Total of 75 TFlops/s 2 x 24 core AMD zen3 10600 MB / core 2 x Nvidia A100 2 nodes 2 x 24 core AMD zen3 10600 MB / core 2 x AMD MI100 1 node 2 x 24 core AMD zen4 6630 MB / core 2 x Nvidia A6000 1 node 2 x 24 core AMD zen4 6630 MB / core 2 x Nvidia L40s 10 nodes 2 x 48 core AMD zen4 6630 MB / core 4 x Nvidia H100 SXM5 2 nodes The large memory nodes are: 4 x 18 core Intel broadwell 41666 MB memory / core 8 nodes Total of 13.6 TFlops/s for all these nodes Kebnekaise - HPC2N storage \u00b6 Basically four types of storage are available at HPC2N: Home directory /home/X/Xyz , $HOME , ~ 25 GB, user owned Project storage /proj/nobackup/abc Shared among project members Local scratch space $SNIC_TMP SSD (170GB), per job, per node, \u201cvolatile\u201d Tape Storage Backup Long term storage Also SweStore \u2014 disk based (dCache) Research Data Storage Infrastructure, for active research data and operated by NAISS, WLCG Kebnekaise - projects \u00b6 Compute projects To use Kebnekaise, you must be a member of a compute project . A compute project has a certain number of core hours allocated for it per month A regular CPU core cost 1 core hour per hour, other resources (e.g., GPUs) cost more Not a hard limit but projects that go over the allocation get lower priority A compute project contains a certain amount of storage. If more storage is required, you must be a member of a storage project . Note As Kebnekaise is a local cluster, you need to be affiliated with UmU, IRF, SLU, Miun, or LTU to use it. Projects are applied for through SUPR ( https://supr.naiss.se ). I will cover more details in a later section, where we go more into detail about HPC2N and Kebnekaise. HPC \u00b6 What is HPC? High Performance Computing (definition) \u201cHigh Performance Computing most generally refers to the practice of aggregating computing power in a way that delivers much higher performance than one could get out of a typical desktop computer or workstation in order to solve large problems in science, engineering, or business.\u201d From: https://insidehpc.com/hpc-basic-training/what-is-hpc/ High Performance Computing - opening the definition \u00b6 Aggregating computing power \u00b6 147 nodes totalling 6808 cores and ??? CUDA cores Compared to 4 cores in a modern laptop Higher performance \u00b6 More than 527,000,000,000,000 arithmetical operations per second (527 trillion (billion) Compared to 200,000,000,000 Flops in a modern laptop (200 billion (milliard) Solve large problems \u00b6 When does a problem become large enough for HPC? Are there other reasons for using HPC resources? (Memory, software, support, etc.) High Performance Computing - large problems \u00b6 A problem can be large for two main reasons: Execution time : The time required to form a solution to the problem is very long Memory / storage use : The solution of the problem requires a lot of memory and/or storage The former can be remedied by increasing the performance More cores, more nodes, GPUs, \u2026 The latter by adding more memory / storage More memory per node (including large memory nodes), more nodes, \u2026 Kebnekaise: 128GB - 192GB, 384GB, 512GB, 768GB, 3TB Large storage solutions, \u2026 High Performance Computing - what counts as HPC \u00b6 High Performance Computing - other reasons \u00b6 Specialized (expensive) hardware GPUs, including those optimized for AI Kebnekaise has V100, A100, A40, MI100, A6000, L40S, H100 High-end CPUs (AVX-512 etc) and ECC memory Software HPC2N holds licenses for several softwares Software is pre-configured and ready-to-use Support and documentation High Performance Computing - memory models \u00b6 Two memory models are relevant for HPC: Shared memory: Single memory space for all data. Everyone can access the same data Straightforward to use Distributed memory: Multiple distinct memory spaces. Everyone has direct access only to the local data Requires communication High Performance Computing - programming models \u00b6 The programming model changes when we aim for extra performance and/or memory: Single-core: Matlab, Python, C, Fortran, \u2026 Single stream of operations Multi-core: Vectorized Matlab, pthreads, OpenMP Multiple streams of operations Work distribution, coordination (synchronization, etc), \u2026 Distributed memory: MPI, \u2026 Multiple streams of operations Work distribution, coordination (synchronization, etc), \u2026 Data distribution and communication GPUs: CUDA, OpenCL, OpenACC, OpenMP, \u2026 Many lightweight streams of operations Work distribution, coordination (synchronization, etc), \u2026 Data distribution across memory spaces and movement High Performance Computing - software \u00b6 Complexity grows when we aim for extra performance and/or memory/storage: Single-core: LAPACK, \u2026 Load correct toolchain etc Multi-core: LAPACK + parallel BLAS, \u2026 Load correct toolchain etc Allocate correct number of cores, configure software to use correct number of cores, \u2026 Distributed memory}: ScaLAPACK, \u2026 Load correct toolchain etc Allocate correct number of nodes and cores , configure software to use correct number of nodes and cores , \u2026 Data distribution, storage, \u2026 GPUs: MAGMA, TensorFlow, \u2026 Load correct toolchain etc Allocate correct number of cores and GPUs , configure software to use correct number of cores and GPUs , \u2026","title":"Introduction to Kebnekaise and HPC2N"},{"location":"intro/#introduction__to__hpc2n__kebnekaise__and__hpc","text":"Welcome page and syllabus: https://hpc2n.github.io/intro-linux/index.html Also link at the House symbol at the top of the page.","title":"Introduction to HPC2N, Kebnekaise and HPC"},{"location":"intro/#hpc2n","text":"Note High Performance Computing Center North (HPC2N) is a competence center for Scientific and Parallel Computing part of National Academic Infrastructure for Super\u00adcomputing in Sweden (NAISS) HPC2N provides state-of-the-art resources and expertise: Scalable and parallel HPC Large-scale storage facilities (Project storage (Lustre), SweStore, Tape) Grid and cloud computing (WLCG NT1, Swedish Science Cloud) National Data Science Node in \u201dEpidemiology and Biology of Infections\u201d (DDLS) Software for e-Science applications All levels of user support Primary, advanced, dedicated Application Experts (AEs) Primary objective To raise the national and local level of HPC competence and transfer HPC knowledge and technology to new users in academia and industry.","title":"HPC2N"},{"location":"intro/#hpc2n__partners","text":"HPC2N is hosted by: Partners:","title":"HPC2N partners"},{"location":"intro/#hpc2n__funding__and__collaborations","text":"Funded mainly by Ume\u00e5 University , with contributions from the other HPC2N partners . Involved in several projects and collaborations :","title":"HPC2N funding and collaborations"},{"location":"intro/#hpc2n__training__and__other__services","text":"User support (primary, advanced, dedicated) Research group meetings @ UmU Also at the partner sites Online \u201cHPC2N fika\u201d User training and education program 0.5 \u2013 5 days; ready-to-run exercises Introduction to Linux, 16 September 2024 Introduction to HPC2N and Kebnekaise, 16 September 2024 Parallel programming and tools (OpenMP, MPI, debugging, perf. analyzers, Matlab, R, MD simulation, ML, GPU, \u2026) Basic Singularity, 16 October 2024 Introduction to running R, Python, Julia, and Matlab in HPC, 22-25 October 2024 Introduction to Git, 25-29 November 2024 Using Python in an HPC environment, 5-6 December 2024 Updated list: https://www.hpc2n.umu.se/events/courses Workshops and seminars NGSSC / SeSE & university courses","title":"HPC2N training and other services"},{"location":"intro/#hpc2n__personnel","text":"Management: Paolo Bientinesi, director Bj\u00f6rn Torkelsson, deputy director Lena Hellman, administrator Application experts: Jerry Eriksson Pedro Ojeda May Birgitte Bryds\u00f6 \u00c5ke Sandgren Others: Mikael R\u00e4nnar (WLCG coord) Research Engineers under DDLS, HPC2N/SciLifeLab Paul Dulaud, System Developer, IT Abdullah Aziz, Data Engineer Data Steward System and support: Erik Andersson Birgitte Bryds\u00f6 Niklas Edmundsson (Tape coord) My Karlsson Roger Oscarsson \u00c5ke Sandgren Mattias Wadenstein (NeIC, Tier1) Lars Viklund","title":"HPC2N personnel"},{"location":"intro/#hpc2n__application__experts","text":"HPC2N provides advanced and dedicated support in the form of Application Experts (AEs) : Jerry Eriksson: Profiling, Machine learning (DNN), MPI, OpenMP, OpenACC Pedro Ojeda May: Molecular dynamics, Profiling, QM/MM, NAMD, Amber, Gromacs, GAUSSIAN, R, Python \u00c5ke Sandgren: General high level programming assistance, VASP, Gromacs, Amber Birgitte Bryds\u00f6: General HPC, R, Python Contact through regular support","title":"HPC2N application experts"},{"location":"intro/#hpc2n__users__by__discipline","text":"Users from several scientific disciplines: Biosciences and medicine Chemistry Computing science Engineering Materials science Mathematics and statistics Physics including space physics ML, DL, and other AI","title":"HPC2N users by discipline"},{"location":"intro/#hpc2n__users__by__discipline__largest__users","text":"Users from several scientific disciplines: Biosciences and medicine Chemistry Computing science Engineering Materials science Mathematics and statistics Physics including space physics Machine learning and artificial intelligence (several new projects)","title":"HPC2N users by discipline, largest users"},{"location":"intro/#hpc2n__users__by__software","text":"","title":"HPC2N users by software"},{"location":"intro/#kebnekaise","text":"The current supercomputer at HPC2N. It is a very heterogeneous system. Named after a massif (contains some of Sweden\u2019s highest mountain peaks) Kebnekaise was delivered by Lenovo and installed during the summer 2016 Opened up for general availability on November 7, 2016 In 2018, Kebnekaise was extended with 52 Intel Xeon Gold 6132 (Skylake) nodes, as well as 10 NVidian V100 (Volta) GPU nodes In 2023, Kebnekaise was extended with 2 dual NVIDIA A100 GPU nodes one many-core AMD Zen3 CPU node Kebnekaise will be continuosly upgraded, as old hardware gets retired. In 2024 Kebnekaise was extended with 2 Dual socket GPU-nodes: Lenovo ThinkSystem SR675 V3 2 x AMD EPYC 9454 48C 290W 2.75GHz Processor 768GB [24x 32GB TruDDR5 4800MHz RDIMM-A] 1 x 3.84TB Read Intensive NVMe PCIe 4.0 x4 HS SSD 1 x NVIDIA H100 SXM5 700W 80G HBM3 GPU Board 10 dual-socket GPU-nodes: ThinkSystem SR665 V3 2 x AMD EPYC 9254 24C 200W 2.9GHz Processor 384GB [24x 16GB TruDDR5 4800MHz RDIMM-A] 1 x 1.92TB Read Intensive NVMe PCIe 5.0 x4 HS SSD 2 x NVIDIA L40S 48GB PCIe Gen4 Passive GPU 8 dual-socket CPU only: ThinkSystem SR645 V3 2 x AMD EPYC 9754 128C 360W 2.25GHz Processor 768GB [24x 32GB TruDDR5 4800MHz RDIMM-A] 1 x 1 3.84TB Read Intensive NVMe PCIe 4.0 x4 HS SSD","title":"Kebnekaise"},{"location":"intro/#current__hardware__in__kebnekaise","text":"Kebnekaise have CPU-only, GPU enabled and large memory nodes. The CPU-only nodes are: 2 x 14 core Intel broadwell 4460 MB memory / core 48 nodes Total of 41.6 TFlops/s 2 x 14 core Intel skylake 6785 MB memory / core 52 nodes Total of 87 TFlops/s 2 x 64 core AMD zen3 8020 MB / core 1 node Total of 11 TFlops/s 2 x 128 core AMD zen4 2516 MB / core 8 nodes Total of 216 TFlops/s The GPU enabled nodes are: 2 x 14 core Intel broadwell 9000 MB memory / core 2 x Nvidia A40 4 nodes Total of 83 TFlops/s 2 x 14 core Intel skylake 6785 MB memory / core 2 x Nvidia V100 10 nodes Total of 75 TFlops/s 2 x 24 core AMD zen3 10600 MB / core 2 x Nvidia A100 2 nodes 2 x 24 core AMD zen3 10600 MB / core 2 x AMD MI100 1 node 2 x 24 core AMD zen4 6630 MB / core 2 x Nvidia A6000 1 node 2 x 24 core AMD zen4 6630 MB / core 2 x Nvidia L40s 10 nodes 2 x 48 core AMD zen4 6630 MB / core 4 x Nvidia H100 SXM5 2 nodes The large memory nodes are: 4 x 18 core Intel broadwell 41666 MB memory / core 8 nodes Total of 13.6 TFlops/s for all these nodes","title":"Current hardware in Kebnekaise"},{"location":"intro/#kebnekaise__-__hpc2n__storage","text":"Basically four types of storage are available at HPC2N: Home directory /home/X/Xyz , $HOME , ~ 25 GB, user owned Project storage /proj/nobackup/abc Shared among project members Local scratch space $SNIC_TMP SSD (170GB), per job, per node, \u201cvolatile\u201d Tape Storage Backup Long term storage Also SweStore \u2014 disk based (dCache) Research Data Storage Infrastructure, for active research data and operated by NAISS, WLCG","title":"Kebnekaise - HPC2N storage"},{"location":"intro/#kebnekaise__-__projects","text":"Compute projects To use Kebnekaise, you must be a member of a compute project . A compute project has a certain number of core hours allocated for it per month A regular CPU core cost 1 core hour per hour, other resources (e.g., GPUs) cost more Not a hard limit but projects that go over the allocation get lower priority A compute project contains a certain amount of storage. If more storage is required, you must be a member of a storage project . Note As Kebnekaise is a local cluster, you need to be affiliated with UmU, IRF, SLU, Miun, or LTU to use it. Projects are applied for through SUPR ( https://supr.naiss.se ). I will cover more details in a later section, where we go more into detail about HPC2N and Kebnekaise.","title":"Kebnekaise - projects"},{"location":"intro/#hpc","text":"What is HPC? High Performance Computing (definition) \u201cHigh Performance Computing most generally refers to the practice of aggregating computing power in a way that delivers much higher performance than one could get out of a typical desktop computer or workstation in order to solve large problems in science, engineering, or business.\u201d From: https://insidehpc.com/hpc-basic-training/what-is-hpc/","title":"HPC"},{"location":"intro/#high__performance__computing__-__opening__the__definition","text":"","title":"High Performance Computing - opening the definition"},{"location":"intro/#aggregating__computing__power","text":"147 nodes totalling 6808 cores and ??? CUDA cores Compared to 4 cores in a modern laptop","title":"Aggregating computing power"},{"location":"intro/#higher__performance","text":"More than 527,000,000,000,000 arithmetical operations per second (527 trillion (billion) Compared to 200,000,000,000 Flops in a modern laptop (200 billion (milliard)","title":"Higher performance"},{"location":"intro/#solve__large__problems","text":"When does a problem become large enough for HPC? Are there other reasons for using HPC resources? (Memory, software, support, etc.)","title":"Solve large problems"},{"location":"intro/#high__performance__computing__-__large__problems","text":"A problem can be large for two main reasons: Execution time : The time required to form a solution to the problem is very long Memory / storage use : The solution of the problem requires a lot of memory and/or storage The former can be remedied by increasing the performance More cores, more nodes, GPUs, \u2026 The latter by adding more memory / storage More memory per node (including large memory nodes), more nodes, \u2026 Kebnekaise: 128GB - 192GB, 384GB, 512GB, 768GB, 3TB Large storage solutions, \u2026","title":"High Performance Computing - large problems"},{"location":"intro/#high__performance__computing__-__what__counts__as__hpc","text":"","title":"High Performance Computing - what counts as HPC"},{"location":"intro/#high__performance__computing__-__other__reasons","text":"Specialized (expensive) hardware GPUs, including those optimized for AI Kebnekaise has V100, A100, A40, MI100, A6000, L40S, H100 High-end CPUs (AVX-512 etc) and ECC memory Software HPC2N holds licenses for several softwares Software is pre-configured and ready-to-use Support and documentation","title":"High Performance Computing - other reasons"},{"location":"intro/#high__performance__computing__-__memory__models","text":"Two memory models are relevant for HPC: Shared memory: Single memory space for all data. Everyone can access the same data Straightforward to use Distributed memory: Multiple distinct memory spaces. Everyone has direct access only to the local data Requires communication","title":"High Performance Computing - memory models"},{"location":"intro/#high__performance__computing__-__programming__models","text":"The programming model changes when we aim for extra performance and/or memory: Single-core: Matlab, Python, C, Fortran, \u2026 Single stream of operations Multi-core: Vectorized Matlab, pthreads, OpenMP Multiple streams of operations Work distribution, coordination (synchronization, etc), \u2026 Distributed memory: MPI, \u2026 Multiple streams of operations Work distribution, coordination (synchronization, etc), \u2026 Data distribution and communication GPUs: CUDA, OpenCL, OpenACC, OpenMP, \u2026 Many lightweight streams of operations Work distribution, coordination (synchronization, etc), \u2026 Data distribution across memory spaces and movement","title":"High Performance Computing - programming models"},{"location":"intro/#high__performance__computing__-__software","text":"Complexity grows when we aim for extra performance and/or memory/storage: Single-core: LAPACK, \u2026 Load correct toolchain etc Multi-core: LAPACK + parallel BLAS, \u2026 Load correct toolchain etc Allocate correct number of cores, configure software to use correct number of cores, \u2026 Distributed memory}: ScaLAPACK, \u2026 Load correct toolchain etc Allocate correct number of nodes and cores , configure software to use correct number of nodes and cores , \u2026 Data distribution, storage, \u2026 GPUs: MAGMA, TensorFlow, \u2026 Load correct toolchain etc Allocate correct number of cores and GPUs , configure software to use correct number of cores and GPUs , \u2026","title":"High Performance Computing - software"},{"location":"login/","text":"Logging in \u00b6 When you have your account, you can login to Kebnekaise. This can be done with any number of SSH clients or with ThinLinc (the easiest option if you need a graphical interface). Objectives Login to Kebnekaise, either with ThinLinc or your SSH client of choice. Kebnekaise login servers \u00b6 Note The main login node of Kebnekaise: kebnekaise.hpc2n.umu.se ThinLinc login node: kebnekaise-tl.hpc2n.umu.se ThinLinc through a browser (less features): https://kebnekaise-tl.hpc2n.umu.se:300/ In addition, there is a login node for the AMD-based nodes. We will talk more about this later: kebnekaise-amd.hpc2n.umu.se . For ThinLinc access: kebnekaise-amd-tl.hpc2n.umu.se ThinLinc is recommended for this course ThinLinc: a cross-platform remote desktop server from Cendio AB. Especially useful when you need software with a graphical interface. This is what we recommend you use for this course, unless you have a preferred SSH client. Using ThinLinc \u00b6 Download the client from https://www.cendio.com/thinlinc/download . Install it. Start the client. Enter the name of the server: kebnekaise-tl.hpc2n.umu.se . Enter your username. Go to \u201cOptions\u201d \\(->\\) \u201cSecurity\u201d. Check that authentication method is set to password. Go to \u201cOptions\u201d \\(->\\) \u201cScreen\u201d. Uncheck \u201cFull screen mode\u201d. Enter your HPC2N password. Click \u201cConnect\u201d Click \u201cContinue\u201d when you are being told that the server\u2019s host key is not in the registry. Wait for the ThinLinc desktop to open. Exercise Login to Kebnekaise. If you are using ThinLinc, first install the ThinLinc client. If you are using another SSH client, install it first if you have not already done so. Change password \u00b6 You get your first, temporary HPC2N password from this page: HPC2N passwords . That page can also be used to reset your HPC2N password if you have forgotten it. Note that you are authenticating through SUPR, using that service\u2019s login credentials! Warning The HPC2N password and the SUPR password are separate! The HPC2N password and your university/department password are also separate! Exercise: Change your password after first login ONLY do this if you have logged in for the first time/is still using the termporary password you got from the HPC2N password reset service! Changing password is done using the passwd command: passwd Use a good password that combines letters of different case. Do not use dictionary words. Avoid using the same password that you also use in other places. It will first ask for your current password. Type in that and press enter. Then type in the new password, enter, and repeat. You have changed the password. File transfers \u00b6 We are not going to transfer any files as part of this course, but you may have to do so as part of your workflow when using Kebnekaise (or another HPC centre) for your research. Linux, OS X \u00b6 scp \u00b6 SCP (Secure CoPy) is a simple way of transferring files between two machines that use the SSH (Secure SHell) protocol. You may use SCP to connect to any system where you have SSH (log-in) access. These examples show how to use scp from the command-line. Graphical programs exists for doing scp transfer. The command-lone scp program should already be installed. Remote to local Transfer a file from Kebnekaise to your local system, while on your local system scp username@kebnekaise.hpc2n.umu.se:file . Local to remote Transfer a local file to Kebnekaise, while on your local system scp file username@kebnekaise.hpc2n.umu.se:file Recursive directory copy from a local system to a remote system The directory sourcedirectory is here copied as a subdirectory to somedir scp -r sourcedirectory/ username@kebnekaise.hpc2n.umu.se:somedir/ sftp \u00b6 SFTP (SSH File Transfer Protocol or sometimes called Secure File Transfer Protocol) is a network protocol that provides file transfer over a reliable data stream. SFTP is a command -line program on most Unix, Linux, and Mac OS X systems. It is also available as a protocol choice in some graphical file transfer programs. Example: From a local system to a remote system enterprise-d [ ~ ] $ sftp user@kebnekaise.hpc2n.umu.se Connecting to kebnekaise.hpc2n.umu.se... user@kebnekaise.hpc2n.umu.se ' s password: sftp> put file.c C/file.c Uploading file.c to /home/u/user/C/file.c file.c 100 % 1 0 .0KB/s 00 :00 sftp> put -P irf.png pic/ Uploading irf.png to /home/u/user/pic/irf.png irf.png 100 % 2100 2 .1KB/s 00 :00 sftp> Windows \u00b6 Here you need to download a client: WinSCP, FileZilla (sftp), PSCP/PSFTP, \u2026 You can transfer with sftp or scp. There is documentation in HPC2N\u2019s documentation pages for Windows file transfers . Editors \u00b6 Since the editors on a Linux system are different to those you may be familiar with from Windows or macOS, here follows a short overview. There are command-line editors and graphical editors. If you are connecting with a regular SSH client, it will be simplest to use a command-line editor. If you are using ThinLinc, you can use command-line editors or graphical editors as you want. Command-line \u00b6 These are all good editors for using on the command line: nano vi , vim emacs They are all installed on Kebnekaise. Of these, vi/vim as well as emacs are probably the most powerful, though the latter is better in a GUI environment. The easiest editor to use if you are not familiar with any of them is nano . Nano Starting \u201cnano\u201d: Type nano FILENAME on the command line and press Enter . FILENAME is whatever you want to call your file. If FILENAME is a file that already exists, nano will open the file. If it dows not exist, it will be created. You now get an editor that looks like this: First thing to notice is that many of the commands are listed at the bottom. The ^ before the letter-commands means you should press CTRL and then the letter (while keeping CTRL down). Your prompt is in the editor window itself, and you can just type (or copy and paste) the content you want in your file. When you want to exit (and possibly save), you press CTRL and then x while holding CTRL down (this is written CTRL-x or ^x ). nano will ask you if you want to save the content of the buffer to the file. After that it will exit. There is a manual for nano here . GUI \u00b6 If you are connecting with ThinLinc , you will be presented with a graphical user interface (GUI). From there you can either open a terminal window/shell ( Applications -> System Tools -> MATE Terminal ) or you can choose editors from the menu by going to Applications -> Accessories . This gives several editor options, of which these have a graphical interface: Text Editor (gedit) Pluma - the default editor on the MATE desktop environments (that Thinlinc runs) Atom - not just an editor, but an IDE Emacs (GUI) NEdit \u201cNirvana Text Editor\u201d If you are not familiar with any of these, a good recommendation would be to use Text Editor/gedit . Text Editor/gedit Starting \u201c gedit \u201d: From the menu, choose Applications -> Accessories -> Text Editor . You then get a window that looks like this: You can open files by clicking \u201c Open \u201d in the top menu. Clicking the small file icon with a green plus will create a new document. Save by clicking \u201c Save \u201d in the menu. The menu on the top right (the three horizontal lines) gives you several other options, including \u201c Find \u201d and \u201c Find and Replace \u201d. Keypoints You can login with ThinLinc or another SSH client ThinLinc is easiest if you need a GUI There are several command-line editors: vi/vim, nano, emacs, \u2026 And several GUI editors, which works best when using ThinLinc: gedit, pluma, atom, emacs (gui), nedit, \u2026","title":"Logging in"},{"location":"login/#logging__in","text":"When you have your account, you can login to Kebnekaise. This can be done with any number of SSH clients or with ThinLinc (the easiest option if you need a graphical interface). Objectives Login to Kebnekaise, either with ThinLinc or your SSH client of choice.","title":"Logging in"},{"location":"login/#kebnekaise__login__servers","text":"Note The main login node of Kebnekaise: kebnekaise.hpc2n.umu.se ThinLinc login node: kebnekaise-tl.hpc2n.umu.se ThinLinc through a browser (less features): https://kebnekaise-tl.hpc2n.umu.se:300/ In addition, there is a login node for the AMD-based nodes. We will talk more about this later: kebnekaise-amd.hpc2n.umu.se . For ThinLinc access: kebnekaise-amd-tl.hpc2n.umu.se ThinLinc is recommended for this course ThinLinc: a cross-platform remote desktop server from Cendio AB. Especially useful when you need software with a graphical interface. This is what we recommend you use for this course, unless you have a preferred SSH client.","title":"Kebnekaise login servers"},{"location":"login/#using__thinlinc","text":"Download the client from https://www.cendio.com/thinlinc/download . Install it. Start the client. Enter the name of the server: kebnekaise-tl.hpc2n.umu.se . Enter your username. Go to \u201cOptions\u201d \\(->\\) \u201cSecurity\u201d. Check that authentication method is set to password. Go to \u201cOptions\u201d \\(->\\) \u201cScreen\u201d. Uncheck \u201cFull screen mode\u201d. Enter your HPC2N password. Click \u201cConnect\u201d Click \u201cContinue\u201d when you are being told that the server\u2019s host key is not in the registry. Wait for the ThinLinc desktop to open. Exercise Login to Kebnekaise. If you are using ThinLinc, first install the ThinLinc client. If you are using another SSH client, install it first if you have not already done so.","title":"Using ThinLinc"},{"location":"login/#change__password","text":"You get your first, temporary HPC2N password from this page: HPC2N passwords . That page can also be used to reset your HPC2N password if you have forgotten it. Note that you are authenticating through SUPR, using that service\u2019s login credentials! Warning The HPC2N password and the SUPR password are separate! The HPC2N password and your university/department password are also separate! Exercise: Change your password after first login ONLY do this if you have logged in for the first time/is still using the termporary password you got from the HPC2N password reset service! Changing password is done using the passwd command: passwd Use a good password that combines letters of different case. Do not use dictionary words. Avoid using the same password that you also use in other places. It will first ask for your current password. Type in that and press enter. Then type in the new password, enter, and repeat. You have changed the password.","title":"Change password"},{"location":"login/#file__transfers","text":"We are not going to transfer any files as part of this course, but you may have to do so as part of your workflow when using Kebnekaise (or another HPC centre) for your research.","title":"File transfers"},{"location":"login/#linux__os__x","text":"","title":"Linux, OS X"},{"location":"login/#scp","text":"SCP (Secure CoPy) is a simple way of transferring files between two machines that use the SSH (Secure SHell) protocol. You may use SCP to connect to any system where you have SSH (log-in) access. These examples show how to use scp from the command-line. Graphical programs exists for doing scp transfer. The command-lone scp program should already be installed. Remote to local Transfer a file from Kebnekaise to your local system, while on your local system scp username@kebnekaise.hpc2n.umu.se:file . Local to remote Transfer a local file to Kebnekaise, while on your local system scp file username@kebnekaise.hpc2n.umu.se:file Recursive directory copy from a local system to a remote system The directory sourcedirectory is here copied as a subdirectory to somedir scp -r sourcedirectory/ username@kebnekaise.hpc2n.umu.se:somedir/","title":"scp"},{"location":"login/#sftp","text":"SFTP (SSH File Transfer Protocol or sometimes called Secure File Transfer Protocol) is a network protocol that provides file transfer over a reliable data stream. SFTP is a command -line program on most Unix, Linux, and Mac OS X systems. It is also available as a protocol choice in some graphical file transfer programs. Example: From a local system to a remote system enterprise-d [ ~ ] $ sftp user@kebnekaise.hpc2n.umu.se Connecting to kebnekaise.hpc2n.umu.se... user@kebnekaise.hpc2n.umu.se ' s password: sftp> put file.c C/file.c Uploading file.c to /home/u/user/C/file.c file.c 100 % 1 0 .0KB/s 00 :00 sftp> put -P irf.png pic/ Uploading irf.png to /home/u/user/pic/irf.png irf.png 100 % 2100 2 .1KB/s 00 :00 sftp>","title":"sftp"},{"location":"login/#windows","text":"Here you need to download a client: WinSCP, FileZilla (sftp), PSCP/PSFTP, \u2026 You can transfer with sftp or scp. There is documentation in HPC2N\u2019s documentation pages for Windows file transfers .","title":"Windows"},{"location":"login/#editors","text":"Since the editors on a Linux system are different to those you may be familiar with from Windows or macOS, here follows a short overview. There are command-line editors and graphical editors. If you are connecting with a regular SSH client, it will be simplest to use a command-line editor. If you are using ThinLinc, you can use command-line editors or graphical editors as you want.","title":"Editors"},{"location":"login/#command-line","text":"These are all good editors for using on the command line: nano vi , vim emacs They are all installed on Kebnekaise. Of these, vi/vim as well as emacs are probably the most powerful, though the latter is better in a GUI environment. The easiest editor to use if you are not familiar with any of them is nano . Nano Starting \u201cnano\u201d: Type nano FILENAME on the command line and press Enter . FILENAME is whatever you want to call your file. If FILENAME is a file that already exists, nano will open the file. If it dows not exist, it will be created. You now get an editor that looks like this: First thing to notice is that many of the commands are listed at the bottom. The ^ before the letter-commands means you should press CTRL and then the letter (while keeping CTRL down). Your prompt is in the editor window itself, and you can just type (or copy and paste) the content you want in your file. When you want to exit (and possibly save), you press CTRL and then x while holding CTRL down (this is written CTRL-x or ^x ). nano will ask you if you want to save the content of the buffer to the file. After that it will exit. There is a manual for nano here .","title":"Command-line"},{"location":"login/#gui","text":"If you are connecting with ThinLinc , you will be presented with a graphical user interface (GUI). From there you can either open a terminal window/shell ( Applications -> System Tools -> MATE Terminal ) or you can choose editors from the menu by going to Applications -> Accessories . This gives several editor options, of which these have a graphical interface: Text Editor (gedit) Pluma - the default editor on the MATE desktop environments (that Thinlinc runs) Atom - not just an editor, but an IDE Emacs (GUI) NEdit \u201cNirvana Text Editor\u201d If you are not familiar with any of these, a good recommendation would be to use Text Editor/gedit . Text Editor/gedit Starting \u201c gedit \u201d: From the menu, choose Applications -> Accessories -> Text Editor . You then get a window that looks like this: You can open files by clicking \u201c Open \u201d in the top menu. Clicking the small file icon with a green plus will create a new document. Save by clicking \u201c Save \u201d in the menu. The menu on the top right (the three horizontal lines) gives you several other options, including \u201c Find \u201d and \u201c Find and Replace \u201d. Keypoints You can login with ThinLinc or another SSH client ThinLinc is easiest if you need a GUI There are several command-line editors: vi/vim, nano, emacs, \u2026 And several GUI editors, which works best when using ThinLinc: gedit, pluma, atom, emacs (gui), nedit, \u2026","title":"GUI"},{"location":"modules/","text":"The Module System (Lmod) \u00b6 Objectives Learn the basics of the module system which is used to access most of the software on Kebnekaise Try some of the most used commands for the module system: find/list software modules load/unload software modules Learn about compiler toolchains Most programs are accessed by first loading them as a \u2018module\u2019. Modules are: used to set up your environment (paths to executables, libraries, etc.) for using a particular (set of) software package(s) a tool to help users manage their Unix/Linux shell environment, allowing groups of related environment-variable settings to be made or removed dynamically allows having multiple versions of a program or package available by just loading the proper module are installed in a hierarchial layout. This means that some modules are only available after loading a specific compiler and/or MPI version. Useful commands (Lmod) \u00b6 See which modules exists: module spider or ml spider See which versions exist of a specific module: module spider MODULE or ml spider MODULE See prerequisites and how to load a specfic version of a module: module spider MODULE/VERSION or ml spider MODULE/VERSION List modules depending only on what is currently loaded: module avail or ml av See which modules are currently loaded: module list or ml Loading a module: module load MODULE or ml MODULE Loading a specific version of a module: module load MODULE/VERSION or ml MODULE/VERSION Unload a module: module unload MODULE or ml -MODULE Get more information about a module: ml show MODULE or module show MODULE Unload all modules except the \u2018sticky\u2019 modules: module purge or ml purge Hint Code-along! Example: checking which versions exist of the module \u2018Python\u2019 b-an01 [ ~ ] $ ml spider Python --------------------------------------------------------------------------------------------------------- Python: --------------------------------------------------------------------------------------------------------- Description: Python is a programming language that lets you work more quickly and integrate your systems more effectively. Versions: Python/2.7.15 Python/2.7.16 Python/2.7.18-bare Python/2.7.18 Python/3.7.2 Python/3.7.4 Python/3.8.2 Python/3.8.6 Python/3.9.5-bare Python/3.9.5 Python/3.9.6-bare Python/3.9.6 Python/3.10.4-bare Python/3.10.4 Python/3.10.8-bare Python/3.10.8 Python/3.11.3 Python/3.11.5 Other possible modules matches: Biopython Boost.Python Brotli-python GitPython IPython Python-bundle-PyPI flatbuffers-python ... --------------------------------------------------------------------------------------------------------- To find other possible module matches execute: $ module -r spider '.*Python.*' --------------------------------------------------------------------------------------------------------- For detailed information about a specific \"Python\" package ( including how to load the modules ) use the module ' s full name. Note that names that have a trailing ( E ) are extensions provided by other modules. For example: $ module spider Python/3.11.5 --------------------------------------------------------------------------------------------------------- b-an01 [ ~ ] $ Example: Check how to load a specific Python version (3.11.5 in this example) b-an01 [ ~ ] $ ml spider Python/3.11.5 --------------------------------------------------------------------------------------------------------- Python: Python/3.11.5 --------------------------------------------------------------------------------------------------------- Description: Python is a programming language that lets you work more quickly and integrate your systems more effectively. You will need to load all module ( s ) on any one of the lines below before the \"Python/3.11.5\" module is available to load. GCCcore/13.2.0 This module provides the following extensions: flit_core/3.9.0 ( E ) , packaging/23.2 ( E ) , pip/23.2.1 ( E ) , setuptools-scm/8.0.4 ( E ) , setuptools/68.2.2 ( E ) , tomli/2.0.1 ( E ) , typing_extensions/4.8.0 ( E ) , wheel/0.41.2 ( E ) Help: Description =========== Python is a programming language that lets you work more quickly and integrate your systems more effectively. More information ================ - Homepage: https://python.org/ Included extensions =================== flit_core-3.9.0, packaging-23.2, pip-23.2.1, setuptools-68.2.2, setuptools- scm-8.0.4, tomli-2.0.1, typing_extensions-4.8.0, wheel-0.41.2 b-an01 [ ~ ] $ Example: Load Python/3.11.5 and its prerequisite(s) Here we also show the loaded module before and after the load. For illustration, we use first ml and then module list : b-an01 [ ~ ] $ ml Currently Loaded Modules: 1 ) snicenvironment ( S ) 2 ) systemdefault ( S ) Where: S: Module is Sticky, requires --force to unload or purge b-an01 [ ~ ] $ module load GCCcore/13.2.0 Python/3.11.5 b-an01 [ ~ ] $ module list Currently Loaded Modules: 1 ) snicenvironment ( S ) 4 ) zlib/1.2.13 7 ) ncurses/6.4 10 ) SQLite/3.43.1 13 ) OpenSSL/1.1 2 ) systemdefault ( S ) 5 ) binutils/2.40 8 ) libreadline/8.2 11 ) XZ/5.4.4 14 ) Python/3.11.5 3 ) GCCcore/13.2.0 6 ) bzip2/1.0.8 9 ) Tcl/8.6.13 12 ) libffi/3.4.4 Where: S: Module is Sticky, requires --force to unload or purge b-an01 [ ~ ] $ Example: Unloading the module Python/3.11.5 In this example we unload the module Python/3.11.5 , but not the prerequisite GCCcore/13.2.0 . We also look at the output of module list before and after. b-an01 [ ~ ] $ module list Currently Loaded Modules: 1 ) snicenvironment ( S ) 4 ) zlib/1.2.13 7 ) ncurses/6.4 10 ) SQLite/3.43.1 13 ) OpenSSL/1.1 2 ) systemdefault ( S ) 5 ) binutils/2.40 8 ) libreadline/8.2 11 ) XZ/5.4.4 14 ) Python/3.11.5 3 ) GCCcore/13.2.0 6 ) bzip2/1.0.8 9 ) Tcl/8.6.13 12 ) libffi/3.4.4 Where: S: Module is Sticky, requires --force to unload or purge b-an01 [ ~ ] $ ml unload Python/3.11.5 b-an01 [ ~ ] $ module list Currently Loaded Modules: 1 ) snicenvironment ( S ) 2 ) systemdefault ( S ) 3 ) GCCcore/13.2.0 Where: S: Module is Sticky, requires --force to unload or purge b-an01 [ ~ ] $ As you can see, the prerequisite did not get unloaded. This is on purpose, because you may have other things loaded which uses the prerequisite. Example: unloading every module you have loaded, with module purge except the \u2018sticky\u2019 modules (some needed things for the environment) First we load some modules. Here Python 3.11.5, SciPy-bundle, and prerequisites for them. We also do module list after loading the modules and after using module purge . b-an01 [ ~ ] $ ml GCC/13.2.0 b-an01 [ ~ ] $ ml Python/3.11.5 ml SciPy-bundle/2023.11 b-an01 [ ~ ] $ ml list Currently Loaded Modules: 1 ) snicenvironment ( S ) 7 ) bzip2/1.0.8 13 ) libffi/3.4.4 19 ) cffi/1.15.1 2 ) systemdefault ( S ) 8 ) ncurses/6.4 14 ) OpenSSL/1.1 20 ) cryptography/41.0.5 3 ) GCCcore/13.2.0 9 ) libreadline/8.2 15 ) Python/3.11.5 21 ) virtualenv/20.24.6 4 ) zlib/1.2.13 10 ) Tcl/8.6.13 16 ) OpenBLAS/0.3.24 22 ) Python-bundle-PyPI/2023.10 5 ) binutils/2.40 11 ) SQLite/3.43.1 17 ) FlexiBLAS/3.3.1 23 ) pybind11/2.11.1 6 ) GCC/13.2.0 12 ) XZ/5.4.4 18 ) FFTW/3.3.10 24 ) SciPy-bundle/2023.11 Where: S: Module is Sticky, requires --force to unload or purge b-an01 [ ~ ] $ ml purge The following modules were not unloaded: ( Use \"module --force purge\" to unload all ) : 1 ) snicenvironment 2 ) systemdefault b-an01 [ ~ ] $ ml list Currently Loaded Modules: 1 ) snicenvironment ( S ) 2 ) systemdefault ( S ) Where: S: Module is Sticky, requires --force to unload or purge b-an01 [ ~ ] $ Note You can do several module load on the same line. Or you can do them one at a time, as you want. The modules have to be loaded in order! You cannot list the prerequisite after the module that needs it! One advantage to loading modules one at a time is that you can then find compatible modules that depend on that version easily. Example: you have loaded GCC/13.2.0 and Python/3.11.5 . You can now do ml av to see which versions of other modules you want to load, say SciPy-bundle, are compatible. If you know the name of the module you want, you can even start writing module load SciPy-bundle/ and press TAB - the system will then autocomplete to the compatible one(s). Compiler Toolchains \u00b6 Compiler toolchains load bundles of software making up a complete environment for compiling/using a specific prebuilt software. Includes some/all of: compiler suite, MPI, BLAS, LAPACK, ScaLapack, FFTW, CUDA. Some currently available toolchains (check ml av for versions and full, updated list): GCC : GCC only gcccuda : GCC and CUDA foss : GCC, OpenMPI, OpenBLAS/LAPACK, FFTW, ScaLAPACK gompi : GCC, OpenMPI gompic : GCC, OpenMPI, CUDA gomkl : GCC, OpenMPI, MKL iccifort : icc, ifort iccifortcuda : icc, ifort, CUDA iimpi : icc, ifort, IntelMPI iimpic : iccifort, CUDA, impi intel : icc, ifort, IntelMPI, IntelMKL intel-compilers : icc, ifort (classic and oneAPI) intelcuda : intel and CUDA iompi : iccifort and OpenMPI Keypoints The software on Kebnekaise is mostly accessed through the module system. The modules are arranged in a hierarchial layout; many modules have prerequisites that needs to be loaded first. Important commands to the module system: Loading: module load MODULE Unloading: module unload MODULE Unload all modules: module purge List all modules in the system: module spider List versions available of a specific module: module spider MODULE Show how to load a specific module and version: module spider MODULE/VERSION List the modules you have currently loaded: module list Compiler toolchains are modules containing compiler suites and various libraries More information There is more information about the module system and how to work with it in HPC2N\u2019s documentation for the modules system .","title":"The Module System"},{"location":"modules/#the__module__system__lmod","text":"Objectives Learn the basics of the module system which is used to access most of the software on Kebnekaise Try some of the most used commands for the module system: find/list software modules load/unload software modules Learn about compiler toolchains Most programs are accessed by first loading them as a \u2018module\u2019. Modules are: used to set up your environment (paths to executables, libraries, etc.) for using a particular (set of) software package(s) a tool to help users manage their Unix/Linux shell environment, allowing groups of related environment-variable settings to be made or removed dynamically allows having multiple versions of a program or package available by just loading the proper module are installed in a hierarchial layout. This means that some modules are only available after loading a specific compiler and/or MPI version.","title":"The Module System (Lmod)"},{"location":"modules/#useful__commands__lmod","text":"See which modules exists: module spider or ml spider See which versions exist of a specific module: module spider MODULE or ml spider MODULE See prerequisites and how to load a specfic version of a module: module spider MODULE/VERSION or ml spider MODULE/VERSION List modules depending only on what is currently loaded: module avail or ml av See which modules are currently loaded: module list or ml Loading a module: module load MODULE or ml MODULE Loading a specific version of a module: module load MODULE/VERSION or ml MODULE/VERSION Unload a module: module unload MODULE or ml -MODULE Get more information about a module: ml show MODULE or module show MODULE Unload all modules except the \u2018sticky\u2019 modules: module purge or ml purge Hint Code-along! Example: checking which versions exist of the module \u2018Python\u2019 b-an01 [ ~ ] $ ml spider Python --------------------------------------------------------------------------------------------------------- Python: --------------------------------------------------------------------------------------------------------- Description: Python is a programming language that lets you work more quickly and integrate your systems more effectively. Versions: Python/2.7.15 Python/2.7.16 Python/2.7.18-bare Python/2.7.18 Python/3.7.2 Python/3.7.4 Python/3.8.2 Python/3.8.6 Python/3.9.5-bare Python/3.9.5 Python/3.9.6-bare Python/3.9.6 Python/3.10.4-bare Python/3.10.4 Python/3.10.8-bare Python/3.10.8 Python/3.11.3 Python/3.11.5 Other possible modules matches: Biopython Boost.Python Brotli-python GitPython IPython Python-bundle-PyPI flatbuffers-python ... --------------------------------------------------------------------------------------------------------- To find other possible module matches execute: $ module -r spider '.*Python.*' --------------------------------------------------------------------------------------------------------- For detailed information about a specific \"Python\" package ( including how to load the modules ) use the module ' s full name. Note that names that have a trailing ( E ) are extensions provided by other modules. For example: $ module spider Python/3.11.5 --------------------------------------------------------------------------------------------------------- b-an01 [ ~ ] $ Example: Check how to load a specific Python version (3.11.5 in this example) b-an01 [ ~ ] $ ml spider Python/3.11.5 --------------------------------------------------------------------------------------------------------- Python: Python/3.11.5 --------------------------------------------------------------------------------------------------------- Description: Python is a programming language that lets you work more quickly and integrate your systems more effectively. You will need to load all module ( s ) on any one of the lines below before the \"Python/3.11.5\" module is available to load. GCCcore/13.2.0 This module provides the following extensions: flit_core/3.9.0 ( E ) , packaging/23.2 ( E ) , pip/23.2.1 ( E ) , setuptools-scm/8.0.4 ( E ) , setuptools/68.2.2 ( E ) , tomli/2.0.1 ( E ) , typing_extensions/4.8.0 ( E ) , wheel/0.41.2 ( E ) Help: Description =========== Python is a programming language that lets you work more quickly and integrate your systems more effectively. More information ================ - Homepage: https://python.org/ Included extensions =================== flit_core-3.9.0, packaging-23.2, pip-23.2.1, setuptools-68.2.2, setuptools- scm-8.0.4, tomli-2.0.1, typing_extensions-4.8.0, wheel-0.41.2 b-an01 [ ~ ] $ Example: Load Python/3.11.5 and its prerequisite(s) Here we also show the loaded module before and after the load. For illustration, we use first ml and then module list : b-an01 [ ~ ] $ ml Currently Loaded Modules: 1 ) snicenvironment ( S ) 2 ) systemdefault ( S ) Where: S: Module is Sticky, requires --force to unload or purge b-an01 [ ~ ] $ module load GCCcore/13.2.0 Python/3.11.5 b-an01 [ ~ ] $ module list Currently Loaded Modules: 1 ) snicenvironment ( S ) 4 ) zlib/1.2.13 7 ) ncurses/6.4 10 ) SQLite/3.43.1 13 ) OpenSSL/1.1 2 ) systemdefault ( S ) 5 ) binutils/2.40 8 ) libreadline/8.2 11 ) XZ/5.4.4 14 ) Python/3.11.5 3 ) GCCcore/13.2.0 6 ) bzip2/1.0.8 9 ) Tcl/8.6.13 12 ) libffi/3.4.4 Where: S: Module is Sticky, requires --force to unload or purge b-an01 [ ~ ] $ Example: Unloading the module Python/3.11.5 In this example we unload the module Python/3.11.5 , but not the prerequisite GCCcore/13.2.0 . We also look at the output of module list before and after. b-an01 [ ~ ] $ module list Currently Loaded Modules: 1 ) snicenvironment ( S ) 4 ) zlib/1.2.13 7 ) ncurses/6.4 10 ) SQLite/3.43.1 13 ) OpenSSL/1.1 2 ) systemdefault ( S ) 5 ) binutils/2.40 8 ) libreadline/8.2 11 ) XZ/5.4.4 14 ) Python/3.11.5 3 ) GCCcore/13.2.0 6 ) bzip2/1.0.8 9 ) Tcl/8.6.13 12 ) libffi/3.4.4 Where: S: Module is Sticky, requires --force to unload or purge b-an01 [ ~ ] $ ml unload Python/3.11.5 b-an01 [ ~ ] $ module list Currently Loaded Modules: 1 ) snicenvironment ( S ) 2 ) systemdefault ( S ) 3 ) GCCcore/13.2.0 Where: S: Module is Sticky, requires --force to unload or purge b-an01 [ ~ ] $ As you can see, the prerequisite did not get unloaded. This is on purpose, because you may have other things loaded which uses the prerequisite. Example: unloading every module you have loaded, with module purge except the \u2018sticky\u2019 modules (some needed things for the environment) First we load some modules. Here Python 3.11.5, SciPy-bundle, and prerequisites for them. We also do module list after loading the modules and after using module purge . b-an01 [ ~ ] $ ml GCC/13.2.0 b-an01 [ ~ ] $ ml Python/3.11.5 ml SciPy-bundle/2023.11 b-an01 [ ~ ] $ ml list Currently Loaded Modules: 1 ) snicenvironment ( S ) 7 ) bzip2/1.0.8 13 ) libffi/3.4.4 19 ) cffi/1.15.1 2 ) systemdefault ( S ) 8 ) ncurses/6.4 14 ) OpenSSL/1.1 20 ) cryptography/41.0.5 3 ) GCCcore/13.2.0 9 ) libreadline/8.2 15 ) Python/3.11.5 21 ) virtualenv/20.24.6 4 ) zlib/1.2.13 10 ) Tcl/8.6.13 16 ) OpenBLAS/0.3.24 22 ) Python-bundle-PyPI/2023.10 5 ) binutils/2.40 11 ) SQLite/3.43.1 17 ) FlexiBLAS/3.3.1 23 ) pybind11/2.11.1 6 ) GCC/13.2.0 12 ) XZ/5.4.4 18 ) FFTW/3.3.10 24 ) SciPy-bundle/2023.11 Where: S: Module is Sticky, requires --force to unload or purge b-an01 [ ~ ] $ ml purge The following modules were not unloaded: ( Use \"module --force purge\" to unload all ) : 1 ) snicenvironment 2 ) systemdefault b-an01 [ ~ ] $ ml list Currently Loaded Modules: 1 ) snicenvironment ( S ) 2 ) systemdefault ( S ) Where: S: Module is Sticky, requires --force to unload or purge b-an01 [ ~ ] $ Note You can do several module load on the same line. Or you can do them one at a time, as you want. The modules have to be loaded in order! You cannot list the prerequisite after the module that needs it! One advantage to loading modules one at a time is that you can then find compatible modules that depend on that version easily. Example: you have loaded GCC/13.2.0 and Python/3.11.5 . You can now do ml av to see which versions of other modules you want to load, say SciPy-bundle, are compatible. If you know the name of the module you want, you can even start writing module load SciPy-bundle/ and press TAB - the system will then autocomplete to the compatible one(s).","title":"Useful commands (Lmod)"},{"location":"modules/#compiler__toolchains","text":"Compiler toolchains load bundles of software making up a complete environment for compiling/using a specific prebuilt software. Includes some/all of: compiler suite, MPI, BLAS, LAPACK, ScaLapack, FFTW, CUDA. Some currently available toolchains (check ml av for versions and full, updated list): GCC : GCC only gcccuda : GCC and CUDA foss : GCC, OpenMPI, OpenBLAS/LAPACK, FFTW, ScaLAPACK gompi : GCC, OpenMPI gompic : GCC, OpenMPI, CUDA gomkl : GCC, OpenMPI, MKL iccifort : icc, ifort iccifortcuda : icc, ifort, CUDA iimpi : icc, ifort, IntelMPI iimpic : iccifort, CUDA, impi intel : icc, ifort, IntelMPI, IntelMKL intel-compilers : icc, ifort (classic and oneAPI) intelcuda : intel and CUDA iompi : iccifort and OpenMPI Keypoints The software on Kebnekaise is mostly accessed through the module system. The modules are arranged in a hierarchial layout; many modules have prerequisites that needs to be loaded first. Important commands to the module system: Loading: module load MODULE Unloading: module unload MODULE Unload all modules: module purge List all modules in the system: module spider List versions available of a specific module: module spider MODULE Show how to load a specific module and version: module spider MODULE/VERSION List the modules you have currently loaded: module list Compiler toolchains are modules containing compiler suites and various libraries More information There is more information about the module system and how to work with it in HPC2N\u2019s documentation for the modules system .","title":"Compiler Toolchains"},{"location":"projectsaccounts/","text":"Projects - compute and storage \u00b6 Note In order to have an account at HPC2N, you need to be a member of a compute project. You can either join a project or apply for one yourself (if you fulfill the requirements). There are both storage projects and compute projects. The storage projects are for when the amount of storage included with the compute project is not enough. Kebnekaise is only open for local project requests! The PI must be affiliated with UmU, LTU, IRF, MiUN, or SLU. You can still add members (join) from anywhere. Application process \u00b6 Apply for compute projects in SUPR . Login to SUPR (create SUPR account if you do not have one). Click \u201cRounds\u201d in the left menu. Pick \u201cCompute Rounds\u201d. Pick \u201cCentre Local Compute\u201d. Pick \u201cHPC2N Local Compute YYYY\u201d. Choose \u201cCreate New Proposal for HPC2N Local Compute YYYY\u201d. Create from scratch or use earlier proposal as starting point. Agree to the default storage if 500GB is enough. More information: https://supr.naiss.se/round/open_or_pending_type/?type=Centre+Local+Compute If the above mentioned default storage is not enough, you will need to apply for a Local storage project : https://supr.naiss.se/round/open_or_pending_type/?type=Centre+Local+Storage Info As default, you have 25GB in your home directory. If you need more, you/your PI can accept the \u201cdefault storage\u201d you will be offered after applying for compute resources. The default storage is 500GB. If you need more than that, you/your PI will have to apply for a storage project. When you have both, link them together. It is done from the storage project. This way all members of the compute project also becomes members of the storage project. After applying on SUPR, the project(s) will be reviewed. Linking a compute project to a storage project \u00b6 Before linking (SUPR): 2. Pick a compute project to link: 3. Showing linked projects: 4. Members of the storage project after linking: Accounts \u00b6 When you have a project / have become member of a project, you can apply for an account at HPC2N. This is done in SUPR, under \u201cAccounts\u201d: https://supr.naiss.se/account/ . Your account request will be processed within a week. You will then get an email with information about logging in and links to getting started information. More information on the account process can be found on HPC2N\u2019s documentation pages: https://www.hpc2n.umu.se/documentation/access-and-accounts/users","title":"Projects and Accounts"},{"location":"projectsaccounts/#projects__-__compute__and__storage","text":"Note In order to have an account at HPC2N, you need to be a member of a compute project. You can either join a project or apply for one yourself (if you fulfill the requirements). There are both storage projects and compute projects. The storage projects are for when the amount of storage included with the compute project is not enough. Kebnekaise is only open for local project requests! The PI must be affiliated with UmU, LTU, IRF, MiUN, or SLU. You can still add members (join) from anywhere.","title":"Projects - compute and storage"},{"location":"projectsaccounts/#application__process","text":"Apply for compute projects in SUPR . Login to SUPR (create SUPR account if you do not have one). Click \u201cRounds\u201d in the left menu. Pick \u201cCompute Rounds\u201d. Pick \u201cCentre Local Compute\u201d. Pick \u201cHPC2N Local Compute YYYY\u201d. Choose \u201cCreate New Proposal for HPC2N Local Compute YYYY\u201d. Create from scratch or use earlier proposal as starting point. Agree to the default storage if 500GB is enough. More information: https://supr.naiss.se/round/open_or_pending_type/?type=Centre+Local+Compute If the above mentioned default storage is not enough, you will need to apply for a Local storage project : https://supr.naiss.se/round/open_or_pending_type/?type=Centre+Local+Storage Info As default, you have 25GB in your home directory. If you need more, you/your PI can accept the \u201cdefault storage\u201d you will be offered after applying for compute resources. The default storage is 500GB. If you need more than that, you/your PI will have to apply for a storage project. When you have both, link them together. It is done from the storage project. This way all members of the compute project also becomes members of the storage project. After applying on SUPR, the project(s) will be reviewed.","title":"Application process"},{"location":"projectsaccounts/#linking__a__compute__project__to__a__storage__project","text":"Before linking (SUPR): 2. Pick a compute project to link: 3. Showing linked projects: 4. Members of the storage project after linking:","title":"Linking a compute project to a storage project"},{"location":"projectsaccounts/#accounts","text":"When you have a project / have become member of a project, you can apply for an account at HPC2N. This is done in SUPR, under \u201cAccounts\u201d: https://supr.naiss.se/account/ . Your account request will be processed within a week. You will then get an email with information about logging in and links to getting started information. More information on the account process can be found on HPC2N\u2019s documentation pages: https://www.hpc2n.umu.se/documentation/access-and-accounts/users","title":"Accounts"}]} \ No newline at end of file diff --git a/search/worker.js b/search/worker.js new file mode 100644 index 00000000..8628dbce --- /dev/null +++ b/search/worker.js @@ -0,0 +1,133 @@ +var base_path = 'function' === typeof importScripts ? '.' : '/search/'; +var allowSearch = false; +var index; +var documents = {}; +var lang = ['en']; +var data; + +function getScript(script, callback) { + console.log('Loading script: ' + script); + $.getScript(base_path + script).done(function () { + callback(); + }).fail(function (jqxhr, settings, exception) { + console.log('Error: ' + exception); + }); +} + +function getScriptsInOrder(scripts, callback) { + if (scripts.length === 0) { + callback(); + return; + } + getScript(scripts[0], function() { + getScriptsInOrder(scripts.slice(1), callback); + }); +} + +function loadScripts(urls, callback) { + if( 'function' === typeof importScripts ) { + importScripts.apply(null, urls); + callback(); + } else { + getScriptsInOrder(urls, callback); + } +} + +function onJSONLoaded () { + data = JSON.parse(this.responseText); + var scriptsToLoad = ['lunr.js']; + if (data.config && data.config.lang && data.config.lang.length) { + lang = data.config.lang; + } + if (lang.length > 1 || lang[0] !== "en") { + scriptsToLoad.push('lunr.stemmer.support.js'); + if (lang.length > 1) { + scriptsToLoad.push('lunr.multi.js'); + } + if (lang.includes("ja") || lang.includes("jp")) { + scriptsToLoad.push('tinyseg.js'); + } + for (var i=0; i < lang.length; i++) { + if (lang[i] != 'en') { + scriptsToLoad.push(['lunr', lang[i], 'js'].join('.')); + } + } + } + loadScripts(scriptsToLoad, onScriptsLoaded); +} + +function onScriptsLoaded () { + console.log('All search scripts loaded, building Lunr index...'); + if (data.config && data.config.separator && data.config.separator.length) { + lunr.tokenizer.separator = new RegExp(data.config.separator); + } + + if (data.index) { + index = lunr.Index.load(data.index); + data.docs.forEach(function (doc) { + documents[doc.location] = doc; + }); + console.log('Lunr pre-built index loaded, search ready'); + } else { + index = lunr(function () { + if (lang.length === 1 && lang[0] !== "en" && lunr[lang[0]]) { + this.use(lunr[lang[0]]); + } else if (lang.length > 1) { + this.use(lunr.multiLanguage.apply(null, lang)); // spread operator not supported in all browsers: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Spread_operator#Browser_compatibility + } + this.field('title'); + this.field('text'); + this.ref('location'); + + for (var i=0; i < data.docs.length; i++) { + var doc = data.docs[i]; + this.add(doc); + documents[doc.location] = doc; + } + }); + console.log('Lunr index built, search ready'); + } + allowSearch = true; + postMessage({config: data.config}); + postMessage({allowSearch: allowSearch}); +} + +function init () { + var oReq = new XMLHttpRequest(); + oReq.addEventListener("load", onJSONLoaded); + var index_path = base_path + '/search_index.json'; + if( 'function' === typeof importScripts ){ + index_path = 'search_index.json'; + } + oReq.open("GET", index_path); + oReq.send(); +} + +function search (query) { + if (!allowSearch) { + console.error('Assets for search still loading'); + return; + } + + var resultDocuments = []; + var results = index.search(query); + for (var i=0; i < results.length; i++){ + var result = results[i]; + doc = documents[result.ref]; + doc.summary = doc.text.substring(0, 200); + resultDocuments.push(doc); + } + return resultDocuments; +} + +if( 'function' === typeof importScripts ) { + onmessage = function (e) { + if (e.data.init) { + init(); + } else if (e.data.query) { + postMessage({ results: search(e.data.query) }); + } else { + console.error("Worker - Unrecognized message: " + e); + } + }; +} diff --git a/sitemap.xml b/sitemap.xml new file mode 100644 index 00000000..3252b9b7 --- /dev/null +++ b/sitemap.xml @@ -0,0 +1,43 @@ + +