Skip to content

Commit

Permalink
[install] modify and regenerate the acceptance tests with a much simp…
Browse files Browse the repository at this point in the history
…ler option: ln -sf ../MG5aMC_PLUGIN/CUDACPP_OUTPUT PLUGIN/CUDACPP_OUTPUT
  • Loading branch information
valassi committed Sep 26, 2024
1 parent 7803ee4 commit e33d71d
Show file tree
Hide file tree
Showing 3 changed files with 35 additions and 40 deletions.
24 changes: 12 additions & 12 deletions .github/workflows/madgraph_launch_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,9 +49,9 @@ 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 cudacpp_acceptance_tests
ln -sf ../MG5aMC_PLUGIN/CUDACPP_OUTPUT/acceptance_tests cudacpp_acceptance_tests # workaround for 'relative position not supported'
./tests/test_manager.py -p./cudacpp_acceptance_tests/ test_simd_cpp_eemumua_float
rm -f PLUGIN/CUDACPP_OUTPUT
ln -sf ../MG5aMC_PLUGIN/CUDACPP_OUTPUT PLUGIN/CUDACPP_OUTPUT
./tests/test_manager.py -p./PLUGIN/CUDACPP_OUTPUT/acceptance_tests/ test_simd_cpp_eemumua_float
simd_cpp_heft_ggh_double:
# The type of runner that the job will run on
Expand All @@ -71,9 +71,9 @@ 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 cudacpp_acceptance_tests
ln -sf ../MG5aMC_PLUGIN/CUDACPP_OUTPUT/acceptance_tests cudacpp_acceptance_tests # workaround for 'relative position not supported'
./tests/test_manager.py -p./cudacpp_acceptance_tests/ test_simd_cpp_heft_ggh_double
rm -f PLUGIN/CUDACPP_OUTPUT
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
simd_cpp_pptt_mixed:
# The type of runner that the job will run on
Expand All @@ -93,9 +93,9 @@ 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 cudacpp_acceptance_tests
ln -sf ../MG5aMC_PLUGIN/CUDACPP_OUTPUT/acceptance_tests cudacpp_acceptance_tests # workaround for 'relative position not supported'
./tests/test_manager.py -p./cudacpp_acceptance_tests/ test_simd_cpp_pptt_mixed
rm -f PLUGIN/CUDACPP_OUTPUT
ln -sf ../MG5aMC_PLUGIN/CUDACPP_OUTPUT PLUGIN/CUDACPP_OUTPUT
./tests/test_manager.py -p./PLUGIN/CUDACPP_OUTPUT/acceptance_tests/ test_simd_cpp_pptt_mixed
simd_cpp_vector_size:
# The type of runner that the job will run on
Expand All @@ -115,6 +115,6 @@ 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 cudacpp_acceptance_tests
ln -sf ../MG5aMC_PLUGIN/CUDACPP_OUTPUT/acceptance_tests cudacpp_acceptance_tests # workaround for 'relative position not supported'
./tests/test_manager.py -p./cudacpp_acceptance_tests/ test_simd_cpp_vector_size
rm -f PLUGIN/CUDACPP_OUTPUT
ln -sf ../MG5aMC_PLUGIN/CUDACPP_OUTPUT PLUGIN/CUDACPP_OUTPUT
./tests/test_manager.py -p./PLUGIN/CUDACPP_OUTPUT/acceptance_tests/ test_simd_cpp_vector_size
Original file line number Diff line number Diff line change
Expand Up @@ -36,12 +36,11 @@ def test_%(name)s(self):
\"\"\" %%self.run_dir
open(pjoin(self.path, 'mg5_cmd'),'w').write(cmd)
newenv = os.environ.copy()
newenv[\"PYTHONPATH\"] = f\"..\"
subprocess.call([sys.executable, pjoin(MG5DIR, 'bin','mg5_aMC','-m','CUDACPP_OUTPUT'),
pjoin(self.path, 'mg5_cmd')], env=newenv,
subprocess.call([sys.executable, pjoin(MG5DIR, 'bin','mg5_aMC'),
pjoin(self.path, 'mg5_cmd')],
#cwd=self.path,
stdout=stdout, stderr=stderr)
stdout=stdout, stderr=stderr)
"""

template_onecheck = """
Expand Down Expand Up @@ -106,9 +105,9 @@ 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 cudacpp_acceptance_tests
ln -sf ../MG5aMC_PLUGIN/CUDACPP_OUTPUT/acceptance_tests cudacpp_acceptance_tests # workaround for 'relative position not supported'
./tests/test_manager.py -p./cudacpp_acceptance_tests/ test_%(name)s
rm -f PLUGIN/CUDACPP_OUTPUT
ln -sf ../MG5aMC_PLUGIN/CUDACPP_OUTPUT PLUGIN/CUDACPP_OUTPUT
./tests/test_manager.py -p./PLUGIN/CUDACPP_OUTPUT/acceptance_tests/ test_%(name)s
"""

def create_cicd():
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -148,12 +148,11 @@ def test_simd_cpp_eemumua_float(self):
""" %self.run_dir

open(pjoin(self.path, 'mg5_cmd'),'w').write(cmd)
newenv = os.environ.copy()
newenv["PYTHONPATH"] = f".."
subprocess.call([sys.executable, pjoin(MG5DIR, 'bin','mg5_aMC','-m','CUDACPP_OUTPUT'),
pjoin(self.path, 'mg5_cmd')], env=newenv,

subprocess.call([sys.executable, pjoin(MG5DIR, 'bin','mg5_aMC'),
pjoin(self.path, 'mg5_cmd')],
#cwd=self.path,
stdout=stdout, stderr=stderr)
stdout=stdout, stderr=stderr)

self.check_parton_output(cross=0.0266, error=0.0002854, run_name='run_01', html=True)
event = '%s/Events/run_01/unweighted_events.lhe' % self.run_dir
Expand Down Expand Up @@ -198,12 +197,11 @@ def test_simd_cpp_heft_ggh_double(self):
""" %self.run_dir

open(pjoin(self.path, 'mg5_cmd'),'w').write(cmd)
newenv = os.environ.copy()
newenv["PYTHONPATH"] = f".."
subprocess.call([sys.executable, pjoin(MG5DIR, 'bin','mg5_aMC','-m','CUDACPP_OUTPUT'),
pjoin(self.path, 'mg5_cmd')], env=newenv,

subprocess.call([sys.executable, pjoin(MG5DIR, 'bin','mg5_aMC'),
pjoin(self.path, 'mg5_cmd')],
#cwd=self.path,
stdout=stdout, stderr=stderr)
stdout=stdout, stderr=stderr)

self.check_parton_output(cross=0.01859, error=0.0002853789088650386, run_name='run_01', html=True)
event = '%s/Events/run_01/unweighted_events.lhe' % self.run_dir
Expand Down Expand Up @@ -248,12 +246,11 @@ def test_simd_cpp_pptt_mixed(self):
""" %self.run_dir

open(pjoin(self.path, 'mg5_cmd'),'w').write(cmd)
newenv = os.environ.copy()
newenv["PYTHONPATH"] = f".."
subprocess.call([sys.executable, pjoin(MG5DIR, 'bin','mg5_aMC','-m','CUDACPP_OUTPUT'),
pjoin(self.path, 'mg5_cmd')], env=newenv,

subprocess.call([sys.executable, pjoin(MG5DIR, 'bin','mg5_aMC'),
pjoin(self.path, 'mg5_cmd')],
#cwd=self.path,
stdout=stdout, stderr=stderr)
stdout=stdout, stderr=stderr)

self.check_parton_output(cross=505.5, error=2.749, run_name='run_01', html=True)
event = '%s/Events/run_01/unweighted_events.lhe' % self.run_dir
Expand Down Expand Up @@ -305,12 +302,11 @@ def test_simd_cpp_vector_size(self):
""" %self.run_dir

open(pjoin(self.path, 'mg5_cmd'),'w').write(cmd)
newenv = os.environ.copy()
newenv["PYTHONPATH"] = f".."
subprocess.call([sys.executable, pjoin(MG5DIR, 'bin','mg5_aMC','-m','CUDACPP_OUTPUT'),
pjoin(self.path, 'mg5_cmd')], env=newenv,

subprocess.call([sys.executable, pjoin(MG5DIR, 'bin','mg5_aMC'),
pjoin(self.path, 'mg5_cmd')],
#cwd=self.path,
stdout=stdout, stderr=stderr)
stdout=stdout, stderr=stderr)

self.check_parton_output(cross=505.5, error=2.749, run_name='run_01', html=True)
event = '%s/Events/run_01/unweighted_events.lhe' % self.run_dir
Expand Down

0 comments on commit e33d71d

Please sign in to comment.