StePS is a cosmological
In
StePS provides a direct
Example
If you plan to publish an academic paper using this software or data, please consider citing the following publications:
- G. Rácz, I. Szapudi, I. Csabai, and L. Dobos "Compactified Cosmological Simulations of the Infinite Universe": MNRAS, Volume 477, Issue 2, p.1949-1957 (2018) [MNRAS] [astro-ph] [NASA adsabs]
- G. Rácz, I. Szapudi, L. Dobos, I. Csabai, and A. S. Szalay "StePS: A multi-GPU cosmological N-body Code for compactified simulations": Astron. Comput. 28, 100303 (2019) [Astronomy and Computing] [astro-ph] [NASA adsabs]
- G. Rácz, V. H. Varga, B. Pál, I. Szapudi, I. Csabai, and T. Sawala "Cylindrical cosmological simulations with StePS": A&A, 710, A101 (2026) [A&A] [astro-ph] [NASA adsabs]
The initial condition generator for StePS can be find on github. Please consider citing the following publication, if you used this initial condition generator:
- B. Pál, G. Rácz, I. Csabai, and I. Szapudi "stepsic: Initial condition generator for stereographic cosmological simulations" arXiv pre-print (2026) [astro-ph]
StePS is written in C++ and parallelised with MPI, OpenMP, and (optionally) CUDA. It runs on GNU/Linux and macOS (Darwin); GPU acceleration is available on GNU/Linux only.
Required:
- A C++17 compiler (GCC, Intel
icpc/icpx, or Clang) - An MPI implementation (OpenMPI is recommended; other implementations should work)
- OpenMP (provided by the compilers above)
Optional:
- HDF5 for reading and writing HDF5 snapshots (enabled by default; see compile-time options)
- CUDA Toolkit for multi-GPU force calculation (GNU/Linux only)
git clone https://github.com/eltevo/StePS.git
cd StePS/StePSAll build commands below are run from the StePS/StePS source directory.
The provided conda environment installs a matching compiler toolchain, OpenMPI, and HDF5, so the code builds reproducibly without depending on system libraries. The CUDA Toolkit is not provided by conda and must be installed system-wide; the Makefile defaults CUDA_PATH to /usr/local/cuda (override it with CUDA_PATH=...).
conda env create -f environment.yml
conda activate steps
cp Template-LinuxGCC-Makefile Makefile # supplies the build rules and compile-time options
./build.sh # CPU build using the conda toolchainBy default ./build.sh produces the CPU executable build/StePS. Pass USING_CUDA=YES for a GPU build (any extra arguments are forwarded to make), which produces build/StePS_CUDA:
./build.sh USING_CUDA=YESEdit the compile-time options in Makefile before running ./build.sh to select the simulation topology and other features.
For CPU-only builds, alternative compilers, or macOS, copy the template matching your platform, set the library paths and compile-time options it contains, then compile:
cp Template-LinuxGCC-Makefile Makefile # or Template-LinuxICC-Makefile / Template-Darwin-Makefile
# edit Makefile: set the MPI/HDF5/CUDA paths and the compile-time options
make -jDepending on the USING_CUDA setting, this produces build/StePS (CPU) or build/StePS_CUDA (GPU).
Several features are selected at compile time in the Makefile. The most important ones are:
| Option | Effect |
|---|---|
USING_CUDA = YES |
Build the multi-GPU CUDA executable (GNU/Linux only) |
| (no boundary flag) | Non-periodic |
-DPERIODIC |
Fully periodic |
-DPERIODIC_Z |
Cylindrical |
-DUSE_BH=0.25 |
Barnes-Hut octree solver with the given opening angle (CPU) |
-DUSE_SINGLE_PRECISION |
32-bit force calculation (faster, lower memory) |
-DHAVE_HDF5 |
Enable HDF5 I/O (on by default) |
-DCOSMOPARAM=0 |
Background cosmology: 0 = ΛCDM, 1 = wCDM, 2 = CPL, -1 = tabulated |
See StePS/README.md for the full list of options and their interactions.
Run the compiled binary under MPI, passing a parameter file. For the GPU build, the final argument is the number of GPUs per MPI task:
export OMP_NUM_THREADS=1
mpirun -np 1 ./build/StePS_CUDA ./examples/LCDM_SP_1860_com_VOI100.param 1For the CPU build, OMP_NUM_THREADS sets the number of threads per MPI task:
export OMP_NUM_THREADS=8
mpirun -np 1 ./build/StePS ./examples/LCDM_SP_1860_com_VOI100.paramRunnable example parameter files and initial conditions are provided in StePS/examples/. Full documentation—including every compile-time option, the parameter-file reference, and the output formats—is available in StePS/README.md.
The development of this code has been supported by Department of Physics of Complex Systems, ELTE. GR would like to thank the Department of Physics & Astronomy, JHU for supporting this work. GR acknowledges sponsorship of a NASA Postdoctoral Program Fellowship. GR was supported by JPL, which is run under contract by California Institute of Technology for NASA. GR acknowledges the support of the Research Council of Finland grant 354905






