Skip to content

Commit

Permalink
[install] modify and regenerate the acceptance tests after fixing the…
Browse files Browse the repository at this point in the history
… 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)
  • Loading branch information
valassi committed Sep 26, 2024
1 parent e33d71d commit 1d2b575
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 10 deletions.
32 changes: 24 additions & 8 deletions .github/workflows/madgraph_launch_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,9 +49,13 @@ jobs:
cd MG5aMC/mg5amcnlo/
cp input/.mg5_configuration_default.txt input/mg5_configuration.txt
cp Template/LO/Source/.make_opts Template/LO/Source/make_opts
rm -f PLUGIN/CUDACPP_OUTPUT
ln -sf ../MG5aMC_PLUGIN/CUDACPP_OUTPUT PLUGIN/CUDACPP_OUTPUT
# *** NB1: acceptance tests require code generation (so in principle both PLUGIN and ../MG5aMC_PLUGIN are an option)
# *** NB2: test_manager.py cannot handle absolute paths and '..' relative paths (therefore ../MG5aMC_PLUGIN will not work)
# *** ===> therefore, the only option is to install CUDACPP_OUTPUT in PLUGIN (this is done and undone in each CI job)
if [ -f PLUGIN/CUDACPP_OUTPUT ]; then echo 'ERROR! PLUGIN/CUDACPP_OUTPUT already exists'; exit 1; fi
ln -sf ../../MG5aMC_PLUGIN/CUDACPP_OUTPUT PLUGIN/CUDACPP_OUTPUT
./tests/test_manager.py -p./PLUGIN/CUDACPP_OUTPUT/acceptance_tests/ test_simd_cpp_eemumua_float
rm -f PLUGIN/CUDACPP_OUTPUT
simd_cpp_heft_ggh_double:
# The type of runner that the job will run on
Expand All @@ -71,9 +75,13 @@ jobs:
cd MG5aMC/mg5amcnlo/
cp input/.mg5_configuration_default.txt input/mg5_configuration.txt
cp Template/LO/Source/.make_opts Template/LO/Source/make_opts
rm -f PLUGIN/CUDACPP_OUTPUT
ln -sf ../MG5aMC_PLUGIN/CUDACPP_OUTPUT PLUGIN/CUDACPP_OUTPUT
# *** NB1: acceptance tests require code generation (so in principle both PLUGIN and ../MG5aMC_PLUGIN are an option)
# *** NB2: test_manager.py cannot handle absolute paths and '..' relative paths (therefore ../MG5aMC_PLUGIN will not work)
# *** ===> therefore, the only option is to install CUDACPP_OUTPUT in PLUGIN (this is done and undone in each CI job)
if [ -f PLUGIN/CUDACPP_OUTPUT ]; then echo 'ERROR! PLUGIN/CUDACPP_OUTPUT already exists'; exit 1; fi
ln -sf ../../MG5aMC_PLUGIN/CUDACPP_OUTPUT PLUGIN/CUDACPP_OUTPUT
./tests/test_manager.py -p./PLUGIN/CUDACPP_OUTPUT/acceptance_tests/ test_simd_cpp_heft_ggh_double
rm -f PLUGIN/CUDACPP_OUTPUT
simd_cpp_pptt_mixed:
# The type of runner that the job will run on
Expand All @@ -93,9 +101,13 @@ jobs:
cd MG5aMC/mg5amcnlo/
cp input/.mg5_configuration_default.txt input/mg5_configuration.txt
cp Template/LO/Source/.make_opts Template/LO/Source/make_opts
rm -f PLUGIN/CUDACPP_OUTPUT
ln -sf ../MG5aMC_PLUGIN/CUDACPP_OUTPUT PLUGIN/CUDACPP_OUTPUT
# *** NB1: acceptance tests require code generation (so in principle both PLUGIN and ../MG5aMC_PLUGIN are an option)
# *** NB2: test_manager.py cannot handle absolute paths and '..' relative paths (therefore ../MG5aMC_PLUGIN will not work)
# *** ===> therefore, the only option is to install CUDACPP_OUTPUT in PLUGIN (this is done and undone in each CI job)
if [ -f PLUGIN/CUDACPP_OUTPUT ]; then echo 'ERROR! PLUGIN/CUDACPP_OUTPUT already exists'; exit 1; fi
ln -sf ../../MG5aMC_PLUGIN/CUDACPP_OUTPUT PLUGIN/CUDACPP_OUTPUT
./tests/test_manager.py -p./PLUGIN/CUDACPP_OUTPUT/acceptance_tests/ test_simd_cpp_pptt_mixed
rm -f PLUGIN/CUDACPP_OUTPUT
simd_cpp_vector_size:
# The type of runner that the job will run on
Expand All @@ -115,6 +127,10 @@ jobs:
cd MG5aMC/mg5amcnlo/
cp input/.mg5_configuration_default.txt input/mg5_configuration.txt
cp Template/LO/Source/.make_opts Template/LO/Source/make_opts
rm -f PLUGIN/CUDACPP_OUTPUT
ln -sf ../MG5aMC_PLUGIN/CUDACPP_OUTPUT PLUGIN/CUDACPP_OUTPUT
# *** NB1: acceptance tests require code generation (so in principle both PLUGIN and ../MG5aMC_PLUGIN are an option)
# *** NB2: test_manager.py cannot handle absolute paths and '..' relative paths (therefore ../MG5aMC_PLUGIN will not work)
# *** ===> therefore, the only option is to install CUDACPP_OUTPUT in PLUGIN (this is done and undone in each CI job)
if [ -f PLUGIN/CUDACPP_OUTPUT ]; then echo 'ERROR! PLUGIN/CUDACPP_OUTPUT already exists'; exit 1; fi
ln -sf ../../MG5aMC_PLUGIN/CUDACPP_OUTPUT PLUGIN/CUDACPP_OUTPUT
./tests/test_manager.py -p./PLUGIN/CUDACPP_OUTPUT/acceptance_tests/ test_simd_cpp_vector_size
rm -f PLUGIN/CUDACPP_OUTPUT
Original file line number Diff line number Diff line change
Expand Up @@ -105,9 +105,13 @@ def create_test_simd_madevent():
cd MG5aMC/mg5amcnlo/
cp input/.mg5_configuration_default.txt input/mg5_configuration.txt
cp Template/LO/Source/.make_opts Template/LO/Source/make_opts
rm -f PLUGIN/CUDACPP_OUTPUT
ln -sf ../MG5aMC_PLUGIN/CUDACPP_OUTPUT PLUGIN/CUDACPP_OUTPUT
# *** NB1: acceptance tests require code generation (so in principle both PLUGIN and ../MG5aMC_PLUGIN are an option)
# *** NB2: test_manager.py cannot handle absolute paths and '..' relative paths (therefore ../MG5aMC_PLUGIN will not work)
# *** ===> therefore, the only option is to install CUDACPP_OUTPUT in PLUGIN (this is done and undone in each CI job)
if [ -f PLUGIN/CUDACPP_OUTPUT ]; then echo 'ERROR! PLUGIN/CUDACPP_OUTPUT already exists'; exit 1; fi
ln -sf ../../MG5aMC_PLUGIN/CUDACPP_OUTPUT PLUGIN/CUDACPP_OUTPUT
./tests/test_manager.py -p./PLUGIN/CUDACPP_OUTPUT/acceptance_tests/ test_%(name)s
rm -f PLUGIN/CUDACPP_OUTPUT
"""

def create_cicd():
Expand Down

0 comments on commit 1d2b575

Please sign in to comment.