|
Peano
|
ExaGRyPE is Peano's extension for numerical relativity and is built as part of Peano. For general remarks on how to install Peano, please see Installation. This page is designed to be self-contained, i.e. it should include all the steps you need to run the example codes.
Besides a C++20 compiler with OpenMP support (and MPI if you want to run in parallel on a cluster), ExaGRyPE needs
On a workstation, GSL is typically installed via the package manager, e.g.
On a cluster, load the corresponding module (e.g. module load gsl) before you configure, and load the proper modules for your compiler and MPI (see Run ExaGRyPE on Clusters).
Configure and compile Peano in the Peano root directory. With GCC and Autotools, a minimal setup reads
Give make an explicit number of parallel jobs. A plain make -j starts as many compiler processes as there are files to compile, which exhausts the memory of a workstation.
On macOS, libtoolize is called glibtoolize, and Apple's clang does not support -fopenmp. Install GCC via Homebrew and pass it to configure, e.g. CC=gcc-16 CXX=g++-16 (use the version number of your GCC). Do not configure with CPPFLAGS or LDFLAGS pointing to Homebrew's libomp: Peano's libraries then pick up its omp.h, while the generated applications use GCC's, and the executables crash at start-up. If your shell sets these variables, unset them first (unset CPPFLAGS LDFLAGS). With Homebrew, the whole sequence reads
On a cluster with the Intel toolchain and MPI, the call becomes
The flags have the following roles:
--enable-exahype, --enable-blockstructured and --enable-loadbalancing build ExaHyPE 2, on top of which ExaGRyPE sits.--enable-particles builds the particle toolbox, which ExaGRyPE uses for its tracers.--enable-exagrype builds the ExaGRyPE library, which hosts the CCZ4 kernels and the initial conditions (in src/exagrype). It requires ExaHyPE 2 and is built for 3d only. Without it, the generated ExaGRyPE Makefiles do not link.--with-gsl compiles the TwoPunctures black hole initial data into the ExaGRyPE library and adds GSL to the link line of all generated Makefiles. You can drop it if you only run the gauge wave. If you build a black hole scenario against a Peano configured without GSL, the build stops with an error message that asks you to reconfigure.--with-gsl does not take a path. Configure asks pkg-config for GSL and otherwise falls back to -lgsl -lgslcblas -lm. If GSL is installed in a non-standard location that pkg-config does not know, add its directories by hand:
If you prefer CMake, build out-of-tree with the equivalent options:
CMake locates GSL via its FindGSL module. For a non-standard installation, pass -DGSL_ROOT_DIR=/path/to/gsl.
Missing libraries may lead to configuration or compilation errors; please check Troubleshooting if necessary. You only need to compile Peano once as long as your working environment and the Peano kernel code remain unchanged. We recommend re-compiling it after you pull a new code version or change working environments (e.g. when you switch between different login nodes of a cluster).
To clean the Peano root directory completely, e.g. before a fresh configure, use the following lines:
ExaGRyPE's code generation relies on several Python packages. The recommended way to install them is an editable install from the Peano root directory (where the pyproject.toml file resides). This installs the full set of required dependencies and sets the Python path to the Peano modules automatically, so there is no need to export PYTHONPATH by hand. For the complete dependency list and alternative setups (e.g. setting PYTHONPATH manually), see Installation.
The install needs a Python version for which VTK provides packages, i.e. Python 3.14 or older at the time of writing. If your python3 is newer, as Homebrew's 3.15 is, create the environment with an older one, e.g. python3.13 -m venv .venv. Otherwise pip stops with No matching distribution found for vtk (see Troubleshooting).
The editable install also brings Jupyter along. Start it from the tutorial folder within the activated environment:
The notebooks find Peano relative to their own folder, so open them where they are and do not copy them elsewhere.
ExaGRyPE currently offers two entry points:
The new Python API exagrype.api layers on top of exahype2.api. It offers Finite Volumes and the fourth-order Finite Differences (exahype2.api.rkfd4, optionally with Kreiss-Oliger dissipation and lopsided advection) on regular meshes, the gauge wave, and a single black hole with TwoPunctures initial data. Binary black holes, adaptive mesh refinement for the Finite Differences and tracers are not available yet. Its tutorials are Jupyter notebooks in tutorials/exahype2/exagrype. They assume that you have worked through ExaHyPE 2 - Getting prepared and A first advection problem with the Euler equations. For the single black hole, Additional solver steps: postprocessing the solution after each update and Domain decomposition with an off-the-shelf heuristic help as well:
Gauge wave, Single Schwarzschild black hole and ExaGRyPE provide further details.
applications/exahype2/ccz4 hosts the main script ccz4.py, which provides all scenarios (gauge wave, single and binary black holes), tracers and the different numerical schemes. The remaining ExaGRyPE tutorials work with this script: exahype2.solvers.rkfd. They have been removed in favour of exahype2.api.rkfd4, so the script and the tutorials which use it do not run until they are ported to the new API.The following paper contains the physics and code design of ExaGRyPE.