Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
48b2c19
rename the launcher bin/mg5_aMC to bin/madgraph
oliviermattelaer Aug 11, 2026
3828841
remove the dead Template/LO/bin/newprocess_mg5 script
oliviermattelaer Aug 11, 2026
db84be2
rename the Fortran export format standalone -> standalone_fortran
oliviermattelaer Aug 11, 2026
02f0c0d
rename the export format standalone_mg7 -> standalone
oliviermattelaer Aug 11, 2026
74e9844
rename the default process directory prefix PROCMG7_ to PROC_
oliviermattelaer Aug 12, 2026
e6afaf2
draw the merged-flavor particles with short labels
oliviermattelaer Aug 12, 2026
c3588d3
rename the mg7 template module madevent.py to launch.py
oliviermattelaer Aug 12, 2026
50b086c
remove the dead simd/ and generate_events templates from mg7
oliviermattelaer Aug 12, 2026
865563c
accept standalone as an alias of standalone_fortran in ML5 and aMC@NLO
oliviermattelaer Aug 12, 2026
bc499a4
repoint the madmatrix cross-checks from standalone_cpp to standalone_…
oliviermattelaer Aug 12, 2026
ea8593d
remove the user-facing standalone_cpp export format
oliviermattelaer Aug 12, 2026
329f22b
give MG7 its own command-history file, mg7history
oliviermattelaer Aug 12, 2026
836b96d
default the mg7 run_card to the dynamical HT/2 scale
oliviermattelaer Aug 12, 2026
37b97d9
fix the mg7 transverse_energy scale mapping to the legacy code 1
oliviermattelaer Aug 12, 2026
4ad794d
gzip the mg7 LHE output by default
oliviermattelaer Aug 12, 2026
f035e18
do not double-gzip the mg7 event file for the madevent tools
oliviermattelaer Aug 13, 2026
3137b3f
pin the PDF set in the mg7 cross-section reference test
oliviermattelaer Aug 13, 2026
f861e74
switch the mg7 default PDF to NNPDF40MC_lo_as_01180
oliviermattelaer Aug 13, 2026
621c9c9
guard the discrete-sampling divisions against zero parton densities
oliviermattelaer Aug 13, 2026
24e252f
rename the madmatrix CPU/SIMD backends to cpu_* names
oliviermattelaer Aug 14, 2026
a3611c5
remove the bare cpp madmatrix backend token
oliviermattelaer Aug 14, 2026
04fb0bf
Merge branch 'main' into feat-big-renaming
oliviermattelaer Aug 14, 2026
e7bb1bc
drop the debug sprints from the madmatrix and madevent output path
oliviermattelaer Aug 16, 2026
0bee7d7
only warn about a lorentz redefinition that is not an argument reorde…
oliviermattelaer Aug 16, 2026
ba9b403
carry the lorentz argument symmetry on the structure itself
oliviermattelaer Aug 17, 2026
7c67206
require python 3.12
oliviermattelaer Aug 17, 2026
ea68c29
default the mg7 devices to the auto-detected cpu backend
oliviermattelaer Aug 18, 2026
b2dfb75
Merge branch 'main' into feat-big-renaming
oliviermattelaer Aug 19, 2026
32ce8d4
Merge branch 'main' into feat-big-renaming
oliviermattelaer Aug 25, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion .github/actions/install_lhapdf_pdfset/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: Install LHAPDF PDF set
description: >
Make an LHAPDF PDF grid available to the mg7 (madspace) runtime and export
LHAPDF_DATA_PATH so it is found. The mg7 runtime reads the grid file directly
(mg7/madevent.py: ms.PdfGrid on $LHAPDF_DATA_PATH/<set>/<set>_0000.dat), so it
(mg7/launch.py: ms.PdfGrid on $LHAPDF_DATA_PATH/<set>/<set>_0000.dat), so it
only needs the grid data -- not the LHAPDF C++ library and not a pre-baked
HEPTools cache. The set is installed with the lhapdf-management pip package
into a cached, writable directory, so the download happens at most once.
Expand All @@ -11,6 +11,11 @@ inputs:
pdfset:
description: Name of the LHAPDF set to install
required: false
# NNPDF23_lo_as_0130_qed on purpose: this action's only consumer is
# check_xsec_processes_mg7.yml, whose ~40 reference cross-sections are
# pinned to that set (_REFERENCE_PDF, written into every run_card.toml).
# It is deliberately NOT the mg7 run_card default, which is now
# NNPDF40MC_lo_as_01180 and comes from the heptools cache.
default: NNPDF23_lo_as_0130_qed

runs:
Expand Down
21 changes: 20 additions & 1 deletion .github/actions/restore_heptools_lhapdf/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,4 +38,23 @@ runs:
if: ${{ env.CACHE_KEY == 'lhapdf-ubuntu24' }}
run: |
echo "PYTHONPATH=$PYTHONPATH:/home/runner/.cache/HEPtools/lhapdf6_py3/lib/python3.12/dist-packages" >> $GITHUB_ENV
shell: bash
shell: bash

# The mg7 run_card.toml default PDF (NNPDF40MC_lo_as_01180). warm_cache.yml
# bakes it into the lhapdf cache, but that cache is only rebuilt when
# warm_cache runs with a reset, so a branch that changes the default would
# otherwise face a cache that predates it: the mg7 tests guard on the set
# being present and would all self-skip (test_manager.py counts a skip as a
# failure). Fetching it here costs ~0.7 MB and is a no-op once the cache
# carries it. Non-fatal on failure: the tests skip as they did before.
- name: ensure the mg7 default PDF set is present
run: |
DATADIR=/home/runner/.cache/HEPtools/lhapdf6_py3/share/LHAPDF
SET=NNPDF40MC_lo_as_01180
if [ -d "$DATADIR" ] && [ ! -d "$DATADIR/$SET" ]; then
( cd "$DATADIR" \
&& wget -q https://lhapdfsets.web.cern.ch/current/$SET.tar.gz \
&& tar -xzpf $SET.tar.gz \
&& rm -f $SET.tar.gz ) || echo "::warning::could not fetch $SET"
fi
shell: bash
6 changes: 3 additions & 3 deletions .github/workflows/acceptancetest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -307,7 +307,7 @@ jobs:
run: |
cd $GITHUB_WORKSPACE
./tests/test_manager.py test_standalone_cpp_output_consistency -pA -t0 -l INFO
./tests/test_manager.py test_standalone_mg7_vs_cpp -pA -t0 -l INFO
./tests/test_manager.py test_madmatrix_vs_fortran -pA -t0 -l INFO



Expand Down Expand Up @@ -389,7 +389,7 @@ jobs:
# cd $GITHUB_WORKSPACE
# echo "install lhapdf6" > cmd
# echo "install pythia8" >> cmd
# ./bin/mg5_aMC cmd
# ./bin/madgraph cmd
#
# # Runs a set of commands using the runners shell

Expand Down Expand Up @@ -635,7 +635,7 @@ jobs:
run: |
cd $GITHUB_WORKSPACE
echo "set acknowledged_v3.1_syntax True --global" > cmd
./bin/mg5_aMC cmd
./bin/madgraph cmd
./tests/test_manager.py test_amcatnlo_from_file -pA -t0 -l INFO


Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/acceptancetest_madevent.yml
Original file line number Diff line number Diff line change
Expand Up @@ -461,7 +461,7 @@ jobs:
cd $GITHUB_WORKSPACE
cp input/.mg5_configuration_default.txt input/mg5_configuration.txt
echo "install RunningCoupling" > cmd
./bin/mg5_aMC cmd
./bin/madgraph cmd
./tests/test_manager.py test_eft_running -pA -t0 -l INFO


Expand Down Expand Up @@ -985,7 +985,7 @@ jobs:
acceptancetest_mssm_gogo:
# Fortran madevent supports MSSM p p > go go (merged-flavor squark/gluino
# vertices); the mg7/madmatrix counterpart now also supports it and is
# checked per-flavor (test_standalone_mg7_mssm_gogo in acceptancetest_mg7.yml).
# checked per-flavor (test_madmatrix_mssm_gogo in acceptancetest_mg7.yml).
runs-on: ubuntu-24.04
if: github.event_name == 'push' || github.event.pull_request.head.repo.fork == true
steps:
Expand Down
19 changes: 10 additions & 9 deletions .github/workflows/acceptancetest_mg7.yml
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ jobs:
- name: test FD gauge madmatrix vs fortran
run: |
cd $GITHUB_WORKSPACE
./tests/test_manager.py test_standalone_mg7_fd_vs_fortran test_standalone_mg7_fd_simd_lanes -pA -t0 -l INFO
./tests/test_manager.py test_madmatrix_fd_vs_fortran test_madmatrix_fd_simd_lanes -pA -t0 -l INFO

acceptancetest_mg7_output_directory:
needs: build_madspace
Expand Down Expand Up @@ -136,8 +136,8 @@ jobs:
acceptancetest_mg7_madspin_mixed_flavor:
needs: build_madspace
# mg7 + MadSpin density-summary check driven through the madevent-style
# launch command interface. restore_heptools provides LHAPDF/NNPDF23 for the
# u u~ > z g generation.
# launch command interface. restore_heptools provides LHAPDF and the mg7
# default PDF set for the u u~ > z g generation.
runs-on: ubuntu-24.04
if: github.event_name == 'push' || github.event.pull_request.head.repo.fork == true
steps:
Expand Down Expand Up @@ -201,7 +201,7 @@ jobs:
acceptancetest_mg7_group_subprocess:
needs: build_madspace
# mg7 cross-section run (u u > u u). madspace is installed by checkout_mg5;
# LHAPDF (incl. NNPDF23_lo_as_0130_qed) comes from the heptools cache.
# LHAPDF (incl. NNPDF40MC_lo_as_01180) comes from the heptools cache.
# The test self-skips if that stack is unavailable.
runs-on: ubuntu-24.04
if: github.event_name == 'push' || github.event.pull_request.head.repo.fork == true
Expand Down Expand Up @@ -307,8 +307,9 @@ jobs:

acceptancetest_mg7_mssm_gogo:
# mg7/madmatrix now generates the MSSM merged-flavor squark/gluino vertices
# (single-merged-leg / event-by-event flavored couplings); standalone_mg7
# reproduces the Fortran standalone per-flavor |M|^2 (~1e-4). This is a
# (single-merged-leg / event-by-event flavored couplings); `output
# standalone` reproduces the standalone_fortran per-flavor |M|^2 (~1e-4).
# This is a
# matrix-element (standalone) check only -- full mg7 event generation for
# merged-flavor processes is not wired up yet (see test_madevent_merged_
# flavor_uq_mg7). The madevent counterpart is test_madevent_mssm_gogo in
Expand All @@ -320,15 +321,15 @@ jobs:
- uses: actions/checkout@v4
- uses: ./.github/actions/checkout_mg5
- uses: ./.github/actions/restore-pip-cache
- name: test one of the test test_standalone_mg7_mssm_gogo
- name: test one of the test test_madmatrix_mssm_gogo
run: |
cd $GITHUB_WORKSPACE
./tests/test_manager.py test_standalone_mg7_mssm_gogo -pA -t0 -l INFO
./tests/test_manager.py test_madmatrix_mssm_gogo -pA -t0 -l INFO

acceptancetest_mg7_mssm_gogo_xsec:
# Pins the mg7 (madspace) cross-section for MSSM p p > go go to the madevent
# reference (5.024 pb, run_01 of test_generation_from_file_1), on top of the
# per-flavor |M|^2 check in test_standalone_mg7_mssm_gogo. This job used to
# per-flavor |M|^2 check in test_madmatrix_mssm_gogo. This job used to
# be red at random rather than for a physics reason: the 1% assertion sat
# below the ~1.1% statistical error of a 2000-event run, so it failed on
# roughly 40% of runs. _run_mg7_xsec now runs 50000 events (error ~0.08%).
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/aloha.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ jobs:
run: |
cd $GITHUB_WORKSPACE
echo "import model MSSM_SLHA2" > cmd
./bin/mg5_aMC cmd
./bin/madgraph cmd
./tests/test_manager.py -pP -t0 test_aloha.* -e test_short_mssm_subset_creation

test_excluded:
Expand Down
22 changes: 13 additions & 9 deletions .github/workflows/warm_cache.yml
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ jobs:
mkdir -p /home/runner/.cache/UFOMODEL
echo "PYTHONPATH=$PYTHONPATH:$HOME/.cache/UFOMODEL" >> $GITHUB_ENV
echo "import model 2HDM" >> cmd
./bin/mg5_aMC cmd
./bin/madgraph cmd

- name: move UFO model to cache
if: steps.cache-ufo.outputs.cache-hit != 'true'
Expand Down Expand Up @@ -146,7 +146,7 @@ jobs:
echo "heptools_install_dir=/home/runner/.cache/HEPtools" >> input/mg5_configuration.txt
cp Template/LO/Source/.make_opts Template/LO/Source/make_opts
echo "install lhapdf6" > cmd
./bin/mg5_aMC cmd
./bin/madgraph cmd

- name: get pdf set for NLO
if: steps.cache-lhapdf.outputs.cache-hit != 'true'
Expand All @@ -157,6 +157,10 @@ jobs:
wget https://lhapdfsets.web.cern.ch/lhapdfsets/current/cteq6l1.tar.gz
tar -xzpvf cteq6l1.tar.gz
# LO set used by the mg7 run_card.toml default (madspace integration)
wget https://lhapdfsets.web.cern.ch/current/NNPDF40MC_lo_as_01180.tar.gz
tar -xzpvf NNPDF40MC_lo_as_01180.tar.gz
# previous mg7 default; still pinned by the mg7 cross-section
# reference tests (tests/acceptance_tests/test_check_xsec_processes_mg7.py)
wget https://lhapdfsets.web.cern.ch/current/NNPDF23_lo_as_0130_qed.tar.gz
tar -xzpvf NNPDF23_lo_as_0130_qed.tar.gz

Expand Down Expand Up @@ -201,12 +205,12 @@ jobs:
echo "heptools_install_dir=/home/runner/.cache/HEPtools" >> input/mg5_configuration.txt
cp Template/LO/Source/.make_opts Template/LO/Source/make_opts
echo "install pythia8" > cmd
./bin/mg5_aMC cmd
./bin/madgraph cmd

- name: Verify pythia8 landed in the cache
if: steps.cache-pythia8.outputs.cache-hit != 'true'
run: |
# mg5_aMC exits 0 even when "install pythia8" fails (e.g. a network
# madgraph exits 0 even when "install pythia8" fails (e.g. a network
# timeout while downloading hepmc/pythia8 from the download server),
# so guard the cache here. Without Pythia.h, MG5 nullifies
# pythia8_path at startup, leaving the parton shower unavailable and
Expand Down Expand Up @@ -251,7 +255,7 @@ jobs:
echo "heptools_install_dir=/home/runner/.cache/HEPtools" >> input/mg5_configuration.txt
cp Template/LO/Source/.make_opts Template/LO/Source/make_opts
echo "install eMELA" > cmd
./bin/mg5_aMC cmd
./bin/madgraph cmd

# delete_lhapdf_cache:
# runs-on: ${{ matrix.os }}
Expand Down Expand Up @@ -309,7 +313,7 @@ jobs:
# YODA's python extension build needs Cython (no longer shipped by
# default on the GitHub runner image); without it rivet aborts at
# YODA, before FastJet is installed, leaving NLO builds broken.
# Install into the same interpreter mg5_aMC/YODA use (no sudo, so
# Install into the same interpreter madgraph/YODA use (no sudo, so
# the system Python is left untouched for other steps).
python3 -m pip install Cython
mkdir -p /home/runner/.cache/HEPtools
Expand All @@ -318,12 +322,12 @@ jobs:
cp Template/LO/Source/.make_opts Template/LO/Source/make_opts
echo "install rivet" > cmd
echo "install contur" >> cmd
./bin/mg5_aMC cmd
./bin/madgraph cmd

- name: Verify rivet/fastjet landed in the cache
if: steps.cache-contur.outputs.cache-hit != 'true'
run: |
# mg5_aMC exits 0 even when "install rivet" fails, so guard the
# madgraph exits 0 even when "install rivet" fails, so guard the
# cache here: a missing fastjet-config means NLO subprocesses cannot
# compile (fastjet/ClusterSequence.hh). Fail loudly instead of
# saving an incomplete heptools cache.
Expand Down Expand Up @@ -385,7 +389,7 @@ jobs:
cp Template/LO/Source/.make_opts Template/LO/Source/make_opts
echo "install collier " > cmd
echo "install ninja " >> cmd
./bin/mg5_aMC cmd
./bin/madgraph cmd

heptools_cache:
if: always() && (github.ref_name == 'main' || github.ref_name == 'test_ci' || github.event_name == 'workflow_dispatch' || github.event_name == 'schedule')
Expand Down
4 changes: 2 additions & 2 deletions INSTALL
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ Dependencies :

* MadGraph5_aMC@NLO *

- Python 3.7 (or higher)
- Python 3.12 (or higher)

* MadEvent *
Package for the LO cross-section computation and generation of events
Expand All @@ -48,7 +48,7 @@ On Windows:

In order to run MG5 you need to
1) add the Python directory to the PATH
2) run $> python ./bin/mg5_aMC
2) run $> python ./bin/madgraph

Note that most of the output (including madevent/aMCatNLO)
are not compatible with Windows. We do recomend to use unix subsystem.
Expand Down
2 changes: 1 addition & 1 deletion MadSpin/decay.py
Original file line number Diff line number Diff line change
Expand Up @@ -5127,7 +5127,7 @@ def generate_all_matrix_element(self):
# remove decay with 0 branching ratio.
#mgcmd.remove_pointless_decay(self.banner.param_card)
#
commandline = 'output standalone %s --prefix=int' % pjoin(path_me, ms_me_subdir)
commandline = 'output standalone_fortran %s --prefix=int' % pjoin(path_me, ms_me_subdir)
logger.info(commandline)
mgcmd.exec_cmd(commandline, precmd=True)
logger.info('Done %.4g' % (time.time()-start))
Expand Down
4 changes: 2 additions & 2 deletions MadSpin/madspin
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ and call immediately the command line interface scripts"""

from __future__ import absolute_import
import sys
if sys.version_info < (3, 7):
sys.exit('MadSpin works only with python 3.7 (or later).\n\
if sys.version_info < (3, 12):
sys.exit('MadSpin works only with python 3.12 (or later).\n\
Please upgrade your version of python.')

import os
Expand Down
2 changes: 1 addition & 1 deletion Template/LO/Cards/proc_card_mg5.dat
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
#* *
#* Command File for MadGraph5_aMC@NLO *
#* *
#* run as ./bin/mg5_aMC filename *
#* run as ./bin/madgraph filename *
#* *
#************************************************************
import model sm
Expand Down
4 changes: 2 additions & 2 deletions Template/LO/bin/generate_events
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@ import time
root_path = os.path.split(os.path.dirname(os.path.realpath( __file__ )))[0]
pjoin = os.path.join

if sys.version_info < (3, 7):
sys.exit('MadEvent works with python 3.7 or higher.\n\
if sys.version_info < (3, 12):
sys.exit('MadEvent works with python 3.12 or higher.\n\
Please upgrade your version of python.')

try:
Expand Down
4 changes: 2 additions & 2 deletions Template/LO/bin/internal/Gridpack/gridrun
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ and call immediately the command line interface scripts"""

from __future__ import absolute_import
import sys
if sys.version_info < (3, 7):
sys.exit('MadGraph/MadEvent 5 works only with python 3.7 or later.\n\
if sys.version_info < (3, 12):
sys.exit('MadGraph/MadEvent 5 works only with python 3.12 or later.\n\
Please upgrate your version of python.')

try:
Expand Down
4 changes: 2 additions & 2 deletions Template/LO/bin/madevent
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@
and call immediately the command line interface scripts"""

import sys
if sys.version_info < (3, 7):
sys.exit('MadGraph/MadEvent 5 works only with python 3.7 or later.\n\
if sys.version_info < (3, 12):
sys.exit('MadGraph/MadEvent 5 works only with python 3.12 or later.\n\
Please upgrate your version of python.')

try:
Expand Down
Loading
Loading