Skip to content

Commit 28c39c8

Browse files
authored
Merge pull request #1074 from Qubitol/1068-cppauto-deduction
Fix cppauto deduction
2 parents 8973282 + 561a809 commit 28c39c8

File tree

62 files changed

+749
-646
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

62 files changed

+749
-646
lines changed

epochX/cudacpp/CODEGEN/PLUGIN/CUDACPP_SA_OUTPUT/MadtRex/makefiles/cudacpp_driver.mk

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ endif
5656

5757
#=== Redefine BACKEND if the current value is 'cppauto'
5858

59-
# Set the default BACKEND choice corresponding to 'cppauto' (the 'best' C++ vectorization available: eventually use native instead?)
59+
# Set the default BACKEND choice corresponding to 'cppauto' (the 'best' C++ vectorization available)
6060
ifeq ($(BACKEND),cppauto)
6161
ifeq ($(UNAME_P),ppc64le)
6262
override BACKEND = cppsse4
@@ -67,13 +67,17 @@ ifeq ($(BACKEND),cppauto)
6767
###$(warning Using BACKEND='$(BACKEND)' because host SIMD features cannot be read from /proc/cpuinfo)
6868
else ifeq ($(shell grep -m1 -c avx512vl /proc/cpuinfo)$(shell $(CXX) --version | grep ^clang),1)
6969
override BACKEND = cpp512y
70-
else
70+
else ifeq ($(shell grep -m1 -c avx2 /proc/cpuinfo),1)
7171
override BACKEND = cppavx2
7272
###ifneq ($(shell grep -m1 -c avx512vl /proc/cpuinfo),1)
7373
### $(warning Using BACKEND='$(BACKEND)' because host does not support avx512vl)
7474
###else
7575
### $(warning Using BACKEND='$(BACKEND)' because this is faster than avx512vl for clang)
7676
###endif
77+
else ifeq ($(shell grep -m1 -c sse4_2 /proc/cpuinfo),1)
78+
override BACKEND = cppsse4
79+
else
80+
override BACKEND = cppnone
7781
endif
7882
$(info BACKEND=$(BACKEND) (was cppauto))
7983
else

epochX/cudacpp/CODEGEN/PLUGIN/CUDACPP_SA_OUTPUT/MadtRex/makefiles/cudacpp_runner.mk

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ endif
5656

5757
#=== Redefine BACKEND if the current value is 'cppauto'
5858

59-
# Set the default BACKEND choice corresponding to 'cppauto' (the 'best' C++ vectorization available: eventually use native instead?)
59+
# Set the default BACKEND choice corresponding to 'cppauto' (the 'best' C++ vectorization available)
6060
ifeq ($(BACKEND),cppauto)
6161
ifeq ($(UNAME_P),ppc64le)
6262
override BACKEND = cppsse4
@@ -67,13 +67,17 @@ ifeq ($(BACKEND),cppauto)
6767
###$(warning Using BACKEND='$(BACKEND)' because host SIMD features cannot be read from /proc/cpuinfo)
6868
else ifeq ($(shell grep -m1 -c avx512vl /proc/cpuinfo)$(shell $(CXX) --version | grep ^clang),1)
6969
override BACKEND = cpp512y
70-
else
70+
else ifeq ($(shell grep -m1 -c avx2 /proc/cpuinfo),1)
7171
override BACKEND = cppavx2
7272
###ifneq ($(shell grep -m1 -c avx512vl /proc/cpuinfo),1)
7373
### $(warning Using BACKEND='$(BACKEND)' because host does not support avx512vl)
7474
###else
7575
### $(warning Using BACKEND='$(BACKEND)' because this is faster than avx512vl for clang)
7676
###endif
77+
else ifeq ($(shell grep -m1 -c sse4_2 /proc/cpuinfo),1)
78+
override BACKEND = cppsse4
79+
else
80+
override BACKEND = cppnone
7781
endif
7882
$(info BACKEND=$(BACKEND) (was cppauto))
7983
else

epochX/cudacpp/CODEGEN/PLUGIN/CUDACPP_SA_OUTPUT/madgraph/iolibs/template_files/gpu/cudacpp.mk

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ endif
5656

5757
#=== Redefine BACKEND if the current value is 'cppauto'
5858

59-
# Set the default BACKEND choice corresponding to 'cppauto' (the 'best' C++ vectorization available: eventually use native instead?)
59+
# Set the default BACKEND choice corresponding to 'cppauto' (the 'best' C++ vectorization available)
6060
ifeq ($(BACKEND),cppauto)
6161
ifeq ($(UNAME_P),ppc64le)
6262
override BACKEND = cppsse4
@@ -67,13 +67,17 @@ ifeq ($(BACKEND),cppauto)
6767
###$(warning Using BACKEND='$(BACKEND)' because host SIMD features cannot be read from /proc/cpuinfo)
6868
else ifeq ($(shell grep -m1 -c avx512vl /proc/cpuinfo)$(shell $(CXX) --version | grep ^clang),1)
6969
override BACKEND = cpp512y
70-
else
70+
else ifeq ($(shell grep -m1 -c avx2 /proc/cpuinfo),1)
7171
override BACKEND = cppavx2
7272
###ifneq ($(shell grep -m1 -c avx512vl /proc/cpuinfo),1)
7373
### $(warning Using BACKEND='$(BACKEND)' because host does not support avx512vl)
7474
###else
7575
### $(warning Using BACKEND='$(BACKEND)' because this is faster than avx512vl for clang)
7676
###endif
77+
else ifeq ($(shell grep -m1 -c sse4_2 /proc/cpuinfo),1)
78+
override BACKEND = cppsse4
79+
else
80+
override BACKEND = cppnone
7781
endif
7882
$(info BACKEND=$(BACKEND) (was cppauto))
7983
else

epochX/cudacpp/ee_mumu.mad/CODEGEN_mad_ee_mumu_log.txt

Lines changed: 27 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ Note that you can still compile and run aMC@NLO with the built-in PDFs
4848

4949
Using default eps viewer "evince". Set another one in ./input/mg5_configuration.txt
5050
Using default web browser "firefox". Set another one in ./input/mg5_configuration.txt
51-
import /home/dmass/Development/madgraph4gpu/release-v1.01.01/MG5aMC/TMPOUT/CODEGEN_mad_ee_mumu.mg
51+
import /home/dmass/Development/madgraph4gpu/1068-cppauto-deduction/MG5aMC/TMPOUT/CODEGEN_mad_ee_mumu.mg
5252
The import format was not given, so we guess it as command
5353
set stdout_level DEBUG
5454
set output information to level: 10
@@ -57,7 +57,7 @@ generate e+ e- > mu+ mu-
5757
No model currently active, so we import the Standard Model
5858
INFO: load particles
5959
INFO: load vertices
60-
DEBUG: model prefixing takes 0.004445075988769531 
60+
DEBUG: model prefixing takes 0.004334926605224609 
6161
INFO: Restrict model sm with file models/sm/restrict_default.dat .
6262
DEBUG: Simplifying conditional expressions 
6363
DEBUG: remove interactions: u s w+ at order: QED=1 
@@ -160,10 +160,10 @@ output madevent_simd ../TMPOUT/CODEGEN_mad_ee_mumu --hel_recycling=False --vecto
160160
INFO: initialize a new directory: CODEGEN_mad_ee_mumu
161161
INFO: remove old information in CODEGEN_mad_ee_mumu
162162
DEBUG: Entering PLUGIN_ProcessExporter.copy_template (initialise the directory) [output.py at line 180] 
163-
WARNING: File exists /home/dmass/Development/madgraph4gpu/release-v1.01.01/MG5aMC/TMPOUT/CODEGEN_mad_ee_mumu 
164-
INFO: Creating subdirectories in directory /home/dmass/Development/madgraph4gpu/release-v1.01.01/MG5aMC/TMPOUT/CODEGEN_mad_ee_mumu
165-
WARNING: File exists /home/dmass/Development/madgraph4gpu/release-v1.01.01/MG5aMC/TMPOUT/CODEGEN_mad_ee_mumu/Cards 
166-
WARNING: File exists /home/dmass/Development/madgraph4gpu/release-v1.01.01/MG5aMC/TMPOUT/CODEGEN_mad_ee_mumu/SubProcesses 
163+
WARNING: File exists /home/dmass/Development/madgraph4gpu/1068-cppauto-deduction/MG5aMC/TMPOUT/CODEGEN_mad_ee_mumu 
164+
INFO: Creating subdirectories in directory /home/dmass/Development/madgraph4gpu/1068-cppauto-deduction/MG5aMC/TMPOUT/CODEGEN_mad_ee_mumu
165+
WARNING: File exists /home/dmass/Development/madgraph4gpu/1068-cppauto-deduction/MG5aMC/TMPOUT/CODEGEN_mad_ee_mumu/Cards 
166+
WARNING: File exists /home/dmass/Development/madgraph4gpu/1068-cppauto-deduction/MG5aMC/TMPOUT/CODEGEN_mad_ee_mumu/SubProcesses 
167167
INFO: Organizing processes into subprocess groups
168168
INFO: Generating Helas calls for process: e+ e- > mu+ mu- WEIGHTED<=4 @1
169169
INFO: Processing color information for process: e+ e- > mu+ mu- @1
@@ -179,18 +179,18 @@ INFO: Finding symmetric diagrams for subprocess group epem_mupmum
179179
DEBUG: iconfig_to_diag =  {1: 1, 2: 2} [model_handling.py at line 1576] 
180180
DEBUG: diag_to_iconfig =  {1: 1, 2: 2} [model_handling.py at line 1577] 
181181
Generated helas calls for 1 subprocesses (2 diagrams) in 0.004 s
182-
Wrote files for 8 helas calls in 0.060 s
182+
Wrote files for 8 helas calls in 0.056 s
183183
ALOHA: aloha starts to compute helicity amplitudes
184184
ALOHA: aloha creates FFV1 routines
185185
ALOHA: aloha creates FFV2 routines
186186
ALOHA: aloha creates FFV4 routines
187-
ALOHA: aloha creates 3 routines in 0.170 s
187+
ALOHA: aloha creates 3 routines in 0.147 s
188188
ALOHA: aloha starts to compute helicity amplitudes
189189
ALOHA: aloha creates FFV1 routines
190190
ALOHA: aloha creates FFV2 routines
191191
ALOHA: aloha creates FFV4 routines
192192
ALOHA: aloha creates FFV2_4 routines
193-
ALOHA: aloha creates 7 routines in 0.184 s
193+
ALOHA: aloha creates 7 routines in 0.209 s
194194
<class 'aloha.create_aloha.AbstractRoutine'> FFV1
195195
<class 'aloha.create_aloha.AbstractRoutine'> FFV1
196196
<class 'aloha.create_aloha.AbstractRoutine'> FFV2
@@ -199,32 +199,32 @@ ALOHA: aloha creates 7 routines in 0.184 s
199199
<class 'aloha.create_aloha.AbstractRoutine'> FFV4
200200
<class 'aloha.create_aloha.AbstractRoutine'> FFV2_4
201201
<class 'aloha.create_aloha.AbstractRoutine'> FFV2_4
202-
FileWriter <class 'MG5aMC_PLUGIN.CUDACPP_OUTPUT.model_handling.PLUGIN_CPPWriter'> for /home/dmass/Development/madgraph4gpu/release-v1.01.01/MG5aMC/TMPOUT/CODEGEN_mad_ee_mumu/src/./HelAmps_sm.h
203-
INFO: Created file HelAmps_sm.h in directory /home/dmass/Development/madgraph4gpu/release-v1.01.01/MG5aMC/TMPOUT/CODEGEN_mad_ee_mumu/src/.
202+
FileWriter <class 'MG5aMC_PLUGIN.CUDACPP_OUTPUT.model_handling.PLUGIN_CPPWriter'> for /home/dmass/Development/madgraph4gpu/1068-cppauto-deduction/MG5aMC/TMPOUT/CODEGEN_mad_ee_mumu/src/./HelAmps_sm.h
203+
INFO: Created file HelAmps_sm.h in directory /home/dmass/Development/madgraph4gpu/1068-cppauto-deduction/MG5aMC/TMPOUT/CODEGEN_mad_ee_mumu/src/.
204204
super_write_set_parameters_onlyfixMajorana (hardcoded=False)
205205
super_write_set_parameters_onlyfixMajorana (hardcoded=True)
206-
FileWriter <class 'MG5aMC_PLUGIN.CUDACPP_OUTPUT.model_handling.PLUGIN_CPPWriter'> for /home/dmass/Development/madgraph4gpu/release-v1.01.01/MG5aMC/TMPOUT/CODEGEN_mad_ee_mumu/src/./Parameters_sm.h
207-
FileWriter <class 'MG5aMC_PLUGIN.CUDACPP_OUTPUT.model_handling.PLUGIN_CPPWriter'> for /home/dmass/Development/madgraph4gpu/release-v1.01.01/MG5aMC/TMPOUT/CODEGEN_mad_ee_mumu/src/./Parameters_sm.cc
206+
FileWriter <class 'MG5aMC_PLUGIN.CUDACPP_OUTPUT.model_handling.PLUGIN_CPPWriter'> for /home/dmass/Development/madgraph4gpu/1068-cppauto-deduction/MG5aMC/TMPOUT/CODEGEN_mad_ee_mumu/src/./Parameters_sm.h
207+
FileWriter <class 'MG5aMC_PLUGIN.CUDACPP_OUTPUT.model_handling.PLUGIN_CPPWriter'> for /home/dmass/Development/madgraph4gpu/1068-cppauto-deduction/MG5aMC/TMPOUT/CODEGEN_mad_ee_mumu/src/./Parameters_sm.cc
208208
INFO: Created files Parameters_sm.h and Parameters_sm.cc in directory
209-
INFO: /home/dmass/Development/madgraph4gpu/release-v1.01.01/MG5aMC/TMPOUT/CODEGEN_mad_ee_mumu/src/. and /home/dmass/Development/madgraph4gpu/release-v1.01.01/MG5aMC/TMPOUT/CODEGEN_mad_ee_mumu/src/.
209+
INFO: /home/dmass/Development/madgraph4gpu/1068-cppauto-deduction/MG5aMC/TMPOUT/CODEGEN_mad_ee_mumu/src/. and /home/dmass/Development/madgraph4gpu/1068-cppauto-deduction/MG5aMC/TMPOUT/CODEGEN_mad_ee_mumu/src/.
210210
The option zerowidth_tchannel is modified [True] but will not be written in the configuration files.
211211
If you want to make this value the default for future session, you can run 'save options --all'
212-
save configuration file to /home/dmass/Development/madgraph4gpu/release-v1.01.01/MG5aMC/TMPOUT/CODEGEN_mad_ee_mumu/Cards/me5_configuration.txt
212+
save configuration file to /home/dmass/Development/madgraph4gpu/1068-cppauto-deduction/MG5aMC/TMPOUT/CODEGEN_mad_ee_mumu/Cards/me5_configuration.txt
213213
INFO: Use Fortran compiler gfortran
214214
INFO: Use c++ compiler g++
215215
INFO: Generate jpeg diagrams
216216
INFO: Generate web pages
217217
DEBUG: result.returncode =  0 [output.py at line 273] 
218-
Output to directory /home/dmass/Development/madgraph4gpu/release-v1.01.01/MG5aMC/TMPOUT/CODEGEN_mad_ee_mumu done.
218+
Output to directory /home/dmass/Development/madgraph4gpu/1068-cppauto-deduction/MG5aMC/TMPOUT/CODEGEN_mad_ee_mumu done.
219219
Type "launch" to generate events from this process, or see
220-
/home/dmass/Development/madgraph4gpu/release-v1.01.01/MG5aMC/TMPOUT/CODEGEN_mad_ee_mumu/README
220+
/home/dmass/Development/madgraph4gpu/1068-cppauto-deduction/MG5aMC/TMPOUT/CODEGEN_mad_ee_mumu/README
221221
Run "open index.html" to see more information about this process.
222222
quit
223223

224-
real 0m2.396s
225-
user 0m1.798s
226-
sys 0m0.425s
227-
Code generation completed in 2 seconds
224+
real 0m2.336s
225+
user 0m1.738s
226+
sys 0m0.448s
227+
Code generation completed in 3 seconds
228228
************************************************************
229229
* *
230230
* W E L C O M E to *
@@ -245,9 +245,9 @@ Code generation completed in 2 seconds
245245
* Type 'help' for in-line help. *
246246
* *
247247
************************************************************
248-
INFO: load configuration from /home/dmass/Development/madgraph4gpu/release-v1.01.01/MG5aMC/TMPOUT/CODEGEN_mad_ee_mumu/Cards/me5_configuration.txt
249-
INFO: load configuration from /home/dmass/Development/madgraph4gpu/release-v1.01.01/MG5aMC/mg5amcnlo/input/mg5_configuration.txt
250-
INFO: load configuration from /home/dmass/Development/madgraph4gpu/release-v1.01.01/MG5aMC/TMPOUT/CODEGEN_mad_ee_mumu/Cards/me5_configuration.txt
248+
INFO: load configuration from /home/dmass/Development/madgraph4gpu/1068-cppauto-deduction/MG5aMC/TMPOUT/CODEGEN_mad_ee_mumu/Cards/me5_configuration.txt
249+
INFO: load configuration from /home/dmass/Development/madgraph4gpu/1068-cppauto-deduction/MG5aMC/mg5amcnlo/input/mg5_configuration.txt
250+
INFO: load configuration from /home/dmass/Development/madgraph4gpu/1068-cppauto-deduction/MG5aMC/TMPOUT/CODEGEN_mad_ee_mumu/Cards/me5_configuration.txt
251251
Using default eps viewer "evince". Set another one in ./input/mg5_configuration.txt
252252
Using default web browser "firefox". Set another one in ./input/mg5_configuration.txt
253253
treatcards run
@@ -274,9 +274,9 @@ launch in debug mode
274274
* Type 'help' for in-line help. *
275275
* *
276276
************************************************************
277-
INFO: load configuration from /home/dmass/Development/madgraph4gpu/release-v1.01.01/MG5aMC/TMPOUT/CODEGEN_mad_ee_mumu/Cards/me5_configuration.txt
278-
INFO: load configuration from /home/dmass/Development/madgraph4gpu/release-v1.01.01/MG5aMC/mg5amcnlo/input/mg5_configuration.txt
279-
INFO: load configuration from /home/dmass/Development/madgraph4gpu/release-v1.01.01/MG5aMC/TMPOUT/CODEGEN_mad_ee_mumu/Cards/me5_configuration.txt
277+
INFO: load configuration from /home/dmass/Development/madgraph4gpu/1068-cppauto-deduction/MG5aMC/TMPOUT/CODEGEN_mad_ee_mumu/Cards/me5_configuration.txt
278+
INFO: load configuration from /home/dmass/Development/madgraph4gpu/1068-cppauto-deduction/MG5aMC/mg5amcnlo/input/mg5_configuration.txt
279+
INFO: load configuration from /home/dmass/Development/madgraph4gpu/1068-cppauto-deduction/MG5aMC/TMPOUT/CODEGEN_mad_ee_mumu/Cards/me5_configuration.txt
280280
Using default eps viewer "evince". Set another one in ./input/mg5_configuration.txt
281281
Using default web browser "firefox". Set another one in ./input/mg5_configuration.txt
282282
treatcards param

epochX/cudacpp/ee_mumu.mad/Cards/me5_configuration.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -235,7 +235,7 @@
235235
# pineappl = pineappl
236236

237237

238-
#mg5_path = /home/dmass/Development/madgraph4gpu/release-v1.01.01/MG5aMC/mg5amcnlo
238+
#mg5_path = /home/dmass/Development/madgraph4gpu/1068-cppauto-deduction/MG5aMC/mg5amcnlo
239239

240240
# MG5 MAIN DIRECTORY
241-
#mg5_path = /home/dmass/Development/madgraph4gpu/release-v1.01.01/MG5aMC/mg5amcnlo
241+
#mg5_path = /home/dmass/Development/madgraph4gpu/1068-cppauto-deduction/MG5aMC/mg5amcnlo

epochX/cudacpp/ee_mumu.mad/SubProcesses/cudacpp.mk

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ endif
5656

5757
#=== Redefine BACKEND if the current value is 'cppauto'
5858

59-
# Set the default BACKEND choice corresponding to 'cppauto' (the 'best' C++ vectorization available: eventually use native instead?)
59+
# Set the default BACKEND choice corresponding to 'cppauto' (the 'best' C++ vectorization available)
6060
ifeq ($(BACKEND),cppauto)
6161
ifeq ($(UNAME_P),ppc64le)
6262
override BACKEND = cppsse4
@@ -67,13 +67,17 @@ ifeq ($(BACKEND),cppauto)
6767
###$(warning Using BACKEND='$(BACKEND)' because host SIMD features cannot be read from /proc/cpuinfo)
6868
else ifeq ($(shell grep -m1 -c avx512vl /proc/cpuinfo)$(shell $(CXX) --version | grep ^clang),1)
6969
override BACKEND = cpp512y
70-
else
70+
else ifeq ($(shell grep -m1 -c avx2 /proc/cpuinfo),1)
7171
override BACKEND = cppavx2
7272
###ifneq ($(shell grep -m1 -c avx512vl /proc/cpuinfo),1)
7373
### $(warning Using BACKEND='$(BACKEND)' because host does not support avx512vl)
7474
###else
7575
### $(warning Using BACKEND='$(BACKEND)' because this is faster than avx512vl for clang)
7676
###endif
77+
else ifeq ($(shell grep -m1 -c sse4_2 /proc/cpuinfo),1)
78+
override BACKEND = cppsse4
79+
else
80+
override BACKEND = cppnone
7781
endif
7882
$(info BACKEND=$(BACKEND) (was cppauto))
7983
else

0 commit comments

Comments
 (0)