Quickstart
This page provides a minimal workflow to build and run Astra.
What is Astra?
Astra (Accelerated Spectral code for TuRbulent plAsmas) is a modern, high-performance spectral plasma turbulence code. It is designed for performance portability with Kokkos and FFT backends through Kokkos-fft.
Supported backends include:
CPU (OpenMP/Threads + FFTW)
NVIDIA GPU (CUDA + cuFFT)
AMD GPU (HIP/ROCm + rocFFT)
Prerequisites
You need:
CMake >= 3.16
A C++20-capable compiler
Backend-specific FFT library:
CPU: FFTW3
NVIDIA: CUDA Toolkit (cuFFT)
AMD: ROCm (rocFFT)
Optional: MPI implementation (OpenMPI, MPICH, …)
Download Astra
You can get the latest source code from GitHub by cloning the repository with:
git clone --recurse-submodules https://github.com/glesur/astra.git astra
cd astra
Note
If you are updating an already cloned Astra installation (e.g. git pull), you can use the git submodule update --init --recursive command to automatically update submodules.
Build Astra
It is recommended to build in a dedicated directory.
Create and enter a build directory:
mkdir build cd build
Configure with CMake for your target backend.
CPU (FFTW):
cmake .. -DAstra_MPI=ON
NVIDIA GPU (CUDA + cuFFT):
cmake .. \ -DKokkos_ENABLE_CUDA=ON \ -DKokkos_ARCH_VOLTA70=ON \ -DAstra_MPI=ON
AMD GPU (ROCm + rocFFT):
cmake .. \ -DKokkos_ENABLE_HIP=ON \ -DAstra_MPI=ON
Compile:
make -j
Run Astra
Run in serial:
./astra -i ../problem/hydro_turbulence.ini
Run with MPI (example with 4 ranks):
mpirun -np 4 ./astra -i ../problem/hydro_turbulence.ini
Next step
After this first run, explore available problem setup files in problem/
and adapt input parameters in .ini files for your target simulations.