2  Install and Build OPALX

OPALX uses CMake and Kokkos to select the execution backend. The following toolchain is recommended for current development and production builds:

Dependency Recommended version Notes
GCC 13 Use the same host compiler throughout the dependency stack.
OpenMPI 4 or 5 Either major version is suitable; use the MPI wrappers from the selected installation.
CUDA 12.9 Required only for NVIDIA GPU builds. Match the architecture setting to the target GPU.
CMake 3.24 or newer OPALX currently declares CMake 3.24 as its minimum version.
Git Recent release Used to clone OPALX and fetched dependencies.

These are recommended versions, not a promise that every other combination is unsupported. Accelerator builds need the matching CUDA or HIP toolchain. Other core dependencies are obtained by the build unless installed-dependency options are selected.

On a module-based system, a typical environment is:

module load gcc/13
module load openmpi/5  # openmpi/4 is also supported
module load cuda/12.9  # CUDA builds only

Module names vary between clusters. After loading them, check that gcc, mpicxx, and nvcc resolve to the intended installations before configuring the build.

2.1 Clone the source

git clone https://github.com/OPALX-project/OPALX.git
cd OPALX

2.2 Configure a CPU build

For a portable single-threaded backend:

cmake -S . -B build_serial \
  -DBUILD_TYPE=Release \
  -DPLATFORMS=SERIAL
cmake --build build_serial -j 8

For OpenMP, use a separate build directory:

cmake -S . -B build_openmp \
  -DBUILD_TYPE=Release \
  -DPLATFORMS=OPENMP
cmake --build build_openmp -j 8

2.3 Configure a GPU build

An NVIDIA A100 build uses the CUDA backend and Ampere architecture:

cmake -S . -B build_cuda \
  -DBUILD_TYPE=Release \
  -DPLATFORMS=CUDA \
  -DARCH=AMPERE80
cmake --build build_cuda -j 8

Select the architecture that matches the target GPU. HIP builds use -DPLATFORMS=HIP and the corresponding AMD architecture.

2.4 Enable tests

Add -DOPALX_ENABLE_UNIT_TESTS=ON when configuring, then run:

ctest --test-dir build_serial --output-on-failure

See Build, Test, and CI for the full developer workflow and Configuration Reference for the maintained build options.