Skip to content

Commit

Permalink
[curand] ** COMPLETE CURAND ** regenerate all processes
Browse files Browse the repository at this point in the history
  • Loading branch information
valassi committed Aug 14, 2024
1 parent c9b90a1 commit 228efbf
Show file tree
Hide file tree
Showing 43 changed files with 823 additions and 382 deletions.
16 changes: 8 additions & 8 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.005379676818847656 
DEBUG: model prefixing takes 0.005307912826538086 
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 1152] 
DEBUG: process_exporter_cpp =  <PLUGIN.CUDACPP_OUTPUT.model_handling.PLUGIN_OneProcessExporter object at 0x7f630143f4c0> [export_v4.py at line 6261] 
DEBUG: process_exporter_cpp =  <PLUGIN.CUDACPP_OUTPUT.model_handling.PLUGIN_OneProcessExporter object at 0x7f09ed66e490> [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,18 +198,18 @@ INFO: Finding symmetric diagrams for subprocess group epem_mupmum
DEBUG: iconfig_to_diag =  {1: 1, 2: 2} [model_handling.py at line 1544] 
DEBUG: diag_to_iconfig =  {1: 1, 2: 2} [model_handling.py at line 1545] 
Generated helas calls for 1 subprocesses (2 diagrams) in 0.004 s
Wrote files for 8 helas calls in 0.114 s
Wrote files for 8 helas calls in 0.112 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.201 s
ALOHA: aloha creates 3 routines in 0.198 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 FFV2_4 routines
ALOHA: aloha creates 7 routines in 0.255 s
ALOHA: aloha creates 7 routines in 0.253 s
<class 'aloha.create_aloha.AbstractRoutine'> FFV1
<class 'aloha.create_aloha.AbstractRoutine'> FFV1
<class 'aloha.create_aloha.AbstractRoutine'> FFV2
Expand Down Expand Up @@ -252,9 +252,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.118s
user 0m1.862s
sys 0m0.242s
real 0m2.067s
user 0m1.807s
sys 0m0.251s
Code generation completed in 2 seconds
************************************************************
* *
Expand Down
39 changes: 30 additions & 9 deletions epochX/cudacpp/ee_mumu.mad/SubProcesses/cudacpp.mk
Original file line number Diff line number Diff line change
Expand Up @@ -116,15 +116,31 @@ override CUDA_HOME = $(patsubst %/bin/nvcc,%,$(shell which nvcc 2>/dev/null))
# Set HIP_HOME from the path to hipcc, if it exists
override HIP_HOME = $(patsubst %/bin/hipcc,%,$(shell which hipcc 2>/dev/null))

# Configure CUDA_INC (for CURAND and NVTX) and NVTX if a CUDA installation exists
# (FIXME? Is there any equivalent of NVTX FOR HIP? What should be configured if both CUDA and HIP are installed?)
ifneq ($(CUDA_HOME),)
USE_NVTX ?=-DUSE_NVTX
CUDA_INC = -I$(CUDA_HOME)/include/
# Configure CUDA_INC (for CURAND and NVTX) and NVTX if a CUDA installation exists (see #965)
ifeq ($(CUDA_HOME),)
# CUDA_HOME is empty (nvcc not found)
override CUDA_INC=
else ifeq ($(wildcard $(CUDA_HOME)/include/),)
# CUDA_HOME is defined (nvcc was found) but $(CUDA_HOME)/include/ does not exist?
override CUDA_INC=
else
CUDA_INC = -I$(CUDA_HOME)/include/
endif
###$(info CUDA_INC=$(CUDA_INC))

# Configure NVTX if a CUDA include directory exists and NVTX headers exist (see #965)
ifeq ($(CUDA_INC),)
# $(CUDA_HOME)/include/ does not exist
override USE_NVTX=
override CUDA_INC=
else ifeq ($(wildcard $(CUDA_HOME)/include/nvtx3/nvToolsExt.h),)
# $(CUDA_HOME)/include/ exists but NVTX headers do not exist?
override USE_NVTX=
else
# $(CUDA_HOME)/include/nvtx.h exists: use NVTX
# (NB: the option to disable NVTX if 'USE_NVTX=' is defined has been removed)
override USE_NVTX=-DUSE_NVTX
endif
###$(info USE_NVTX=$(USE_NVTX))

# NB: NEW LOGIC FOR ENABLING AND DISABLING CUDA OR HIP BUILDS (AV Feb-Mar 2024)
# - In the old implementation, by default the C++ targets for one specific AVX were always built together with either CUDA or HIP.
Expand Down Expand Up @@ -424,13 +440,18 @@ endif
# (NB: allow HASCURAND=hasCurand even if $(GPUCC) does not point to nvcc: assume CUDA_HOME was defined correctly...)
ifeq ($(HASCURAND),)
ifeq ($(GPUCC),) # CPU-only build
ifneq ($(CUDA_HOME),)
ifeq ($(CUDA_INC),)
# $(CUDA_HOME)/include/ does not exist (see #965)
override HASCURAND = hasNoCurand
else ifeq ($(wildcard $(CUDA_HOME)/include/curand.h),)
# $(CUDA_HOME)/include/ exists but CURAND headers do not exist? (see #965)
override HASCURAND = hasNoCurand
else
# By default, assume that curand is installed if a CUDA installation exists
override HASCURAND = hasCurand
else
override HASCURAND = hasNoCurand
endif
else ifeq ($(findstring nvcc,$(GPUCC)),nvcc) # Nvidia GPU build
# By default, assume that curand is installed if a CUDA build is requested
override HASCURAND = hasCurand
else # non-Nvidia GPU build
override HASCURAND = hasNoCurand
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.00564265251159668 
DEBUG: model prefixing takes 0.005346059799194336 
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,13 +177,13 @@ INFO: Creating files in directory /data/avalassi/GPU2023/madgraph4gpuX/MG5aMC/TM
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
INFO: Created files CPPProcess.h and CPPProcess.cc in directory /data/avalassi/GPU2023/madgraph4gpuX/MG5aMC/TMPOUT/CODEGEN_cudacpp_ee_mumu/SubProcesses/P1_Sigma_sm_epem_mupmum/.
Generated helas calls for 1 subprocesses (2 diagrams) in 0.004 s
Generated helas calls for 1 subprocesses (2 diagrams) in 0.003 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 FFV2_4 routines
ALOHA: aloha creates 4 routines in 0.271 s
ALOHA: aloha creates 4 routines in 0.264 s
<class 'aloha.create_aloha.AbstractRoutine'> FFV1
<class 'aloha.create_aloha.AbstractRoutine'> FFV1
<class 'aloha.create_aloha.AbstractRoutine'> FFV2
Expand All @@ -202,7 +202,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.674s
user 0m0.596s
sys 0m0.058s
real 0m0.647s
user 0m0.592s
sys 0m0.048s
Code generation completed in 1 seconds
39 changes: 30 additions & 9 deletions epochX/cudacpp/ee_mumu.sa/SubProcesses/cudacpp.mk
Original file line number Diff line number Diff line change
Expand Up @@ -116,15 +116,31 @@ override CUDA_HOME = $(patsubst %/bin/nvcc,%,$(shell which nvcc 2>/dev/null))
# Set HIP_HOME from the path to hipcc, if it exists
override HIP_HOME = $(patsubst %/bin/hipcc,%,$(shell which hipcc 2>/dev/null))

# Configure CUDA_INC (for CURAND and NVTX) and NVTX if a CUDA installation exists
# (FIXME? Is there any equivalent of NVTX FOR HIP? What should be configured if both CUDA and HIP are installed?)
ifneq ($(CUDA_HOME),)
USE_NVTX ?=-DUSE_NVTX
CUDA_INC = -I$(CUDA_HOME)/include/
# Configure CUDA_INC (for CURAND and NVTX) and NVTX if a CUDA installation exists (see #965)
ifeq ($(CUDA_HOME),)
# CUDA_HOME is empty (nvcc not found)
override CUDA_INC=
else ifeq ($(wildcard $(CUDA_HOME)/include/),)
# CUDA_HOME is defined (nvcc was found) but $(CUDA_HOME)/include/ does not exist?
override CUDA_INC=
else
CUDA_INC = -I$(CUDA_HOME)/include/
endif
###$(info CUDA_INC=$(CUDA_INC))

# Configure NVTX if a CUDA include directory exists and NVTX headers exist (see #965)
ifeq ($(CUDA_INC),)
# $(CUDA_HOME)/include/ does not exist
override USE_NVTX=
override CUDA_INC=
else ifeq ($(wildcard $(CUDA_HOME)/include/nvtx3/nvToolsExt.h),)
# $(CUDA_HOME)/include/ exists but NVTX headers do not exist?
override USE_NVTX=
else
# $(CUDA_HOME)/include/nvtx.h exists: use NVTX
# (NB: the option to disable NVTX if 'USE_NVTX=' is defined has been removed)
override USE_NVTX=-DUSE_NVTX
endif
###$(info USE_NVTX=$(USE_NVTX))

# NB: NEW LOGIC FOR ENABLING AND DISABLING CUDA OR HIP BUILDS (AV Feb-Mar 2024)
# - In the old implementation, by default the C++ targets for one specific AVX were always built together with either CUDA or HIP.
Expand Down Expand Up @@ -424,13 +440,18 @@ endif
# (NB: allow HASCURAND=hasCurand even if $(GPUCC) does not point to nvcc: assume CUDA_HOME was defined correctly...)
ifeq ($(HASCURAND),)
ifeq ($(GPUCC),) # CPU-only build
ifneq ($(CUDA_HOME),)
ifeq ($(CUDA_INC),)
# $(CUDA_HOME)/include/ does not exist (see #965)
override HASCURAND = hasNoCurand
else ifeq ($(wildcard $(CUDA_HOME)/include/curand.h),)
# $(CUDA_HOME)/include/ exists but CURAND headers do not exist? (see #965)
override HASCURAND = hasNoCurand
else
# By default, assume that curand is installed if a CUDA installation exists
override HASCURAND = hasCurand
else
override HASCURAND = hasNoCurand
endif
else ifeq ($(findstring nvcc,$(GPUCC)),nvcc) # Nvidia GPU build
# By default, assume that curand is installed if a CUDA build is requested
override HASCURAND = hasCurand
else # non-Nvidia GPU build
override HASCURAND = hasNoCurand
Expand Down
16 changes: 8 additions & 8 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.005546092987060547 
DEBUG: model prefixing takes 0.005777120590209961 
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 1152] 
DEBUG: process_exporter_cpp =  <PLUGIN.CUDACPP_OUTPUT.model_handling.PLUGIN_OneProcessExporter object at 0x7f16c1385ca0> [export_v4.py at line 6261] 
DEBUG: process_exporter_cpp =  <PLUGIN.CUDACPP_OUTPUT.model_handling.PLUGIN_OneProcessExporter object at 0x7fa5a393fd30> [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,15 +198,15 @@ INFO: Finding symmetric diagrams for subprocess group gg_ttx
DEBUG: iconfig_to_diag =  {1: 1, 2: 2, 3: 3} [model_handling.py at line 1544] 
DEBUG: diag_to_iconfig =  {1: 1, 2: 2, 3: 3} [model_handling.py at line 1545] 
Generated helas calls for 1 subprocesses (3 diagrams) in 0.006 s
Wrote files for 10 helas calls in 0.121 s
Wrote files for 10 helas calls in 0.115 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.146 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 4 routines in 0.133 s
ALOHA: aloha creates 4 routines in 0.132 s
<class 'aloha.create_aloha.AbstractRoutine'> VVV1
<class 'aloha.create_aloha.AbstractRoutine'> FFV1
<class 'aloha.create_aloha.AbstractRoutine'> FFV1
Expand Down Expand Up @@ -241,9 +241,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.353s
user 0m1.682s
sys 0m0.261s
real 0m1.927s
user 0m1.671s
sys 0m0.252s
Code generation completed in 2 seconds
************************************************************
* *
Expand Down
14 changes: 7 additions & 7 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.005394935607910156 
DEBUG: model prefixing takes 0.005595207214355469 
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.009 s
1 processes with 3 diagrams generated in 0.008 s
Total: 1 processes with 3 diagrams
output standalone_cudacpp ../TMPOUT/CODEGEN_cudacpp_gg_tt
Load PLUGIN.CUDACPP_OUTPUT
Expand All @@ -182,7 +182,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.145 s
ALOHA: aloha creates 2 routines in 0.144 s
<class 'aloha.create_aloha.AbstractRoutine'> VVV1
<class 'aloha.create_aloha.AbstractRoutine'> FFV1
<class 'aloha.create_aloha.AbstractRoutine'> FFV1
Expand All @@ -197,7 +197,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.549s
user 0m0.474s
sys 0m0.058s
Code generation completed in 0 seconds
real 0m0.556s
user 0m0.475s
sys 0m0.048s
Code generation completed in 1 seconds
39 changes: 30 additions & 9 deletions epochX/cudacpp/gg_tt.sa/SubProcesses/cudacpp.mk
Original file line number Diff line number Diff line change
Expand Up @@ -116,15 +116,31 @@ override CUDA_HOME = $(patsubst %/bin/nvcc,%,$(shell which nvcc 2>/dev/null))
# Set HIP_HOME from the path to hipcc, if it exists
override HIP_HOME = $(patsubst %/bin/hipcc,%,$(shell which hipcc 2>/dev/null))

# Configure CUDA_INC (for CURAND and NVTX) and NVTX if a CUDA installation exists
# (FIXME? Is there any equivalent of NVTX FOR HIP? What should be configured if both CUDA and HIP are installed?)
ifneq ($(CUDA_HOME),)
USE_NVTX ?=-DUSE_NVTX
CUDA_INC = -I$(CUDA_HOME)/include/
# Configure CUDA_INC (for CURAND and NVTX) and NVTX if a CUDA installation exists (see #965)
ifeq ($(CUDA_HOME),)
# CUDA_HOME is empty (nvcc not found)
override CUDA_INC=
else ifeq ($(wildcard $(CUDA_HOME)/include/),)
# CUDA_HOME is defined (nvcc was found) but $(CUDA_HOME)/include/ does not exist?
override CUDA_INC=
else
CUDA_INC = -I$(CUDA_HOME)/include/
endif
###$(info CUDA_INC=$(CUDA_INC))

# Configure NVTX if a CUDA include directory exists and NVTX headers exist (see #965)
ifeq ($(CUDA_INC),)
# $(CUDA_HOME)/include/ does not exist
override USE_NVTX=
override CUDA_INC=
else ifeq ($(wildcard $(CUDA_HOME)/include/nvtx3/nvToolsExt.h),)
# $(CUDA_HOME)/include/ exists but NVTX headers do not exist?
override USE_NVTX=
else
# $(CUDA_HOME)/include/nvtx.h exists: use NVTX
# (NB: the option to disable NVTX if 'USE_NVTX=' is defined has been removed)
override USE_NVTX=-DUSE_NVTX
endif
###$(info USE_NVTX=$(USE_NVTX))

# NB: NEW LOGIC FOR ENABLING AND DISABLING CUDA OR HIP BUILDS (AV Feb-Mar 2024)
# - In the old implementation, by default the C++ targets for one specific AVX were always built together with either CUDA or HIP.
Expand Down Expand Up @@ -424,13 +440,18 @@ endif
# (NB: allow HASCURAND=hasCurand even if $(GPUCC) does not point to nvcc: assume CUDA_HOME was defined correctly...)
ifeq ($(HASCURAND),)
ifeq ($(GPUCC),) # CPU-only build
ifneq ($(CUDA_HOME),)
ifeq ($(CUDA_INC),)
# $(CUDA_HOME)/include/ does not exist (see #965)
override HASCURAND = hasNoCurand
else ifeq ($(wildcard $(CUDA_HOME)/include/curand.h),)
# $(CUDA_HOME)/include/ exists but CURAND headers do not exist? (see #965)
override HASCURAND = hasNoCurand
else
# By default, assume that curand is installed if a CUDA installation exists
override HASCURAND = hasCurand
else
override HASCURAND = hasNoCurand
endif
else ifeq ($(findstring nvcc,$(GPUCC)),nvcc) # Nvidia GPU build
# By default, assume that curand is installed if a CUDA build is requested
override HASCURAND = hasCurand
else # non-Nvidia GPU build
override HASCURAND = hasNoCurand
Expand Down
Loading

0 comments on commit 228efbf

Please sign in to comment.