chapel OverviewChapel is an emerging parallel programming language being developed by Cray Inc. with the goal of improving programmer productivity. Chapel’s implementation is very much a work-in-progress and one that Cray is undertaking in an open-source manner at SourceForge under the BSD license.
The following information is available by running
module help chapel
Now Available: Cray Chapel Compiler 1.4.0
Cray is pleased to announce the release of version 1.4.0 of the
Cray Chapel Compiler. Chapel is an emerging parallel programming
language designed to improve productivity of high-end computer
users while also serving as a portable parallel programming model
for use on commodity clusters or desktop multicore systems.
Chapel is an emerging parallel programming language being
developed by Cray Inc. with the goal of improving programmer
productivity. Chapel's implementation is very much a
work-in-progress and one that Cray is undertaking in an
open-source manner at SourceForge under the BSD license. We
encourage feedback from potential users in order to help improve
Chapel's usefulness, generality, and adoptability. We are also
interested in seeking out mutually beneficial collaborations with
external research groups.
The highlights of this release include: New optimizations for
whole-array assignments and remote array accesses; new 'export'
and 'extern' keywords for interoperability; improved support for
Qthreads and Nanos+++ tasking, including multi-locale execution;
dynamic work partitioning iterators for ranges; new and improved
example codes; improvements to the language specification; and
numerous feature improvements and bug fixes. See
$CHPL_HOME/CHANGES for a more complete list of changes.
This release of Chapel contains stable support for the base
language, and for task and regular data parallelism using one or
more locales. Data parallel operations on irregular domains and
arrays are currently supported in a single-locale implementation.
While performance has received a great deal of attention in
Chapel's design, this release lacks a number of crucial
performance optimizations and is not suitable for in-depth
performance comparisons and studies.
To get started with Chapel, load the chapel module and refer to
$CHPL_HOME/README for 'Quick Start' instructions and pointers to
next steps, including example programs, the language
specification, and further documentation. Unimplemented features
and known bugs can be found in $CHPL_HOME/STATUS and a full list
of changes since the previous release can be found in
$CHPL_HOME/CHANGES. Users of Chapel are expected to read and
comply with the user agreement contained in $CHPL_HOME/AGREEMENT.
For more information on Chapel beyond what's contained in the
release, please refer to the Chapel web page at:
Interested users are encouraged to join the Chapel users' mailing
list, firstname.lastname@example.org. Questions about Chapel
can be directed to the Chapel team at email@example.com. Bug
reports that can be made publicly visible should be directed to
firstname.lastname@example.org; private bugs can be mailed to
How Do I Get It?
The Chapel 1.4.0 release is available for download at these URLs:
The Chapel release packages contain the compiler executables,
runtime libraries, example programs, and documentation for use on
Cray XT (TM) and Cray XE (TM) systems. Additional information and
the source release can be found at: http://chapel.cray.com and
Official release date October 20, 2011
Chapel 1.5.0 release April 2012
Chapel is licensed under the terms of the BSD license. See
http://chapel.cray.com/release/LICENSE for details.
The Chapel 1.4.0 release is supported on Cray XT systems running the
UNICOS/lc 2.0 CNL and CLE 2.1 or later operating systems and
Cray XE systems running CLE 3.1UP00 CNL or later operating system.
A back-end C compiler is required to generate an executable.
Any recent version of PrgEnv-cray, PrgEnv-pgi, PrgEnv-gnu,
or PrgEnv-intel can be used.
Copy the Chapel 1.4.0 RPM file to the current directory and execute
one of the following commands:
#On Cray XE systems:
rpm -ivh chapel-1.4.0-gem3.x86_64.rpm
#On Cray XT systems:
rpm -ivh chapel-1.4.0-ss3.x86_64.rpm
To make Chapel 1.4.0 the default version, execute:
Please see $CHPL_HOME/README for quick start information.
Unimplemented features and known problems are documented in
To re-display chapel/1.4.0 release information,
type: less /opt/chapel/1.4.0/gemini/release_info
UsageFirst load the chapel module
$ module load chapel
Next, now that the compiler executable is available in the PATH. Chapel has built in support for multi-threading/parallel programming. This can be seen in the following example:
config const numTasks = here.maxTaskPar;
forall tid in 0..#numTasks do
writeln("Hello from task " + tid);
Config variables, like numTasks can be set at runtime by passing the executable the --numTasks=<number of processes>. Next, the forall loop is automatically parallelized by the Chapel compiler to run on multicore CPUs (this is NOT GPU parallelization). To compile the source into an executable, run:
$ chpl -o source source.chpl
This will output two executables: source and source_real. The first is a wrapper that will execute the appropriate aprun command. When running a Chapel executable, be sure to pass it the -nl or --numLocales= flag with the appropriate number of nodes you want used. Other available flags and config variables can be viewed by running ./source --help.
$ ./source -nl8 --numTasks=16
For example, this is the equivilant of launching:
$ aprun -cc none -d16 -n8 -N1 -j0 ./source_real -v -nl8 --numTasks=16
The result will look something like this:
Hello from task 2 of 16
Hello from task 4 of 16
Hello from task 8 of 16
Hello from task 0 of 16
Hello from task 6 of 16
Hello from task 12 of 16
Hello from task 14 of 16
Hello from task 10 of 16
Hello from task 3 of 16
Hello from task 5 of 16
Hello from task 9 of 16
Hello from task 1 of 16
Hello from task 7 of 16
Hello from task 13 of 16
Hello from task 15 of 16
Hello from task 11 of 16