NERSCPowering Scientific Discovery Since 1974



Chapel is an emerging parallel programming language being developed by Cray Inc. with the goal of improving programmer productivity.  Chapel's implementation is a work-in-progress and one that Cray is undertaking in a collaborative, open-source manner at SourceForge under the BSD license.  Cray Inc. encourages feedback from potential users in order to help improve Chapel's utility, generality, and adoptability, and are are also interested in seeking out mutually beneficial collaborations with external research groups.

Quick start

1) Load the Chapel module:

% module load chapel

2) Compile an example program using:

% chpl -o hello6-taskpar-dist $CHPL_HOME/examples/hello6-taskpar-dist.chpl

By default, the Chapel compiler creates two binaries:

  1. A wrapper/launcher binary, which you can name via the -o compiler option (defaults to a.out);
  2. The actual binary resulting from the Chapel application being built, with the same name as the launcher binary with _real appended to it.

We recommend using the second binary directly via SLURM's srun. Configure the run with the following when calling srun:

  • Overall number of nodes: --nodes=<num nodes>
  • Overall number of tasks equal to the number of nodes: --ntasks=<num nodes> --ntasks-per-node=1
  • Number of CPUs per task equal to the available hardware threads per node: --cpus-per-task=48

This combination gives Chapel's runtime library the most latitude in setting thread/task placement and scheduling. Also for Chapel, use the -nl to the number of locales to equal the number of nodes requested.

Here is an example run:

$ salloc -N 2 -t 10:00 -p debug
$ srun --nodes=2 --ntasks=2 --ntasks-per-node=1 --cpus-per-task=48 ./hello-coforall_real -v -nl 2