Skip to content

Commit

Permalink
[banner] regenerate CODEGEN patch from gg_tt.mad after updating mg5am…
Browse files Browse the repository at this point in the history
…cnlo (functionally equivalent, only line numbers change)

Only the following files are needed to build the patch:
- 1 in patch.common: SubProcesses/makefile
- 2 in patch.P1: driver.f, matrix1.f

./CODEGEN/generateAndCompare.sh gg_tt --mad --nopatch
git diff --no-ext-diff -R gg_tt.mad/SubProcesses/makefile > CODEGEN/PLUGIN/CUDACPP_SA_OUTPUT/MG5aMC_patches/PROD/patch.common
git diff --no-ext-diff -R 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

(Later checked that gg_tt.mad code is regenerated with no changes in c++/fortran - quite a few python changes however)
  • Loading branch information
valassi committed Oct 8, 2024
1 parent a7ef501 commit 1ef55d6
Showing 1 changed file with 9 additions and 9 deletions.
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
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..27a6e4674 100644
index af6d02998..ec5722702 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,13 +74,77 @@ c common/to_colstats/ncols,ncolflow,ncolalt,ic
@@ -76,7 +76,15 @@ c common/to_colstats/ncols,ncolflow,ncolalt,ic

include 'coupl.inc' ! needs VECSIZE_MEMMAX (defined in vector.inc)
INTEGER VECSIZE_USED
Expand All @@ -19,10 +19,10 @@ index 1124a9164..27a6e4674 100644

C-----
C BEGIN CODE
C-----
@@ -84,6 +92,61 @@ C-----
call cpu_time(t_before)
CUMULATED_TIMING = t_before
+
+#ifdef _OPENMP
+ CALL OMPNUMTHREADS_NOT_SET_MEANS_ONE_THREAD()
+#endif
Expand Down Expand Up @@ -81,13 +81,13 @@ index 1124a9164..27a6e4674 100644
c
c Read process number
c
@@ -208,8 +272,33 @@ c call sample_result(xsec,xerr)
@@ -217,9 +280,33 @@ c call sample_result(xsec,xerr)
c write(*,*) 'Final xsec: ',xsec

rewind(lun)
-
close(lun)
+
+#ifdef MG5AMC_MEEXPORTER_CUDACPP
+ CALL FBRIDGEDELETE(FBRIDGE_PBRIDGE) ! this must be at the end as it shuts down the CUDA device
+ IF( FBRIDGE_MODE .LE. -1 ) THEN ! (BothQuiet=-1 or BothDebug=-2)
Expand Down Expand Up @@ -116,7 +116,7 @@ index 1124a9164..27a6e4674 100644
end

c $B$ get_user_params $B$ ! tag for MadWeight
@@ -387,7 +476,7 @@ c
@@ -402,7 +489,7 @@ c
fopened=.false.
tempname=filename
fine=index(tempname,' ')
Expand All @@ -126,7 +126,7 @@ index 1124a9164..27a6e4674 100644
open(unit=lun,file=tempname,status='old',ERR=20)
fopened=.true.
diff --git b/epochX/cudacpp/gg_tt.mad/SubProcesses/P1_gg_ttx/matrix1.f a/epochX/cudacpp/gg_tt.mad/SubProcesses/P1_gg_ttx/matrix1.f
index 1acba8200..069c74ef4 100644
index bf488e4b0..707ea4032 100644
--- b/epochX/cudacpp/gg_tt.mad/SubProcesses/P1_gg_ttx/matrix1.f
+++ a/epochX/cudacpp/gg_tt.mad/SubProcesses/P1_gg_ttx/matrix1.f
@@ -71,7 +71,10 @@ C
Expand All @@ -141,7 +141,7 @@ index 1acba8200..069c74ef4 100644
C
C This is just to temporarily store the reference grid for
C helicity of the DiscreteSampler so as to obtain its number of
@@ -211,6 +214,17 @@ C ----------
@@ -224,6 +227,17 @@ C update.
ENDIF
IF(NTRY(1).EQ.MAXTRIES)THEN
ISHEL=MIN(ISUM_HEL,NGOOD)
Expand Down

0 comments on commit 1ef55d6

Please sign in to comment.