Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -163,8 +163,6 @@ ifeq ($(findstring nvcc,$(CUDA_COMPILER_PATH)),nvcc)
override CUINC=
override CURANDLIBFLAGS=
endif
export GPUCC
export GPUFLAGS

# Set the host C++ compiler for GPUCC via "-ccbin <host-compiler>"
# (NB issue #505: this must be a single word, "clang++ --gcc-toolchain..." is not supported)
Expand Down Expand Up @@ -215,6 +213,8 @@ else ifeq ($(findstring hipcc,$(HIP_COMPILER_PATH)),hipcc)
CUBUILDRULEFLAGS = -fPIC -c
CCBUILDRULEFLAGS = -fPIC -c

export HIPARCHFLAGS

else ifneq ($(origin REQUIRE_HIP),undefined)
# If REQUIRE_HIP is set but no cuda is found, stop here (e.g. for CI tests on GPU #443)
$(error No hip installation found (set HIP_HOME or make GPUCC visible in PATH))
Expand All @@ -234,6 +234,9 @@ else ifeq ($(findstring hipcc,$(HIP_COMPILER_PATH)),hipcc)

endif

export GPUCC
export GPUFLAGS

#-------------------------------------------------------------------------------

#=== Configure ccache for C++ and CUDA builds
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ SHELL := /bin/bash
#=== Configure common compiler flags for CUDA and C++

INCFLAGS = -I.
OPTFLAGS = -O3 # this ends up in CUFLAGS too (should it?), cannot add -Ofast or -ffast-math here
OPTFLAGS = -O3 # this ends up in GPUFLAGS too (should it?), cannot add -Ofast or -ffast-math here

#-------------------------------------------------------------------------------

Expand Down Expand Up @@ -85,6 +85,13 @@ endif
###$(info OMPFLAGS=$(OMPFLAGS))
CXXFLAGS += $(OMPFLAGS)

# Add correct -DHIP_LATFORM when compiling for HIP
ifeq ($(findstring nvcc,$(GPUCC)),nvcc)
GPUFLAGS += -Xcompiler -fPIC -c -x cu
else ifeq ($(findstring hipcc,$(GPUCC)),hipcc)
GPUFLAGS += $(HIPARCHFLAGS) -DHIP_PLATFORM=amd -fPIC -c
endif

# Set the build flags appropriate to each AVX choice (example: "make AVX=none")
# [NB MGONGPU_PVW512 is needed because "-mprefer-vector-width=256" is not exposed in a macro]
# [See https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96476]
Expand Down Expand Up @@ -246,7 +253,7 @@ $(BUILDDIR)/%%.o : %%.cc *.h $(BUILDDIR)/.build.$(TAG)
# Generic target and build rules: objects from CUDA compilation
$(BUILDDIR)/%%_cu.o : %%.cc *.h $(BUILDDIR)/.build.$(TAG)
@if [ ! -d $(BUILDDIR) ]; then echo "mkdir -p $(BUILDDIR)"; mkdir -p $(BUILDDIR); fi
$(GPUCC) $(CPPFLAGS) $(CUFLAGS) -Xcompiler -fPIC -c -x cu $< -o $@
$(GPUCC) $(CPPFLAGS) $(GPUFLAGS) $< -o $@

#-------------------------------------------------------------------------------

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ namespace mg5amcCpu
inline __host__ std::ostream&
operator<<( std::ostream& out, const cxsmpl<FP>& c )
{
out << std::complex( c.real(), c.imag() );
out << std::complex<FP>( c.real(), c.imag() );
return out;
}

Expand Down
12 changes: 6 additions & 6 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.0032465457916259766 
DEBUG: model prefixing takes 0.0034666061401367188 
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 @@ -176,7 +176,7 @@ INFO: Creating files in directory P1_epem_mupmum
DEBUG: Entering PLUGIN_OneProcessExporter.__init__ [model_handling.py at line 1039] 
DEBUG: kwargs[prefix] = 0 [model_handling.py at line 1040] 
DEBUG: proc_id =  1 [model_handling.py at line 1045] 
DEBUG: process_exporter_cpp =  <PLUGIN.CUDACPP_SA_OUTPUT.model_handling.PLUGIN_OneProcessExporter object at 0x7f983ab093d0> [export_v4.py at line 6174] 
DEBUG: process_exporter_cpp =  <PLUGIN.CUDACPP_SA_OUTPUT.model_handling.PLUGIN_OneProcessExporter object at 0x7fa8b93883d0> [export_v4.py at line 6174] 
INFO: Creating files in directory .
DEBUG: Entering PLUGIN_OneProcessExporter.generate_process_files [model_handling.py at line 1297] 
DEBUG: self.include_multi_channel is already defined: this is madevent+second_exporter mode [model_handling.py at line 1299] 
Expand Down Expand Up @@ -210,7 +210,7 @@ INFO: Created files CPPProcess.h and CPPProcess.cc in directory ./.
INFO: Generating Feynman diagrams for Process: e+ e- > mu+ mu- WEIGHTED<=4 @1
INFO: Finding symmetric diagrams for subprocess group epem_mupmum
Generated helas calls for 1 subprocesses (2 diagrams) in 0.003 s
Wrote files for 8 helas calls in 0.202 s
Wrote files for 8 helas calls in 0.214 s
ALOHA: aloha starts to compute helicity amplitudes
ALOHA: aloha creates FFV1 routines
ALOHA: aloha creates FFV2 routines
Expand Down Expand Up @@ -254,6 +254,6 @@ Type "launch" to generate events from this process, or see
Run "open index.html" to see more information about this process.
quit

real 0m4.503s
user 0m1.166s
sys 0m1.531s
real 0m5.476s
user 0m1.181s
sys 0m1.503s
7 changes: 5 additions & 2 deletions epochX/cudacpp/ee_mumu.mad/SubProcesses/cudacpp.mk
Original file line number Diff line number Diff line change
Expand Up @@ -163,8 +163,6 @@ ifeq ($(findstring nvcc,$(CUDA_COMPILER_PATH)),nvcc)
override CUINC=
override CURANDLIBFLAGS=
endif
export GPUCC
export GPUFLAGS

# Set the host C++ compiler for GPUCC via "-ccbin <host-compiler>"
# (NB issue #505: this must be a single word, "clang++ --gcc-toolchain..." is not supported)
Expand Down Expand Up @@ -215,6 +213,8 @@ else ifeq ($(findstring hipcc,$(HIP_COMPILER_PATH)),hipcc)
CUBUILDRULEFLAGS = -fPIC -c
CCBUILDRULEFLAGS = -fPIC -c

export HIPARCHFLAGS

else ifneq ($(origin REQUIRE_HIP),undefined)
# If REQUIRE_HIP is set but no cuda is found, stop here (e.g. for CI tests on GPU #443)
$(error No hip installation found (set HIP_HOME or make GPUCC visible in PATH))
Expand All @@ -234,6 +234,9 @@ else ifeq ($(findstring hipcc,$(HIP_COMPILER_PATH)),hipcc)

endif

export GPUCC
export GPUFLAGS

#-------------------------------------------------------------------------------

#=== Configure ccache for C++ and CUDA builds
Expand Down
11 changes: 9 additions & 2 deletions epochX/cudacpp/ee_mumu.mad/src/cudacpp_src.mk
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ SHELL := /bin/bash
#=== Configure common compiler flags for CUDA and C++

INCFLAGS = -I.
OPTFLAGS = -O3 # this ends up in CUFLAGS too (should it?), cannot add -Ofast or -ffast-math here
OPTFLAGS = -O3 # this ends up in GPUFLAGS too (should it?), cannot add -Ofast or -ffast-math here

#-------------------------------------------------------------------------------

Expand Down Expand Up @@ -85,6 +85,13 @@ endif
###$(info OMPFLAGS=$(OMPFLAGS))
CXXFLAGS += $(OMPFLAGS)

# Add correct -DHIP_LATFORM when compiling for HIP
ifeq ($(findstring nvcc,$(GPUCC)),nvcc)
GPUFLAGS += -Xcompiler -fPIC -c -x cu
else ifeq ($(findstring hipcc,$(GPUCC)),hipcc)
GPUFLAGS += $(HIPARCHFLAGS) -DHIP_PLATFORM=amd -fPIC -c
endif

# Set the build flags appropriate to each AVX choice (example: "make AVX=none")
# [NB MGONGPU_PVW512 is needed because "-mprefer-vector-width=256" is not exposed in a macro]
# [See https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96476]
Expand Down Expand Up @@ -246,7 +253,7 @@ $(BUILDDIR)/%.o : %.cc *.h $(BUILDDIR)/.build.$(TAG)
# Generic target and build rules: objects from CUDA compilation
$(BUILDDIR)/%_cu.o : %.cc *.h $(BUILDDIR)/.build.$(TAG)
@if [ ! -d $(BUILDDIR) ]; then echo "mkdir -p $(BUILDDIR)"; mkdir -p $(BUILDDIR); fi
$(GPUCC) $(CPPFLAGS) $(CUFLAGS) -Xcompiler -fPIC -c -x cu $< -o $@
$(GPUCC) $(CPPFLAGS) $(GPUFLAGS) $< -o $@

#-------------------------------------------------------------------------------

Expand Down
2 changes: 1 addition & 1 deletion epochX/cudacpp/ee_mumu.mad/src/mgOnGpuCxtypes.h
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ namespace mg5amcCpu
inline __host__ std::ostream&
operator<<( std::ostream& out, const cxsmpl<FP>& c )
{
out << std::complex( c.real(), c.imag() );
out << std::complex<FP>( c.real(), c.imag() );
return out;
}

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.0036804676055908203 
DEBUG: model prefixing takes 0.003462553024291992 
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.004 s
1 processes with 2 diagrams generated in 0.003 s
Total: 1 processes with 2 diagrams
output standalone_cudacpp CODEGEN_cudacpp_ee_mumu
Load PLUGIN.CUDACPP_SA_OUTPUT
Expand Down Expand Up @@ -202,7 +202,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.215 s
ALOHA: aloha creates 4 routines in 0.191 s
<class 'aloha.create_aloha.AbstractRoutine'> FFV1
<class 'aloha.create_aloha.AbstractRoutine'> FFV1
<class 'aloha.create_aloha.AbstractRoutine'> FFV2
Expand All @@ -225,6 +225,6 @@ INFO: /afs/cern.ch/work/j/jteig/mg5amcnlo/CODEGEN_cudacpp_ee_mumu/src/. and /afs
DEBUG: Entering PLUGIN_ProcessExporter.finalize [output.py at line 203] 
quit

real 0m0.899s
user 0m0.522s
sys 0m0.169s
real 0m0.940s
user 0m0.430s
sys 0m0.166s
7 changes: 5 additions & 2 deletions epochX/cudacpp/ee_mumu.sa/SubProcesses/cudacpp.mk
Original file line number Diff line number Diff line change
Expand Up @@ -163,8 +163,6 @@ ifeq ($(findstring nvcc,$(CUDA_COMPILER_PATH)),nvcc)
override CUINC=
override CURANDLIBFLAGS=
endif
export GPUCC
export GPUFLAGS

# Set the host C++ compiler for GPUCC via "-ccbin <host-compiler>"
# (NB issue #505: this must be a single word, "clang++ --gcc-toolchain..." is not supported)
Expand Down Expand Up @@ -215,6 +213,8 @@ else ifeq ($(findstring hipcc,$(HIP_COMPILER_PATH)),hipcc)
CUBUILDRULEFLAGS = -fPIC -c
CCBUILDRULEFLAGS = -fPIC -c

export HIPARCHFLAGS

else ifneq ($(origin REQUIRE_HIP),undefined)
# If REQUIRE_HIP is set but no cuda is found, stop here (e.g. for CI tests on GPU #443)
$(error No hip installation found (set HIP_HOME or make GPUCC visible in PATH))
Expand All @@ -234,6 +234,9 @@ else ifeq ($(findstring hipcc,$(HIP_COMPILER_PATH)),hipcc)

endif

export GPUCC
export GPUFLAGS

#-------------------------------------------------------------------------------

#=== Configure ccache for C++ and CUDA builds
Expand Down
11 changes: 9 additions & 2 deletions epochX/cudacpp/ee_mumu.sa/src/cudacpp_src.mk
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ SHELL := /bin/bash
#=== Configure common compiler flags for CUDA and C++

INCFLAGS = -I.
OPTFLAGS = -O3 # this ends up in CUFLAGS too (should it?), cannot add -Ofast or -ffast-math here
OPTFLAGS = -O3 # this ends up in GPUFLAGS too (should it?), cannot add -Ofast or -ffast-math here

#-------------------------------------------------------------------------------

Expand Down Expand Up @@ -85,6 +85,13 @@ endif
###$(info OMPFLAGS=$(OMPFLAGS))
CXXFLAGS += $(OMPFLAGS)

# Add correct -DHIP_LATFORM when compiling for HIP
ifeq ($(findstring nvcc,$(GPUCC)),nvcc)
GPUFLAGS += -Xcompiler -fPIC -c -x cu
else ifeq ($(findstring hipcc,$(GPUCC)),hipcc)
GPUFLAGS += $(HIPARCHFLAGS) -DHIP_PLATFORM=amd -fPIC -c
endif

# Set the build flags appropriate to each AVX choice (example: "make AVX=none")
# [NB MGONGPU_PVW512 is needed because "-mprefer-vector-width=256" is not exposed in a macro]
# [See https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96476]
Expand Down Expand Up @@ -246,7 +253,7 @@ $(BUILDDIR)/%.o : %.cc *.h $(BUILDDIR)/.build.$(TAG)
# Generic target and build rules: objects from CUDA compilation
$(BUILDDIR)/%_cu.o : %.cc *.h $(BUILDDIR)/.build.$(TAG)
@if [ ! -d $(BUILDDIR) ]; then echo "mkdir -p $(BUILDDIR)"; mkdir -p $(BUILDDIR); fi
$(GPUCC) $(CPPFLAGS) $(CUFLAGS) -Xcompiler -fPIC -c -x cu $< -o $@
$(GPUCC) $(CPPFLAGS) $(GPUFLAGS) $< -o $@

#-------------------------------------------------------------------------------

Expand Down
2 changes: 1 addition & 1 deletion epochX/cudacpp/ee_mumu.sa/src/mgOnGpuCxtypes.h
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ namespace mg5amcCpu
inline __host__ std::ostream&
operator<<( std::ostream& out, const cxsmpl<FP>& c )
{
out << std::complex( c.real(), c.imag() );
out << std::complex<FP>( c.real(), c.imag() );
return out;
}

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.003694295883178711 
DEBUG: model prefixing takes 0.003400087356567383 
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: Creating files in directory P1_gg_ttx
DEBUG: Entering PLUGIN_OneProcessExporter.__init__ [model_handling.py at line 1039] 
DEBUG: kwargs[prefix] = 0 [model_handling.py at line 1040] 
DEBUG: proc_id =  1 [model_handling.py at line 1045] 
DEBUG: process_exporter_cpp =  <PLUGIN.CUDACPP_SA_OUTPUT.model_handling.PLUGIN_OneProcessExporter object at 0x7f11940656a0> [export_v4.py at line 6174] 
DEBUG: process_exporter_cpp =  <PLUGIN.CUDACPP_SA_OUTPUT.model_handling.PLUGIN_OneProcessExporter object at 0x7f9ac2b576a0> [export_v4.py at line 6174] 
INFO: Creating files in directory .
DEBUG: Entering PLUGIN_OneProcessExporter.generate_process_files [model_handling.py at line 1297] 
DEBUG: self.include_multi_channel is already defined: this is madevent+second_exporter mode [model_handling.py at line 1299] 
Expand Down Expand Up @@ -213,17 +213,17 @@ INFO: Created files CPPProcess.h and CPPProcess.cc in directory ./.
DEBUG: Done [export_cpp.py at line 713] 
INFO: Generating Feynman diagrams for Process: g g > t t~ WEIGHTED<=2 @1
INFO: Finding symmetric diagrams for subprocess group gg_ttx
Generated helas calls for 1 subprocesses (3 diagrams) in 0.006 s
Wrote files for 10 helas calls in 0.231 s
Generated helas calls for 1 subprocesses (3 diagrams) in 0.005 s
Wrote files for 10 helas calls in 0.318 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.122 s
ALOHA: aloha creates 2 routines in 0.116 s
DEBUG: Entering PLUGIN_ProcessExporter.convert_model (create the model) [output.py at line 194] 
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.096 s
ALOHA: aloha creates 4 routines in 0.089 s
<class 'aloha.create_aloha.AbstractRoutine'> VVV1
<class 'aloha.create_aloha.AbstractRoutine'> FFV1
<class 'aloha.create_aloha.AbstractRoutine'> FFV1
Expand Down Expand Up @@ -254,6 +254,6 @@ Type "launch" to generate events from this process, or see
Run "open index.html" to see more information about this process.
quit

real 0m4.821s
user 0m1.257s
sys 0m1.715s
real 0m5.392s
user 0m1.094s
sys 0m1.559s
7 changes: 5 additions & 2 deletions epochX/cudacpp/gg_tt.mad/SubProcesses/cudacpp.mk
Original file line number Diff line number Diff line change
Expand Up @@ -163,8 +163,6 @@ ifeq ($(findstring nvcc,$(CUDA_COMPILER_PATH)),nvcc)
override CUINC=
override CURANDLIBFLAGS=
endif
export GPUCC
export GPUFLAGS

# Set the host C++ compiler for GPUCC via "-ccbin <host-compiler>"
# (NB issue #505: this must be a single word, "clang++ --gcc-toolchain..." is not supported)
Expand Down Expand Up @@ -215,6 +213,8 @@ else ifeq ($(findstring hipcc,$(HIP_COMPILER_PATH)),hipcc)
CUBUILDRULEFLAGS = -fPIC -c
CCBUILDRULEFLAGS = -fPIC -c

export HIPARCHFLAGS

else ifneq ($(origin REQUIRE_HIP),undefined)
# If REQUIRE_HIP is set but no cuda is found, stop here (e.g. for CI tests on GPU #443)
$(error No hip installation found (set HIP_HOME or make GPUCC visible in PATH))
Expand All @@ -234,6 +234,9 @@ else ifeq ($(findstring hipcc,$(HIP_COMPILER_PATH)),hipcc)

endif

export GPUCC
export GPUFLAGS

#-------------------------------------------------------------------------------

#=== Configure ccache for C++ and CUDA builds
Expand Down
11 changes: 9 additions & 2 deletions epochX/cudacpp/gg_tt.mad/src/cudacpp_src.mk
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ SHELL := /bin/bash
#=== Configure common compiler flags for CUDA and C++

INCFLAGS = -I.
OPTFLAGS = -O3 # this ends up in CUFLAGS too (should it?), cannot add -Ofast or -ffast-math here
OPTFLAGS = -O3 # this ends up in GPUFLAGS too (should it?), cannot add -Ofast or -ffast-math here

#-------------------------------------------------------------------------------

Expand Down Expand Up @@ -85,6 +85,13 @@ endif
###$(info OMPFLAGS=$(OMPFLAGS))
CXXFLAGS += $(OMPFLAGS)

# Add correct -DHIP_LATFORM when compiling for HIP
ifeq ($(findstring nvcc,$(GPUCC)),nvcc)
GPUFLAGS += -Xcompiler -fPIC -c -x cu
else ifeq ($(findstring hipcc,$(GPUCC)),hipcc)
GPUFLAGS += $(HIPARCHFLAGS) -DHIP_PLATFORM=amd -fPIC -c
endif

# Set the build flags appropriate to each AVX choice (example: "make AVX=none")
# [NB MGONGPU_PVW512 is needed because "-mprefer-vector-width=256" is not exposed in a macro]
# [See https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96476]
Expand Down Expand Up @@ -246,7 +253,7 @@ $(BUILDDIR)/%.o : %.cc *.h $(BUILDDIR)/.build.$(TAG)
# Generic target and build rules: objects from CUDA compilation
$(BUILDDIR)/%_cu.o : %.cc *.h $(BUILDDIR)/.build.$(TAG)
@if [ ! -d $(BUILDDIR) ]; then echo "mkdir -p $(BUILDDIR)"; mkdir -p $(BUILDDIR); fi
$(GPUCC) $(CPPFLAGS) $(CUFLAGS) -Xcompiler -fPIC -c -x cu $< -o $@
$(GPUCC) $(CPPFLAGS) $(GPUFLAGS) $< -o $@

#-------------------------------------------------------------------------------

Expand Down
2 changes: 1 addition & 1 deletion epochX/cudacpp/gg_tt.mad/src/mgOnGpuCxtypes.h
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ namespace mg5amcCpu
inline __host__ std::ostream&
operator<<( std::ostream& out, const cxsmpl<FP>& c )
{
out << std::complex( c.real(), c.imag() );
out << std::complex<FP>( c.real(), c.imag() );
return out;
}

Expand Down
Loading