Summary and Setup
This workshop is an introduction to parallel programming in Chapel. This material is designed for Day 2 of HPC Carpentry.
By the end of this workshop, students will know:
- the basic syntax of Chapel codes,
- how to run single-locale Chapel codes,
- how to write task-parallel codes for a shared-memory compute node,
- how to run multi-locale Chapel codes,
- how to write domain-parallel codes for a distributed-memory cluster.
NOTE: This is the draft HPC Carpentry release. Comments and feedback are welcome.
We highly recommend running Chapel on an HPC cluster. Alternatively, you can run Chapel on your computer, but don’t expect a multi-node speedup since you have only one node.
Software Setup
Details
This section describes installing Chapel on your own computer. Before proceeding, please double-check that your workshop instructors do not already provide Chapel on an HPC cluster.
Go to the website https://docs.docker.com/docker-for-windows/install/ and
download the Docker Desktop installation file. Double-click on the
Docker_Desktop_Installer.exe
to run the installer. During
the installation process, enable Hyper-V Windows Feature on the
Configuration page, and wait for the installation to complete. At this
point you might need to restart your computer.
Eventually you want to run https://hub.docker.com/r/chapel/chapel Docker image.
The quickest way to get started with Chapel on MacOS is to install it via Homebrew. If you don’t have Homebrew installed (skip this step if you do), open Terminal.app and type
BASH
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
Next, proceed to installing Chapel:
At https://github.com/chapel-lang/chapel/releases scroll to the first “Assets” section (you might need to click on “Show all assets”) and pick the latest precompiled Chapel package for your Linux distribution. For example, with Ubuntu 22.04 you can do: