Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
211 commits
Select commit Hold shift + click to select a range
bac6e8c
first step in removing amp common blocks --- so far rid of (j)amp2 an…
zeniheisser Sep 30, 2025
204fb9a
move towards making amps return arguments from born
zeniheisser Oct 2, 2025
b15f8f5
first steps in localising reals
zeniheisser Oct 7, 2025
5d88826
made tree-level split amplitudes local in smatrix routines
zeniheisser Oct 8, 2025
68589be
lowercase c to uppercase for comment in b_sf template
zeniheisser Oct 8, 2025
2aeb575
failed attempt at localising saveamp --- haven't yet managed to get i…
zeniheisser Oct 13, 2025
e95a7c9
localised saveamp for sborn_soft, still uses cashed version from sbor…
zeniheisser Oct 14, 2025
e1aa9cd
localised saveamp, goes as argument through binothLHA for MC
zeniheisser Oct 14, 2025
0423d97
completely removed saveamp outside of born subroutine, small data rea…
zeniheisser Oct 14, 2025
05da07e
first steps at separating standard calls to borns from first time che…
zeniheisser Oct 14, 2025
ca12c1e
work on separating trial runs and regular; borns might be done, reals…
zeniheisser Oct 15, 2025
34cfc6c
fixed goodhel setting in reals
zeniheisser Oct 16, 2025
7919e0b
localised amps in nbody_noborn
zeniheisser Oct 17, 2025
e6638ba
extracting calls to sborn and bornsoftvirtual from the compute_ routi…
zeniheisser Oct 20, 2025
0c74df1
extracted sreal and sreal_deg calls into drivers
zeniheisser Oct 20, 2025
f2fa628
pulled sborn out of sborncol and sbornsoft
zeniheisser Oct 22, 2025
a02176c
extracted sborn from sreal (done incorrectly in test_soft_col_limits …
zeniheisser Oct 22, 2025
2299097
techically a bugfix in sreal_deg (didn't account generally for p_born…
zeniheisser Oct 23, 2025
231dbc2
split sreal into old version and new version intended to not do any c…
zeniheisser Oct 23, 2025
88ded99
completely extracted amplitudes from weight addition routines in MC
zeniheisser Oct 23, 2025
44ae8be
factorised amplitude calculations to use local copies in soft terms, …
zeniheisser Oct 23, 2025
c6a8403
finally factorised amplitudes out of accumulation for each FKS sector…
zeniheisser Oct 24, 2025
e9101dc
completely factored out amplitude evaluations from accumulation --- i…
zeniheisser Oct 26, 2025
226880b
structure for vectorising amplitudes, no longer bitwise identicality …
zeniheisser Oct 27, 2025
cb54d3c
testing hypothesis in previous commit --- resetting couplings inbetwe…
zeniheisser Oct 27, 2025
ef04423
fixed separation of momentum generation and evaluation --- some missi…
zeniheisser Oct 28, 2025
dce089d
separated vector wrappers to their own file. momentum generation in s…
zeniheisser Oct 28, 2025
ae50019
add back amp calls in driver, returns to bitwise consistency. trying …
zeniheisser Oct 28, 2025
8180cc6
tryig things out --- still getting the same results, inconsistent wit…
zeniheisser Oct 28, 2025
481afc6
FOUND IT! stored the incorrect variables for rotated borns. now it's …
zeniheisser Oct 28, 2025
71f6ff2
small removal of unnecessary global state changes
zeniheisser Oct 28, 2025
642d285
removed calculatedBorn checks in certain functions and made born_vec …
zeniheisser Oct 29, 2025
e193431
formalised vectorisation in driverMC
zeniheisser Oct 30, 2025
ae524c2
fixed small issues wrt vector indices and MCcntcalled, now vectorisat…
zeniheisser Oct 30, 2025
0dc0388
added vector_index to weight_lines to keep track of which index each …
zeniheisser Oct 30, 2025
ddde0f8
added so-called vectorised versions of sigint as well as some subrout…
zeniheisser Oct 31, 2025
a2222ea
vectorised storage for weight_lines --- compiles and runs, but fails …
zeniheisser Oct 31, 2025
0785081
fixed issues in weight_lines_vec
zeniheisser Oct 31, 2025
3c8a3fa
fixed two issues for vec_size > 1: momentum generation properly takes…
zeniheisser Nov 1, 2025
a648647
implemented vectorised gen routines./bin/mg5_aMC !
zeniheisser Nov 1, 2025
0d66473
got rid of global data writes in the vectorised amps, added a generic…
zeniheisser Nov 2, 2025
5da4125
tried getting rid of remaining sborn calls outside of sigint --- coul…
zeniheisser Nov 2, 2025
66ce6ef
made single-index amplitudes routine
zeniheisser Nov 2, 2025
1abcc01
bunch of memory fixes, basically everything to do with amplitudes is …
zeniheisser Nov 2, 2025
925b316
forgot to add weight_lines_vec mod
zeniheisser Nov 2, 2025
eb73b3e
added vector size as an argument in the input card
zeniheisser Nov 5, 2025
09b91e7
modifications for dev tests
zeniheisser Nov 28, 2025
0d3710d
fixed an issue in cuts tests and one in goodhel tests
zeniheisser Jan 14, 2026
27fc204
fixed minor bugs in amp and wgt handling --- now bitwise matching to …
zeniheisser Jan 23, 2026
0c27970
accidentally removed variable assignment, fixed
zeniheisser Jan 26, 2026
00eea3d
Merge branch '3.x' (v3.7.2) into offload-reals
Qubitol Aug 23, 2026
8877e90
make test_MC a real check of the MC counterterms
oliviermattelaer Aug 21, 2026
cfce5e2
Add FKS Born building-block standalone output
oliviermattelaer Sep 19, 2026
50c7896
Give the FKS standalone output a default directory
oliviermattelaer Jun 7, 2026
316aec8
Extend FKS standalone check to decays, mixed-coupling and [QED] Borns
oliviermattelaer Jun 7, 2026
1b1814b
Route bare launch after Fortran FKS standalone output
oliviermattelaer Jun 7, 2026
2ea5c95
Add a dedicated FKS standalone launcher and runtime controls
oliviermattelaer Jun 7, 2026
df1bf17
Drop the MadLoop virtual directory from FKS standalone output
oliviermattelaer Jun 7, 2026
cbe35c9
Drop the real-emission matrix elements from FKS standalone output
oliviermattelaer Jun 7, 2026
6289d90
Trim FKS standalone output to only the files check_fks needs
oliviermattelaer Jun 7, 2026
ae4fb77
nicer display including gluon to itself color connected born
oliviermattelaer Jun 8, 2026
33931ff
Complete the FKS standalone command rename
oliviermattelaer Sep 19, 2026
ca5d639
FKS standalone: add opt-in soft/collinear limit checks
oliviermattelaer Sep 18, 2026
adbcfb0
Add deterministic multi-point FKS standalone output
Qubitol Sep 19, 2026
844829d
Run FKS standalone acceptance coverage in CI
Qubitol Sep 19, 2026
3ddb1c7
Add NLO flavor mapping primitives
Qubitol Sep 19, 2026
41db525
Map physical FKS flavor classes
Qubitol Sep 19, 2026
1b351c8
Complete physical FKS mapping identity
Qubitol Sep 19, 2026
ca7e25e
Enable capability-gated NLO flavor grouping
Qubitol Sep 19, 2026
a465489
Thread physical FKS flavours through tree output
Qubitol Sep 20, 2026
738b836
Keep NLO FKS weights flavor resolved
Qubitol Sep 20, 2026
467c82b
Resolve grouped NLO virtual flavours
Qubitol Sep 20, 2026
ba07a86
Complete grouped NLO acceptance
Qubitol Sep 20, 2026
db498c9
Add pre-grouping NLO flavor oracle
Qubitol Sep 20, 2026
3942320
Stratify grouped fixed-order FKS flavours
Qubitol Sep 20, 2026
070f423
Merge offload-reals NLO multi-event history
Qubitol Sep 21, 2026
35c3b71
Adapt NLO batching to physical flavour groups
Qubitol Sep 21, 2026
f398a76
Harden grouped NLO integration and benchmark tooling
Qubitol Sep 21, 2026
bd512c2
Fix fixed-order sreal_store interface
Qubitol Sep 21, 2026
43e0cef
Freeze NLO real offload contracts
Qubitol Sep 23, 2026
6abd4d8
Implement scalar NLO real MadMatrix contract
Qubitol Sep 23, 2026
9cb69fa
Route scalar NLO real workflows through MadMatrix
Qubitol Sep 23, 2026
d8f2130
Batch NLO real amplitudes on CPU SIMD
Qubitol Sep 23, 2026
5dc7970
Execute supported NLO real batches on CUDA
Qubitol Sep 23, 2026
d1e39f3
Keep grouped NLO loop counterterms and closed-loop flavour sums
Qubitol Sep 24, 2026
0a185b9
Check the production MC counterterms in test_MC
Qubitol Sep 24, 2026
c1acf27
Detect hadron beams for grouped quark-initiated NLO processes
Qubitol Sep 24, 2026
7428eca
Port the MG5 v3.8.0 local NLO host fixes
Qubitol Sep 24, 2026
38478ee
Make Fortran the default NLO real backend and audit its lifecycle
Qubitol Sep 24, 2026
9c36ab3
Evaluate the real matrix element in the fixed-order driver
Qubitol Sep 24, 2026
976c414
Use the ALOHA-object spinor calls in sborncol_isr_store
Qubitol Sep 24, 2026
9112b75
Never switch NLO real backends in the middle of a run
Qubitol Sep 24, 2026
80add4f
Sample and adapt multi-event MINT points per lane
Qubitol Sep 25, 2026
eb60679
Select the NLO real backend in the run card
Qubitol Sep 25, 2026
b1ae35d
Fix the add_wgt call of special_check_SoftSing; time the real batch
Qubitol Sep 25, 2026
82ca4a4
Take the NLO real backend only from the run card
Qubitol Sep 28, 2026
e09f912
Generate the [QED] FKS standalone test case ungrouped
Qubitol Sep 28, 2026
11e511c
Restore the QED soft and extra-counterterm split-order limits
Qubitol Sep 29, 2026
b1e8696
Test the mixed QCD/QED soft and collinear limits of p p > w+ j
Qubitol Sep 30, 2026
649bdb7
Recompute the link-configuration Born in bornsoftvirtual
Qubitol Oct 1, 2026
4968ab4
Preserve additive counterterms during flavour merging
Qubitol Oct 6, 2026
018cf9e
Use consistent complex masses for ghost loop propagators
Qubitol Oct 6, 2026
1203237
Build standalone model couplings from the generated Fortran module
Qubitol Oct 7, 2026
989d535
Support physical flavour cycles in grouped QED virtual amplitudes
Qubitol Oct 7, 2026
82b947a
Restore equal Born shares in grouped NLO event generation
Qubitol Oct 7, 2026
873c214
Preserve NLO squared-order restrictions in offloaded real amplitudes
Qubitol Oct 7, 2026
45cf3c7
Preserve per-lane virtual state across MINT folds and grid training
Qubitol Oct 7, 2026
29ea10b
Resolve merged open-loop cuts from their closing fermion
Qubitol Oct 8, 2026
a881670
Restore polarized-frame routing in NLO amplitude batches
Qubitol Oct 8, 2026
c5d583d
Initialize fixed-order histograms before integrating grouped reals
Qubitol Oct 8, 2026
290740d
NLO real: the batched Fortran real ME applies the scalar helicity filter
oliviermattelaer Oct 13, 2026
bc5f691
MODEL makefile: keep couplings.mod out of libmodel.a
oliviermattelaer Oct 13, 2026
b0ca734
write the color matrix out wherever nothing rebuilds it at run time
oliviermattelaer Sep 20, 2026
34d5205
CI: run the colour-matrix encoding gate tests
oliviermattelaer Sep 20, 2026
f200302
NLO real: MATRIX_<N>_VEC without RECURSIVE (10% faster with gcc 13 at…
oliviermattelaer Oct 13, 2026
a968ce9
FKS real: test the colour matrix and the value of the real g g > g g g g
oliviermattelaer Oct 13, 2026
44724d9
Model coupl.f90: no empty coupling-vector declaration
oliviermattelaer Oct 14, 2026
2094300
MODEL makefile: keep couplings.mod out of libmodel.a
oliviermattelaer Oct 13, 2026
1a9c8a2
Merge pull request #276 from MadGraphTeam/claude/nlo-real-vec-helfilter
Qubitol Oct 14, 2026
e0262c3
Merge pull request #283 from MadGraphTeam/claude/fks-color-matrix-enc…
Qubitol Oct 14, 2026
4ff7d2b
MC@NLO event generation: write every accepted lane of a batch
oliviermattelaer Oct 14, 2026
916f2bc
Test that the MC@NLO event queue serves its records unchanged, run it…
oliviermattelaer Oct 14, 2026
42f984e
Reset only the lanes of the current batch
oliviermattelaer Oct 14, 2026
a0be6fc
MC@NLO vec driver: start every lane's n-body part with nbody=.true.
oliviermattelaer Oct 14, 2026
5593e2b
MadLoop: keep the filters when a P directory evaluates one grouped vi…
oliviermattelaer Oct 14, 2026
599c94b
CI: run the grouped FKS metadata unit tests
oliviermattelaer Oct 15, 2026
49b9168
NLO: MC over helicities for P directories using several grouped virtu…
oliviermattelaer Oct 15, 2026
6754c04
Grouped virtual oracle tests: interleave the rows and check their fil…
oliviermattelaer Oct 15, 2026
9f24bb3
Run NLO MC lane regression on same-repository PRs
Qubitol Oct 19, 2026
c423132
Merge pull request #287 from MadGraphTeam/claude/mcatnlo-vecsize-xsec
Qubitol Oct 19, 2026
a35d319
Integrate MC@NLO event queue with per-lane cross-section fix
Qubitol Oct 22, 2026
a1865c7
Merge PR #286 event queue with merged PR #287
Qubitol Oct 22, 2026
c3dfa83
Merge pull request #286 from MadGraphTeam/claude/nlo-mc-lane-queue
Qubitol Oct 22, 2026
34c0f7c
Merge pull request #284 from MadGraphTeam/claude/coupl-f90-empty-decl…
Qubitol Oct 27, 2026
1d0f316
Merge pull request #288 from MadGraphTeam/claude/nlo-helfilter-mc-ove…
Qubitol Oct 27, 2026
6b2d5d2
Merge pull request #289 from MadGraphTeam/claude/nlo-grouped-virtual-…
Qubitol Oct 27, 2026
abec9bd
Avoid duplicate scale evaluation in batched NLO real setup
Qubitol Oct 14, 2026
5eec4be
Cap CPU NLO event-generation batches independently of integration
Qubitol Oct 14, 2026
f99b9b4
Skip redundant NLO vector setup at rejected or single-lane points
Qubitol Oct 15, 2026
eddf0b1
Avoid unused vector weight storage in single-lane NLO integration
Qubitol Oct 27, 2026
e25f187
Skip unused mapping Born amplitudes and coupling preparation
Qubitol Oct 27, 2026
1b1e7ec
Stage dense NLO GPU inputs and squared-order results explicitly
Qubitol Oct 27, 2026
929bcce
Avoid unused collinear and rotated Born precomputation
Qubitol Oct 27, 2026
6006845
Prepare scalar NLO amplitudes from the existing replay point
Qubitol Oct 27, 2026
54ca690
Initialize scalar NLO cache defaults once per integration process
Qubitol Oct 27, 2026
ecc82f2
Combine adjacent scalar and vector coupling preparation timers
Qubitol Oct 27, 2026
6535b59
Reuse scalar replay preparation during NLO event generation
Qubitol Oct 27, 2026
101db97
Reuse Born amplitudes across fixed-order degenerate terms
Qubitol Oct 27, 2026
aa9013a
Remove unused CPU timestamps from LHAPDF alpha-s queries
Qubitol Oct 28, 2026
48bfb38
Preserve colour tensors and diagram indices in grouped virtual Born e…
Qubitol Nov 3, 2026
099699d
Stabilize vector propagators and avoid generic host BLAS defaults
Qubitol Nov 3, 2026
678a7a2
Merge main and migrate NLO offloading to split MadMatrix backends
Qubitol Nov 5, 2026
c4ea27c
Preserve ordered real flavours before FKS grouping
Qubitol Nov 5, 2026
6c5a23e
Align MC lane-state probe with Born diagnostic flags
Qubitol Nov 5, 2026
87fe3d9
Merge current main into feat-nlo-acceleration
Qubitol Nov 16, 2026
49440c0
Add design document detailing the implementation of NLO matrix elemen…
Qubitol Nov 17, 2026
b838e27
Merge current main into NLO real acceleration
Qubitol Nov 19, 2026
0740689
Keep NLO flavor grouping behind a developer-only switch
Qubitol Nov 19, 2026
ddaf279
Build the NLO real bridge before linking its native consumers
Qubitol Nov 19, 2026
0e604e4
Call the native pole evaluator from both virtual interfaces
Qubitol Nov 19, 2026
1837ae0
Expose and consume coupling-resolved NLO real blocks through UMAMI
Qubitol Nov 19, 2026
0228217
Expose real coupling inputs and the squared-order axis in MadSpace
Qubitol Nov 19, 2026
e7f4bc7
Discard unused Born routines when linking offline reweighting
Qubitol Nov 19, 2026
a8ea400
Refresh generated grouped FKS structural fixtures after merging main
Qubitol Nov 19, 2026
e93f894
Exercise the merged MadLoop flavor wrapper and C++20 kernels in regre…
Qubitol Nov 19, 2026
0aa5ce6
Report NinjaRS precision usage in scalar and buffered virtual calls
Qubitol Nov 19, 2026
10bd72e
Accept crossing-extended flavor rows in the UMAMI providers
Qubitol Nov 19, 2026
2a4abe5
Read native event-job widths and count scalar MINT points correctly
Qubitol Nov 19, 2026
7b5bc66
Reopen completed Born helicity sectors when the model or frame changes
Qubitol Nov 19, 2026
c0b6d8d
doc: colour-correlated Born as the flattened pairs of coloured legs
ramonpeter Nov 20, 2026
0841c15
Update NLO_matrix_elements_through_UMAMI.md
ramonpeter Nov 20, 2026
085acad
Batch independent native MINT draws through the NLO real provider
Qubitol Nov 19, 2026
c6d17b2
Merge main into feat-nlo-acceleration preserving native real batching
Qubitol Nov 20, 2026
1bc0f66
Align NLO real providers with the scoped UMAMI conventions
Qubitol Nov 20, 2026
6bb27b6
Refresh NLO and recursive Fortran IO references
Qubitol Nov 20, 2026
5c69412
Build NLO real CPU providers with strict arithmetic
Qubitol Nov 20, 2026
f8387c6
Fix macOS build of native NLO outputs with the real-emission bridge
oliviermattelaer Nov 20, 2026
7acab09
Restore the per-order virtual in MC@NLO (binothlha_frame)
oliviermattelaer Nov 20, 2026
9178ae8
Merge main into feat-nlo-acceleration
oliviermattelaer Nov 21, 2026
0ea13b2
Fix the main merge: scalar color_sum and the TIRust template keys
oliviermattelaer Nov 21, 2026
12f9776
Count TIRust usage in both BinothLHA routines after the main merge
oliviermattelaer Nov 21, 2026
995cb75
Merge main while preserving flavour switching and NLO real batching
Qubitol Nov 21, 2026
72a22b3
Preserve finite virtual returns and native Born frame scope
Qubitol Nov 21, 2026
917fc04
Initialize sparse Born helicity colour amplitudes
Qubitol Nov 21, 2026
0de9804
Bound the nonconverging FKS limit scan
Qubitol Nov 21, 2026
c90e1d2
Preserve structured coupling dependencies and vector model scopes
Qubitol Nov 21, 2026
987cab0
Preserve physical flavours across model and interface transitions
Qubitol Nov 21, 2026
d2fb769
Update native FKS and flavour regression harnesses
Qubitol Nov 21, 2026
f6be2ac
Refresh exporter reference files for current physical-flavour output
Qubitol Nov 21, 2026
caf19ac
Merge remote-tracking branch 'origin/main' into feat-nlo-acceleration
Qubitol Nov 21, 2026
52a1ade
Certify generated flavour modules for terminal loop updates
Qubitol Nov 21, 2026
2a66d7e
Build the boosted real-helicity probe through native dependencies
Qubitol Nov 21, 2026
408472c
Ignore the shared preview image in generation equivalence checks
Qubitol Nov 21, 2026
37bd4e0
Pass saved amplitudes through Sudakov Born derivatives
Qubitol Nov 21, 2026
122d131
Synchronize MadSpin flavour lookups with the generated model
Qubitol Nov 21, 2026
438062c
Stop rebuilding every NLO P0 directory on each launch
oliviermattelaer Nov 21, 2026
def7855
Keep G in the MadMatrix dependent parameters of a process
oliviermattelaer Nov 21, 2026
a9bd395
Let the DP terminal proof skip the standalone coupl.f90 link
oliviermattelaer Nov 21, 2026
5737759
Repair the stale NLO unit tests and run them in CI
oliviermattelaer Nov 21, 2026
5e9b86b
Time the buffered FKS routines with sampled categories
oliviermattelaer Nov 22, 2026
2765857
Merge main into feat-nlo-acceleration
oliviermattelaer Nov 22, 2026
34b7b2a
Follow main's build.<BACKEND>_<FPTYPE> directories in the host BLAS b…
oliviermattelaer Nov 22, 2026
b19f175
Reuse checked Born amplitudes in the fixed-order driver
oliviermattelaer Nov 22, 2026
3505311
Certify G scaling of the helicity masks again
oliviermattelaer Nov 22, 2026
59b88be
Size each virtual surrogate fit by its own channel data
oliviermattelaer Nov 22, 2026
c2233c8
Take the buffered FKS Born, links and helicity weights from the nativ…
oliviermattelaer Nov 22, 2026
8e772ba
Keep each MC cohort lane's Born cached and time the batched real
oliviermattelaer Nov 22, 2026
5333c5e
Reuse MC cohort lane buffers instead of reallocating them
oliviermattelaer Nov 22, 2026
2e42d1c
Swap lane scale arrays and real cache instead of copying them
oliviermattelaer Nov 22, 2026
6a19b13
Build the MadMatrix common library once before compiling P* dirs in p…
oliviermattelaer Nov 23, 2026
4a4ce04
Merge origin/main into feat-nlo-acceleration
oliviermattelaer Nov 23, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
2 changes: 2 additions & 0 deletions .github/actions/restore_ufomodel/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ runs:
heft.tgz
loop_qcd_qed_sm.tgz
loop_qcd_qed_sm_Gmu.tgz
loop_qcd_qed_sm_Gmu_4FS.tgz
loop_qcd_qed_sm_Gmu_forSudakov.tgz
RS.tgz
sm_v4.tgz
uutt_sch_4fermion.tgz
Expand Down
39 changes: 35 additions & 4 deletions .github/gpu_ci/host_hip/include/hip/hip_runtime.h
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@
#define HOST_HIP_RUNTIME_H 1

#include <cstddef>
#include <cstdint>
#include <map>
#include <cstdio>
#include <cstdlib>
#include <cstring>
Expand Down Expand Up @@ -90,15 +92,44 @@ inline void* host_hip_alloc( size_t n )
memset( p, 0xff, n );
return p;
}
// Classify an interior momentum pointer the same way as the HIP runtime.
enum hipMemoryType { hipMemoryTypeHost = 1, hipMemoryTypeDevice = 2 };
struct hipPointerAttribute_t { hipMemoryType type; int isManaged; };
inline std::map<std::uintptr_t, size_t> host_hip_device_allocations;
inline hipError_t hipPointerGetAttributes( hipPointerAttribute_t* attr, const void* p )
{
const auto address = reinterpret_cast<std::uintptr_t>( p );
auto it = host_hip_device_allocations.upper_bound( address );
if( it == host_hip_device_allocations.begin() ) return hipErrorInvalidValue;
--it;
if( address - it->first >= it->second ) return hipErrorInvalidValue;
*attr = { hipMemoryTypeDevice, 0 };
return hipSuccess;
}
template<typename T>
inline hipError_t hipMalloc( T** p, size_t n ) { *p = (T*)host_hip_alloc( n ); return *p ? hipSuccess : hipErrorInvalidValue; }
inline hipError_t hipMalloc( T** p, size_t n )
{
*p = (T*)host_hip_alloc( n );
if( !*p ) return hipErrorInvalidValue;
host_hip_device_allocations[reinterpret_cast<std::uintptr_t>( *p )] = n;
return hipSuccess;
}
template<typename T>
inline hipError_t hipHostMalloc( T** p, size_t n, unsigned int = 0 ) { return hipMalloc( p, n ); }
inline hipError_t hipHostMalloc( T** p, size_t n, unsigned int = 0 )
{
*p = (T*)host_hip_alloc( n );
return *p ? hipSuccess : hipErrorInvalidValue;
}
template<typename T>
inline hipError_t hipMallocAsync( T** p, size_t n, hipStream_t ) { return hipMalloc( p, n ); }
inline hipError_t hipFree( void* p ) { free( p ); return hipSuccess; }
inline hipError_t hipFree( void* p )
{
host_hip_device_allocations.erase( reinterpret_cast<std::uintptr_t>( p ) );
free( p );
return hipSuccess;
}
inline hipError_t hipHostFree( void* p ) { free( p ); return hipSuccess; }
inline hipError_t hipFreeAsync( void* p, hipStream_t ) { free( p ); return hipSuccess; }
inline hipError_t hipFreeAsync( void* p, hipStream_t ) { return hipFree( p ); }
inline hipError_t hipMemcpy( void* d, const void* s, size_t n, hipMemcpyKind ) { memmove( d, s, n ); return hipSuccess; }
inline hipError_t hipMemcpyAsync( void* d, const void* s, size_t n, hipMemcpyKind, hipStream_t = nullptr ) { memmove( d, s, n ); return hipSuccess; }
inline hipError_t hipMemset( void* d, int v, size_t n ) { memset( d, v, n ); return hipSuccess; }
Expand Down
143 changes: 143 additions & 0 deletions .github/workflows/acceptancetest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -1091,6 +1091,149 @@ jobs:
done
gh run cancel "$RUN_ID" --repo "$REPO" || true

acceptancetest_fks_standalone_limits_pp_ttx:
# soft and collinear limits of p p > t t~ [QCD] via the FKS standalone
# output ('output standalone_fortran --fks --limits'): launch runs
# test_soft_col_limits in every partonic channel (built-in PDF set, no
# LHAPDF) and the test requires all of them to pass.
runs-on: ubuntu-24.04
if: github.event_name == 'push' || github.event.pull_request.head.repo.fork == true
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/checkout_mg5
- uses: ./.github/actions/restore_all

- name: test soft/collinear limits of p p > t t~ [QCD] (FKS standalone --limits)
run: |
cd $GITHUB_WORKSPACE
./tests/test_manager.py test_fks_standalone_limits_pp_ttx -pA -t0 -l INFO

acceptancetest_bundle_fks_standalone:
# FKS Born-building-block standalone oracle. Keep the broad numerical and
# production-equivalence matrix together, then run the multi-channel pp
# limit check as a separate step so either result remains visible.
runs-on: ubuntu-24.04
if: github.event_name == 'push' || github.event.pull_request.head.repo.fork == true
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/checkout_mg5
- uses: ./.github/actions/restore_all

- name: "FKS standalone: values, production equivalence, multi-point and limits"
if: ${{ !cancelled() }}
run: |
cd $GITHUB_WORKSPACE
./tests/test_manager.py test_fks_standalone_born_values test_fks_standalone_vs_amcatnlo test_fks_standalone_multi_point test_fks_standalone_grouped_physical_flavors test_fks_standalone_grouped_real_vs_pre_grouping test_fks_standalone_grouped_mixed_wj_tree_values test_fks_standalone_invalid_options test_nonconverging_limit_sequence_fails_safely test_fks_standalone_limits -pA -t0 -l INFO

# a real emission with 120 colour flows: it was exactly zero while the
# FKS output wrote the compressed colour matrix without INIT_CF
- name: "FKS real: colour matrix and value of g g > g g g g"
if: ${{ !cancelled() }}
run: |
cd $GITHUB_WORKSPACE
./tests/test_manager.py test_fks_real_color_matrix_gg_gggg -pA -t0 -l INFO

- name: "FKS standalone: grouped virtual physical rows"
if: ${{ !cancelled() }}
run: |
cd $GITHUB_WORKSPACE
./tests/test_manager.py test_grouped_nlo_virtual_values_all_physical_rows test_grouped_nlo_virtual_values_ttx_all_physical_rows test_grouped_nlo_virtual_values_zj_open_cuts -pA -t0 -l INFO

- name: "MadLoop: grouped QED, forbidden internal flavours and ggZZ"
if: ${{ !cancelled() }}
run: |
cd $GITHUB_WORKSPACE
./tests/test_manager.py test_grouped_nlo_qed_virtual_values_all_physical_rows test_grouped_qed_forbidden_internal_flavor_matches_oracle test_grouped_loop_induced_ggzz_matches_physical_oracle -pA -t0 -l INFO

- name: "FKS standalone: Phase-04 real-amplitude oracle"
if: ${{ !cancelled() }}
run: |
cd $GITHUB_WORKSPACE
./tests/test_manager.py test_grouped_qcd_ttx_real_components test_grouped_mixed_wj_real_components -pA -t0 -l INFO

- name: "FKS standalone: batched Fortran real amplitudes (helicity filter)"
if: ${{ !cancelled() }}
run: |
cd $GITHUB_WORKSPACE
./tests/test_manager.py test_grouped_qcd_ttx_fortran_vector_real test_grouped_mixed_wj_fortran_vector_real -pA -t0 -l INFO

- name: "FKS standalone: all p p > t t~ Born-channel limits"
if: ${{ !cancelled() }}
run: |
cd $GITHUB_WORKSPACE
./tests/test_manager.py test_fks_standalone_limits_pp_ttx -pA -t0 -l INFO

- name: "FKS: polarized Born, real, linked and ISR frame routing"
if: ${{ !cancelled() }}
run: |
cd $GITHUB_WORKSPACE
./tests/test_manager.py TestNLOFrameRouting -pA -t0 -l INFO


acceptancetest_bundle_15:
# former jobs, run one after the other:
# acceptancetest_density_LI_standalone1
# acceptancetest_density_LI_standalone2
# acceptancetest_density_LI_standalone3
# Each keeps its own steps, run even when an earlier one failed.
runs-on: ubuntu-24.04
if: github.event_name == 'push' || github.event.pull_request.head.repo.fork == true
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/checkout_mg5
- uses: ./.github/actions/restore-pip-cache
- uses: ./.github/actions/restore_heptools

# ---- acceptancetest_density_LI_standalone1 ----
- name: "acceptancetest_density_LI_standalone1: test the loop induced standalone mode of the density matrix code"
if: ${{ !cancelled() }}
run: |
cd $GITHUB_WORKSPACE
./tests/test_manager.py test_density_mode_loop_induced_standalone1 -pA -t0 -l INFO

# ---- acceptancetest_density_LI_standalone2 ----
- name: "acceptancetest_density_LI_standalone2: test the loop induced standalone mode of the density matrix code"
if: ${{ !cancelled() }}
run: |
cd $GITHUB_WORKSPACE
./tests/test_manager.py test_density_mode_loop_induced_standalone2 -pA -t0 -l INFO

# ---- acceptancetest_density_LI_standalone3 ----
- name: "acceptancetest_density_LI_standalone3: test the loop induced standalone mode of the density matrix code"
if: ${{ !cancelled() }}
run: |
cd $GITHUB_WORKSPACE
./tests/test_manager.py test_density_mode_loop_induced_standalone3 -pA -t0 -l INFO


acceptancetest_density_LI_f2py:
# The type of runner that the job will run on
runs-on: ${{ matrix.os }}
if: github.event_name == 'push' || github.event.pull_request.head.repo.fork == true
strategy:
matrix:
os: [ubuntu-24.04]

# Steps represent a sequence of tasks that will be executed as part of the job
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v2
- uses: ./.github/actions/checkout_mg5
- uses: ./.github/actions/restore-pip-cache
- uses: ./.github/actions/restore_heptools

- name: Install Meson and Ninja
run: |
sudo apt-get update
sudo apt-get install -y meson ninja-build

# Runs a set of commands using the runners shell
- name: test one of the density mode for f2py loop-induced
run: |
cd $GITHUB_WORKSPACE
./tests/test_manager.py test_density_mode_vs_standalone_LI1 -pA -t0 -l INFO


acceptancetest_107:
# The type of runner that the job will run on
runs-on: ${{ github.event.pull_request.head.repo.fork && 'ubuntu-24.04' || fromJSON('["self-hosted", "alma10", "large"]') }}
Expand Down
52 changes: 48 additions & 4 deletions .github/workflows/unittest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,23 @@ concurrency:
cancel-in-progress: true


# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
# This workflow contains a single job called "build"

# The full bundle below skips same-repository PR events, so give the MC@NLO
# regressions a focused PR check in addition to their push-run coverage.
nlo_mc_lane_state_pr:
runs-on: ubuntu-24.04
if: github.event_name == 'pull_request' && github.event.pull_request.head.repo.fork == false
steps:
- uses: actions/checkout@v5
- name: "Check Fortran compiler"
run: gfortran --version
- name: "NLO MC per-lane state"
run: ./tests/test_manager.py -t0 TestMCLaneState
- name: "NLO MC@NLO event queue"
run: ./tests/test_manager.py -t0 TestMCEventQueue
- name: "Native MINT scheduling and real-provider ownership"
if: ${{ !cancelled() }}
run: ./tests/test_manager.py -t0 TestMintChannels TestNativeScheduler TestNativeRealContinuation TestNativeWeightLines TestNativeContextMemory TestMCDecisionLedger NativeDispatchGate NativeProviderWave TestProviderPacking TestVirtualFiniteCommon TestNLOModelReload TestFlavourCouplingVectorScope TestLoopCheckFlavourDependencies TestBornHelicitySnapshot TestVirtualFoldCache TestNLOCouplingTimer TestHostBlasBuild TestNLORealDiagramRouting TestNLOAlphasWrapper

unittest_bundle_1:
# former jobs, run one after the other: test_additional_unittest unittest_0
Expand All @@ -52,6 +65,28 @@ jobs:
- uses: actions/checkout@v5
- uses: ./.github/actions/clean_tmp

- name: "Phase-04 NLO real offload contracts"
if: ${{ !cancelled() }}
run: |
cd $GITHUB_WORKSPACE
./tests/test_manager.py -t0 TestNLORealOffloadContract

- name: "NLO MC per-lane state"
if: ${{ !cancelled() }}
run: |
cd $GITHUB_WORKSPACE
./tests/test_manager.py -t0 TestMCLaneState

- name: "NLO MC@NLO event queue"
if: ${{ !cancelled() }}
run: |
cd $GITHUB_WORKSPACE
./tests/test_manager.py -t0 TestMCEventQueue
- name: "Native MINT scheduling and real-provider ownership"
if: ${{ !cancelled() }}
run: |
cd $GITHUB_WORKSPACE
./tests/test_manager.py -t0 TestMintChannels TestNativeScheduler TestNativeRealContinuation TestNativeWeightLines TestNativeContextMemory TestMCDecisionLedger NativeDispatchGate NativeProviderWave TestProviderPacking TestVirtualFiniteCommon TestNLOModelReload TestFlavourCouplingVectorScope TestLoopCheckFlavourDependencies TestBornHelicitySnapshot TestVirtualFoldCache TestNLOCouplingTimer TestHostBlasBuild TestNLORealDiagramRouting TestNLOAlphasWrapper
- name: "MadLoop NinjaRS interfaces, defaults, and reporting"
if: ${{ !cancelled() }}
run: |
Expand Down Expand Up @@ -136,7 +171,7 @@ jobs:
if: ${{ !cancelled() }}
run: |
cd $GITHUB_WORKSPACE
./tests/test_manager.py test_case_sensitive test_refactorize test_export_matrix_element_python_madevent_group test_python_export_functions test_run_python_matrix_element test_python_template_uses_decay_aware_broken_symmetry_metadata test_broken_symmetry_decomposes_each_decay_component test_broken_symmetry_distinguishes_identical_parent_with_different_decays test_get_fortran_str test_generate_virtuals_helas_matrix_element test_generate_virtuals_single_process test_fks_helas_multi_process_pptt test_fks_helas_multi_process_ppwj test_fks_helas_multi_process_ppz test_fks_helas_multi_process_ppz_loonly test_fks_helas_process_init test_fks_helas_real_process_init test_get_fks_info_list test_set_color_links test_FKSMultiProcess test_FKSMultiProcess_add test_FKSMultiProcess_no_fsr test_FKSMultiProcess_no_isr test_FKSProcess_aguux_qed -t0
./tests/test_manager.py test_case_sensitive test_refactorize test_create_mod_coupl_without_running_coupling test_export_matrix_element_python_madevent_group test_python_export_functions test_run_python_matrix_element test_python_template_uses_decay_aware_broken_symmetry_metadata test_broken_symmetry_decomposes_each_decay_component test_broken_symmetry_distinguishes_identical_parent_with_different_decays test_get_fortran_str test_generate_virtuals_helas_matrix_element test_generate_virtuals_single_process test_fks_helas_multi_process_pptt test_fks_helas_multi_process_ppwj test_fks_helas_multi_process_ppz test_fks_helas_multi_process_ppz_loonly test_fks_helas_process_init test_fks_helas_real_process_init test_get_fks_info_list test_set_color_links test_FKSMultiProcess test_FKSMultiProcess_add test_FKSMultiProcess_no_fsr test_FKSMultiProcess_no_isr test_FKSProcess_aguux_qed -t0

# ---- unittest_25 ----
- name: "unittest_25"
Expand Down Expand Up @@ -501,6 +536,15 @@ jobs:
cd $GITHUB_WORKSPACE
./tests/test_manager.py test_CF_simple test_cf_computation test_generate_ewsud_ttbar test_generate_ewsud_ww test_generate_ewsud_zz test_check_import_model test_schedular test_dummy_fcts test_UFO_Python_helas_call_writer_fd test_get_symmetric_color test_get_symmetric_lorentz test_remove_interactions2 test_remove_interactions3 test_fd_python_value_matches_unitary_fixed_point test_shower_card_write -t0

# ---- grouped FKS metadata ----
# Physical flavour classes of grouped NLO P directories, and the virtual
# row the MadLoop filters (HelFilter.dat) are set up for.
- name: "grouped FKS metadata: flavour classes and MadLoop filters"
if: ${{ !cancelled() }}
run: |
cd $GITHUB_WORKSPACE
./tests/test_manager.py -t0 TestGroupedFKSMetadata

# ---- unittest_run_output (from mg5 3.8.2) ----
# combine_runs, histograms and the madevent run helpers (Delphes split
# fusion, LHAPDF info patching); collect_events, systematics, make_opts and
Expand Down
29 changes: 18 additions & 11 deletions MadSpin/interface_madspin.py
Original file line number Diff line number Diff line change
Expand Up @@ -4302,17 +4302,7 @@ def run_onshell(self, line, density_method=False):
self.generate_all.compile()
self.all_me = self.generate_all.all_me
self.all_f2py = {}
# Build raw-PDG -> merged-particle-ID mapping so event tags can be
# remapped to match all_me keys (which are built from process legs,
# i.e. merged-particle IDs when apply_flavor_grouping is on).
self._revert_merged = {}
model_merged = getattr(self.generate_all, 'model', None)
model_merged = model_merged.get('merged_particles') if model_merged else None
if model_merged:
for merged_id, members in model_merged.items():
for pdg in members:
self._revert_merged[pdg] = merged_id
self._revert_merged[-pdg] = -merged_id
self._set_density_flavour_model()

self.all_density = {}
time_me_generation = time.time() - time_me_generation
Expand Down Expand Up @@ -12863,6 +12853,23 @@ def to_rest(momenta, frame):
out[rest_leg - 1] = (out[rest_leg - 1][0], 0., 0., 0.)
return out

def _set_density_flavour_model(self):
"""Use the model that wrote the production and decay matrix elements.

Loop generation can reload a grouped model with physical flavours.
The handler captured the earlier model before generation; building a
map from it would turn physical W decay tags into absent +/-81 tags.
"""
self.model = self.generate_all.mgcmd._curr_model
self.generate_all.model = self.model
self._revert_merged = {}
for merged_id, members in (self.model.get('merged_particles') or {}).items():
for pdg in members:
self._revert_merged[pdg] = merged_id
self._revert_merged[-pdg] = -merged_id
self.__dict__.pop('_ms_density_flavours', None)
self.__dict__.pop('_pdir_cache', None)

def _density_flavour(self, event):
"""What get_density needs of the flavours of event, for every event
with the same particles (pid, status) in the same order, which is all
Expand Down
Loading
Loading