Skip to content

siddharthsule/gaps

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

304 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

GAPS: a GPU-Amplified Parton Shower

Version 2.1.0: Replace LHC LO Process, PDF choices

This is the Codebase for:

The aim of this project is to demonstrate how a Parton Shower Veto Algorithm can be reorganised to run in parallel on a GPU without altering the algorithm itself.

What can the code do on the GPU?

The code is an NLO+Shower generator. It can simulate two processes:

  • Electron-Positron Collisions at LEP @ 91.2 GeV

    • Process: $e^+ e^- \to Z/\gamma \to q \bar{q}$ at LO/NLO
    • Observables: Durham Jet Rates and Event Shapes
  • Z Production at the LHC @ 13 TeV

    • NLO Process: $p p \to Z$ at LO/NLO
    • Observables: $Z$ Observables and Anti-$k_T$ Jets

Requirements

You will need an NVIDIA GPU with CUDA Compatibility 7.0 [Guide]. To build the code, you will need cmake, g++, python and NVIDIA's nvcc compiler.

Running the Code

The executable rungaps is provided to simplify the use of the code. One can execute the command:

./rungaps

NB: When running the first time, the code will install LHAPDF-GPU, packaged with the code [LHAPDF Repo]

This command should build the program and generate 10000 events on the GPU. More customisation options are available, and are listed below:

# Simulate N Events on GPU (Default)
./rungaps -p <LEP/LHC> [-nlo] -n nevents

# Simulate N Events on CPU
./rungaps -p <LEP/LHC> [-nlo] -n nevents -r cpu

# Simulate N Events over multiple CPUs
./rungaps -p <LEP/LHC> [-nlo] -n nevents -r cpu-cluster -ncpu ncores

The histograms are saved as Yoda files [arxiv:2312.15070]. To generate the plots, use Rivet [2404.15984] as follows:

rivet-mkhtml --mc-errs -c test/plots.conf <yoda file>

CPU-Only Compilation

If you would like to just use the CPU code, you will need you’ll need a local build of LHAPDF with the CT14lo dataset installed. After this, write the path to LHAPDF when inside the gaps repository using the command

# NB: the gaps repo has a folder called gaps
echo "/path/to/lhapdf/6.5.X" > gaps/lhapdf-gpu/path.txt

After this, you can run the CPU code using rungaps -r cpu. The code will be compiled for you.

Going Further

You can adjust the following parameters:

  • -e, --root_s: Adjust the centre of mass energy
  • -asmz, -fixas: Adjust $\alpha_s(m_Z)$, use fixed $\alpha_s=\alpha_s(m_Z)$
  • -noshower: Skip the shower section (hard subprocess only)
  • -t_c: Adjust the Shower Cutoff
  • -n_em_max: Limit the number of emissions, including the MC@NLO Emission
  • -me2pdf and -showerpdf: Change PDF (default: CT14lo). Also update range in base.h!
  • -t: Number of threads per block on the GPU
  • -do_partitioning: Do Event Record Partitioning (GPU Speedup Trick)
  • -nsys, -codecarbon, -gprof: Profiling Tools

The LHC LO process $pp \to Z/\gamma \to e^+e^-$ has been replaced with $pp \to Z$, as it is a better complementary to the NLO process. If needed, the old code can be uncommented in lhc_lo.cpp/.cu.

To learn more about the code and how it all works, see the documentation.


Sid Sule + Mike Seymour, March 2026

For issues and queries, email: siddharth.sule@manchester.ac.uk

About

Event Generator, written in CUDA C++. Simulates LEP and LHC Collisions.

Topics

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors