Parallel programming in Chapel


Tuesday, June 28  &  Thursday, June 30
9:30am–12:30pm Pacific Time

This course will start at 9:30am Pacific Time and will run until 12:30pm Pacific Time. Its format will be a combination of several interactive Zoom sessions and the reading materials in-between the Zoom sessions. Course materials will be added here shortly before the start of the course.


This course is a general introduction to the main principles of parallel programming, using Chapel programming language to illustrate the basic concepts and ideas. Chapel is a relatively new language for both shared- and distributed-memory programming, with easy-to-use, high-level abstractions for both task and data parallelism that make it ideal for learning parallel programming for a novice HPC user. Chapel is incredibly intuitive, striving to merge the ease-of-use of Python and the performance of traditional compiled languages such as C and Fortran. Parallel constructs that typically take tens of lines of MPI code can be expressed in only a few lines of Chapel code. Chapel is open source and can run on any Unix-like operating system, with hardware support from laptops to large HPC systems.

Instructor: Alex Razoumov (SFU)

Prerequisites: working knowledge of the Linux Bash shell and familiarity with Compute Canada’s HPC cluster environment, in particular, with the Slurm scheduler (covered in our HPC course).

Software: All attendees will need a remote secure shell (SSH) client installed on their computer in order to participate in the course exercises. On Windows we recommend the free Home Edition of MobaXterm. On Mac and Linux computers SSH is usually pre-installed (try typing ssh in a terminal to make sure it is there). No need to install Chapel on your computer.


Zoom   Day 1 - 9:30am-12:30pm Pacific
    Part 1: basic language features
Introduction to Chapel
Basic syntax and variables
Ranges and arrays
Conditional statements
Getting started with loops
Using command-line arguments
Measuring code performance
    Part 2: task parallelism
Intro to parallel computing
Fire-and-forget tasks
Synchronization of threads


Zoom   Day 2 - 9:30am-12:30pm Pacific
Task-parallelizing the heat transfer solver
    Part 3: data parallelism
Single-locale data parallelism
Parallelizing the Julia set problem
Multi-locale Chapel
Domains and data parallelism

Solutions

You can find the solutions here.