Building

Obtaining the Source Code

athelas uses git submodules for managing several dependencies. To make sure you get them all, clone it as

git clone --recursive git@github.com:athelas-astro/athelas.git

or as

git clone git@github.com:athelas-astro/athelas.git
cd athelas
git submodule update --init --recursive

Prerequisites

To build athelas, you need to create a build directly, as in-source builds are not supported. After cloning the repository,

cd athelas
mkdir build
cd build

Cmake is used as the build system. For a standard build:

cmake ..
make -j4 # or cmake --build .

In the above, you may adjust -j4 to reflect the number of cores available on your machine. It is not generally a good idea to set this to all of your available cores.

Build Options

The build options explicitly provided by athelas are:

Option

Default

Comment

ATHELAS_ENABLE_UNIT_TESTS

OFF

Build the unit testing suite

ATHELAS_ENABLE_SANITIZERS

OFF

Build with address and undefined behavior sanitizers

MACHINE_CFG

None

Sets a custom config file.

A few other relevant compile options not specific to Athelas:

Option

Default

Comment

CMAKE_BUILD_TYPE

RelWithDebInfo

Used to set the optimization level

CMAKE_CXX_COMPILER

None

Can be used to specify cxx compiler

Kokkos_ARCH_XXXX

OFF

Can be used to set the machine architecture

You can see all the kokkos build options here

For example, you might get a debug build of Athelas with unit tests using clang++ as

cmake -DCMAKE_BUILD_TYPE=Debug -DCMAKE_CXX_COMPILER=clang++ -DATHELAS_ENABLE_UNIT_TESTS=On ..
make -j4 # or cmake --build .

Running

Run Athelas from the build directory as

./athelas -i path/to/input/file.toml

The input files are in athelas/inputs/*.

Dependencies

Submodules

  • tomlplusplus is a C++ file parser for toml file format. Used for input decks and data.

  • eigen is a C++ linear algebra library.

  • Kokkos provides performance portable shared-memory parallelism. It allows our loops to be CUDA, OpenMP, or something else.

External (Required)

  • cmake for building

  • hdf5 for output

Optional

  • python3 for visualization