Setup¶
This page is intended as a guide to jump start new Kokkos Comm users.
System requirements¶
Name |
Requirement |
|---|---|
CMake |
3.25+ |
C++ compiler |
Conforming to ISO C++20 standard |
Kokkos |
4.7+ |
MPI |
Conforming to MPI-3+ standard |
NCCL |
2+ |
Kokkos Comm will attempt to support the same systems and toolchains as Kokkos.
Installation¶
Download¶
Kokkos Comm’s source code is available on GitHub, which you can obtain using the following command:
$ git clone https://github.com/kokkos/kokkos-comm.git
Or using the GitHub CLI:
$ gh repo clone kokkos/kokkos-comm
Build¶
A basic configure and build of Kokkos Comm:
$ cmake -B <BUILD_DIR> -DKokkos_ROOT=<KOKKOS_INSTALL_DIR>
$ cmake --build <BUILD_DIR>
Test¶
$ cmake -B <BUILD_DIR> \
-DKokkos_ROOT=<KOKKOS_INSTALL_DIR> \
-DKokkosComm_ENABLE_TESTS=ON
$ cmake --build <BUILD_DIR>
$ ctest --test-dir <BUILD_DIR>/unit_tests
For a detailed guide on testing Kokkos Comm, please refer to the Testing section.
Install¶
$ cmake --install <BUILD_DIR> --prefix <INSTALL_DIR>
Integration in user applications¶
Similarly to Kokkos, Kokkos Comm is packaged with a modern CMake build system.
Once installed, you can declare Kokkos Comm as a dependency of your project by adding the following line to your CMakeLists.txt:
find_package(KokkosComm REQUIRED)
Then, for every executable or library in your project that depends on Kokkos Comm:
target_link_libraries(MyTarget KokkosComm::KokkosComm)
CMake configuration options¶
This section lists the available options to customize your Kokkos Comm build and/or installation.
Important
All Kokkos Comm CMake options are prefixed with KokkosComm_, which is case-sensitive.
Communication backend selection¶
You can enable communication backends by configuring with -DKokkosComm_ENABLE_<COMM_BACKEND>=ON, where <COMM_BACKEND> is replaced with the specific communication backend you want to enable (e.g. -DKokkosComm_ENABLE_MPI=ON for MPI).
CMake option |
Default |
Description |
|---|---|---|
|
|
Build with MPI backend. |
|
|
Build with NCCL backend (experimental). |
Behavior tuning¶
CMake option |
Default |
Description |
|---|---|---|
|
|
Runtime check failures trigger a global abort. |
General options¶
CMake option |
Default |
Description |
|---|---|---|
|
|
Build unit tests. |
|
|
Build performance tests. |
|
|
Install a CMake config-file package together with the library. Defaults to |
Known quirks¶
At Sandia, with the VPN enabled while using MPICH, you may have to do the following:
$ export FI_PROVIDER=tcp