- Boost (Note: There appear to be some issues with newer versions of Boost - pending investigation. In the meantime we recommend using a version ranging from 1.65 to 1.68)
- A MPI 2 implementation (for example OpenMPI 4)
- A C++14 compiler
- A supported SYCL implementation (see below)
Note that while Celerity does support compilation and execution on Windows in principle, in this documentation we focus exclusively on Linux, as it represents the de-facto standard in HPC nowadays.
Picking a SYCL Implementation
Celerity currently supports two different SYCL implementations. If you're simply giving Celerity a try, the choice does not matter all that much. For more advanced use cases or specific hardware setups it might however make sense to prefer one over the other.
hipSYCL is an open source SYCL implementation based on AMD HIP. While not fully spec-conformant (especially regarding its OpenCL interoperability, which is fundamentally incompatible with its design), hipSYCL is a great choice when directly targeting Nvidia CUDA and AMD ROCm platforms.
hipSYCL is currently only available on Linux.
Codeplay's ComputeCpp is a fully SYCL 1.2.1 spec-conformant proprietary implementation. Binary distributions can be downloaded from Codeplay's website. You will also need the CMake module from the ComputeCpp SDK.
ComputeCpp is available for both Linux and Windows.
After installing all of the aforementioned dependencies, clone or download
the Celerity source files
from GitHub. Next, create a
build folder inside the Celerity root folder
and navigate into it.
The exact CMake configuration call you need depends on a few factors, for example the SYCL implementation you chose, as well as your target hardware platform. Here are a couple of examples:
cmake -G Ninja .. -DCMAKE_PREFIX_PATH="<path-to-hipsycl-install>/lib" -DHIPSYCL_PLATFORM=cuda -DHIPSYCL_GPU_ARCH=sm_52 -DCMAKE_INSTALL_PREFIX="<install-path>" -DCMAKE_BUILD_TYPE=Release
cmake -G "Unix Makefiles" .. -DComputeCpp_DIR="<path-to-computecpp-install>" -DCMAKE_INSTALL_PREFIX="<install-path>" -DCMAKE_BUILD_TYPE=Release
Note that the
ComputeCpp_DIR parameters should only
be required if you installed SYCL in a non-standard location. See the CMake
documentation as well as the documentation
for your SYCL implementation for more information on the other parameters.
We currently recommend using the Ninja build system for building hipSYCL-based projects due to some issues with dependency tracking that CMake has with Unix Makefiles.
Celerity comes with several example applications that are built by default.
If you don't want to build examples, provide
an additional parameter to your CMake configuration call.
Building and Installing
After you have successfully configured CMake, building and installing
Celerity should be as simple as calling
ninja install or
If you just want to run the examples, you can skip the installation and
If you have configured CMake to build the Celerity example applications, you can now run them from within the build directory. For example, try running:
mpirun -n 2 ./examples/matmul/matmul
Tip: You might also want to try and run the unit tests that come with Celerity.