Skip to content

Commit

Permalink
[omp] regenerate all processes: disable OpenMP by default, and enable…
Browse files Browse the repository at this point in the history
… OpenMP only if USEOPENMP=1 (madgraph5#758)
  • Loading branch information
valassi committed Jul 10, 2024
1 parent 318fe88 commit e517ca7
Show file tree
Hide file tree
Showing 43 changed files with 337 additions and 547 deletions.
18 changes: 9 additions & 9 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.0053675174713134766 
DEBUG: model prefixing takes 0.0055866241455078125 
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 0x7f6d5db19760> [export_v4.py at line 6261] 
DEBUG: process_exporter_cpp =  <PLUGIN.CUDACPP_OUTPUT.model_handling.PLUGIN_OneProcessExporter object at 0x7f61e8f92760> [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.112 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.198 s
ALOHA: aloha creates 3 routines in 0.197 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.262 s
ALOHA: aloha creates 7 routines in 0.252 s
<class 'aloha.create_aloha.AbstractRoutine'> FFV1
<class 'aloha.create_aloha.AbstractRoutine'> FFV1
<class 'aloha.create_aloha.AbstractRoutine'> FFV2
Expand Down Expand Up @@ -255,10 +255,10 @@ Type "launch" to generate events from this process, or see
Run "open index.html" to see more information about this process.
quit

real 0m2.114s
user 0m1.793s
sys 0m0.254s
Code generation completed in 2 seconds
real 0m2.805s
user 0m1.790s
sys 0m0.263s
Code generation completed in 3 seconds
************************************************************
* *
* W E L C O M E to *
Expand Down
24 changes: 7 additions & 17 deletions epochX/cudacpp/ee_mumu.mad/SubProcesses/cudacpp.mk
Original file line number Diff line number Diff line change
Expand Up @@ -266,7 +266,7 @@ export GPUSUFFIX

#=== Configure ccache for C++ and CUDA/HIP builds

# Enable ccache if USECCACHE=1
# Enable ccache only if USECCACHE=1
ifeq ($(USECCACHE)$(shell echo $(CXX) | grep ccache),1)
override CXX:=ccache $(CXX)
endif
Expand Down Expand Up @@ -373,22 +373,9 @@ endif

#=== Configure defaults for OMPFLAGS

###OMPFLAGS= # FOR DEBUGGING ONLY (disable OMP)

# To build without OpenMP, you must set externally OMPFLAGS to an empty string (#758)
ifeq ($(origin OMPFLAGS),undefined)
###$(info OMPFLAGS was not set externally: will override it to a default value)
override override_OMPFLAGS=true
else ifeq ($(OMPFLAGS),)
$(info OMPFLAGS was set externally to an empty string: will build without OpenMP)
override override_OMPFLAGS=false
else
###$(info OMPFLAGS was set externally to a non-empty string: will override it to a default value)
override override_OMPFLAGS=true
endif

# Set the default OMPFLAGS choice
ifeq ($(override_OMPFLAGS),true)
# Disable OpenMP by default: enable OpenMP only if USEOPENMP=1 (#758)
ifeq ($(USEOPENMP),1)
###$(info USEOPENMP==1: will build with OpenMP if possible)
ifneq ($(findstring hipcc,$(GPUCC)),)
override OMPFLAGS = # disable OpenMP MT when using hipcc #802
else ifneq ($(shell $(CXX) --version | egrep '^Intel'),)
Expand All @@ -405,6 +392,9 @@ ifeq ($(override_OMPFLAGS),true)
override OMPFLAGS = -fopenmp # enable OpenMP MT by default on all other platforms
###override OMPFLAGS = # disable OpenMP MT on all other platforms (default before #575)
endif
else
###$(info USEOPENMP!=1: will build without OpenMP)
override OMPFLAGS =
endif

#-------------------------------------------------------------------------------
Expand Down
12 changes: 6 additions & 6 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.0060863494873046875 
DEBUG: model prefixing takes 0.005552768707275391 
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 @@ -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.267 s
ALOHA: aloha creates 4 routines in 0.265 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.729s
user 0m0.659s
sys 0m0.062s
Code generation completed in 0 seconds
real 0m0.657s
user 0m0.593s
sys 0m0.054s
Code generation completed in 1 seconds
24 changes: 7 additions & 17 deletions epochX/cudacpp/ee_mumu.sa/SubProcesses/cudacpp.mk
Original file line number Diff line number Diff line change
Expand Up @@ -266,7 +266,7 @@ export GPUSUFFIX

#=== Configure ccache for C++ and CUDA/HIP builds

# Enable ccache if USECCACHE=1
# Enable ccache only if USECCACHE=1
ifeq ($(USECCACHE)$(shell echo $(CXX) | grep ccache),1)
override CXX:=ccache $(CXX)
endif
Expand Down Expand Up @@ -373,22 +373,9 @@ endif

#=== Configure defaults for OMPFLAGS

###OMPFLAGS= # FOR DEBUGGING ONLY (disable OMP)

# To build without OpenMP, you must set externally OMPFLAGS to an empty string (#758)
ifeq ($(origin OMPFLAGS),undefined)
###$(info OMPFLAGS was not set externally: will override it to a default value)
override override_OMPFLAGS=true
else ifeq ($(OMPFLAGS),)
$(info OMPFLAGS was set externally to an empty string: will build without OpenMP)
override override_OMPFLAGS=false
else
###$(info OMPFLAGS was set externally to a non-empty string: will override it to a default value)
override override_OMPFLAGS=true
endif

# Set the default OMPFLAGS choice
ifeq ($(override_OMPFLAGS),true)
# Disable OpenMP by default: enable OpenMP only if USEOPENMP=1 (#758)
ifeq ($(USEOPENMP),1)
###$(info USEOPENMP==1: will build with OpenMP if possible)
ifneq ($(findstring hipcc,$(GPUCC)),)
override OMPFLAGS = # disable OpenMP MT when using hipcc #802
else ifneq ($(shell $(CXX) --version | egrep '^Intel'),)
Expand All @@ -405,6 +392,9 @@ ifeq ($(override_OMPFLAGS),true)
override OMPFLAGS = -fopenmp # enable OpenMP MT by default on all other platforms
###override OMPFLAGS = # disable OpenMP MT on all other platforms (default before #575)
endif
else
###$(info USEOPENMP!=1: will build without OpenMP)
override OMPFLAGS =
endif

#-------------------------------------------------------------------------------
Expand Down
18 changes: 9 additions & 9 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.0055196285247802734 
DEBUG: model prefixing takes 0.0059490203857421875 
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 @@ -155,7 +155,7 @@ INFO: Please specify coupling orders to bypass this step.
INFO: Trying coupling order WEIGHTED<=2: WEIGTHED IS QCD+2*QED
INFO: Trying process: g g > t t~ WEIGHTED<=2 @1
INFO: Process has 3 diagrams
1 processes with 3 diagrams generated in 0.008 s
1 processes with 3 diagrams generated in 0.009 s
Total: 1 processes with 3 diagrams
output madevent_simd ../TMPOUT/CODEGEN_mad_gg_tt --hel_recycling=False --vector_size=32
Load PLUGIN.CUDACPP_OUTPUT
Expand All @@ -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 0x7f7a61bfe880> [export_v4.py at line 6261] 
DEBUG: process_exporter_cpp =  <PLUGIN.CUDACPP_OUTPUT.model_handling.PLUGIN_OneProcessExporter object at 0x7f3e3dc43880> [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.114 s
Wrote files for 10 helas calls in 0.122 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.152 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.133 s
ALOHA: aloha creates 4 routines in 0.130 s
<class 'aloha.create_aloha.AbstractRoutine'> VVV1
<class 'aloha.create_aloha.AbstractRoutine'> FFV1
<class 'aloha.create_aloha.AbstractRoutine'> FFV1
Expand Down Expand Up @@ -244,9 +244,9 @@ Type "launch" to generate events from this process, or see
Run "open index.html" to see more information about this process.
quit

real 0m1.902s
user 0m1.650s
sys 0m0.249s
real 0m1.966s
user 0m1.679s
sys 0m0.267s
Code generation completed in 2 seconds
************************************************************
* *
Expand Down
12 changes: 6 additions & 6 deletions epochX/cudacpp/gg_tt.sa/CODEGEN_cudacpp_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.005663156509399414 
DEBUG: model prefixing takes 0.00550532341003418 
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 @@ -183,7 +183,7 @@ Generated helas calls for 1 subprocesses (3 diagrams) in 0.006 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.142 s
ALOHA: aloha creates 2 routines in 0.143 s
<class 'aloha.create_aloha.AbstractRoutine'> VVV1
<class 'aloha.create_aloha.AbstractRoutine'> FFV1
<class 'aloha.create_aloha.AbstractRoutine'> FFV1
Expand All @@ -198,7 +198,7 @@ INFO: Created files Parameters_sm.h and Parameters_sm.cc in directory
INFO: /data/avalassi/GPU2023/madgraph4gpuX/MG5aMC/TMPOUT/CODEGEN_cudacpp_gg_tt/src/. and /data/avalassi/GPU2023/madgraph4gpuX/MG5aMC/TMPOUT/CODEGEN_cudacpp_gg_tt/src/.
quit

real 0m0.529s
user 0m0.480s
sys 0m0.042s
Code generation completed in 0 seconds
real 0m1.469s
user 0m0.482s
sys 0m0.049s
Code generation completed in 2 seconds
24 changes: 7 additions & 17 deletions epochX/cudacpp/gg_tt.sa/SubProcesses/cudacpp.mk
Original file line number Diff line number Diff line change
Expand Up @@ -266,7 +266,7 @@ export GPUSUFFIX

#=== Configure ccache for C++ and CUDA/HIP builds

# Enable ccache if USECCACHE=1
# Enable ccache only if USECCACHE=1
ifeq ($(USECCACHE)$(shell echo $(CXX) | grep ccache),1)
override CXX:=ccache $(CXX)
endif
Expand Down Expand Up @@ -373,22 +373,9 @@ endif

#=== Configure defaults for OMPFLAGS

###OMPFLAGS= # FOR DEBUGGING ONLY (disable OMP)

# To build without OpenMP, you must set externally OMPFLAGS to an empty string (#758)
ifeq ($(origin OMPFLAGS),undefined)
###$(info OMPFLAGS was not set externally: will override it to a default value)
override override_OMPFLAGS=true
else ifeq ($(OMPFLAGS),)
$(info OMPFLAGS was set externally to an empty string: will build without OpenMP)
override override_OMPFLAGS=false
else
###$(info OMPFLAGS was set externally to a non-empty string: will override it to a default value)
override override_OMPFLAGS=true
endif

# Set the default OMPFLAGS choice
ifeq ($(override_OMPFLAGS),true)
# Disable OpenMP by default: enable OpenMP only if USEOPENMP=1 (#758)
ifeq ($(USEOPENMP),1)
###$(info USEOPENMP==1: will build with OpenMP if possible)
ifneq ($(findstring hipcc,$(GPUCC)),)
override OMPFLAGS = # disable OpenMP MT when using hipcc #802
else ifneq ($(shell $(CXX) --version | egrep '^Intel'),)
Expand All @@ -405,6 +392,9 @@ ifeq ($(override_OMPFLAGS),true)
override OMPFLAGS = -fopenmp # enable OpenMP MT by default on all other platforms
###override OMPFLAGS = # disable OpenMP MT on all other platforms (default before #575)
endif
else
###$(info USEOPENMP!=1: will build without OpenMP)
override OMPFLAGS =
endif

#-------------------------------------------------------------------------------
Expand Down
18 changes: 9 additions & 9 deletions epochX/cudacpp/gg_tt01g.mad/CODEGEN_mad_gg_tt01g_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.0054836273193359375 
DEBUG: model prefixing takes 0.0055751800537109375 
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 @@ -163,7 +163,7 @@ INFO: Please specify coupling orders to bypass this step.
INFO: Trying coupling order WEIGHTED<=3: WEIGTHED IS QCD+2*QED
INFO: Trying process: g g > t t~ g WEIGHTED<=3 @2
INFO: Process has 16 diagrams
1 processes with 16 diagrams generated in 0.020 s
1 processes with 16 diagrams generated in 0.019 s
Total: 2 processes with 19 diagrams
output madevent_simd ../TMPOUT/CODEGEN_mad_gg_tt01g --hel_recycling=False --vector_size=32
Load PLUGIN.CUDACPP_OUTPUT
Expand All @@ -188,7 +188,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 P2_gg_ttxg
DEBUG: kwargs[prefix] = 0 [model_handling.py at line 1151] 
DEBUG: process_exporter_cpp =  <PLUGIN.CUDACPP_OUTPUT.model_handling.PLUGIN_OneProcessExporter object at 0x7fc63ad550a0> [export_v4.py at line 6261] 
DEBUG: process_exporter_cpp =  <PLUGIN.CUDACPP_OUTPUT.model_handling.PLUGIN_OneProcessExporter object at 0x7fee7ba310a0> [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 @@ -209,7 +209,7 @@ INFO: Finding symmetric diagrams for subprocess group gg_ttxg
DEBUG: diag_to_iconfig =  {1: 1, 2: 2, 3: 3, 4: 4, 5: 5, 6: 6, 7: 7, 8: 8, 9: 9, 10: 10, 11: 11, 12: 12, 13: 13, 14: 14, 15: 15} [model_handling.py at line 1544] 
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 0x7fc63aededf0> [export_v4.py at line 6261] 
DEBUG: process_exporter_cpp =  <PLUGIN.CUDACPP_OUTPUT.model_handling.PLUGIN_OneProcessExporter object at 0x7fee7bbbadf0> [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 @@ -229,22 +229,22 @@ 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 2 subprocesses (19 diagrams) in 0.042 s
Wrote files for 46 helas calls in 0.272 s
Wrote files for 46 helas calls in 0.271 s
ALOHA: aloha starts to compute helicity amplitudes
ALOHA: aloha creates VVV1 routines
ALOHA: aloha creates FFV1 routines
ALOHA: aloha creates VVVV1 set of routines with options: P0
ALOHA: aloha creates VVVV3 set of routines with options: P0
ALOHA: aloha creates VVVV4 set of routines with options: P0
ALOHA: aloha creates 5 routines in 0.322 s
ALOHA: aloha creates 5 routines in 0.324 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 routines
ALOHA: aloha creates FFV1 routines
ALOHA: aloha creates VVVV1 set of routines with options: P0
ALOHA: aloha creates VVVV3 set of routines with options: P0
ALOHA: aloha creates VVVV4 set of routines with options: P0
ALOHA: aloha creates 10 routines in 0.314 s
ALOHA: aloha creates 10 routines in 0.311 s
<class 'aloha.create_aloha.AbstractRoutine'> VVV1
<class 'aloha.create_aloha.AbstractRoutine'> VVV1
<class 'aloha.create_aloha.AbstractRoutine'> FFV1
Expand Down Expand Up @@ -294,9 +294,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.851s
real 0m2.653s
user 0m2.329s
sys 0m0.315s
sys 0m0.324s
Code generation completed in 3 seconds
************************************************************
* *
Expand Down
Loading

0 comments on commit e517ca7

Please sign in to comment.