CMake installation¶
Minimal requirements¶
- a
C++20compiler (gcc11 or newer) andCMake3.22 or newer; - an
MPIimplementation (OpenMPI,MPICH, ...); zlib(compression of the checkpoint files, e.g.sudo apt install zlib1g-dev);CUDA(optional, for theGPUversion).
CMake 4.x
yaml-cpp 0.6.3 is not compatible with CMake 4.x (the build fails with a cmake_minimum_required error). If
your system ships a newer CMake, install an older one (for example spack install cmake@3.27.9 and
spack load cmake@3.27.9) before running the steps below.
yaml-cpp¶
After the build, you can remove the source and build directories (yaml-cpp/ and build-yaml-cpp/).
Note
The variable PATH_TO_YAML is now set: append -DCMAKE_PREFIX_PATH=${PATH_TO_YAML} to every subsequent
cmake command (onika and hippoLBM). This is not needed with spack or apt-get.
onika¶
Select the compute capability of your GPU for CMAKE_CUDA_ARCHITECTURES (86 in this example).
Copy the onika repository (v1.1.0) onto TOPAZE first. The yaml-cpp module can be loaded with
module load yaml-cpp.
hippoLBM¶
onika_DIR
Make sure the onika_DIR environment variable is set to your onika installation path before running CMake.
If you opened a new shell since installing onika, re-export it:
CMake options
| Option | Default | Description |
|---|---|---|
CMAKE_BUILD_TYPE |
— | Release for production runs, Debug to debug |
CMAKE_CUDA_ARCHITECTURES |
— | compute capability of the target GPU (CUDA builds of onika) |
ONIKA_BUILD_hippo_couette |
ON |
builds the optional hippo_couette plugin (bgk_couette_relax, macro_variables_couette_relax) |
The build directory contains the hippoLBM executable, a wrapper that sets the onika environment (plugins and
default configuration files) and runs the deck given on the command line.
Check the installation¶
The regression tests are run with ctest in the build directory (see Tests):
Then run a first example, the Poiseuille flow: