Skip to content

Commit 4bd6777

Browse files
committed
Merge remote-tracking branch 'upstream/master' (including Makefile PRs madgraph5#798 and madgraph5#841) into ewdim6
Fix conflicts: epochX/cudacpp/tmad/allTees.sh epochX/cudacpp/tput/throughputX.sh
2 parents f12730b + 195cc37 commit 4bd6777

File tree

2,070 files changed

+37301
-967907
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

2,070 files changed

+37301
-967907
lines changed

.github/workflows/c-cpp.yml

Lines changed: 15 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -23,17 +23,18 @@ jobs:
2323
matrix:
2424
folder: [ epochX/cudacpp/ee_mumu.mad/SubProcesses/P1_epem_mupmum , epochX/cudacpp/gg_ttgg.mad/SubProcesses/P1_gg_ttxgg ]
2525
precision: [ d , f , m ]
26+
backend: [ cppnone, cppauto ]
2627
fail-fast: false
2728
steps:
2829
- uses: actions/checkout@v2
2930
- name: github PR info
3031
run: date; echo github.event.pull_request.head.sha='${{ github.event.pull_request.head.sha }}'
3132
- name: make info
32-
run: make FPTYPE=${{ matrix.precision }} -C ${{ matrix.folder }} -f cudacpp.mk info
33+
run: make BACKEND=${{ matrix.backend }} FPTYPE=${{ matrix.precision }} -C ${{ matrix.folder }} -f cudacpp.mk info
3334
- name: make
34-
run: make FPTYPE=${{ matrix.precision }} -C ${{ matrix.folder }}
35-
- name: make check
36-
run: make FPTYPE=${{ matrix.precision }} -C ${{ matrix.folder }} -f cudacpp.mk check
35+
run: make BACKEND=${{ matrix.backend }} FPTYPE=${{ matrix.precision }} -C ${{ matrix.folder }}
36+
- name: make test
37+
run: make BACKEND=${{ matrix.backend }} FPTYPE=${{ matrix.precision }} -C ${{ matrix.folder }} -f cudacpp.mk test
3738
CPU_MAC:
3839
runs-on: macos-latest
3940
env:
@@ -42,27 +43,28 @@ jobs:
4243
matrix:
4344
folder: [ epochX/cudacpp/ee_mumu.mad/SubProcesses/P1_epem_mupmum, epochX/cudacpp/gg_ttgg.mad/SubProcesses/P1_gg_ttxgg ]
4445
precision: [ d , f , m ]
46+
backend: [ cppnone, cppsse4 ]
4547
fail-fast: false
4648
steps:
4749
- uses: actions/checkout@v2
4850
- name: github PR info
4951
run: date; echo github.event.pull_request.head.sha='${{ github.event.pull_request.head.sha }}'
5052
- name: make info
51-
run: make AVX=none OMPFLAGS= FPTYPE=${{ matrix.precision }} -C ${{ matrix.folder }} -f cudacpp.mk info
53+
run: make BACKEND=${{ matrix.backend }} OMPFLAGS= FPTYPE=${{ matrix.precision }} -C ${{ matrix.folder }} -f cudacpp.mk info
5254
- name: make
53-
run: make AVX=none OMPFLAGS= FPTYPE=${{ matrix.precision }} -C ${{ matrix.folder }}
54-
- name: make check
55-
run: make AVX=none OMPFLAGS= FPTYPE=${{ matrix.precision }} -C ${{ matrix.folder }} -f cudacpp.mk check
55+
run: make BACKEND=${{ matrix.backend }} OMPFLAGS= FPTYPE=${{ matrix.precision }} -C ${{ matrix.folder }}
56+
- name: make test
57+
run: make BACKEND=${{ matrix.backend }} OMPFLAGS= FPTYPE=${{ matrix.precision }} -C ${{ matrix.folder }} -f cudacpp.mk test
5658
GPU:
5759
runs-on: self-hosted
5860
env:
5961
CUDA_HOME: /usr/local/cuda/
6062
FC: gfortran
61-
REQUIRE_CUDA: 1
6263
strategy:
6364
matrix:
6465
folder: [ epochX/cudacpp/ee_mumu.mad/SubProcesses/P1_epem_mupmum , epochX/cudacpp/gg_ttgg.mad/SubProcesses/P1_gg_ttxgg ]
6566
precision: [ d , f , m ]
67+
backend: [ cppauto, cuda ]
6668
fail-fast: false
6769
steps:
6870
- uses: actions/checkout@v2
@@ -71,8 +73,8 @@ jobs:
7173
- name: github PR info
7274
run: date; echo github.event.pull_request.head.sha='${{ github.event.pull_request.head.sha }}'
7375
- name: make info
74-
run: make FPTYPE=${{ matrix.precision }} -C ${{ matrix.folder }} -f cudacpp.mk info
76+
run: make BACKEND=${{ matrix.backend }} FPTYPE=${{ matrix.precision }} -C ${{ matrix.folder }} -f cudacpp.mk info
7577
- name: make
76-
run: make FPTYPE=${{ matrix.precision }} -C ${{ matrix.folder }}
77-
- name: make check
78-
run: make FPTYPE=${{ matrix.precision }} -C ${{ matrix.folder }} -f cudacpp.mk check
78+
run: make BACKEND=${{ matrix.backend }} FPTYPE=${{ matrix.precision }} -C ${{ matrix.folder }}
79+
- name: make test
80+
run: make BACKEND=${{ matrix.backend }} FPTYPE=${{ matrix.precision }} -C ${{ matrix.folder }} -f cudacpp.mk test

.github/workflows/testsuite_oneprocess.sh

Lines changed: 28 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
#!/bin/bash
2-
# Copyright (C) 2020-2023 CERN and UCLouvain.
2+
# Copyright (C) 2020-2024 CERN and UCLouvain.
33
# Licensed under the GNU Lesser General Public License (version 3 or later).
44
# Created by: A. Valassi (Oct 2023) for the MG5aMC CUDACPP plugin.
5-
# Further modified by: A. Valassi (2023) for the MG5aMC CUDACPP plugin.
5+
# Further modified by: A. Valassi (2023-2024) for the MG5aMC CUDACPP plugin.
66

77
# Verbose script
88
###set -x
@@ -43,7 +43,6 @@ function codegen() {
4343
git checkout HEAD ${proc}/CODEGEN*.txt
4444
if [ "${proc%.mad}" != "${proc}" ]; then
4545
git checkout HEAD ${proc}/Cards/me5_configuration.txt
46-
###sed -i 's/DEFAULT_F2PY_COMPILER=f2py.*/DEFAULT_F2PY_COMPILER=f2py3/' ${proc}/Source/make_opts
4746
git checkout HEAD ${proc}/Source/make_opts
4847
fi
4948
echo "git diff (start)"
@@ -149,7 +148,8 @@ function build() {
149148
gtestlibs=1
150149
make -f cudacpp.mk gtestlibs
151150
fi
152-
make -j avxall
151+
# NB: 'make bldall' internally checks if 'which nvcc' and 'which hipcc' succeed before attempting to build cuda and hip
152+
make -j bldall
153153
popd >& /dev/null
154154
done
155155
}
@@ -211,25 +211,36 @@ function tput_test() {
211211
# FIXME3: handle all d/f/m, inl0/1, hrd0/1 etc...
212212
unamep=$(uname -p)
213213
unames=$(uname -s)
214-
for simd in none sse4 avx2 512y 512z; do
215-
# Skip tests for unsupported simd modes as done in tput tests (prevent illegal instruction crashes #791)
214+
for backend in cuda hip cppnone cppsse4 cppavx2 cpp512y cpp512z; do
215+
# Skip GPU tests for NVidia and AMD unless nvcc and hipcc, respectively, are in PATH
216+
if ! nvcc --version &> /dev/null; then
217+
if [ "${backend}" == "cuda" ]; then echo; echo "(SKIP ${backend} because nvcc is missing on this node)"; continue; fi
218+
elif ! hipcc --version &> /dev/null; then
219+
if [ "${backend}" == "hip" ]; then echo; echo "(SKIP ${backend} because hipcc is missing on this node)"; continue; fi
220+
fi
221+
# Skip C++ tests for unsupported simd modes as done in tput tests (prevent illegal instruction crashes #791)
216222
if [ "${unamep}" != "x86_64" ]; then
217-
if [ "${simd}" == "avx2" ]; then echo; echo "(SKIP ${simd} which is not supported on ${unamep})"; continue; fi
218-
if [ "${simd}" == "512y" ]; then echo; echo "(SKIP ${simd} which is not supported on ${unamep})"; continue; fi
219-
if [ "${simd}" == "512z" ]; then echo; echo "(SKIP ${simd} which is not supported on ${unamep})"; continue; fi
223+
if [ "${backend}" == "cppavx2" ]; then echo; echo "(SKIP ${backend} which is not supported on ${unamep})"; continue; fi
224+
if [ "${backend}" == "cpp512y" ]; then echo; echo "(SKIP ${backend} which is not supported on ${unamep})"; continue; fi
225+
if [ "${backend}" == "cpp512z" ]; then echo; echo "(SKIP ${backend} which is not supported on ${unamep})"; continue; fi
220226
elif [ "${unames}" == "Darwin" ]; then
221-
if [ "${simd}" == "512y" ]; then echo; echo "(SKIP ${simd} which is not supported on ${unames})"; continue; fi
222-
if [ "${simd}" == "512z" ]; then echo; echo "(SKIP ${simd} which is not supported on ${unames})"; continue; fi
227+
if [ "${backend}" == "cpp512y" ]; then echo; echo "(SKIP ${backend} which is not supported on ${unames})"; continue; fi
228+
if [ "${backend}" == "cpp512z" ]; then echo; echo "(SKIP ${backend} which is not supported on ${unames})"; continue; fi
223229
elif [ "$(grep -m1 -c avx512vl /proc/cpuinfo)" != "1" ]; then
224-
if [ "${simd}" == "512y" ]; then echo; echo "(SKIP ${simd} which is not supported - no avx512vl in /proc/cpuinfo)"; continue; fi
225-
if [ "${simd}" == "512z" ]; then echo; echo "(SKIP ${simd} which is not supported - no avx512vl in /proc/cpuinfo)"; continue; fi
230+
if [ "${backend}" == "cpp512y" ]; then echo; echo "(SKIP ${backend} which is not supported - no avx512vl in /proc/cpuinfo)"; continue; fi
231+
if [ "${backend}" == "cpp512z" ]; then echo; echo "(SKIP ${backend} which is not supported - no avx512vl in /proc/cpuinfo)"; continue; fi
226232
fi
227-
if ls -d build.${simd}* > /dev/null 2>&1; then
228-
bdirs="$(ls -d build.${simd}*)"
233+
if ls -d build.${backend}* > /dev/null 2>&1; then
234+
bdirs="$(ls -d build.${backend}*)"
229235
for bdir in ${bdirs}; do
230236
runExe ${bdir}/runTest.exe
231-
runExe ${bdir}/check.exe -p 1 32 1
232-
runExe ${bdir}/gcheck.exe -p 1 32 1
237+
if [ -f ${bdir}/check.exe ]; then
238+
runExe ${bdir}/check.exe -p 1 32 1
239+
elif [ -f ${bdir}/gcheck.exe ]; then
240+
runExe ${bdir}/gcheck.exe -p 1 32 1
241+
else
242+
echo "ERROR! Neither ${bdir}/check.exe nor ${bdir}/gcheck.exe was found?"; exit 1
243+
fi
233244
done
234245
fi
235246
done

.github/workflows/testsuite_oneprocess.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ jobs:
9898
id: cache-restore
9999
# See https://github.com/actions/cache
100100
# See https://github.com/actions/cache/blob/main/tips-and-workarounds.md#update-a-cache
101-
uses: actions/cache/restore@v3
101+
uses: actions/cache/restore@v4
102102
with:
103103
path: |
104104
CCACHE_DIR
@@ -123,7 +123,7 @@ jobs:
123123
- name: update_cache # update caches after the builds but before the tests (which may fail even if builds succeed)
124124
id: cache-update
125125
# See https://github.com/actions/cache
126-
uses: actions/cache/save@v3
126+
uses: actions/cache/save@v4
127127
with:
128128
path: |
129129
CCACHE_DIR

MG5aMC/mg5amcnlo

epochX/cudacpp/CODEGEN/PLUGIN/CUDACPP_SA_OUTPUT/MG5aMC_patches/PROD/patch.P1

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
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
2-
index 0a3dfa449..8f4aaecd6 100644
2+
index 4fbb8e6ba..f9e2335de 100644
33
--- b/epochX/cudacpp/gg_tt.mad/SubProcesses/P1_gg_ttx/auto_dsig1.f
44
+++ a/epochX/cudacpp/gg_tt.mad/SubProcesses/P1_gg_ttx/auto_dsig1.f
55
@@ -484,23 +484,140 @@ C
@@ -284,7 +284,7 @@ index 71fbf2b25..0f1d199fc 100644
284284
open(unit=lun,file=tempname,status='old',ERR=20)
285285
fopened=.true.
286286
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
287-
index 817af778b..0c2ce6ec4 100644
287+
index e73e654d4..27fbe7302 100644
288288
--- b/epochX/cudacpp/gg_tt.mad/SubProcesses/P1_gg_ttx/matrix1.f
289289
+++ a/epochX/cudacpp/gg_tt.mad/SubProcesses/P1_gg_ttx/matrix1.f
290290
@@ -72,7 +72,10 @@ C

0 commit comments

Comments
 (0)