Skip to content
Merged
Show file tree
Hide file tree
Changes from 32 commits
Commits
Show all changes
39 commits
Select commit Hold shift + click to select a range
a826259
fix patch to be compatible with mg5 branch gpucpp_goodhel
oliviermattelaer Aug 6, 2024
76ba27a
change mg5amc version to use
oliviermattelaer Aug 6, 2024
df130b0
temporary fix to set limhel to 0 for cudacpp
oliviermattelaer Aug 6, 2024
b304cc9
fixing a patch that was relying on imirror
oliviermattelaer Aug 6, 2024
c448e89
random test
oliviermattelaer Aug 6, 2024
763479d
[goodhel] regenerate gg_tt.mad using the current CODEGEN from upstrea…
valassi Sep 2, 2024
b986a82
[goodhel] regenerate gg_tt.sa just as a cross check: the only change …
valassi Sep 2, 2024
a08d91f
[goodhel] update MG5AMC from ffb7a2e01 (gpucpp_goodhel) to 0c754d6d8 …
valassi Sep 2, 2024
d582f6c
[goodhel] move to upstream/master codegen logs of gg_tt for easier me…
valassi Sep 2, 2024
002dee8
Merge remote-tracking branch 'upstream/master' into goodhel
valassi Sep 2, 2024
2cd6764
[goodhel] regenerate gg_tt.mad - check all is ok, no change
valassi Sep 2, 2024
d42666d
[goodhel] regenerate CODEGEN patch from gg_tt.mad (note that genps.in…
valassi Sep 2, 2024
ae6652c
[goodhel] regenerate gg_tt.mad - add to the repo couplings3.f and PDF…
valassi Sep 2, 2024
94f9f9b
[goodhel] rerun tmad ggtt test - all ok (even if now reset_cumulative…
valassi Sep 2, 2024
016433b
[goodhel] regenerate all processes - erase them and add them from scr…
valassi Sep 2, 2024
48fa9bf
[goodhel] rerun 102 tput tests on itscrd90 - all ok
valassi Sep 2, 2024
4c35b61
[goodhel] ** COMPLETE GOODHEL ** rerun 30 tmad tests on itscrd90 - al…
valassi Sep 2, 2024
fc8ddb9
[goodhel+june24] update MG5AMC from 0c754d6d8 (valassi_goodhel) to 29…
valassi Sep 3, 2024
c175637
[goodhel+june24] move to CODEGEN logs from the latest upstream/master…
valassi Sep 3, 2024
585f94b
[goodhel+june24] move to tput and tmad logs from the latest upstream/…
valassi Sep 3, 2024
f2f3fc2
[goodhel+june24] move to generated processes (except gg_tt.mad) from …
valassi Sep 3, 2024
b2b268a
Merge remote-tracking branch 'upstream/master' (including june24 #822…
valassi Sep 3, 2024
573e366
[goodhel+june24] regenerate CODEGEN patch from gg_tt.mad (this will p…
valassi Sep 3, 2024
2d1ddd3
[goodhel+june24] manually remove some sections from CODEGEN patch.P1
valassi Sep 3, 2024
be22055
[goodhel+june24] regenerate gg_tt.mad with the latest CODEGEN patches…
valassi Sep 3, 2024
7c93756
[goodhel+june24] regenerate the CODEGEN patch from gg_tt.mad (functio…
valassi Sep 3, 2024
75a66c8
[goodhel+june24] rerun one tmad test for ggtt... the test fails with …
valassi Sep 3, 2024
c731a24
[goodhel+june24] update MG5AMC from 2972a63ab (old valassi_goodhel_ju…
valassi Sep 3, 2024
b4ede27
[goodhel+june24] regenerate gg_tt.mad with the latest mg5amc: three i…
valassi Sep 3, 2024
a97109b
[goodhel+june24] rerun one tmad test for ggtt... the test continues t…
valassi Sep 3, 2024
6d402e9
fix API for 360 branch
oliviermattelaer Sep 3, 2024
7d0a553
remove a reset cumulative variable that reappear
oliviermattelaer Sep 3, 2024
f4d716b
[v360] regenerate all processes on top of Olivier's upstream/master_f…
valassi Sep 15, 2024
b009067
[v360] rerun 102 tput tests on itscrd90 (including Olivier's master_f…
valassi Sep 15, 2024
8e9739a
[v360] rerun 30 tmad tests on itscrd90 (including Olivier's master_fo…
valassi Sep 15, 2024
7f66b92
[v360] rerun 96 tput tests on itgold91 - all ok
valassi Sep 15, 2024
623a2c3
[v360] rerun 30 tmad tests on itgold91 - all ok
valassi Sep 15, 2024
b10aad5
[v360] ** COMPLETE V360 ** go back to tput/tmad test logs on itscrd90
valassi Sep 15, 2024
a40ab80
Merge pull request #997 from valassi/v360
valassi Sep 16, 2024
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
2 changes: 1 addition & 1 deletion MG5aMC/mg5amcnlo
Submodule mg5amcnlo updated 3134 files
Original file line number Diff line number Diff line change
Expand Up @@ -126,34 +126,34 @@ 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 8b73188ef..710fd1297 100644
index 1acba8200..069c74ef4 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
@@ -72,7 +72,10 @@ C
@@ -71,7 +71,10 @@ C
DATA NB_FAIL /0/
DOUBLE PRECISION GET_CHANNEL_CUT
EXTERNAL GET_CHANNEL_CUT
-
+C
+ INTEGER NGOODHEL(2) ! -1 if not yet retrieved and printed
+ INTEGER NGOODHEL ! -1 if not yet retrieved and printed
+ SAVE NGOODHEL
+ DATA NGOODHEL/-1,-1/
+ DATA NGOODHEL/-1/
C
C This is just to temporarily store the reference grid for
C helicity of the DiscreteSampler so as to obtain its number of
@@ -230,6 +233,17 @@ C update.
@@ -211,6 +214,17 @@ C ----------
ENDIF
IF(NTRY(IMIRROR).EQ.MAXTRIES)THEN
ISHEL(IMIRROR)=MIN(ISUM_HEL,NGOOD(IMIRROR))
IF(NTRY(1).EQ.MAXTRIES)THEN
ISHEL=MIN(ISUM_HEL,NGOOD)
+C Print the number of good helicities
+ IF (NGOODHEL(IMIRROR).EQ.-1) THEN
+ NGOODHEL(IMIRROR)=0
+ IF (NGOODHEL.EQ.-1) THEN
+ NGOODHEL=0
+ DO I=1,NCOMB
+ IF (GOODHEL(I,IMIRROR)) THEN
+ NGOODHEL(IMIRROR)=NGOODHEL(IMIRROR)+1
+ IF (GOODHEL(I,1)) THEN
+ NGOODHEL=NGOODHEL+1
+ ENDIF
+ END DO
+ WRITE (6,*) 'NGOODHEL =', NGOODHEL(IMIRROR) ! no need to print imirror?
+ WRITE (6,*) 'NGOODHEL =', NGOODHEL
+ WRITE (6,*) 'NCOMB =', NCOMB
+ ENDIF
ENDIF
Expand Down
Original file line number Diff line number Diff line change
@@ -1,17 +1,3 @@
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
+++ a/epochX/cudacpp/gg_tt.mad/Source/genps.inc
@@ -30,7 +30,8 @@ c*************************************************************************
c Parameters for helicity sums in matrixN.f
c*************************************************************************
REAL*8 LIMHEL
- PARAMETER(LIMHEL=1e-8) ! ME threshold for helicity filtering
+c PARAMETER(LIMHEL=1e-8) ! ME threshold for helicity filtering (Fortran default)
+ PARAMETER(LIMHEL=0) ! ME threshold for helicity filtering (force Fortran to mimic cudacpp, see #419)
INTEGER MAXTRIES
PARAMETER(MAXTRIES=25)
C To pass the helicity configuration chosen by the DiscreteSampler to
diff --git b/epochX/cudacpp/gg_tt.mad/SubProcesses/makefile a/epochX/cudacpp/gg_tt.mad/SubProcesses/makefile
index 348c283be..49e6800ff 100644
--- b/epochX/cudacpp/gg_tt.mad/SubProcesses/makefile
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,7 @@ def default_setup(self):
self['vector_size'] = 16 # already setup in default class (just change value)
self['aloha_flag'] = '--fast-math'
self['matrix_flag'] = '-O3'
self['limhel'] = 0
self.display_block.append('simd')
self.display_block.append('psoptim')

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,9 @@
& SELECTED_HEL2, SELECTED_COL2, .TRUE.) ! quit after computing helicities
FIRST = .FALSE.
c ! This is a workaround for https://github.com/oliviermattelaer/mg5amc_test/issues/22 (see PR #486)
IF( FBRIDGE_MODE .EQ. 1 ) THEN ! (CppOnly=1 : SMATRIX1 is not called at all)
CALL RESET_CUMULATIVE_VARIABLE() ! mimic 'avoid bias of the initialization' within SMATRIX1
ENDIF
c IF( FBRIDGE_MODE .EQ. 1 ) THEN ! (CppOnly=1 : SMATRIX1 is not called at all)
c CALL RESET_CUMULATIVE_VARIABLE() ! mimic 'avoid bias of the initialization' within SMATRIX1
c ENDIF
CALL FBRIDGEGETNGOODHEL(FBRIDGE_PBRIDGE,NGOODHEL,NTOTHEL)
IF( NTOTHEL .NE. NCOMB ) THEN
WRITE(6,*) 'ERROR! Cudacpp/Fortran mismatch',
Expand Down
2 changes: 1 addition & 1 deletion epochX/cudacpp/CODEGEN/PLUGIN/CUDACPP_SA_OUTPUT/output.py
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,7 @@ def copy_template(self, model):
open(os.path.join('test', 'cudacpp_test.mk'), 'w').write(makefile_test)

# OM - overload export_v4.py version to add additional_clean section (and avoid patchMad.sh for Source/makefile)
def write_source_makefile(self, writer, default=None):
def write_source_makefile(self, writer, model=None, default=None):
if default:
replace_dict = default
else:
Expand Down
17 changes: 17 additions & 0 deletions epochX/cudacpp/ee_mumu.mad/Source/MODEL/couplings3.f
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc
c written by the UFO converter
ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc

SUBROUTINE COUP3( VECID)

IMPLICIT NONE
INTEGER VECID
INCLUDE 'model_functions.inc'

DOUBLE PRECISION PI, ZERO
PARAMETER (PI=3.141592653589793D0)
PARAMETER (ZERO=0D0)
INCLUDE 'input.inc'
INCLUDE '../vector.inc'
INCLUDE 'coupl.inc'
END
113 changes: 113 additions & 0 deletions epochX/cudacpp/ee_mumu.mad/Source/PDF/lep_densities/isrbetll/eepdf.f
Original file line number Diff line number Diff line change
@@ -0,0 +1,113 @@
c This function calculate the reduced structure function, with energy
c fraction given by "x", at scale "Qsquare"
real*8 function eepdf_tilde(x,Qsquare,n,partonid,beamid)
implicit none
real*8 x,Qsquare
real*8 me
data me /0.511d-3/
real*8 PI
real*8 alphaem
c In Gmu scheme
data alphaem/0.007562397d0/
real*8 beta
integer n,partonid,beamid
real*8 isr_tilde_racoon
real*8 res
data res/0d0/

PI=4.D0*DATAN(1.D0)

beta = alphaem/PI * (dlog(Qsquare/me/me)-1)

c electron beam
if (beamid .eq. 11) then
c other partons are zero
if (partonid .ne. 11) then
res = 0d0
else
if (n .eq. 1) then
res = isr_tilde_racoon(x,beta)
else
res = 0d0
endif
endif
else if (beamid .eq. -11) then
if (partonid .ne. -11) then
res = 0d0
else
if (n .eq. 1) then
res = isr_tilde_racoon(x,beta)
else
res = 0d0
endif
endif
endif
eepdf_tilde = res
end

c https://arxiv.org/pdf/hep-ph/0302198.pdf, eq.(2.44)
c note that beta_e in eq.(2.45) is twice our beta
c so eq.(2.44) needs to be corrected by some factor of 2
real*8 function isr_tilde_racoon(x,beta)
implicit none
real*8 x,beta
real*8 res
real*8 PI
real*8 gE
real*8 logx, logomx
real*8 dlgam,DDILOG
external dlgam,DDILOG
PI=4.D0*DATAN(1.D0)
gE=0.5772156649d0
res=0d0
if (x .lt. 0.9999999d0) then
logx=dlog(x)
logomx=dlog(1d0-x)
c ----------------------------
c order alpha
res=-beta*(1d0+x)/2d0
c order alpha^2
res=res-(beta**2)/8d0*(
c (1d0+3d0*x*x)/(1d0-x)*logx
c +4d0*(1d0+x)*logomx+5d0+x)
c order alpha^3
res=res-(beta**3)/128d0*(
c (1d0+x)*(6d0*DDILOG(x)+12d0*(logomx**2)-3d0*PI**2)
c +(1d0/(1d0-x)) * (
c (3d0/2d0)*(1d0+8d0*x+3d0*x**2)*logx
c +6d0*(x+5d0)*(1d0-x)*logomx
c +12d0*(1d0+x**2)*logx*logomx
c -1d0/2d0*(1d0+7d0*x**2)*logx**2
c +1d0/4d0*(39d0-24d0*x-15d0*x**2)))
c ----------------------------
res=res*(1d0-x)**(1-beta)
endif
res=res+exp(beta*(-gE+3d0/4d0))/exp(dlgam(1d0+beta))*beta
isr_tilde_racoon=res
end

cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc
function dlgam(xx)
c real logarithm of gamma function
implicit real * 8 (a-h,o-z)
real * 8 cof(6),stp,gt,g,cst
data cof,stp/76.18009173d0,-86.50532033d0,24.01409822d0,
# -1.231739516d0,.120858003d-2,-.536382d-5,2.50662827465d0/
data gt,g/5.5d0,5.0d0/
data cst/4.081061466d0/
x = xx - 1
xpgt = x + gt
xmp5 = x + .5d0
s0 = 1
do 1 j=1,6
x = x + 1
tmp = cof(j)/x
s0 = s0 + tmp
1 continue
r10 = log(s0)
dlgam = xmp5*(log(xpgt)-1) + r10 - cst
return
end

cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc

Original file line number Diff line number Diff line change
@@ -0,0 +1,140 @@
integer function eepdf_n_components(partonid,beamid)
implicit none
integer partonid,beamid
integer ncom
c electron beam
if (beamid .eq. 11) then
c other partons are zero
if (partonid .ne. 11) then
ncom=0
else
ncom=1
endif
else if (beamid .eq. -11) then
if (partonid .ne. -11) then
ncom=0
else
ncom=1
endif
endif
eepdf_n_components=ncom
end

c This function return the power of (1-x)
real*8 function eepdf_tilde_power(Q2,n,partonid,beamid)
implicit none
real*8 me
data me /0.511d-3/
real*8 PI
real*8 alphaem
c In Gmu scheme
data alphaem/0.007562397d0/
real*8 beta,eta,Q2
integer n,partonid,beamid
real*8 k,b

PI=4.D0*DATAN(1.D0)
beta = alphaem/PI * (dlog(Q2/me/me)-1)
eta = alphaem/PI * (dlog(Q2/me/me))
b=-2.D0/3.D0

c electron beam
if (beamid .eq. 11) then
c other partons are zero
if (partonid .ne. 11) then
k=0d0
else
if (n .eq. 1) then
k=1d0-beta
else
k=0d0
endif
endif
else if (beamid .eq. -11) then
if (partonid .ne. -11) then
k=0d0
else
if (n .eq. 1) then
k=1d0-beta
else
k=0d0
endif
endif
endif
eepdf_tilde_power = k
end

c This function return the type of this component
integer function eepdf_tilde_type(n,partonid,beamid)
implicit none
integer n,partonid,beamid
integer res

c electron beam
if (beamid .eq. 11) then
c other partons are zero
if (partonid .ne. 11) then
res=0
else
if (n .eq. 1) then
res=1
else
res=0
endif
endif
else if (beamid .eq. -11) then
if (partonid .ne. -11) then
res=0
else
if (n .eq. 1) then
res=1
else
res=0
endif
endif
endif
eepdf_tilde_type = res
end

c This is to calculate the factor for grid implementation
real*8 function eepdf_tilde_factor(x,Q2,n,partonid,beamid)
implicit none
real*8 x,Q2
real*8 me
data me /0.511d-3/
real*8 PI
real*8 alphaem
c In Gmu scheme
data alphaem/0.007562397d0/
real*8 beta
integer n,partonid,beamid
real*8 res

PI=4.D0*DATAN(1.D0)
beta = alphaem/PI * (dlog(Q2/me/me))

c electron beam
if (beamid .eq. 11) then
c other partons are zero
if (partonid .ne. 11) then
res=1d0
else
if (n .eq. 1) then
res = 1d0
else
res = 1d0
endif
endif
else if (beamid .eq. -11) then
if (partonid .ne. -11) then
res = 1d0
else
if (n .eq. 1) then
res = 1d0
else
res = 1d0
endif
endif
endif
eepdf_tilde_factor = res
end
Loading