Skip to content

[ggttgg] two functional bug fixes in the ME calculation and one in the Makefile#199

Merged
valassi merged 3 commits intomadgraph5:masterfrom
valassi:ggttgg
May 12, 2021
Merged

[ggttgg] two functional bug fixes in the ME calculation and one in the Makefile#199
valassi merged 3 commits intomadgraph5:masterfrom
valassi:ggttgg

Conversation

@valassi
Copy link
Copy Markdown
Member

@valassi valassi commented May 12, 2021

Two bug fixes in the ME calculation

  • first (fix issue epoch2 ggttgg: different physics results for check.exe and gcheck.exe #198, cuda and C++ were giving different results, now fixed): avoid using "abs" for floats, this truncates to integers
  • second (changes both CUDA and C++ in the same way): the handling of energy and mass in ixxxxx was different from that in the Fortran, I now am using the Fortran version as in epoch1 eemumu... @oliviermattelaer can you please cross check and comment? otherwise I would have to fix it also in epoch1 eemumu (an dthen for upstream posrts)

In addition, a third bug fix in the Makefile, the code must be recuit if HelAmps changes

valassi added 3 commits May 12, 2021 08:58
Prepare to fix the bug in issue madgraph5#198

./gcheck.exe -v 1 8 1 | tail -10
Momenta:
   1  7.500000e+02  0.000000e+00  0.000000e+00  7.500000e+02
   2  7.500000e+02  0.000000e+00  0.000000e+00 -7.500000e+02
   3  3.118787e+02  1.091564e+02 -2.764329e+02  9.454122e+01
   4  2.317597e+02 -6.474121e+01 -1.333573e+02 -1.781487e+02
   5  3.853875e+02  1.954334e+00 -7.753632e+01  3.775021e+02
   6  5.709741e+02 -4.636953e+01  4.873266e+02 -2.938947e+02
--------------------------------------------------------------------------------
 Matrix element = 2.08873e-06 GeV^-4
--------------------------------------------------------------------------------

./check.exe -v 1 8 1 | tail -10
Momenta:
   1  7.500000e+02  0.000000e+00  0.000000e+00  7.500000e+02
   2  7.500000e+02  0.000000e+00  0.000000e+00 -7.500000e+02
   3  3.118787e+02  1.091564e+02 -2.764329e+02  9.454122e+01
   4  2.317597e+02 -6.474121e+01 -1.333573e+02 -1.781487e+02
   5  3.853875e+02  1.954334e+00 -7.753632e+01  3.775021e+02
   6  5.709741e+02 -4.636953e+01  4.873266e+02 -2.938947e+02
--------------------------------------------------------------------------------
 Matrix element = 5.88378e-07 GeV^-4
--------------------------------------------------------------------------------
This leads to an integer truncation. The issue was already fixed in epoch1 eemumu.

for exe in ./gcheck.exe ./check.exe; do echo; echo "$exe -v 1 8 1 | tail -10"; $exe -v 1 8 1 | tail -10; done

./gcheck.exe -v 1 8 1 | tail -10
Momenta:
   1  7.500000e+02  0.000000e+00  0.000000e+00  7.500000e+02
   2  7.500000e+02  0.000000e+00  0.000000e+00 -7.500000e+02
   3  3.118787e+02  1.091564e+02 -2.764329e+02  9.454122e+01
   4  2.317597e+02 -6.474121e+01 -1.333573e+02 -1.781487e+02
   5  3.853875e+02  1.954334e+00 -7.753632e+01  3.775021e+02
   6  5.709741e+02 -4.636953e+01  4.873266e+02 -2.938947e+02
--------------------------------------------------------------------------------
 Matrix element = 2.08873e-06 GeV^-4
--------------------------------------------------------------------------------

./check.exe -v 1 8 1 | tail -10
Momenta:
   1  7.500000e+02  0.000000e+00  0.000000e+00  7.500000e+02
   2  7.500000e+02  0.000000e+00  0.000000e+00 -7.500000e+02
   3  3.118787e+02  1.091564e+02 -2.764329e+02  9.454122e+01
   4  2.317597e+02 -6.474121e+01 -1.333573e+02 -1.781487e+02
   5  3.853875e+02  1.954334e+00 -7.753632e+01  3.775021e+02
   6  5.709741e+02 -4.636953e+01  4.873266e+02 -2.938947e+02
--------------------------------------------------------------------------------
 Matrix element = 2.08873e-06 GeV^-4
--------------------------------------------------------------------------------
…HM AS IN FORTRAN

Note: issue madgraph5#198 was about C++/CUDA giving different results and was fixed by the previous commit,
which only changed the behaviour of C++ while leaving CUDA unchanged.

This additional bug fix instead changes the behaviour of both CUDA and C++.
The results from the two implementations were the same before and are the same after the fix,
but in both backends the numerical results has changed.

This is a fix that I already applied in epoch1 eemumu for ixxxxx.
I changed the handling of pvec0 (energy) depending on the input fmass.
I used the same algorithm used in the Fortran.
To be cross checked by Olivier...

for exe in ./gcheck.exe ./check.exe; do echo; echo "$exe -v 1 8 1 | tail -10"; $exe -v 1 8 1 | tail -10; done

./gcheck.exe -v 1 8 1 | tail -10
Momenta:
   1  7.500000e+02  0.000000e+00  0.000000e+00  7.500000e+02
   2  7.500000e+02  0.000000e+00  0.000000e+00 -7.500000e+02
   3  3.118787e+02  1.091564e+02 -2.764329e+02  9.454122e+01
   4  2.317597e+02 -6.474121e+01 -1.333573e+02 -1.781487e+02
   5  3.853875e+02  1.954334e+00 -7.753632e+01  3.775021e+02
   6  5.709741e+02 -4.636953e+01  4.873266e+02 -2.938947e+02
--------------------------------------------------------------------------------
 Matrix element = 5.46032e-06 GeV^-4
--------------------------------------------------------------------------------

./check.exe -v 1 8 1 | tail -10
Momenta:
   1  7.500000e+02  0.000000e+00  0.000000e+00  7.500000e+02
   2  7.500000e+02  0.000000e+00  0.000000e+00 -7.500000e+02
   3  3.118787e+02  1.091564e+02 -2.764329e+02  9.454122e+01
   4  2.317597e+02 -6.474121e+01 -1.333573e+02 -1.781487e+02
   5  3.853875e+02  1.954334e+00 -7.753632e+01  3.775021e+02
   6  5.709741e+02 -4.636953e+01  4.873266e+02 -2.938947e+02
--------------------------------------------------------------------------------
 Matrix element = 5.46032e-06 GeV^-4
--------------------------------------------------------------------------------
@valassi
Copy link
Copy Markdown
Member Author

valassi commented May 12, 2021

Copying also @roiser and @ingvildh for info - related to the discussion we had yesterday on physics validation for epoch2 ggttgg

Self-mergin now

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant