OpenCilk 2.0 runs on Intel x86 64-bit processors (Haswell and newer), AMD x86 64-bit processors (Excavator and newer), and Apple M1 and other 64-bit ARM processors. It has been tested on the following operating systems:
- Ubuntu (18.04, 20.04, 22.04), including via WSL2 (Windows Subsystem for Linux 2)
- FreeBSD (13)
- Fedora (34, 36)
- macOS (10.15, 11.6, 12.4)
Prerequisites: The OpenCilk binaries assume that system header files and system libraries are already installed on the system.
Methods of installation
Precompiled binaries for OpenCilk 2.0 can be installed in several ways:
- Using a shell archive (
.sh) built for the target hardware and operating system.
- Using a tarball (
.tar.gz) built for the target hardware and operating system.
- Using a docker image.
You can also build OpenCilk from source, which is the recommended approach for Ubuntu 18.04 and other operating systems for which precompiled binaries are not available.
Installing using a shell archive
To install OpenCilk 2.0 using a shell archive, first download the appropriate shell archive for your system, then follow the installation instructions.
Download the appropriate shell archive for your system using one of the following links:
- OpenCilk-2.0.0-x86_64-Linux-Ubuntu-20.04.sh (764 MB)
- OpenCilk-2.0.0-x86_64-Linux-Ubuntu-22.04.sh (782 MB)
Execute the shell script to extract OpenCilk 2.0 into the current directory. For example:
$ sh OpenCilk-2.0.0-x86_64-Linux-Ubuntu-20.04.sh
You will be prompted to accept the OpenCilk license and whether or not to append a version-specific subdirectory to the installation prefix (by default the current directory).
Optionally, you can select a different installation directory by passing the
--prefix=/path/to/install/dir to the script. (You will need to make
sure that installation directory exists before running the shell archive with
--prefix.) To see all options, pass
--help argument to the script.
The OpenCilk C (or C++) compiler can be invoked via
bin/clang++) from within the installation directory.
Optionally, you can configure your system so that
clang++ point to the OpenCilk C and C++
compilers (e.g., by setting your
PATH environment variable or installing system-wide symbolic links).
Example: The following example shows the
process on Ubuntu 20.04 to install OpenCilk into
/opt/opencilk without adding
a version-specific subdirectory. The installation and setup process is
analogous for macOS and other Linux systems.
- Download the precompiled OpenCilk shell archive for your system.
- Make directory
/opt/opencilkif it does not already exist, and execute the shell script to install OpenCilk into the directory.
$ mkdir -p /opt/opencilk $ sh OpenCilk-2.0.0-x86_64-Linux-Ubuntu-20.04.sh --prefix=/opt/opencilk --exclude-subdir OpenCilk Installer Version: 2.0.0, Copyright (c) OpenCilk This is a self-extracting archive. The archive will be extracted to: /opt/opencilk Using target directory: /opt/opencilk Extracting, please wait... Unpacking finished successfully
- The OpenCilk C/C++ compiler can now be run as
- Optionally, set
clang++to point to the OpenCilk C and C++ compilers. This can be achieved in numerous ways, such as by setting your
PATHenvironment variable to look in
/opt/opencilk/bin/or by installing system-wide symbolic links.
Installing using a tarball
To install OpenCilk 2.0 using a tarball, first download the appropriate tarball for your system, then follow the installation instructions.
Download the appropriate tarball for your system using one of the following links:
- OpenCilk-2.0.0-x86_64-Linux-Ubuntu-20.04.tar.gz (764 MB)
- OpenCilk-2.0.0-x86_64-Linux-Ubuntu-22.04.tar.gz (782 MB)
- OpenCilk-2.0.0-arm64-Apple-Darwin.tar.gz (695 MB)
- OpenCilk-2.0.0-x86_64-Apple-Darwin.tar.gz (767 MB)
Extract OpenCilk 2.0 from the downloaded tarball. For example:
$ tar xvzf OpenCilk-2.0.0-x86_64-Linux-Ubuntu-20.04.tar.gz
will extract the OpenCilk installation into a subdirectory
OpenCilk-2.0.0-x86_64-Linux-Ubuntu-20.04/ within the current working directory.
Note: Extracting the tarball as above is equivalent to running the corresponding
shell archive with options
--skip-license --include-subdir. Installing using this method,
or by passing
--skip-license to the shell archive, implies that you accept OpenCilk's
OpenCilk 2.0 is also available as a docker image based on Ubuntu 20.04. You can download the docker image here:
- docker-opencilk-v2.0.tar.gz (1.05 GB)
The OpenCilk C and C++ compilers are available as
clang++ in the
image. To use the OpenCilk 2.0 Docker image, download the
docker-opencilk-v2.0.tar.gz file, load the image, and run a container. For
$ docker load -i docker-opencilk-v2.0.tar.gz $ docker run -it opencilk:v2.0 /bin/bash
The OpenCilk 2.0 installation includes LLVM 14 with the following OpenCilk components:
- OpenCilk compiler (with the
- OpenCilk runtime library
- Cilksan race detector
- Cilkscale scalability analyzer and visualization script
See Getting started for steps to verify that your installation is working and to start using OpenCilk.