-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathprogramming.qmd
More file actions
585 lines (551 loc) · 28.5 KB
/
Copy pathprogramming.qmd
File metadata and controls
585 lines (551 loc) · 28.5 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
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
---
title: "Programming resources"
description: "Introduction to programming languages and libraries"
aliases:
- /programming
toc: false
---
<style>
h2 {
color: midnightblue;
}
</style>
<!-- <details style="margin: 0; padding: 0;"> -->
<!-- <summary style="line-height: 1.2; margin: 0; padding: 2px 0;"> -->
<!-- <span style="font-size: 1.2em;">title</span> (date) -->
<!-- </summary> -->
<!-- <br> -->
<!-- <p> -->
<!-- paragraph 1 -->
<!-- </p><p> -->
<!-- paragraph 2 -->
<!-- </p> -->
<!-- <ul> -->
<!-- <li>Speaker: </li> -->
<!-- <li><a href="" target="_blank">PDF slides</a></li> -->
<!-- </ul> -->
<!-- <div class="video-container" data-url="https://www.youtube.com/embed/videoIDstring"></div> -->
<!-- <br> -->
<!-- </details> -->
Table of Contents:
[Python](#python)
• [R](#r-language)
• [Julia](#julia)
• [Chapel](#chapel)
• [MPI](#mpi)
• [OpenMP](#openmp)
• [Debugging and profiling](#debugging)
• [MATLAB](#matlab)
## [Python]{#python}
We give many Python-based workshops and webinars -- you can find quite a few of them in the [visualization
section](tools/visualization).
Click on each webinar for its recording and materials.
<div style="display: flex; flex-direction: column; gap: 6px;">
<!-- ========================================================================================== -->
<details style="margin: 0; padding: 0;">
<summary style="line-height: 1.2; margin: 0; padding: 2px 0;">
<span style="font-size: 1.2em;">The next generation of Python notebooks</span> (2025-Oct-28)
</summary>
<br>
<p>
Project Jupyter was groundbreaking when, back in 2011, it introduced an open-source notebook built on top of
the IPython shell (itself an improvement over the standard Python shell). Notebooks quickly became a popular
tool for literate programming and remain widely used today. However, they come with two major drawbacks: (1)
they are difficult to manage under version control due to the JSON-based .ipynb file format, and (2) it is easy
to forget to rerun cells in order, leading to non-reproducible results.
</p><p>
marimo represents a new generation of open-source Python notebooks designed to overcome these issues. It uses
a dataflow graph under the hood to ensure cells stay up to date and saves notebooks in plain .py files for
seamless version control. marimo also offers rich interactivity with direct synchronization to the Python
kernel. Since its launch in 2023, marimo has rapidly gained popularity. In this webinar, I demonstrate how to
install and use marimo notebooks in practice.
</p>
<ul>
<li>Speaker: Marie-Hélène Burle</li>
<li><a href="https://mint.westdri.ca/python/wb_marimo" target="_blank">Online slides</a></li>
</ul>
<!-- {{< video https://www.youtube.com/watch?v=NS6cGgb3TFk width="100%" height="500px" >}} -->
<div class="video-container" data-url="https://www.youtube.com/embed/NS6cGgb3TFk"></div>
<br>
</details>
<!-- ========================================================================================== -->
<details style="margin: 0; padding: 0;">
<summary style="line-height: 1.2; margin: 0; padding: 2px 0;">
<span style="font-size: 1.2em;">Managing Python packages, versions, and projects with uv</span> (2025-May-06)
</summary>
<br>
<p>
Despite being the most popular programming language, Python has never had a good package and version
manager. Some languages come with an internal manager (e.g. R, Julia) while others come with well-built
command line managers (e.g. Cargo for Rust). Python on the other hand has seen the development of an
ever-growing and never-satisfactory suite of tools to manage its packages, versions, projects, and virtual
environments: pip, pipx, pipenv, poetry, pyenv, venv, virtualenv to name just a few.
</p><p>
In February 2024, Astral might have finally put an end to the jumble when they launched uv, a fast and
well-documented tool written in Rust which elegantly handles the gamut of tasks associated with Python
versions, packages, and projects.
</p><p>
In this webinar, I show how to use uv to manage Python projects, packages, virtual environments, versions, and
more.
</p>
<ul>
<li>Speaker: Marie-Hélène Burle</li>
<li><a href="https://mint.westdri.ca/python/wb_uv" target="_blank">Online slides</a></li>
<li><a href="https://docs.astral.sh/uv" target="_blank">uv documentation</a></li>
<li><a href="https://docs.astral.sh/uv/guides/integration" target="_blank">Integration with other tools</a></li>
<li><a href="https://mclare.blog/posts/using-uv-in-emacs" target="_blank">Using uv with Emacs</a></li>
</ul>
<!-- {{< video https://www.youtube.com/watch?v=pilnGPOqyeU width="100%" height="500px" >}} -->
<div class="video-container" data-url="https://www.youtube.com/embed/pilnGPOqyeU"></div>
<br>
</details>
<!-- </div> -->
<!-- ========================================================================================== -->
<details style="margin: 0; padding: 0;">
<summary style="line-height: 1.2; margin: 0; padding: 2px 0;">
<span style="font-size: 1.2em;">Running parallel Ray workflows across multiple cluster nodes</span> (2025-Feb-11)
</summary>
<br>
<p>
Ray is a unified framework for scaling AI and general Python workflows. Outside of machine learning (ML), its
core distributed runtime and data libraries can be used for writing parallel applications that launch multiple
processes, both on the same node and across multiple cluster nodes. These processes can subsequently execute a
variety of workloads, e.g. Numba-compiled functions, NumPy calculations, and even GPU-enabled codes.
</p><p>
In this webinar, we will focus on scaling Ray workflows to multiple HPC cluster nodes to speed up various
(non-ML) numerical workflows. We will look at both a loosely coupled (embarrassingly parallel) problem and a
tightly coupled parallel problem.
</p>
<ul>
<li>Speaker: Alex Razoumov</li>
<li><a href="https://wgpages.netlify.app/clusterworkflows" target="_blank">Online notes</a></li>
</ul>
<!-- {{< video https://www.youtube.com/watch?v=ZYmK84ZZQBM width="100%" height="500px" >}} -->
<div class="video-container" data-url="https://www.youtube.com/embed/ZYmK84ZZQBM"></div>
<br>
</details>
<!-- ========================================================================================== -->
<details style="margin: 0; padding: 0;">
<summary style="line-height: 1.2; margin: 0; padding: 2px 0;">
<span style="font-size: 1.2em;">Working with multidimensional datasets in xarray</span> (2020-Sep-30)
</summary>
<br>
<ul>
<li>Speaker: Alex Razoumov</li>
<li><a href="https://raw.githubusercontent.com/WestGrid/trainingMaterials/gh-pages/materials/xarray20200930.pdf" target="_blank">PDF slides</a></li>
</ul>
<!-- {{< video https://www.youtube.com/watch?v=xdrcMi_FB8Q width="100%" height="500px" >}} -->
<div class="video-container" data-url="https://www.youtube.com/embed/xdrcMi_FB8Q"></div>
<br>
</details>
<!-- ========================================================================================== -->
<details style="margin: 0; padding: 0;">
<summary style="line-height: 1.2; margin: 0; padding: 2px 0;">
<span style="font-size: 1.2em;">Working with the Python DASK library</span> (2019-Oct-16)
</summary>
<br>
<ul>
<li>Speaker: Chris Want</li>
<li><a href="https://github.com/ualberta-rcg/wg-dask-webinar" target="_blank">Python notebook with an interactive slide deck on GitHub</a></li>
<li><a href="https://raw.githubusercontent.com/WestGrid/trainingMaterials/gh-pages/materials/dask20191016.ipynb.gz" target="_blank">Python notebook as a gzipped file</a></li>
</ul>
<!-- {{< video https://www.youtube.com/watch?v=uGy5gT2vLdI width="100%" height="500px" >}} -->
<div class="video-container" data-url="https://www.youtube.com/embed/uGy5gT2vLdI"></div>
<br>
</details>
<!-- ========================================================================================== -->
</div>
## [R]{#r-language}
Click on each webinar for its recording and materials.
<div style="display: flex; flex-direction: column; gap: 6px;">
<!-- ========================================================================================== -->
<details style="margin: 0; padding: 0;">
<summary style="line-height: 1.2; margin: 0; padding: 2px 0;">
<span style="font-size: 1.2em;">Introduction to high-performance research computing in R</span> (2023-Jan-31)
</summary>
<br>
<p>
The programming language R is not known for its speed. However, with some code optimization, R can be used for
relatively heavy computations. Additional speedup can be achieved through various parallel techniques, both
with multi-threading and distributed computing. This workshop introduces you to working with R from the
command line on the Alliance clusters with a focus on performance. We discuss code profiling and benchmarking,
various packages for parallelization, as well as using C++ from inside R to speed up your calculations.
</p>
<ul>
<li>Speaker: Marie-Hélène Burle</li>
<li><a href="https://mint.westdri.ca/r/hpc_intro_slides.html#/title-slide" target="_blank">Online slides</a> (use ←/→ keys to navigate)</li>
</ul>
<!-- {{< video https://www.youtube.com/watch?v=mxkhOHdN2Hw width="100%" height="500px" >}} -->
<div class="video-container" data-url="https://www.youtube.com/embed/mxkhOHdN2Hw"></div>
<br>
</details>
<!-- ========================================================================================== -->
</div>
## [Julia]{#julia}
<!-- You can also browse some of our Julia programming materials <a href="https://mint.westdri.ca/julia" target="_blank">here</a>. -->
We teach several Julia programming courses, with a particular focus on parallel programming. You can also
browse some of our past Julia webinars below.
Click on each webinar for its recording and materials.
<div style="display: flex; flex-direction: column; gap: 6px;">
<!-- ========================================================================================== -->
<details style="margin: 0; padding: 0;">
<summary style="line-height: 1.2; margin: 0; padding: 2px 0;">
<span style="font-size: 1.2em;">High-level parallel stencil computations on CPUs and GPUs</span> (2025-Jan-21)
</summary>
<br>
<p>
In this webinar, we cover parallel stencil computations in Julia using the ParallelStencil.jl package. This
package enables you to write high-level code for fast computations on CPUs and GPUs. These computations are
common in all numerical simulations involving the solution of discretized partial differential equations
(PDEs) on a grid. ParallelStencil.jl provides high-level functions for computing derivatives and updating
arrays. You can execute the same code on a single CPU, multiple CPUs with multithreading via Base.Threads, or
on GPUs using either CUDA.jl (NVIDIA GPUs), AMDGPU.jl (AMD GPUs), or Metal.jl (Apple Silicon GPUs).
</p><p>
Regardless of the underlying parallel hardware, all low-level communication between threads is hidden behind
ParallelStencil.jl's macro calls, ensuring that it remains invisible in the simulation code. This framework
makes it highly accessible to domain scientists.
</p><p>
Furthermore, you can extend this framework to multiple
processes, integrating ParallelStencil.jl with ImplicitGlobalGrid.jl (built upon MPI.jl). This combination
facilitates easy scaling to multiple cluster nodes, with further parallelization on multiple cores and GPUs on
each node. This architecture has been shown to scale efficiently to hundreds of GPUs and hundreds of cluster
nodes.
</p>
<ul>
<li>Speaker: Alex Razoumov </li>
<li><a href="https://wgpages.netlify.app/stencil" target="_blank">Online notes</a></li>
</ul>
<!-- {{< video https://www.youtube.com/watch?v=ktDDCoxJfkE width="100%" height="500px" >}} -->
<div class="video-container" data-url="https://www.youtube.com/embed/ktDDCoxJfkE"></div>
<br>
</details>
<!-- ========================================================================================== -->
<!-- <a name="nextflow"></a> -->
<details style="margin: 0; padding: 0;">
<summary style="line-height: 1.2; margin: 0; padding: 2px 0;">
<span style="font-size: 1.2em;">Nextflow and Julia for scalable computation</span> (2024-Nov-12)
</summary>
<br>
<p>
Large-scale numerical experiments are central to much of contemporary scientific and mathematical
research. Performing these numerical experiments in a valid, reproducible and scalable fashion is not easy. In
this webinar I provide an introduction and pointers to two tools my research group uses to perform numerical
experiments:
<ul>
<li>Nextflow: can be thought of as an "operating system" for coordinating numerical experiments.</li>
<li>Julia: a programming language to unlock full access to high-performance computation on both CPUs and GPUs.</li>
</ul>
</p>
<ul>
<li>Speaker: Alexandre Bouchard-Côtén</li>
<li><a href="https://ubc-stat-ml.github.io/nf-nest-doc/01_intro.html" target="_blank">Online material</a></li>
<li><a href="https://github.com/UBC-Stat-ML/nf-nest" target="_blank">nf-nest repository on GitHub</a></li>
</ul>
<!-- {{< video https://www.youtube.com/watch?v=-K91oezt_S8 width="100%" height="500px" >}} -->
<div class="video-container" data-url="https://www.youtube.com/embed/-K91oezt_S8"></div>
<br>
</details>
<!-- ========================================================================================== -->
<details style="margin: 0; padding: 0;">
<summary style="line-height: 1.2; margin: 0; padding: 2px 0;">
<span style="font-size: 1.2em;">Julia at full tilt: profiling and optimizations</span> (2024-Apr-30)
</summary>
<br>
<ul>
<li>Speaker: Paul Schrimpf</li>
<li><a href="https://schrimpf.github.io/ARGridBootstrap.jl/westdri_talk.html#/title-slide" target="_blank">Online slides</a></li>
</ul>
<!-- {{< video https://www.youtube.com/watch?v=QSQ9DXFrfi8 width="100%" height="500px" >}} -->
<div class="video-container" data-url="https://www.youtube.com/embed/QSQ9DXFrfi8"></div>
<br>
</details>
<!-- ========================================================================================== -->
<details style="margin: 0; padding: 0;">
<summary style="line-height: 1.2; margin: 0; padding: 2px 0;">
<span style="font-size: 1.2em;">ThreadsX.jl: easier multithreading in Julia</span> (2022-Feb-02)
</summary>
<br>
<ul>
<li>Speaker: Alex Razoumov</li>
<li><a href="https://raw.githubusercontent.com/WestGrid/trainingMaterials/gh-pages/materials/threadsx20220202.pdf" target="_blank">PDF slides</a></li>
</ul>
<!-- {{< video https://www.youtube.com/watch?v=ZYzlhp-W0a8 width="100%" height="500px" >}} -->
<div class="video-container" data-url="https://www.youtube.com/embed/ZYzlhp-W0a8"></div>
<br>
</details>
<!-- ========================================================================================== -->
<details style="margin: 0; padding: 0;">
<summary style="line-height: 1.2; margin: 0; padding: 2px 0;">
<span style="font-size: 1.2em;">Easier parallel Julia workflow with Dagger.jl</span> (2021-Oct-27)
</summary>
<br>
<p>
Designed specifically for HPC and inspired by the <a href="https://docs.dask.org/en/latest"
target="_blank">Python library Dask</a>, Dagger is a distributed framework with a scheduler built on top of
Distributed.jl for efficient parallel and out-of-core execution of tasks represented by a <a
href="https://en.wikipedia.org/wiki/Directed_acyclic_graph" target="_blank">directed acyclic graph
(DAG)</a>. Dask supports computing with multiple threads, multiple processes, and on GPUs. Checkpoints are
easy to create if you need to interrupt and resume computations. Finally, Dagger provides some debugging and
runtime profiling tools.
</p>
<ul>
<li>Speaker: Marie-Hélène Burle</li>
</ul>
<!-- {{< video https://www.youtube.com/watch?v=VrqzOsav61w width="100%" height="500px" >}} -->
<div class="video-container" data-url="https://www.youtube.com/embed/VrqzOsav61w"></div>
<br>
</details>
<!-- ========================================================================================== -->
<details style="margin: 0; padding: 0;">
<summary style="line-height: 1.2; margin: 0; padding: 2px 0;">
<span style="font-size: 1.2em;">Parallel programming in Julia</span> (2021-Mar-17)
</summary>
<br>
<p>
In this webinar, we start with a quick review of Julia's multi-threading features but focus primarily on Distributed
standard library and its large array of tools. We show parallelization using three problems: a slowly converging series,
a Julia set, and an N-body solver. We run the examples on a multi-core laptop and an HPC cluster.
</p>
<ul>
<li>Speakers: Alex Razoumov and Marie-Hélène Burle</li>
<li><a href="https://raw.githubusercontent.com/WestGrid/trainingMaterials/gh-pages/materials/julia20210317.pdf" target="_blank">PDF slides</a></li>
</ul>
<!-- {{< video https://www.youtube.com/watch?v=2SafLn0xJKY width="100%" height="500px" >}} -->
<div class="video-container" data-url="https://www.youtube.com/embed/2SafLn0xJKY"></div>
<br>
</details>
<!-- ========================================================================================== -->
<details style="margin: 0; padding: 0;">
<summary style="line-height: 1.2; margin: 0; padding: 2px 0;">
<span style="font-size: 1.2em;">High-performance research computing with Julia</span> (2020-Mar-04)
</summary>
<br>
<ul>
<li>Speaker: Marie-Hélène Burle</li>
<li><a href="https://westgrid-julia.netlify.com/webinars/intro.html" target="_blank">Webinar page</a></li>
<li><a href="https://westgrid-julia.netlify.com/webinars/intro.html#headline-4" target="_blank">Comments & questions</a></li>
<li><a href="https://westgrid-webinars.netlify.com/julia_intro#" target="_blank">Online slides</a></li>
</ul>
<!-- {{< video https://www.youtube.com/watch?v=XQsxn8OUXGA width="100%" height="500px" >}} -->
<div class="video-container" data-url="https://www.youtube.com/embed/XQsxn8OUXGA"></div>
<br>
</details>
<!-- ========================================================================================== -->
</div>
## [Chapel]{#chapel}
Click on each webinar for its recording and materials.
<div style="display: flex; flex-direction: column; gap: 6px;">
<!-- ========================================================================================== -->
<details style="margin: 0; padding: 0;">
<summary style="line-height: 1.2; margin: 0; padding: 2px 0;">
<span style="font-size: 1.2em;">GPU computing with Chapel</span> (2024-Oct-01)
</summary>
<br>
<p>
Chapel is a parallel programming language for scientific computing designed to exploit parallelism across a
wide range of hardware, from multi-core computers to large HPC clusters. Recently, Chapel introduced support
for GPUs, allowing the same code to run seamlessly on both NVIDIA and AMD GPUs, without modification. In
addition, for testing and development, Chapel offers a "CPU-as-device" mode, which lets you prototype GPU code
on a regular computer without a dedicated GPU.
</p><p>
Programming GPUs in Chapel is significantly easier than using CUDA or ROCm/HIP, and more flexible than
OpenACC, as you can run fairly generic Chapel code on GPUs. Obviously, you will benefit from GPU acceleration
the most with calculations that can be broken into many independent identical pieces. In Chapel, data transfer
to/from a GPU (and between GPUs) is straightforward, thanks to a well-defined coding model that associates
both calculations and data with a clear concept of locality.
</p><p>
As of this writing, on the Alliance systems, you can run multi-locale (multiple nodes) GPU Chapel natively on
Cedar, and single-locale GPU Chapel on all other clusters with NVIDIA cards via a container. Efforts are
underway to expand native GPU support to more systems.
</p><p>
In this webinar, we guide you through Chapel's key GPU programming features with live demos.
</p>
<ul>
<li>Speaker: Alex Razoumov</li>
<li><a href="https://wgpages.netlify.app/chapel-gpu" target="_blank">Online notes</a></li>
</ul>
<!-- {{< video https://www.youtube.com/watch?v=1gMFtJN-4_E width="100%" height="500px" >}} -->
<div class="video-container" data-url="https://www.youtube.com/embed/1gMFtJN-4_E"></div>
<br>
</details>
<!-- ========================================================================================== -->
<details style="margin: 0; padding: 0;">
<summary style="line-height: 1.2; margin: 0; padding: 2px 0;">
<span style="font-size: 1.2em;">Working with data files and external C libraries in Chapel</span> (2020-Mar-18)
</summary>
<br>
<ul>
<li>Speaker: Alex Razoumov</li>
<li><a href="https://raw.githubusercontent.com/WestGrid/trainingMaterials/gh-pages/materials/cFromChapel20200318.pdf" target="_blank">PDF slides</a></li>
</ul>
<!-- {{< video https://www.youtube.com/watch?v=zkTeKlZe2Ag width="100%" height="500px" >}} -->
<div class="video-container" data-url="https://www.youtube.com/embed/zkTeKlZe2Ag"></div>
<br>
</details>
<!-- ========================================================================================== -->
<details style="margin: 0; padding: 0;">
<summary style="line-height: 1.2; margin: 0; padding: 2px 0;">
<span style="font-size: 1.2em;">Working with distributed unstructured data in Chapel</span> (2019-Apr-17)
</summary>
<br>
<ul>
<li>Speaker: Alex Razoumov</li>
<li><a href="https://raw.githubusercontent.com/WestGrid/trainingMaterials/gh-pages/materials/unstructured20190417.zip" target="_blank">ZIP file</a>with slides and sample codes</li>
</ul>
<!-- {{< video https://www.youtube.com/watch?v=UTu0z_W0-FM width="100%" height="500px" >}} -->
<div class="video-container" data-url="https://www.youtube.com/embed/UTu0z_W0-FM"></div>
<br>
</details>
<!-- ========================================================================================== -->
<details style="margin: 0; padding: 0;">
<summary style="line-height: 1.2; margin: 0; padding: 2px 0;">
<span style="font-size: 1.2em;">Intro to Parallel Programming in Chapel</span> (3-part series, early 2018)
</summary>
<br>
<p>
In this three-part online webinar series, we introduce the main concepts of the <a
href="https://chapel-lang.org" target="_blank">Chapel</a> parallel programming language. Chapel is a
relatively new language for both shared- and distributed-memory programming, with easy-to-use, high-level
features that make it ideal for learning parallel programming for a novice HPC user.
</p><p>
Unlike other high-level data-processing languages and workflows, the primary application of Chapel is
numerical modelling and simulation codes, so this workshop is ideal for anyone who wants to learn how to
write efficient large-scale numerical codes.
</p>
<ul>
<li>Speaker: Alex Razoumov</li>
</ul>
<h4>Part 1: Basic language features (2018-Feb-28)</h4><br>
<!-- {{< video https://www.youtube.com/watch?v=QiyLkfYHEvg width="100%" height="500px" >}} -->
<div class="video-container" data-url="https://www.youtube.com/embed/QiyLkfYHEvg"></div>
<h4>Part 2: Task parallelism in Chapel (2018-Mar-07)</h4><br>
{{< video https://www.youtube.com/watch?v=kCI0riVEjlk width="100%" height="500px" >}}
<h4>Part 3: Data parallelism in Chapel (2018-Mar-14)</h4><br>
{{< video https://www.youtube.com/watch?v=hdnVKGJAlcM width="100%" height="500px" >}}
<br>
</details>
<!-- ========================================================================================== -->
</div>
## [HPC Carpentry Course]{#hpc-carpentry}
As part of their contribution to HPC Carpentry, WestGrid staff authored a [*Parallel programming in Chapel*
course](https://hpc-carpentry.github.io/hpc-chapel). The materials and exercises presented in this course can
be presented as a full-day workshop. If you have questions about the materials, please contact Alex Razoumov -
alex dot razoumov at westgrid dot ca.
## [MPI]{#mpi}
Click on each webinar for its recording and materials.
<div style="display: flex; flex-direction: column; gap: 6px;">
<!-- ========================================================================================== -->
<details style="margin: 0; padding: 0;">
<summary style="line-height: 1.2; margin: 0; padding: 2px 0;">
<span style="font-size: 1.2em;">A Brief Introduction to the Boost MPI Library</span> (2018-May-09)
</summary>
<br>
<ul>
<li>Speaker: Patrick Mann</li>
<li><a href="https://raw.githubusercontent.com/WestGrid/trainingMaterials/gh-pages/materials/boostMPI20180509.pdf" target="_blank">PDF slides</a></li>
<li><a href="https://github.com/WestGrid/boostWebinar" target="_blank">Repository with example codes</a></li>
</ul>
<!-- {{< video https://www.youtube.com/watch?v=P3kMdyka0XI width="100%" height="500px" >}} -->
<div class="video-container" data-url="https://www.youtube.com/embed/P3kMdyka0XI"></div>
<br>
</details>
<!-- ========================================================================================== -->
</div>
## [OpenMP]{#openmp}
Click on each webinar for its recording and materials.
<div style="display: flex; flex-direction: column; gap: 6px;">
<!-- ========================================================================================== -->
<details style="margin: 0; padding: 0;">
<summary style="line-height: 1.2; margin: 0; padding: 2px 0;">
<span style="font-size: 1.2em;">Intro to Parallel Programming for Shared Memory Machines</span> (2019-Oct)
</summary>
<br>
<p>
This online workshop explores how to use OpenMP to improve the speed of serial jobs on multi-core machines. We
review how to add OpenMP constructs to a serial program in order to run it using multiple cores. Viewers are
led through a series of hands-on, interactive examples, focusing on multi-threading parallel programming.
</p><p>
The topics covered include:
</p>
<ul>
<li>Basic OpenMP operations</li>
<li>Loops</li>
<li>Reduction variables</li>
</ul>
<ul>
<li>Speaker: Ali Kerrache</li>
<li><a href="https://raw.githubusercontent.com/WestGrid/trainingMaterials/gh-pages/materials/introParallelProgrammingOpenMP201710.pdf" target="_blank">PDF slides</a></li>
</ul>
<!-- {{< video https://www.youtube.com/watch?v=LL3TAHpxOig width="100%" height="500px" >}} -->
<div class="video-container" data-url="https://www.youtube.com/embed/LL3TAHpxOig"></div>
<br>
</details>
<!-- ========================================================================================== -->
</div>
## [Debugging and profiling]{#debugging}
Click on each webinar for its recording and materials.
<div style="display: flex; flex-direction: column; gap: 6px;">
<!-- ========================================================================================== -->
<details style="margin: 0; padding: 0;">
<summary style="line-height: 1.2; margin: 0; padding: 2px 0;">
<span style="font-size: 1.2em;">Memory debugging with Valgrind</span> (2019-Feb-20)
</summary>
<br>
<ul>
<li>Speaker: Tyson Whitehead</li>
<li><a href="https://raw.githubusercontent.com/WestGrid/trainingMaterials/gh-pages/materials/valgrind20190220.zip" target="_blank">ZIP file with slides, handout, and code examples</a></li>
</ul>
<!-- {{< video https://www.youtube.com/watch?v=-VDiEe9hxC4 width="100%" height="500px" >}} -->
<div class="video-container" data-url="https://www.youtube.com/embed/-VDiEe9hxC4"></div>
<br>
</details>
<!-- ========================================================================================== -->
</div>
## [MATLAB]{#matlab}
Click on each webinar for its recording and materials.
<div style="display: flex; flex-direction: column; gap: 6px;">
<!-- ========================================================================================== -->
<details style="margin: 0; padding: 0;">
<summary style="line-height: 1.2; margin: 0; padding: 2px 0;">
<span style="font-size: 1.2em;">Data Analytics and Machine Learning with MATLAB</span> (2018-Oct-31)
</summary>
<br>
<ul>
<li>Speaker: Sumit Tandon</li>
<li><a href="https://raw.githubusercontent.com/WestGrid/trainingMaterials/gh-pages/materials/MATLAB20181031.pdf" target="_blank">PDF slides</a></li>
</ul>
<!-- {{< video https://www.youtube.com/watch?v=LFxTqte_Msc width="100%" height="500px" >}} -->
<div class="video-container" data-url="https://www.youtube.com/embed/LFxTqte_Msc"></div>
<br>
</details>
<!-- ========================================================================================== -->
</div>
<br>
```{=html}
{{< video https://www.youtube.com/watch?v=videoIDstring width="100%" height="500px" >}}
<div class="d-flex justify-content-end my-4">
<button class="btn btn-outline-secondary btn-sm" onclick="collapseAllDetails()">
<i class="bi bi-arrows-collapse"></i> Collapse All Sections
</button>
</div>
<!-- button to collapse all sections in this page -->
<script>
function collapseAllDetails() {
document.querySelectorAll('details').forEach(d => d.open = false);
}
</script>
<!-- embed a video forcing a high-resolution thumbnail preview -->
<script>
document.querySelectorAll('details').forEach(details => {
details.addEventListener('toggle', () => {
if (details.open) {
const container = details.querySelector('.video-container');
if (container && !container.querySelector('iframe')) {
const url = container.getAttribute('data-url');
container.innerHTML = `<iframe src="${url}" width="100%" height="500px" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>`;
}
}
});
});
</script>
```