Chapel Quickstart Instructions

The following instructions are designed to help you build Chapel from source. If you haven't already downloaded Chapel, obtain the latest release from https://chapel-lang.org/download.html, or refer to https://chapel-lang.org/install.html for other installation options.

In the following instructions, note that building and using Chapel as described in steps 1-7 disables optional and advanced features in the interest of getting you a clean build as quickly as possible. Step 8 explains how to re-build in the preferred configuration with these additional features enabled. Step 9 explains how to build Chapel for distributed memory execution.

  1. See doc/prereqs.rst for more information about system tools and packages you may need to have installed to build and run Chapel.
  1. Make sure that your shell is in the directory containing this QUICKSTART.rst file. For example:

    cd ~/chapel-1.13.0

  2. Set up your environment to use Chapel in "Quick Start" mode:

If you use: then type:
a bash-compatible shell (bash/zsh) source util/quickstart/setchplenv.bash
a csh-compatible shell (csh/tcsh) source util/quickstart/setchplenv.csh
the fish shell (fish) . util/quickstart/setchplenv.fish
the Bourne shell (sh) . util/quickstart/setchplenv.sh
Note that there is no requirement to use these scripts long-term, they are merely designed to help new users get their environment variables and paths set up quickly. Long-term, users may want to copy and paste these settings into their dotfiles or set them in other ways. See doc/chplenv.rst for a complete description of Chapel's environment variables and their expected values.
  1. Build the compiler and runtime libraries using:

    gmake

    or if your default make is GNU make compatible (as on Mac OS X or Cygwin), use:

    make

    Parallel builds (e.g. gmake -j) are also supported.

  2. csh/tcsh users only: Update your shell's path hash table using:

    rehash

  3. Optionally, check that your Chapel installation is working correctly:

    gmake check

    or:

    make check

  4. Compile an example program:

    chpl -o hello examples/hello.chpl

  5. Run the resulting executable:

    ./hello

  6. Experiment with Chapel in this Quickstart mode to your heart's content. Once you are comfortable with Chapel and interested in using a full-featured version in the preferred configuration:

    1. Open up a new shell to avoid inheriting the previous environment settings.
    2. Repeat steps 1-7 above, but in Step 2, source util/setchplenv.* instead of util/quickstart/setchplenv.*

    This will set up your environment to use Chapel in the preferred configuration. Building this configuration involves compiling third-party packages, which will increase the overall build time. If you run into any portability issues, please let us know via https://chapel-lang.org/bugs.html.

  7. All of the instructions above describe how to run Chapel programs in a single-locale (shared-memory) mode. To run using multiple locales (distributed memory), please refer to doc/multilocale.rst.

  1. If you plan to do performance studies of Chapel programs, be sure to (a) use the full-featured version from steps 8-9 and (b) read $CHPL_HOME/PERFORMANCE.md to avoid common pitfalls.

What's next?

For more detailed information about: refer to:
platform-specific notes platforms
online Chapel Documentation chapel-lang.org/docs
example Chapel programs examples/README
setting Chapel environment variables doc/chplenv.rst
building the compiler doc/building.rst
compiling Chapel programs doc/compiling.rst
executing Chapel programs doc/executing.rst
debugging Chapel programs doc/debugging.rst
reporting bugs doc/bugs.rst
implementation status STATUS
performance status PERFORMANCE.md
Chapel modes for emacs and vim highlight/README.md
Chapel's file and directory structure README.files
changes since the last release CHANGES.md