Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/master' (including "june24" ch…
Browse files Browse the repository at this point in the history
…annelid fixes/reimplementation madgraph5#882 and madgraph5#985) into runcard

Fix conflicts (use ~runcard version): epochX/cudacpp/CODEGEN/PLUGIN/CUDACPP_SA_OUTPUT/MG5aMC_patches/PROD/patch.common
  • Loading branch information
valassi committed Sep 10, 2024
2 parents cc08439 + 6dd4ca8 commit 0feabcf
Show file tree
Hide file tree
Showing 2,617 changed files with 1,127,188 additions and 169,545 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/c-cpp.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@ name: C/C++ CI

on:
push:
branches: [ master ]
branches: [ master, master_june24 ]
pull_request:
branches: [ master ]
branches: [ master, master_june24 ]

jobs:
debug_builds:
Expand Down Expand Up @@ -38,7 +38,7 @@ jobs:
CPU_MAC:
runs-on: macos-latest
env:
FC: gfortran-11
FC: gfortran-14 # see #971
strategy:
matrix:
folder: [ epochX/cudacpp/ee_mumu.mad/SubProcesses/P1_epem_mupmum, epochX/cudacpp/gg_ttgg.mad/SubProcesses/P1_gg_ttxgg ]
Expand Down
112 changes: 112 additions & 0 deletions .github/workflows/madgraph_launch_test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,112 @@
# WARNING THIS FILE IS AUTOGENERATED -> edit test_simd_madevent.template


# This is a basic workflow to help you get started with Actions

name: running acceptance test
# Controls when the workflow will run
# branches: [ main LTS ]
on:
# Triggers the workflow on push or pull request events but only for the 3.4.0 branch
push:
paths-ignore:
- 'docs/**'
# - '.github/**'

# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
inputs:
message:
description: 'running acceptance test'
required: true

env:
commitmsg: ${{ github.event.head_commit.message }}

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
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"

simd_cpp_heft_ggh_double:
# The type of runner that the job will run on
runs-on: ubuntu-latest

# 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
with:
submodules: 'true'

# Runs a set of commands using the runners shell
- name: test one of the test testIO_AcceptanceProcOutputIOTests
run: |
cd $GITHUB_WORKSPACE
cd MG5aMC/mg5amcnlo/
cp input/.mg5_configuration_default.txt input/mg5_configuration.txt
cp Template/LO/Source/.make_opts Template/LO/Source/make_opts
./tests/test_manager.py -p./PLUGIN/CUDACPP_OUTPUT/acceptance_tests/ test_simd_cpp_heft_ggh_double
simd_cpp_pptt_mixed:
# The type of runner that the job will run on
runs-on: ubuntu-latest

# 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
with:
submodules: 'true'

# Runs a set of commands using the runners shell
- name: test one of the test testIO_AcceptanceProcOutputIOTests
run: |
cd $GITHUB_WORKSPACE
cd MG5aMC/mg5amcnlo/
cp input/.mg5_configuration_default.txt input/mg5_configuration.txt
cp Template/LO/Source/.make_opts Template/LO/Source/make_opts
./tests/test_manager.py -p./PLUGIN/CUDACPP_OUTPUT/acceptance_tests/ test_simd_cpp_pptt_mixed
simd_cpp_eemumua_float:
# The type of runner that the job will run on
runs-on: ubuntu-latest

# 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
with:
submodules: 'true'

# Runs a set of commands using the runners shell
- name: test one of the test testIO_AcceptanceProcOutputIOTests
run: |
cd $GITHUB_WORKSPACE
cd MG5aMC/mg5amcnlo/
cp input/.mg5_configuration_default.txt input/mg5_configuration.txt
cp Template/LO/Source/.make_opts Template/LO/Source/make_opts
./tests/test_manager.py -p./PLUGIN/CUDACPP_OUTPUT/acceptance_tests/ test_simd_cpp_eemumua_float
simd_cpp_vector_size:
# The type of runner that the job will run on
runs-on: ubuntu-latest

# 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
with:
submodules: 'true'

# Runs a set of commands using the runners shell
- name: test one of the test testIO_AcceptanceProcOutputIOTests
run: |
cd $GITHUB_WORKSPACE
cd MG5aMC/mg5amcnlo/
cp input/.mg5_configuration_default.txt input/mg5_configuration.txt
cp Template/LO/Source/.make_opts Template/LO/Source/make_opts
./tests/test_manager.py -p./PLUGIN/CUDACPP_OUTPUT/acceptance_tests/ test_simd_cpp_vector_size
2 changes: 1 addition & 1 deletion .github/workflows/testsuite_allprocesses.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ on:

# Trigger the all-processes workflow for pull requests to master
pull_request:
branches: [ master ]
branches: [ master, master_june24 ]

# Trigger the all-processes workflow when new changes to the workflow are pushed
# (NB: this is now disabled to avoid triggering two jobs when pushing to a branch for which a PR is opened)
Expand Down
8 changes: 5 additions & 3 deletions .github/workflows/testsuite_oneprocess.sh
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,11 @@ function ECHO() { echo " "; }
echo "Executing $0 $*"; ECHO
topdir=$(cd $(dirname $0)/../..; pwd)

# Disable OpenMP in the CI tests
# To do this, set OMPFLAGS externally to an empty string (#758)
export OMPFLAGS=
# Enable OpenMP in the CI tests? (#758)
###export USEOPENMP=1

# Debug channelid in MatrixElementKernelBase?
export MG5AMC_CHANNELID_DEBUG=1

# Bypass known issues?
BYPASS_KNOWN_ISSUES=0 # do not bypass known issues (fail)
Expand Down
3 changes: 1 addition & 2 deletions .github/workflows/testsuite_oneprocess.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,7 @@ on:
required: true
type: choice
# FIXME? Can the list of supported processes be specified only once in oneprocess.yml or allprocesses.yml?
options: [gg_tt.mad, gg_ttg.mad, gg_ttgg.mad, gg_ttggg.mad, ee_mumu.mad, nobm_pp_ttW.mad]
###options: [ee_mumu.mad, gg_tt.mad, gg_ttg.mad, gg_ttgg.mad, gg_ttggg.mad, gg_tt01g.mad, gq_ttq.mad, pp_tt012j.mad]
options: [gg_tt.mad, gg_ttg.mad, gg_ttgg.mad, gg_ttggg.mad, ee_mumu.mad, nobm_pp_ttW.mad, susy_gg_tt.mad]

#----------------------------------------------------------------------------------------------------------------------------------

Expand Down
2 changes: 1 addition & 1 deletion MG5aMC/mg5amcnlo
Submodule mg5amcnlo updated 2002 files
Original file line number Diff line number Diff line change
@@ -1,161 +1,3 @@
diff --git b/epochX/cudacpp/gg_tt.mad/SubProcesses/P1_gg_ttx/auto_dsig1.f a/epochX/cudacpp/gg_tt.mad/SubProcesses/P1_gg_ttx/auto_dsig1.f
index 4fbb8e6ba..f9e2335de 100644
--- b/epochX/cudacpp/gg_tt.mad/SubProcesses/P1_gg_ttx/auto_dsig1.f
+++ a/epochX/cudacpp/gg_tt.mad/SubProcesses/P1_gg_ttx/auto_dsig1.f
@@ -484,23 +484,140 @@ C
INTEGER VECSIZE_USED

INTEGER IVEC
-
-
+ INTEGER IEXT
+
+ INTEGER ISUM_HEL
+ LOGICAL MULTI_CHANNEL
+ COMMON/TO_MATRIX/ISUM_HEL, MULTI_CHANNEL
+
+ LOGICAL FIRST_CHID
+ SAVE FIRST_CHID
+ DATA FIRST_CHID/.TRUE./
+
+#ifdef MG5AMC_MEEXPORTER_CUDACPP
+ INCLUDE 'coupl.inc' ! for ALL_G
+ INCLUDE 'fbridge.inc'
+ INCLUDE 'fbridge_common.inc'
+ INCLUDE 'genps.inc'
+ INCLUDE 'run.inc'
+ DOUBLE PRECISION OUT2(VECSIZE_MEMMAX)
+ INTEGER SELECTED_HEL2(VECSIZE_MEMMAX)
+ INTEGER SELECTED_COL2(VECSIZE_MEMMAX)
+ DOUBLE PRECISION CBYF1
+ INTEGER*4 NGOODHEL, NTOTHEL
+
+ INTEGER*4 NWARNINGS
+ SAVE NWARNINGS
+ DATA NWARNINGS/0/
+
+ LOGICAL FIRST
+ SAVE FIRST
+ DATA FIRST/.TRUE./
+
+ IF( FBRIDGE_MODE .LE. 0 ) THEN ! (FortranOnly=0 or BothQuiet=-1 or BothDebug=-2)
+#endif
+ call counters_smatrix1multi_start( -1, VECSIZE_USED ) ! fortran=-1
!$OMP PARALLEL
!$OMP DO
- DO IVEC=1, VECSIZE_USED
- CALL SMATRIX1(P_MULTI(0,1,IVEC),
- & hel_rand(IVEC),
- & col_rand(IVEC),
- & channel,
- & IVEC,
- & out(IVEC),
- & selected_hel(IVEC),
- & selected_col(IVEC)
- & )
- ENDDO
+ DO IVEC=1, VECSIZE_USED
+ CALL SMATRIX1(P_MULTI(0,1,IVEC),
+ & hel_rand(IVEC),
+ & col_rand(IVEC),
+ & channel,
+ & IVEC,
+ & out(IVEC),
+ & selected_hel(IVEC),
+ & selected_col(IVEC)
+ & )
+ ENDDO
!$OMP END DO
!$OMP END PARALLEL
+ call counters_smatrix1multi_stop( -1 ) ! fortran=-1
+#ifdef MG5AMC_MEEXPORTER_CUDACPP
+ ENDIF
+
+ IF( FBRIDGE_MODE .EQ. 1 .OR. FBRIDGE_MODE .LT. 0 ) THEN ! (CppOnly=1 or BothQuiet=-1 or BothDebug=-2)
+ IF( LIMHEL.NE.0 ) THEN
+ WRITE(6,*) 'ERROR! The cudacpp bridge only supports LIMHEL=0'
+ STOP
+ ENDIF
+ IF ( FIRST ) THEN ! exclude first pass (helicity filtering) from timers (#461)
+ CALL FBRIDGESEQUENCE_NOMULTICHANNEL( FBRIDGE_PBRIDGE, ! multi channel disabled for helicity filtering
+ & P_MULTI, ALL_G, HEL_RAND, COL_RAND, OUT2,
+ & SELECTED_HEL2, SELECTED_COL2 )
+ FIRST = .FALSE.
+c ! This is a workaround for https://github.com/oliviermattelaer/mg5amc_test/issues/22 (see PR #486)
+ IF( FBRIDGE_MODE .EQ. 1 ) THEN ! (CppOnly=1 : SMATRIX1 is not called at all)
+ CALL RESET_CUMULATIVE_VARIABLE() ! mimic 'avoid bias of the initialization' within SMATRIX1
+ ENDIF
+ CALL FBRIDGEGETNGOODHEL(FBRIDGE_PBRIDGE,NGOODHEL,NTOTHEL)
+ IF( NTOTHEL .NE. NCOMB ) THEN
+ WRITE(6,*) 'ERROR! Cudacpp/Fortran mismatch',
+ & ' in total number of helicities', NTOTHEL, NCOMB
+ STOP
+ ENDIF
+ WRITE (6,*) 'NGOODHEL =', NGOODHEL
+ WRITE (6,*) 'NCOMB =', NCOMB
+ ENDIF
+ call counters_smatrix1multi_start( 0, VECSIZE_USED ) ! cudacpp=0
+ IF ( .NOT. MULTI_CHANNEL ) THEN
+ CALL FBRIDGESEQUENCE_NOMULTICHANNEL( FBRIDGE_PBRIDGE, ! multi channel disabled
+ & P_MULTI, ALL_G, HEL_RAND, COL_RAND, OUT2,
+ & SELECTED_HEL2, SELECTED_COL2 )
+ ELSE
+ IF( SDE_STRAT.NE.1 ) THEN
+ WRITE(6,*) 'ERROR! The cudacpp bridge requires SDE=1' ! multi channel single-diagram enhancement strategy
+ STOP
+ ENDIF
+ CALL FBRIDGESEQUENCE(FBRIDGE_PBRIDGE, P_MULTI, ALL_G,
+ & HEL_RAND, COL_RAND, CHANNEL, OUT2,
+ & SELECTED_HEL2, SELECTED_COL2 ) ! 1-N: multi channel enabled
+ ENDIF
+ call counters_smatrix1multi_stop( 0 ) ! cudacpp=0
+ ENDIF
+
+ IF( FBRIDGE_MODE .LT. 0 ) THEN ! (BothQuiet=-1 or BothDebug=-2)
+ DO IVEC=1, VECSIZE_USED
+ CBYF1 = OUT2(IVEC)/OUT(IVEC) - 1
+ FBRIDGE_NCBYF1 = FBRIDGE_NCBYF1 + 1
+ FBRIDGE_CBYF1SUM = FBRIDGE_CBYF1SUM + CBYF1
+ FBRIDGE_CBYF1SUM2 = FBRIDGE_CBYF1SUM2 + CBYF1 * CBYF1
+ IF( CBYF1 .GT. FBRIDGE_CBYF1MAX ) FBRIDGE_CBYF1MAX = CBYF1
+ IF( CBYF1 .LT. FBRIDGE_CBYF1MIN ) FBRIDGE_CBYF1MIN = CBYF1
+ IF( FBRIDGE_MODE .EQ. -2 ) THEN ! (BothDebug=-2)
+ WRITE (*,'(I4,2E16.8,F23.11,I3,I3,I4,I4)')
+ & IVEC, OUT(IVEC), OUT2(IVEC), 1+CBYF1,
+ & SELECTED_HEL(IVEC), SELECTED_HEL2(IVEC),
+ & SELECTED_COL(IVEC), SELECTED_COL2(IVEC)
+ ENDIF
+ IF( ABS(CBYF1).GT.5E-5 .AND. NWARNINGS.LT.20 ) THEN
+ NWARNINGS = NWARNINGS + 1
+ WRITE (*,'(A,I4,A,I4,2E16.8,F23.11)')
+ & 'WARNING! (', NWARNINGS, '/20) Deviation more than 5E-5',
+ & IVEC, OUT(IVEC), OUT2(IVEC), 1+CBYF1
+ ENDIF
+ END DO
+ ENDIF
+
+ IF( FBRIDGE_MODE .EQ. 1 .OR. FBRIDGE_MODE .LT. 0 ) THEN ! (CppOnly=1 or BothQuiet=-1 or BothDebug=-2)
+ DO IVEC=1, VECSIZE_USED
+ OUT(IVEC) = OUT2(IVEC) ! use the cudacpp ME instead of the fortran ME!
+ SELECTED_HEL(IVEC) = SELECTED_HEL2(IVEC) ! use the cudacpp helicity instead of the fortran helicity!
+ SELECTED_COL(IVEC) = SELECTED_COL2(IVEC) ! use the cudacpp color instead of the fortran color!
+ END DO
+ ENDIF
+#endif
+
+ IF ( FIRST_CHID ) THEN
+ IF ( MULTI_CHANNEL ) THEN
+ WRITE (*,*) 'MULTI_CHANNEL = TRUE'
+ ELSE
+ WRITE (*,*) 'MULTI_CHANNEL = FALSE'
+ ENDIF
+ WRITE (*,*) 'CHANNEL_ID =', CHANNEL
+ FIRST_CHID = .FALSE.
+ ENDIF
+
RETURN
END

diff --git b/epochX/cudacpp/gg_tt.mad/SubProcesses/P1_gg_ttx/driver.f a/epochX/cudacpp/gg_tt.mad/SubProcesses/P1_gg_ttx/driver.f
index 1124a9164..27a6e4674 100644
--- b/epochX/cudacpp/gg_tt.mad/SubProcesses/P1_gg_ttx/driver.f
Expand Down Expand Up @@ -284,7 +126,7 @@ index 1124a9164..27a6e4674 100644
open(unit=lun,file=tempname,status='old',ERR=20)
fopened=.true.
diff --git b/epochX/cudacpp/gg_tt.mad/SubProcesses/P1_gg_ttx/matrix1.f a/epochX/cudacpp/gg_tt.mad/SubProcesses/P1_gg_ttx/matrix1.f
index e73e654d4..27fbe7302 100644
index 8b73188ef..710fd1297 100644
--- b/epochX/cudacpp/gg_tt.mad/SubProcesses/P1_gg_ttx/matrix1.f
+++ a/epochX/cudacpp/gg_tt.mad/SubProcesses/P1_gg_ttx/matrix1.f
@@ -72,7 +72,10 @@ C
Expand All @@ -299,15 +141,7 @@ index e73e654d4..27fbe7302 100644
C
C This is just to temporarily store the reference grid for
C helicity of the DiscreteSampler so as to obtain its number of
@@ -140,6 +143,7 @@ C ----------
C BEGIN CODE
C ----------

+ call counters_smatrix1_start()
NTRY(IMIRROR)=NTRY(IMIRROR)+1
THIS_NTRY(IMIRROR) = THIS_NTRY(IMIRROR)+1
DO I=1,NEXTERNAL
@@ -217,6 +221,17 @@ C ----------
@@ -230,6 +233,17 @@ C update.
ENDIF
IF(NTRY(IMIRROR).EQ.MAXTRIES)THEN
ISHEL(IMIRROR)=MIN(ISUM_HEL,NGOOD(IMIRROR))
Expand All @@ -325,22 +159,3 @@ index e73e654d4..27fbe7302 100644
ENDIF
ENDIF
ELSE IF (.NOT.INIT_MODE) THEN ! random helicity
@@ -234,6 +249,7 @@ C Include the Jacobian from helicity sampling
IHEL = HEL_PICKED
ELSE
ANS = 1D0
+ call counters_smatrix1_stop()
RETURN
ENDIF
IF (ANS.NE.0D0.AND.(ISUM_HEL .NE. 1.OR.HEL_PICKED.EQ.-1)) THEN
@@ -278,9 +294,8 @@ C Set right sign for ANS, based on sign of chosen helicity
ENDIF
ENDIF
ANS=ANS/DBLE(IDEN)
-
CALL SELECT_COLOR(RCOL, JAMP2, ICONFIG,1, ICOL)
-
+ call counters_smatrix1_stop()
END


Loading

0 comments on commit 0feabcf

Please sign in to comment.