Skip to content

Commit

Permalink
[prof] regenerate CODEGEN patch from gg_tt.mad including htuple comme…
Browse files Browse the repository at this point in the history
…nts madgraph5#967 and additional counters

The only files that still need to be patched are
- 4 in patch.common: Source/makefile, Source/genps.inc, Source/dsample.f, SubProcesses/makefile
- 4 in patch.P1: auto_dsig1.f, auto_dsig.f, driver.f, matrix1.f

./CODEGEN/generateAndCompare.sh gg_tt --mad --nopatch
git diff --no-ext-diff -R gg_tt.mad/Source/makefile gg_tt.mad/Source/genps.inc gg_tt.mad/SubProcesses/makefile gg_tt.mad/Source/dsample.f > CODEGEN/PLUGIN/CUDACPP_SA_OUTPUT/MG5aMC_patches/PROD/patch.common
git diff --no-ext-diff -R gg_tt.mad/SubProcesses/P1_gg_ttx/auto_dsig1.f gg_tt.mad/SubProcesses/P1_gg_ttx/auto_dsig.f gg_tt.mad/SubProcesses/P1_gg_ttx/driver.f gg_tt.mad/SubProcesses/P1_gg_ttx/matrix1.f > CODEGEN/PLUGIN/CUDACPP_SA_OUTPUT/MG5aMC_patches/PROD/patch.P1
git checkout gg_tt.mad
  • Loading branch information
valassi committed Aug 19, 2024
1 parent 8335edd commit a882deb
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -241,10 +241,10 @@ index 4fbb8e6ba..77aff307b 100644
END

diff --git b/epochX/cudacpp/gg_tt.mad/SubProcesses/P1_gg_ttx/driver.f a/epochX/cudacpp/gg_tt.mad/SubProcesses/P1_gg_ttx/driver.f
index 1124a9164..447c4168e 100644
index 1124a9164..f205ce6fd 100644
--- b/epochX/cudacpp/gg_tt.mad/SubProcesses/P1_gg_ttx/driver.f
+++ a/epochX/cudacpp/gg_tt.mad/SubProcesses/P1_gg_ttx/driver.f
@@ -74,16 +74,94 @@ c common/to_colstats/ncols,ncolflow,ncolalt,ic
@@ -74,16 +74,95 @@ c common/to_colstats/ncols,ncolflow,ncolalt,ic

include 'coupl.inc' ! needs VECSIZE_MEMMAX (defined in vector.inc)
INTEGER VECSIZE_USED
Expand All @@ -271,7 +271,7 @@ index 1124a9164..447c4168e 100644
+ CALL COUNTERS_INITIALISE()
+c Use null-terminated C-string in COUNTERS_REGISTER_COUNTER calls (maybe it is not needed, but it does not harm)
+ CALL COUNTERS_REGISTER_COUNTER( 1, 'Fortran Initialise(I/O)'//char(0) )
+ CALL COUNTERS_REGISTER_COUNTER( 3, 'Fortran Random2Momenta'//char(0) )
+ CALL COUNTERS_REGISTER_COUNTER( 3, 'Fortran PhaseSpaceSampling'//char(0) ) ! uniform [0,1] + vegas to [0,1] + map to momenta
+ CALL COUNTERS_REGISTER_COUNTER( 4, 'Fortran PDFs'//char(0) )
+ CALL COUNTERS_REGISTER_COUNTER( 5, 'Fortran UpdateScaleCouplings'//char(0) )
+ CALL COUNTERS_REGISTER_COUNTER( 6, 'Fortran Reweight'//char(0) )
Expand All @@ -281,6 +281,7 @@ index 1124a9164..447c4168e 100644
+ CALL COUNTERS_REGISTER_COUNTER( 11, 'CudaCpp Initialise'//char(0) )
+ CALL COUNTERS_REGISTER_COUNTER( 12, 'CudaCpp Finalise'//char(0) )
+ CALL COUNTERS_REGISTER_COUNTER( 19, 'CudaCpp MEs'//char(0) )
+c CALL COUNTERS_REGISTER_COUNTER( 21, 'TEST SampleGetX'//char(0) )
+#ifdef MG5AMC_MEEXPORTER_CUDACPP
+ fbridge_mode = 1 ! CppOnly=1, default for CUDACPP
+#else
Expand Down Expand Up @@ -340,15 +341,15 @@ index 1124a9164..447c4168e 100644
call open_file(lun+1, 'dname.mg', fopened)
if (.not.fopened)then
goto 11
@@ -154,6 +232,7 @@ c If CKKW-type matching, read IS Sudakov grid
@@ -154,6 +233,7 @@ c If CKKW-type matching, read IS Sudakov grid
print *,'Running CKKW as lower mult sample'
endif
endif
+ CALL COUNTERS_STOP_COUNTER( 1 ) ! FortranInitialise=1

c
c Get user input
@@ -208,8 +287,35 @@ c call sample_result(xsec,xerr)
@@ -208,8 +288,35 @@ c call sample_result(xsec,xerr)
c write(*,*) 'Final xsec: ',xsec

rewind(lun)
Expand Down Expand Up @@ -385,7 +386,7 @@ index 1124a9164..447c4168e 100644
end

c $B$ get_user_params $B$ ! tag for MadWeight
@@ -387,7 +493,7 @@ c
@@ -387,7 +494,7 @@ c
fopened=.false.
tempname=filename
fine=index(tempname,' ')
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
diff --git b/epochX/cudacpp/gg_tt.mad/Source/dsample.f a/epochX/cudacpp/gg_tt.mad/Source/dsample.f
index e18ba7c03..a5e066edc 100644
index e18ba7c03..7f37cd083 100644
--- b/epochX/cudacpp/gg_tt.mad/Source/dsample.f
+++ a/epochX/cudacpp/gg_tt.mad/Source/dsample.f
@@ -169,7 +169,9 @@ c
Expand Down Expand Up @@ -58,6 +58,15 @@ index e18ba7c03..a5e066edc 100644
else
nzoom = nzoom -1
ievent=ievent-1
@@ -727,7 +737,7 @@ c
common/read_grid_file/read_grid_file

data use_cut/2/ !Grid: 0=fixed , 1=standard, 2=non-zero
- data ituple/1/ !1=htuple, 2=sobel
+ data ituple/1/ !1=ntuple(ranmar or htuple), 2=sobel
data Minvar(1,1)/-1/ !No special variable mapping

c-----
diff --git b/epochX/cudacpp/gg_tt.mad/Source/genps.inc a/epochX/cudacpp/gg_tt.mad/Source/genps.inc
index a59181c70..af7e0efbc 100644
--- b/epochX/cudacpp/gg_tt.mad/Source/genps.inc
Expand Down

0 comments on commit a882deb

Please sign in to comment.