-
Notifications
You must be signed in to change notification settings - Fork 37
Build
Due to the large number of options required to manage building AthenaK and Kokkos on different architectures, the code no longer uses a configure script (as in Athena++), but instead adopts cmake
(must be version 3.0 or later) to manage builds. In-source builds are not allowed; you must create a new build directory in which cmake can be run, for example:
$ mkdir build
$ cd build
Kokkos provides many options for controlling cmake, see their documentation.
Before running cmake it is important to ensure the correct compilers, cuda toolkits (if required), and MPI libraries (if required) are properly loaded (see Requirements).
The following are useful cmake options frequently used with AthenaK
The
$ cmake ../
$ cmake -D PROBLEM=name ../
$ cmake -D CMAKE_BUILD_TYPE=Debug ../
$ cmake -D Athena_ENABLE_MPI=ON ../
$ cmake -DCMAKE_CXX_COMPILER=icpc -D Kokkos_ARCH_BDW=On -D Kokkos_ENABLE_OPENMP=ON
-D CMAKE_CXX_FLAGS="-O3 -inline-forceinline -qopenmp-simd -qopt-prefetch=4 -diag-disable 3180 "
-D CMAKE_C_FLAGS="-O3 -finline-functions" ../
$ cmake3 -DKokkos_ENABLE_CUDA=On -DKokkos_ARCH_VOLTA70=On -DCMAKE_CXX_COMPILER=${path_to_code}/kokkos/bin/nvcc_wrapper ../
$ cmake3 -DKokkos_ENABLE_CUDA=On -DKokkos_ARCH_AMPERE80=On -DCMAKE_CXX_COMPILER=${path_to_code}/kokkos/bin/nvcc_wrapper ../
Getting Started
Running
User Guide
Physics Modules