809.cactus_s
Physics: General Relativity / Numerical Relativity: Finite difference method, Explicit time integration
This benchmark, CACTUS, was developed from the Einstein Toolkit by:
The Einstein Toolkit itself has many contributors. To see the complete list, please visit 10.5281/zenodo.6588641.
CACTUS was submitted to the SPEC CPU v8 Benchmark Search Program by Steven R. Brandt.
Based on the Cactus Computational Framework, this benchmark uses the EinsteinToolkit to solve the Einstein equations in vacuum. The numerical kernel of this benchmark, McLachlan/ML_CCZ4, is automatically generated from a high level set of partial differential equations with the Kranc code generation package. As a production level code, McLachlan/ML_CCZ4 has been successfully used to model blackholes, gravitational waves. When coupled to other general relativistic (magneto)hydrodynamic codes, it can also be used to model white dwarfs, neutron stars, etc. In this benchmark, vacuum flat space-time is modeled using the BSSN formulation of the Einstein equations. It employs finite differencing in space, an explicit time integration method, and relies on the memory management and communication driver PUGH (Parallel Uniform Grid Hierarchy) for distributing grid functions over processors.
CACTUS requires a parameter file as the input. Both physics and computational parameters are specified in this file. For benchmarking, it is recommended that only the computational parameters, namely the grid size and the number of iterations be changed by end users.
The total run time depends on both parameters. The parameter driver::local_nsize defines the total number of grid points (150x150x150), while Cactus::cctk_itlast defines the total number of iterations. The best practice is probably to set driver::local_nsize to fit the physical memory of the running system and then adjust Cactus::cctk_itlast to change the runtime.
CACTUS writes the components of the spatial metric ADMBase::gxx and ADMBase::gxy at the end of the run. The output is written to separate files. The output files have values along a line. The suffix xl indicates data varying along the x axis at y=0 and z=0; the suffix yl indicates data varying along the y axis at x=0 and z=0; the suffix zl indicates data varying along the z axis at y=0 and x=0; and the suffix dl indicates data varying along the diagonal of all three axes. The following files are written.
gxx.dl gxx.xl gxx.yl gxx.zl gxy.dl gxy.xl gxy.yl gxy.zl
These output files are verified by specdiff using a tight tolerance. The benchmark also writes out to stdout the iteration count when the spatial metric data is written to files. The stdout is also verfied using specdiff.
C, C++
The SPECrate version is single-threaded. The SPECspeed version uses multi-threading with OpenMP.
CACTUS uses complex number types and math functions as defined in C99. Because some C compilers (notably Microsoft Visual Studio C/C++) did not support C99 complex numbers at the time SPEC created this benchmark, SPEC has added alternative complex number types, math functions, and wrapper functions. This additional code is used for all compilers, including compilers that support C99 complex numbers.
CACTUS originated from ET_2020_11 and can be downloaded by following the instructions at http://einsteintoolkit.org/download.html. The submitters contributed a trimmed version to SPEC and further modifications were made by SPEC to improve portability and eliminate unused code.
CACTUS is distributed under the GNU General Public License v2. The submitters gave SPEC permission to use the code under GPLv2. CACTUS has several components referred to as flesh and thorns. Some components are licensed under LGPLv2 and others under GPLv2.
Copyright © 2026 Standard Performance Evaluation Corporation (SPEC®)