Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RAMBO with a single final particle? (Do we need sampling in a 2->1 process?) #358

Closed
valassi opened this issue Jan 26, 2022 · 4 comments
Closed
Assignees

Comments

@valassi
Copy link
Member

valassi commented Jan 26, 2022

Hi @oliviermattelaer , next physics question :-)

For the EFT gg>h process of #344: after fixing other generation/build issues I am now getting this warning

ccache /cvmfs/sft.cern.ch/lcg/releases/gcc/10.2.0-c44b3/x86_64-centos7/bin/g++  -O3  -std=c++17 -I. -I../../src -I../../../../../tools -DUSE_NVTX -Wall -Wshadow -Wextra -ffast-math   -march=skylake-avx512 -mprefer-vector-width=256  -DMGONGPU_FPTYPE_DOUBLE -I/usr/local/cuda-11.6/include/ -c RamboSamplingKernels.cc -o RamboSamplingKernels.o
In file included from RamboSamplingKernels.cc:8:
../../src/rambo.h: In function ‘void mg5amcCpu::ramboGetMomentaFinal(mgOnGpu::fptype, const fptype*, mgOnGpu::fptype*, mgOnGpu::fptype*) [with R_ACCESS = KernelAccessRandomNumbers<false>; M_ACCESS = KernelAccessMomenta<false>; W_ACCESS = KernelAccessWeights<false>]’:
../../src/rambo.h:121:60: warning: ‘z[0]’ is used uninitialized in this function [-Wuninitialized]
  121 |     if ( nparf != 2 ) wt = (2. * nparf - 4.) * log(energy) + z[nparf-1];
      |                            ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~

I looked at the code, and indeed z[0] is never initialized. Initially I was concerned this might be a bug in the translation from Fortran to C indexes, and maybe that I had introduced this in changing the interfaces. But I realised that

Eventually, I realised that: maybe we do not need RAMBO (or any other phase space sampling) at all, if we have a 2->1 process?

Rephrasing this: with a 2->1 process do we not always have exactly the same matrix element with exactly the same momenta?

For the specific case of #344, I can see various options

  • Change process and get one with two particles (gg to hz?)
  • Ignore the build warning (I will probably do this for now!)

More generally:

  • Should RAMBO throw an error if used with only one final particle?
  • Should we remove the full sampling if we do one final particle (or just forbid this in the standalone test...)?

Thanks
Andrea

@valassi
Copy link
Member Author

valassi commented Jan 26, 2022

The code now builds but indeed the ME is always the same (which is OK), but the weight is negative (which is not ok!)

NumMatrixElems(notAbnormal) = 524288
MeanMatrixElemValue         = ( 2.179124e+02 +- 0.000000e+00 )  GeV^2
[Min,Max]MatrixElemValue    = [ 2.179124e+02 ,  2.179124e+02 ]  GeV^2
StdDevMatrixElemValue       = ( 0.000000e+00                 )  GeV^2
MeanWeight                  = ( -1.462644e+01 +- 0.000000e+00
[Min,Max]Weight             = [ -1.462644e+01 ,  -1.462644e+01 ]
StdDevWeight                = ( 0.000000e+00                 )

valassi added a commit to valassi/madgraph4gpu that referenced this issue Jan 26, 2022
@valassi
Copy link
Member Author

valassi commented Jan 26, 2022

Ok thanks to @oliviermattelaer it is now clarified that it is normal that 2>1 processes are special.

The point of gg>h was to check the EFT model. This is now indeed working (PR #352 after fixing #351 and related issues).

I think that this specific RAMBO question for 2>1 can be closed.

@valassi valassi closed this as completed Jan 26, 2022
valassi added a commit to valassi/madgraph4gpu that referenced this issue Feb 1, 2022
valassi added a commit to valassi/madgraph4gpu that referenced this issue Feb 1, 2022
valassi added a commit to valassi/madgraph4gpu that referenced this issue Feb 1, 2022
valassi added a commit to valassi/madgraph4gpu that referenced this issue Feb 1, 2022
@valassi
Copy link
Member Author

valassi commented Feb 1, 2022

In the end I added a simple patch and a warning in PR #365. At least now the final momenta should be correct (previously they were NaN). A warning is written out that the random numbers are ignored.

valassi added a commit to valassi/madgraph4gpu that referenced this issue Feb 1, 2022
valassi added a commit to valassi/madgraph4gpu that referenced this issue Feb 1, 2022
@valassi
Copy link
Member Author

valassi commented Feb 1, 2022

I am merging a better fix in PR #366

valassi added a commit to valassi/madgraph4gpu that referenced this issue May 10, 2022
…for rambo 2 to 1 processes

ccache /cvmfs/sft.cern.ch/lcg/releases/clang/12.0.0-8916b/x86_64-centos7/bin/clang++  -O3  -std=c++17 -I. -I../../src -I../../../../../tools -DUSE_NVTX -Wall -Wshadow -Wextra -ffast-math   -march=haswell  -DMGONGPU_FPTYPE_DOUBLE -DMGONGPU_HARDCODE_PARAM -I/usr/local/cuda-11.6/include/ -fPIC -c fsampler.cc -o fsampler.o
In file included from RamboSamplingKernels.cc:8:
../../src/rambo.h:107:5: warning: array index 1 is past the end of the array (which contains 1 element) [-Warray-bounds]
    z[1] = po2log;
    ^ ~
../../src/rambo.h:106:5: note: array 'z' declared here
    fptype z[nparf];
    ^
1 warning generated.

ccache /cvmfs/sft.cern.ch/lcg/releases/clang/12.0.0-8916b/x86_64-centos7/bin/clang++  -O3  -std=c++17 -I. -I../../src -I../../../../../tools -DUSE_NVTX -Wall -Wshadow -Wextra -ffast-math   -march=haswell  -DMGONGPU_FPTYPE_DOUBLE -DMGONGPU_HARDCODE_PARAM -I/usr/local/cuda-11.6/include/ -fPIC -c fbridge.cc -o fbridge.o
../../src/rambo.h:107:2: warning: array index 1 is past the end of the array (which contains 1 element) [-Warray-bounds]
(z[1]) = po2log;
 ^ ~
../../src/rambo.h:106:1: note: array 'z' declared here
mgOnGpu::fptype z[mgOnGpu::nparf];
^
1 warning generated.
valassi added a commit to mg5amcnlo/mg5amcnlo_cudacpp that referenced this issue Aug 16, 2023
valassi added a commit to mg5amcnlo/mg5amcnlo_cudacpp that referenced this issue Aug 16, 2023
valassi added a commit to mg5amcnlo/mg5amcnlo_cudacpp that referenced this issue Aug 16, 2023
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

No branches or pull requests

2 participants