Skip to content

Commit

Permalink
Merge pull request #849 from madgraph5/less_patch
Browse files Browse the repository at this point in the history
remove un-necessary patch
  • Loading branch information
valassi authored Jul 29, 2024
2 parents 0a88c1d + 6e4357d commit 5502223
Show file tree
Hide file tree
Showing 48 changed files with 250 additions and 538 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -346,51 +346,3 @@ index 348c283be..6a21300f7 100644
+
+distclean: cleanall # Clean all fortran and cudacpp builds as well as the googletest installation
+ $(MAKE) -f $(CUDACPP_MAKEFILE) distclean
diff --git b/epochX/cudacpp/gg_tt.mad/bin/internal/gen_ximprove.py a/epochX/cudacpp/gg_tt.mad/bin/internal/gen_ximprove.py
index c86da36a0..7faa14444 100755
--- b/epochX/cudacpp/gg_tt.mad/bin/internal/gen_ximprove.py
+++ a/epochX/cudacpp/gg_tt.mad/bin/internal/gen_ximprove.py
@@ -391,8 +391,17 @@ class gensym(object):
done = True
if not done:
raise Exception('Parsing error in gensym: %s' % stdout)
-
- self.cmd.compile(['madevent'], cwd=Pdir)
+
+ cudacpp_backend = self.run_card['cudacpp_backend'] # the default value is defined in banner.py
+ logger.info("Building madevent in madevent_interface.py with '%s' matrix elements"%cudacpp_backend)
+ cudacpp_supported_backends = [ 'fortran', 'cuda', 'hip', 'cpp', 'cppnone', 'cppsse4', 'cppavx2', 'cpp512y', 'cpp512z', 'cppauto' ]
+ if cudacpp_backend in cudacpp_supported_backends :
+ self.cmd.compile(['madevent_' + cudacpp_backend + '_link'], cwd=Pdir)
+ else:
+ raise Exception( "Invalid cudacpp_backend='%s': supported backends are %s"%supported_backends )
+ ###logger.info("Building madevent with ALL(FORTRAN/CPP/CUDA) matrix elements (cudacpp_backend=%s)"%cudacpp_backend)
+ ###self.cmd.compile(['all'], cwd=Pdir)
+
if to_submit:
self.submit_to_cluster(job_list)
job_list = {}
diff --git b/epochX/cudacpp/gg_tt.mad/bin/internal/madevent_interface.py a/epochX/cudacpp/gg_tt.mad/bin/internal/madevent_interface.py
index 8c509e83f..1a0af4f18 100755
--- b/epochX/cudacpp/gg_tt.mad/bin/internal/madevent_interface.py
+++ a/epochX/cudacpp/gg_tt.mad/bin/internal/madevent_interface.py
@@ -3614,8 +3614,17 @@ Beware that this can be dangerous for local multicore runs.""")
logger.info(' %s ' % subdir)

if os.path.exists(pjoin(Pdir, 'ajob1')):
- self.compile(['madevent'], cwd=Pdir)
-
+
+ cudacpp_backend = self.run_card['cudacpp_backend'] # the default value is defined in banner.py
+ logger.info("Building madevent in madevent_interface.py with '%s' matrix elements"%cudacpp_backend)
+ cudacpp_supported_backends = [ 'fortran', 'cuda', 'hip', 'cpp', 'cppnone', 'cppsse4', 'cppavx2', 'cpp512y', 'cpp512z', 'cppauto' ]
+ if cudacpp_backend in cudacpp_supported_backends :
+ self.compile(['madevent_' + cudacpp_backend + '_link'], cwd=Pdir)
+ else:
+ raise Exception( "Invalid cudacpp_backend='%s': supported backends are %s"%supported_backends )
+ ###logger.info("Building madevent with ALL (FORTRAN/CPP/CUDA) matrix elements (cudacpp_backend=%s)"%cudacpp_backend)
+ ###self.compile(['all'], cwd=Pdir)
+
alljobs = misc.glob('ajob*', Pdir)

#remove associated results.dat (ensure to not mix with all data)
18 changes: 8 additions & 10 deletions epochX/cudacpp/ee_mumu.mad/CODEGEN_mad_ee_mumu_log.txt
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ generate e+ e- > mu+ mu-
No model currently active, so we import the Standard Model
INFO: load particles
INFO: load vertices
DEBUG: model prefixing takes 0.0056552886962890625 
DEBUG: model prefixing takes 0.00548553466796875 
INFO: Restrict model sm with file models/sm/restrict_default.dat .
DEBUG: Simplifying conditional expressions 
DEBUG: remove interactions: u s w+ at order: QED=1 
Expand Down Expand Up @@ -177,7 +177,7 @@ INFO: Generating Helas calls for process: e+ e- > mu+ mu- WEIGHTED<=4 @1
INFO: Processing color information for process: e+ e- > mu+ mu- @1
INFO: Creating files in directory P1_epem_mupmum
DEBUG: kwargs[prefix] = 0 [model_handling.py at line 1151] 
DEBUG: process_exporter_cpp =  <PLUGIN.CUDACPP_OUTPUT.model_handling.PLUGIN_OneProcessExporter object at 0x7f2b00742760> [export_v4.py at line 6261] 
DEBUG: process_exporter_cpp =  <PLUGIN.CUDACPP_OUTPUT.model_handling.PLUGIN_OneProcessExporter object at 0x7f5f9502b790> [export_v4.py at line 6261] 
INFO: Creating files in directory .
FileWriter <class 'PLUGIN.CUDACPP_OUTPUT.model_handling.PLUGIN_CPPWriter'> for ././CPPProcess.h
FileWriter <class 'PLUGIN.CUDACPP_OUTPUT.model_handling.PLUGIN_CPPWriter'> for ././CPPProcess.cc
Expand All @@ -198,19 +198,19 @@ INFO: Finding symmetric diagrams for subprocess group epem_mupmum
DEBUG: iconfig_to_diag =  {1: 1, 2: 2} [model_handling.py at line 1543] 
DEBUG: diag_to_iconfig =  {1: 1, 2: 2} [model_handling.py at line 1544] 
Generated helas calls for 1 subprocesses (2 diagrams) in 0.004 s
Wrote files for 8 helas calls in 0.113 s
Wrote files for 8 helas calls in 0.114 s
ALOHA: aloha starts to compute helicity amplitudes
ALOHA: aloha creates FFV1 routines
ALOHA: aloha creates FFV2 routines
ALOHA: aloha creates FFV4 routines
ALOHA: aloha creates 3 routines in 0.203 s
ALOHA: aloha creates 3 routines in 0.199 s
DEBUG: Entering PLUGIN_ProcessExporter.convert_model (create the model) [output.py at line 205] 
ALOHA: aloha starts to compute helicity amplitudes
ALOHA: aloha creates FFV1 routines
ALOHA: aloha creates FFV2 routines
ALOHA: aloha creates FFV4 routines
ALOHA: aloha creates FFV2_4 routines
ALOHA: aloha creates 7 routines in 0.252 s
ALOHA: aloha creates 7 routines in 0.256 s
<class 'aloha.create_aloha.AbstractRoutine'> FFV1
<class 'aloha.create_aloha.AbstractRoutine'> FFV1
<class 'aloha.create_aloha.AbstractRoutine'> FFV2
Expand Down Expand Up @@ -238,8 +238,6 @@ DEBUG: cd /data/avalassi/GPU2023/madgraph4gpuX/MG5aMC/TMPOUT/CODEGEN_mad_ee_mumu
patching file Source/genps.inc
patching file Source/makefile
patching file SubProcesses/makefile
patching file bin/internal/gen_ximprove.py
patching file bin/internal/madevent_interface.py
DEBUG: cd /data/avalassi/GPU2023/madgraph4gpuX/MG5aMC/TMPOUT/CODEGEN_mad_ee_mumu/SubProcesses/P1_epem_mupmum; patch -p6 -i /data/avalassi/GPU2023/madgraph4gpuX/epochX/cudacpp/CODEGEN/PLUGIN/CUDACPP_SA_OUTPUT/MG5aMC_patches/PROD/patch.P1
patching file auto_dsig1.f
Hunk #1 succeeded at 496 (offset 12 lines).
Expand All @@ -255,9 +253,9 @@ Type "launch" to generate events from this process, or see
Run "open index.html" to see more information about this process.
quit

real 0m2.096s
user 0m1.833s
sys 0m0.242s
real 0m2.943s
user 0m1.814s
sys 0m0.270s
Code generation completed in 3 seconds
************************************************************
* *
Expand Down
13 changes: 2 additions & 11 deletions epochX/cudacpp/ee_mumu.mad/bin/internal/gen_ximprove.py
Original file line number Diff line number Diff line change
Expand Up @@ -391,17 +391,8 @@ def launch(self, to_submit=True, clean=True):
done = True
if not done:
raise Exception('Parsing error in gensym: %s' % stdout)

cudacpp_backend = self.run_card['cudacpp_backend'] # the default value is defined in banner.py
logger.info("Building madevent in madevent_interface.py with '%s' matrix elements"%cudacpp_backend)
cudacpp_supported_backends = [ 'fortran', 'cuda', 'hip', 'cpp', 'cppnone', 'cppsse4', 'cppavx2', 'cpp512y', 'cpp512z', 'cppauto' ]
if cudacpp_backend in cudacpp_supported_backends :
self.cmd.compile(['madevent_' + cudacpp_backend + '_link'], cwd=Pdir)
else:
raise Exception( "Invalid cudacpp_backend='%s': supported backends are %s"%supported_backends )
###logger.info("Building madevent with ALL(FORTRAN/CPP/CUDA) matrix elements (cudacpp_backend=%s)"%cudacpp_backend)
###self.cmd.compile(['all'], cwd=Pdir)


self.cmd.compile(['madevent'], cwd=Pdir)
if to_submit:
self.submit_to_cluster(job_list)
job_list = {}
Expand Down
13 changes: 2 additions & 11 deletions epochX/cudacpp/ee_mumu.mad/bin/internal/madevent_interface.py
Original file line number Diff line number Diff line change
Expand Up @@ -3614,17 +3614,8 @@ def do_refine(self, line):
logger.info(' %s ' % subdir)

if os.path.exists(pjoin(Pdir, 'ajob1')):

cudacpp_backend = self.run_card['cudacpp_backend'] # the default value is defined in banner.py
logger.info("Building madevent in madevent_interface.py with '%s' matrix elements"%cudacpp_backend)
cudacpp_supported_backends = [ 'fortran', 'cuda', 'hip', 'cpp', 'cppnone', 'cppsse4', 'cppavx2', 'cpp512y', 'cpp512z', 'cppauto' ]
if cudacpp_backend in cudacpp_supported_backends :
self.compile(['madevent_' + cudacpp_backend + '_link'], cwd=Pdir)
else:
raise Exception( "Invalid cudacpp_backend='%s': supported backends are %s"%supported_backends )
###logger.info("Building madevent with ALL (FORTRAN/CPP/CUDA) matrix elements (cudacpp_backend=%s)"%cudacpp_backend)
###self.compile(['all'], cwd=Pdir)

self.compile(['madevent'], cwd=Pdir)

alljobs = misc.glob('ajob*', Pdir)

#remove associated results.dat (ensure to not mix with all data)
Expand Down
14 changes: 7 additions & 7 deletions epochX/cudacpp/ee_mumu.sa/CODEGEN_cudacpp_ee_mumu_log.txt
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ generate e+ e- > mu+ mu-
No model currently active, so we import the Standard Model
INFO: load particles
INFO: load vertices
DEBUG: model prefixing takes 0.005468606948852539 
DEBUG: model prefixing takes 0.005556583404541016 
INFO: Restrict model sm with file models/sm/restrict_default.dat .
DEBUG: Simplifying conditional expressions 
DEBUG: remove interactions: u s w+ at order: QED=1 
Expand Down Expand Up @@ -154,7 +154,7 @@ INFO: Checking for minimal orders which gives processes.
INFO: Please specify coupling orders to bypass this step.
INFO: Trying process: e+ e- > mu+ mu- WEIGHTED<=4 @1
INFO: Process has 2 diagrams
1 processes with 2 diagrams generated in 0.005 s
1 processes with 2 diagrams generated in 0.004 s
Total: 1 processes with 2 diagrams
output standalone_cudacpp ../TMPOUT/CODEGEN_cudacpp_ee_mumu
Load PLUGIN.CUDACPP_OUTPUT
Expand All @@ -172,7 +172,7 @@ INFO: Processing color information for process: e+ e- > mu+ mu- @1
DEBUG: type(subproc_group)=<class 'madgraph.core.helas_objects.HelasMatrixElement'> [output.py at line 197] 
DEBUG: type(fortran_model)=<class 'PLUGIN.CUDACPP_OUTPUT.model_handling.PLUGIN_GPUFOHelasCallWriter'> [output.py at line 198] 
DEBUG: type(me)=<class 'int'> me=0 [output.py at line 199] 
DEBUG: "need to link", self.to_link_in_P =  need to link ['nvtx.h', 'timer.h', 'timermap.h', 'ompnumthreads.h', 'GpuRuntime.h', 'GpuAbstraction.h', 'MemoryAccessHelpers.h', 'MemoryAccessVectors.h', 'MemoryAccessMatrixElements.h', 'MemoryAccessMomenta.h', 'MemoryAccessRandomNumbers.h', 'MemoryAccessWeights.h', 'MemoryAccessAmplitudes.h', 'MemoryAccessWavefunctions.h', 'MemoryAccessGs.h', 'MemoryAccessCouplingsFixed.h', 'MemoryAccessNumerators.h', 'MemoryAccessDenominators.h', 'EventStatistics.h', 'CommonRandomNumbers.h', 'CrossSectionKernels.cc', 'CrossSectionKernels.h', 'MatrixElementKernels.cc', 'MatrixElementKernels.h', 'RamboSamplingKernels.cc', 'RamboSamplingKernels.h', 'RandomNumberKernels.h', 'CommonRandomNumberKernel.cc', 'CurandRandomNumberKernel.cc', 'HiprandRandomNumberKernel.cc', 'Bridge.h', 'BridgeKernels.cc', 'BridgeKernels.h', 'fbridge.cc', 'fbridge.inc', 'fsampler.cc', 'fsampler.inc', 'MadgraphTest.h', 'runTest.cc', 'testmisc.cc', 'testxxx_cc_ref.txt', 'cudacpp.mk', 'testxxx.cc', 'MemoryBuffers.h', 'MemoryAccessCouplings.h', 'perf.py', 'profile.sh'] [output.py at line 200] 
DEBUG: "need to link", self.to_link_in_P =  need to link ['nvtx.h', 'timer.h', 'timermap.h', 'ompnumthreads.h', 'GpuRuntime.h', 'GpuAbstraction.h', 'MemoryAccessHelpers.h', 'MemoryAccessVectors.h', 'MemoryAccessMatrixElements.h', 'MemoryAccessMomenta.h', 'MemoryAccessRandomNumbers.h', 'MemoryAccessWeights.h', 'MemoryAccessAmplitudes.h', 'MemoryAccessWavefunctions.h', 'MemoryAccessGs.h', 'MemoryAccessCouplingsFixed.h', 'MemoryAccessNumerators.h', 'MemoryAccessDenominators.h', 'EventStatistics.h', 'CommonRandomNumbers.h', 'CrossSectionKernels.cc', 'CrossSectionKernels.h', 'MatrixElementKernels.cc', 'MatrixElementKernels.h', 'RamboSamplingKernels.cc', 'RamboSamplingKernels.h', 'RandomNumberKernels.h', 'CommonRandomNumberKernel.cc', 'CurandRandomNumberKernel.cc', 'HiprandRandomNumberKernel.cc', 'Bridge.h', 'BridgeKernels.cc', 'BridgeKernels.h', 'fbridge.cc', 'fbridge.inc', 'fsampler.cc', 'fsampler.inc', 'MadgraphTest.h', 'runTest.cc', 'testmisc.cc', 'testxxx_cc_ref.txt', 'valgrind.h', 'cudacpp.mk', 'testxxx.cc', 'MemoryBuffers.h', 'MemoryAccessCouplings.h', 'perf.py', 'profile.sh'] [output.py at line 200] 
INFO: Creating files in directory /data/avalassi/GPU2023/madgraph4gpuX/MG5aMC/TMPOUT/CODEGEN_cudacpp_ee_mumu/SubProcesses/P1_Sigma_sm_epem_mupmum
FileWriter <class 'PLUGIN.CUDACPP_OUTPUT.model_handling.PLUGIN_CPPWriter'> for /data/avalassi/GPU2023/madgraph4gpuX/MG5aMC/TMPOUT/CODEGEN_cudacpp_ee_mumu/SubProcesses/P1_Sigma_sm_epem_mupmum/./CPPProcess.h
FileWriter <class 'PLUGIN.CUDACPP_OUTPUT.model_handling.PLUGIN_CPPWriter'> for /data/avalassi/GPU2023/madgraph4gpuX/MG5aMC/TMPOUT/CODEGEN_cudacpp_ee_mumu/SubProcesses/P1_Sigma_sm_epem_mupmum/./CPPProcess.cc
Expand All @@ -184,7 +184,7 @@ ALOHA: aloha creates FFV1 routines
ALOHA: aloha creates FFV2 routines
ALOHA: aloha creates FFV4 routines
ALOHA: aloha creates FFV2_4 routines
ALOHA: aloha creates 4 routines in 0.265 s
ALOHA: aloha creates 4 routines in 0.267 s
<class 'aloha.create_aloha.AbstractRoutine'> FFV1
<class 'aloha.create_aloha.AbstractRoutine'> FFV1
<class 'aloha.create_aloha.AbstractRoutine'> FFV2
Expand All @@ -203,7 +203,7 @@ INFO: Created files Parameters_sm.h and Parameters_sm.cc in directory
INFO: /data/avalassi/GPU2023/madgraph4gpuX/MG5aMC/TMPOUT/CODEGEN_cudacpp_ee_mumu/src/. and /data/avalassi/GPU2023/madgraph4gpuX/MG5aMC/TMPOUT/CODEGEN_cudacpp_ee_mumu/src/.
quit

real 0m0.879s
user 0m0.797s
sys 0m0.076s
real 0m0.656s
user 0m0.595s
sys 0m0.056s
Code generation completed in 1 seconds
18 changes: 8 additions & 10 deletions epochX/cudacpp/gg_tt.mad/CODEGEN_mad_gg_tt_log.txt
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ generate g g > t t~
No model currently active, so we import the Standard Model
INFO: load particles
INFO: load vertices
DEBUG: model prefixing takes 0.005348682403564453 
DEBUG: model prefixing takes 0.005664825439453125 
INFO: Restrict model sm with file models/sm/restrict_default.dat .
DEBUG: Simplifying conditional expressions 
DEBUG: remove interactions: u s w+ at order: QED=1 
Expand Down Expand Up @@ -178,7 +178,7 @@ INFO: Generating Helas calls for process: g g > t t~ WEIGHTED<=2 @1
INFO: Processing color information for process: g g > t t~ @1
INFO: Creating files in directory P1_gg_ttx
DEBUG: kwargs[prefix] = 0 [model_handling.py at line 1151] 
DEBUG: process_exporter_cpp =  <PLUGIN.CUDACPP_OUTPUT.model_handling.PLUGIN_OneProcessExporter object at 0x7f0924e2d880> [export_v4.py at line 6261] 
DEBUG: process_exporter_cpp =  <PLUGIN.CUDACPP_OUTPUT.model_handling.PLUGIN_OneProcessExporter object at 0x7fd3a1dad8b0> [export_v4.py at line 6261] 
INFO: Creating files in directory .
FileWriter <class 'PLUGIN.CUDACPP_OUTPUT.model_handling.PLUGIN_CPPWriter'> for ././CPPProcess.h
FileWriter <class 'PLUGIN.CUDACPP_OUTPUT.model_handling.PLUGIN_CPPWriter'> for ././CPPProcess.cc
Expand All @@ -198,16 +198,16 @@ INFO: Finding symmetric diagrams for subprocess group gg_ttx
DEBUG: iconfig_to_diag =  {1: 1, 2: 2, 3: 3} [model_handling.py at line 1543] 
DEBUG: diag_to_iconfig =  {1: 1, 2: 2, 3: 3} [model_handling.py at line 1544] 
Generated helas calls for 1 subprocesses (3 diagrams) in 0.006 s
Wrote files for 10 helas calls in 0.116 s
Wrote files for 10 helas calls in 0.117 s
ALOHA: aloha starts to compute helicity amplitudes
ALOHA: aloha creates VVV1 set of routines with options: P0
ALOHA: aloha creates FFV1 routines
ALOHA: aloha creates 2 routines in 0.144 s
ALOHA: aloha creates 2 routines in 0.147 s
DEBUG: Entering PLUGIN_ProcessExporter.convert_model (create the model) [output.py at line 205] 
ALOHA: aloha starts to compute helicity amplitudes
ALOHA: aloha creates VVV1 set of routines with options: P0
ALOHA: aloha creates FFV1 routines
ALOHA: aloha creates 4 routines in 0.131 s
ALOHA: aloha creates 4 routines in 0.133 s
<class 'aloha.create_aloha.AbstractRoutine'> VVV1
<class 'aloha.create_aloha.AbstractRoutine'> FFV1
<class 'aloha.create_aloha.AbstractRoutine'> FFV1
Expand All @@ -231,8 +231,6 @@ DEBUG: cd /data/avalassi/GPU2023/madgraph4gpuX/MG5aMC/TMPOUT/CODEGEN_mad_gg_tt;
patching file Source/genps.inc
patching file Source/makefile
patching file SubProcesses/makefile
patching file bin/internal/gen_ximprove.py
patching file bin/internal/madevent_interface.py
DEBUG: cd /data/avalassi/GPU2023/madgraph4gpuX/MG5aMC/TMPOUT/CODEGEN_mad_gg_tt/SubProcesses/P1_gg_ttx; patch -p6 -i /data/avalassi/GPU2023/madgraph4gpuX/epochX/cudacpp/CODEGEN/PLUGIN/CUDACPP_SA_OUTPUT/MG5aMC_patches/PROD/patch.P1
patching file auto_dsig1.f
patching file driver.f
Expand All @@ -244,9 +242,9 @@ Type "launch" to generate events from this process, or see
Run "open index.html" to see more information about this process.
quit

real 0m2.001s
user 0m1.648s
sys 0m0.240s
real 0m1.924s
user 0m1.660s
sys 0m0.256s
Code generation completed in 2 seconds
************************************************************
* *
Expand Down
13 changes: 2 additions & 11 deletions epochX/cudacpp/gg_tt.mad/bin/internal/gen_ximprove.py
Original file line number Diff line number Diff line change
Expand Up @@ -391,17 +391,8 @@ def launch(self, to_submit=True, clean=True):
done = True
if not done:
raise Exception('Parsing error in gensym: %s' % stdout)

cudacpp_backend = self.run_card['cudacpp_backend'] # the default value is defined in banner.py
logger.info("Building madevent in madevent_interface.py with '%s' matrix elements"%cudacpp_backend)
cudacpp_supported_backends = [ 'fortran', 'cuda', 'hip', 'cpp', 'cppnone', 'cppsse4', 'cppavx2', 'cpp512y', 'cpp512z', 'cppauto' ]
if cudacpp_backend in cudacpp_supported_backends :
self.cmd.compile(['madevent_' + cudacpp_backend + '_link'], cwd=Pdir)
else:
raise Exception( "Invalid cudacpp_backend='%s': supported backends are %s"%supported_backends )
###logger.info("Building madevent with ALL(FORTRAN/CPP/CUDA) matrix elements (cudacpp_backend=%s)"%cudacpp_backend)
###self.cmd.compile(['all'], cwd=Pdir)


self.cmd.compile(['madevent'], cwd=Pdir)
if to_submit:
self.submit_to_cluster(job_list)
job_list = {}
Expand Down
Loading

0 comments on commit 5502223

Please sign in to comment.