Skip to content

Commit 1d2b575

Browse files
committed
[install] modify and regenerate the acceptance tests after fixing the temporary symlink PLUGIN/CUDACPP_OUTPUT in the CI
(NB it is not enough to copy or symlink test_simd_madevent.py, because acceptance tests need the code generation plugin)
1 parent e33d71d commit 1d2b575

File tree

2 files changed

+30
-10
lines changed

2 files changed

+30
-10
lines changed

.github/workflows/madgraph_launch_test.yml

Lines changed: 24 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -49,9 +49,13 @@ jobs:
4949
cd MG5aMC/mg5amcnlo/
5050
cp input/.mg5_configuration_default.txt input/mg5_configuration.txt
5151
cp Template/LO/Source/.make_opts Template/LO/Source/make_opts
52-
rm -f PLUGIN/CUDACPP_OUTPUT
53-
ln -sf ../MG5aMC_PLUGIN/CUDACPP_OUTPUT PLUGIN/CUDACPP_OUTPUT
52+
# *** NB1: acceptance tests require code generation (so in principle both PLUGIN and ../MG5aMC_PLUGIN are an option)
53+
# *** NB2: test_manager.py cannot handle absolute paths and '..' relative paths (therefore ../MG5aMC_PLUGIN will not work)
54+
# *** ===> therefore, the only option is to install CUDACPP_OUTPUT in PLUGIN (this is done and undone in each CI job)
55+
if [ -f PLUGIN/CUDACPP_OUTPUT ]; then echo 'ERROR! PLUGIN/CUDACPP_OUTPUT already exists'; exit 1; fi
56+
ln -sf ../../MG5aMC_PLUGIN/CUDACPP_OUTPUT PLUGIN/CUDACPP_OUTPUT
5457
./tests/test_manager.py -p./PLUGIN/CUDACPP_OUTPUT/acceptance_tests/ test_simd_cpp_eemumua_float
58+
rm -f PLUGIN/CUDACPP_OUTPUT
5559
5660
simd_cpp_heft_ggh_double:
5761
# The type of runner that the job will run on
@@ -71,9 +75,13 @@ jobs:
7175
cd MG5aMC/mg5amcnlo/
7276
cp input/.mg5_configuration_default.txt input/mg5_configuration.txt
7377
cp Template/LO/Source/.make_opts Template/LO/Source/make_opts
74-
rm -f PLUGIN/CUDACPP_OUTPUT
75-
ln -sf ../MG5aMC_PLUGIN/CUDACPP_OUTPUT PLUGIN/CUDACPP_OUTPUT
78+
# *** NB1: acceptance tests require code generation (so in principle both PLUGIN and ../MG5aMC_PLUGIN are an option)
79+
# *** NB2: test_manager.py cannot handle absolute paths and '..' relative paths (therefore ../MG5aMC_PLUGIN will not work)
80+
# *** ===> therefore, the only option is to install CUDACPP_OUTPUT in PLUGIN (this is done and undone in each CI job)
81+
if [ -f PLUGIN/CUDACPP_OUTPUT ]; then echo 'ERROR! PLUGIN/CUDACPP_OUTPUT already exists'; exit 1; fi
82+
ln -sf ../../MG5aMC_PLUGIN/CUDACPP_OUTPUT PLUGIN/CUDACPP_OUTPUT
7683
./tests/test_manager.py -p./PLUGIN/CUDACPP_OUTPUT/acceptance_tests/ test_simd_cpp_heft_ggh_double
84+
rm -f PLUGIN/CUDACPP_OUTPUT
7785
7886
simd_cpp_pptt_mixed:
7987
# The type of runner that the job will run on
@@ -93,9 +101,13 @@ jobs:
93101
cd MG5aMC/mg5amcnlo/
94102
cp input/.mg5_configuration_default.txt input/mg5_configuration.txt
95103
cp Template/LO/Source/.make_opts Template/LO/Source/make_opts
96-
rm -f PLUGIN/CUDACPP_OUTPUT
97-
ln -sf ../MG5aMC_PLUGIN/CUDACPP_OUTPUT PLUGIN/CUDACPP_OUTPUT
104+
# *** NB1: acceptance tests require code generation (so in principle both PLUGIN and ../MG5aMC_PLUGIN are an option)
105+
# *** NB2: test_manager.py cannot handle absolute paths and '..' relative paths (therefore ../MG5aMC_PLUGIN will not work)
106+
# *** ===> therefore, the only option is to install CUDACPP_OUTPUT in PLUGIN (this is done and undone in each CI job)
107+
if [ -f PLUGIN/CUDACPP_OUTPUT ]; then echo 'ERROR! PLUGIN/CUDACPP_OUTPUT already exists'; exit 1; fi
108+
ln -sf ../../MG5aMC_PLUGIN/CUDACPP_OUTPUT PLUGIN/CUDACPP_OUTPUT
98109
./tests/test_manager.py -p./PLUGIN/CUDACPP_OUTPUT/acceptance_tests/ test_simd_cpp_pptt_mixed
110+
rm -f PLUGIN/CUDACPP_OUTPUT
99111
100112
simd_cpp_vector_size:
101113
# The type of runner that the job will run on
@@ -115,6 +127,10 @@ jobs:
115127
cd MG5aMC/mg5amcnlo/
116128
cp input/.mg5_configuration_default.txt input/mg5_configuration.txt
117129
cp Template/LO/Source/.make_opts Template/LO/Source/make_opts
118-
rm -f PLUGIN/CUDACPP_OUTPUT
119-
ln -sf ../MG5aMC_PLUGIN/CUDACPP_OUTPUT PLUGIN/CUDACPP_OUTPUT
130+
# *** NB1: acceptance tests require code generation (so in principle both PLUGIN and ../MG5aMC_PLUGIN are an option)
131+
# *** NB2: test_manager.py cannot handle absolute paths and '..' relative paths (therefore ../MG5aMC_PLUGIN will not work)
132+
# *** ===> therefore, the only option is to install CUDACPP_OUTPUT in PLUGIN (this is done and undone in each CI job)
133+
if [ -f PLUGIN/CUDACPP_OUTPUT ]; then echo 'ERROR! PLUGIN/CUDACPP_OUTPUT already exists'; exit 1; fi
134+
ln -sf ../../MG5aMC_PLUGIN/CUDACPP_OUTPUT PLUGIN/CUDACPP_OUTPUT
120135
./tests/test_manager.py -p./PLUGIN/CUDACPP_OUTPUT/acceptance_tests/ test_simd_cpp_vector_size
136+
rm -f PLUGIN/CUDACPP_OUTPUT

epochX/cudacpp/CODEGEN/PLUGIN/CUDACPP_SA_OUTPUT/acceptance_tests/create_acceptance_from_file.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -105,9 +105,13 @@ def create_test_simd_madevent():
105105
cd MG5aMC/mg5amcnlo/
106106
cp input/.mg5_configuration_default.txt input/mg5_configuration.txt
107107
cp Template/LO/Source/.make_opts Template/LO/Source/make_opts
108-
rm -f PLUGIN/CUDACPP_OUTPUT
109-
ln -sf ../MG5aMC_PLUGIN/CUDACPP_OUTPUT PLUGIN/CUDACPP_OUTPUT
108+
# *** NB1: acceptance tests require code generation (so in principle both PLUGIN and ../MG5aMC_PLUGIN are an option)
109+
# *** NB2: test_manager.py cannot handle absolute paths and '..' relative paths (therefore ../MG5aMC_PLUGIN will not work)
110+
# *** ===> therefore, the only option is to install CUDACPP_OUTPUT in PLUGIN (this is done and undone in each CI job)
111+
if [ -f PLUGIN/CUDACPP_OUTPUT ]; then echo 'ERROR! PLUGIN/CUDACPP_OUTPUT already exists'; exit 1; fi
112+
ln -sf ../../MG5aMC_PLUGIN/CUDACPP_OUTPUT PLUGIN/CUDACPP_OUTPUT
110113
./tests/test_manager.py -p./PLUGIN/CUDACPP_OUTPUT/acceptance_tests/ test_%(name)s
114+
rm -f PLUGIN/CUDACPP_OUTPUT
111115
"""
112116

113117
def create_cicd():

0 commit comments

Comments
 (0)