How slaclab/genesis-1.3-version2 works
Project type and purpose
• This is a high‐performance scientific simulation code (Genesis‑1.3‑Version2), written in Fortran with a modular structure, targeting particle accelerator physics.
• It supports single‑processor and MPI‑based parallel execution for running large‑scale beam dynamics simulations.
File structure
• Top‐level sources:
• *.f and *.f90 files implement simulation modules (e.g., main.f, pushp.f, track.f, magfield.f).
• *.cmn files hold common blocks (shared data structures, parameters).
• Build & packaging:
• CMakeLists.txt for generating single/MPI builds.
• .gitignore, LICENSE, README.md.
• Configuration & data:
• genesis.def (default parameter template), various .cmn include files, input sequence modules.
• Parallelism:
• mpi.cmn, mpi_single.f, mpi_multi.f plus mpif.h.single – implements the MPI abstraction layer.
Insights from README
• Two build modes: USE_MPI=OFF (serial) and USE_MPI=ON (parallel).
• Relies on external MPI libraries (OpenMPI, MPICH).
• Usage via command‑line driver “genesis2” reading an input file and executing the simulation.