-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmain.tex
More file actions
402 lines (311 loc) · 10.8 KB
/
main.tex
File metadata and controls
402 lines (311 loc) · 10.8 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
\documentclass{beamer}
\usepackage[utf8]{inputenc}
\usepackage{minted} %Allow synthax highlit on code snippets
\usepackage{xcolor}
\usetheme{CambridgeUS}
\title{Introduction to the iPOP-UP HPC cluster}
\author[Rey, Kirsh and Hennion]{Julien Rey \and Olivier Kirsh \and Magali Hennion}
\date{Juin 2023}
\logo {
\includegraphics[height=1cm]{Logo/ipopup.png}
}
%\logo{
% \includegraphics[width=1cm]{Logo/ipopup.png}
%}
\titlegraphic{
\includegraphics[height=1.5cm]{Logo/ipopup.png}
\hspace{1cm}
\includegraphics[height=1.5cm]{Logo/UniversiteLogo.png}
\hspace{1cm}
\includegraphics[height=1.5cm]{Logo/RPBS.png}
}
\begin{document}
{
\setbeamertemplate{logo}{}
\begin{frame}
\maketitle
\end{frame}
}
\begin{frame}
\frametitle{Table of Contents}
\tableofcontents
\end{frame}
\section{Introduction}
\begin{frame}[fragile]{Who is this training for}
\begin{itemize}
\item You work at Université Paris Cité
\item You need (or might need) more computational power than you currently have
\item You are familiar with Unix systems and Bash
\end{itemize}
\end{frame}
\section{The RPBS platform}
\begin{frame}[fragile]{Missions}
\begin{center}
\includegraphics[height = 1.5cm]{Logo/RPBS.png}
\end{center}
\begin{itemize}
\item Development of Structural Bioinformatics methods
\item Services deployment on the computing resource
\item Expertise and training
\item Hardware hosting
\end{itemize}
\end{frame}
\begin{frame}[fragile]{Web portal}
\begin{columns}
\begin{column}{0.7\textwidth}
\begin{itemize}
\item https://mobyle.rpbs.univ-paris-diderot.fr: free access
\item 30+ Structural Bioinformatics services
\item ~1 million CPU hours /year
\item ~80,000 jobs /year
\end{itemize}
\end{column}
\begin{column}{0.3\textwidth}
\includegraphics[height = 2cm]{Images/mobyle.png}
\end{column}
\end{columns}
\begin{columns}
\begin{column}{0.5\textwidth}
\includegraphics[height = 3cm]{Images/country2022.png}
\end{column}
\begin{column}{0.5\textwidth}
\includegraphics[height = 3cm]{Images/service2022.png}
\end{column}
\end{columns}
\end{frame}
\begin{frame}[fragile]{The iPOP-UP project}
\begin{center}
\includegraphics[height = 3cm]{Images/multisite.png}
\end{center}
\begin{itemize}
\item iPOP-UP: \underline{I}ntegrative \underline{P}latform for \underline{O}mics \underline{P}rojects at \underline{U}niversité de \underline{P}aris
\item Multisite Bioinformatics platform
\item Ranging from multiple 'Omics' techniques to structural and chemo- \emph{in silico} Bioinformatics
\item Compute nodes
\end{itemize}
\end{frame}
\section{Cluster description}
\begin{frame}{What is a cluster for ?}
\begin{itemize}
\item High hardware resources needs
\item Long running analyses
\item A lot of similar analyses
\item Shared work between users
\item Free your desktop from the task
\end{itemize}
\end{frame}
\begin{frame}{What is a cluster ?}
\centering
\includegraphics[keepaspectratio=True, width =0.9\textwidth]{Images/architecture.png}
\end{frame}
\begin{frame}{Computational hardware}
Partitions (groups of compute nodes):
\begin{itemize}
\item ipop-up: 16 nodes, 2048 CPUs
\item rpbs: 20 nodes, 832 CPUs, 9 GPUs (+ 9 nodes, 520 CPUs, 4 GPUs)
\item cmpli: 6 nodes, 264 CPUs, 14 GPUs (+ 1 node, 64 CPUs, 2 GPUs)
\item epigen: 4 nodes, 128 CPUs
\item master-bi: 1 node, 32 CPUs, 3 GPUs
\end{itemize}
Storage:
\begin{itemize}
\item hot-storage: 125TB, very fast
\item cold-storage: 240TB, slow + backup (soon)
\end{itemize}
\end{frame}
\begin{frame}[fragile]{In practice}
Go to your terminal and connect to the cluster using the following line, don't forget to replace username with your personal username.
\begin{minted}[bgcolor=lightgray]{bash}
ssh username@ipop-up.rpbs.univ-paris-diderot.fr
\end{minted}
Type in your password and enter.
\includegraphics[keepaspectratio=True, height=4cm]{Images/connexionCluster.png}
\end{frame}
\begin{frame}[fragile]{Note about ssh and security}
Your IP will be banned after 5 failed authentication attempts. Each public keys count as one authentication attempt. To disable public key authentication:
\begin{minted}[bgcolor=lightgray,breaklines]{bash}
ssh -o PubkeyAuthentication=no username@ipop-up.rpbs.univ-paris-diderot.fr
\end{minted}
A good thing to do, change your password:
\begin{minted}[bgcolor=lightgray]{bash}
passwd
\end{minted}
\end{frame}
\section{Cluster's basics}
\begin{frame}[fragile]{Where you can go, write, or execute}
\begin{block}{User environments}
\begin{minted}{bash}
/shared/home/username
\end{minted}
\end{block}
\begin{block}{Computations (hot data)}
\begin{minted}{bash}
/shared/projects/projectname
\end{minted}
\end{block}
\begin{block}{Processed data (cold data)}
\begin{minted}{bash}
/cold-storage/username
\end{minted}
\end{block}
\begin{block}{Data banks (read-only)}
\begin{minted}{bash}
/shared/banks/
\end{minted}
\end{block}
\end{frame}
\begin{frame}[fragile]{Slurm}
\includegraphics[height = 1cm]{Logo/Slurm.png} \\
Slurm is the cluster management and job scheduling system.\\
It is what will take your code and distribute it on one of the computing nodes, while ensuring it has the CPU(s) and RAM that you asked for.
\\
It requires specific commands to run (srun, sbatch, salloc, etc...)
\end{frame}
\begin{frame}{What is a cluster ?}
\centering
\includegraphics[keepaspectratio=True, width =0.9\textwidth]{Images/slurm_submit.png}
\end{frame}
\begin{frame}[fragile]{Modules}
A lot of tools are installed on the cluster.
\\
\begin{block}{To list them}
\verb|module available| \\
\verb|module av|
\end{block}
\begin{block}{For example}
Look for the different versions of multiqc on the cluster using \verb|module av multiqc|
\end{block}
\begin{center}
\includegraphics[height = 1cm]{Images/multiqc.png}
\end{center}
\end{frame}
\begin{frame}[fragile]{Modules}
\begin{columns}
\begin{column}{0.4\textwidth}
\textbf{To load a tool}
\verb|module load tool/1.3|
\verb|module load tool1 tool2 tool3|
\end{column}
\begin{column}{0.1\textwidth}
\\
\end{column}
\begin{column}{0.4\textwidth}
\textbf{To list modules loaded}\\
\verb|module list|
\\
\parskip=8pt
\textbf{To remove all loaded modules}\\
\verb|module purge|
\end{column}
\end{columns}
\parskip=20pt
\begin{center}
\textbf{Load your modules within your "sbatch" file for consistency}
\end{center}
\end{frame}
\begin{frame}[fragile]{Job monitoring - squeue}
On your terminal, type \verb|squeue|
\begin{center}
\includegraphics[height = 3.5cm]{Images/squeue.png}
\end{center}
ST : Status of the job. R means Running, PD means Pending\\
\begin{columns}
\begin{column}{5cm}
To see only iPOP-UP jobs
\verb|squeue -p ipop-up|
\end{column}
\begin{column}{5cm}
To see only your jobs
\verb|squeue -u username|
\end{column}
\end{columns}
\end{frame}
\begin{frame}[fragile]{Monitoring your jobs, sacct}
(Re-run sleep if needed and) type \verb|sacct|
\includegraphics[height = 1.5cm]{Images/sacct.png}
\parskip=12pt
You can pass the option \verb|--format| to list the information that you want to display, including memory usage, time of running, ... For instance: \\
\verb|sacct --format=JobID,JobName,Start,Elapsed,CPUTime,| \\
\verb|NCPUS,NodeList,MaxRSS,ReqMeM,State|
\parskip=12pt
To see every options, run \verb|sacct --helpformat|
\end{frame}
\begin{frame}[fragile]{Job efficiency}
After the run, the \verb|seff| command allows you to access information about the efficiency of a job.
\verb|seff <jobid>|
\begin{center}
\includegraphics[width = 8cm]{Images/seffExample.png}
\end{center}
Exercices star etc...
\end{frame}
\section{Parallelization}
\begin{frame}[fragile]{Some vocabulary}
\begin{itemize}
\item job : A script, typically started with sbatch
\item job step : A specific step in the big job, it can be a "srun" line within the script
\item job task : A unit of resource allocation
\end{itemize}
We will not go into \verb|srun| usage here, but we can talk about it later if you want.
%If you do not use \verb|srun| \textbf{cpus-per-task corresponds to the number of CPUs asked.} % je comprends pas la phrase!!
\end{frame}
\begin{frame}[fragile]{Ask for more CPUs for a tool}
Some tools allow multi-threading, i.e. the use of several CPUs to accelerate one task. \\
It is the case of STAR with the \verb|--runThreadN| option.
\begin{block}{Exercise : Alignment, parallel}
\end{block}
\end{frame}
\begin{frame}{The cost of parallelization}
\begin{itemize}
\item It may cost more in memory
\item The gain in time is not linear
\end{itemize}
\end{frame}
\begin{frame}[fragile]{Job arrays}
Job arrays allow to start the same job a lot of times (same executable, same resources)
\vspace{10pt}
\begin{minted}[fontsize=\small]{bash}
#SBATCH --array=0-3
\end{minted}
Slurm variables
\$SLURM\_ARRAY\_JOB\_ID
\$SLURM\_ARRAY\_TASK\_ID
\end{frame}
\begin{frame}[fragile]{Job Array Common Mistakes}
\begin{itemize}
\item The index of bash lists starts at 0
\item Don't forget to have different output files for each task of the array
\item Same with your log names (\%a or \%J in the name will do the trick)
\item Do not overload the cluster! Please use \%50 (for example) at the end of your indexes to limit the number of tasks (here to 50) running at the same time. The 51st will start as soon as one finishes!
\item The RAM defined using \verb|#SBATCH --mem=25G| is for each task
\end{itemize}
\end{frame}
\begin{frame}[fragile]{Complex workflows}
\begin{center}
\includegraphics[height = 6cm]{Images/snakemake.png} \\
\end{center}
Use workflow managers such as Snakemake or Nextflow.
\end{frame}
\section{Useful resources}
\begin{frame}[fragile]{Useful resources}
To find out more, the SLURM manual : \verb|man sbatch| or \href{https://slurm.schedmd.com/sbatch.html}{https://slurm.schedmd.com/sbatch.html} \\
Ask for help or signal problems on the cluster : \href{https://discourse.rpbs.univ-paris-diderot.fr/}{https://discourse.rpbs.univ-paris-diderot.fr/} \\
iPOP-UP cluster documentation: \\
\href{https://ipop-up.docs.rpbs.univ-paris-diderot.fr/documentation/}
{https://ipop-up.docs.rpbs.univ-paris-diderot.fr/documentation/}
\end{frame}
\section{Ending}
\begin{frame}{Thanks}
\center
\includegraphics[height=1.5cm]{Logo/RPBS.png}
\hspace{1cm}
\includegraphics[height=1.5cm]{Logo/UniversiteLogo.png}
\vspace{1cm}
\begin{columns}
\begin{column}{0.4\textwidth}
\end{column}
\begin{column}{0.4\textwidth}
iPOP-UP's technical and steering comitees
\end{column}
\end{columns}
\end{frame}
\end{document}