Skip to content

Commit

Permalink
[lhe] madgraph5#402 in gg_tt.mad bug fix in random color selection (i…
Browse files Browse the repository at this point in the history
…nitialise jamp2_sv for every SIMD page) - OK NOW! Fortran same as C++
  • Loading branch information
valassi committed Dec 16, 2022
1 parent 792b048 commit 0dd45ac
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions epochX/cudacpp/gg_tt.mad/SubProcesses/P1_gg_ttx/CPPProcess.cc
Original file line number Diff line number Diff line change
Expand Up @@ -838,15 +838,15 @@ namespace mg5amcCpu
#endif
}
#endif
// Running sum of partial amplitudes squared for event by event color selection (#402)
// (for the single event or the single SIMD vector of events processed in calculate_wavefunctions)
fptype_sv jamp2_sv[nParity * ncolor] = { 0 }; // jamp2[nParity][ncolor][neppV] for color choice

// PART 1 - HELICITY LOOP: CALCULATE WAVEFUNCTIONS
// (in both CUDA and C++, using precomputed good helicities)
// FIXME: assume process.nprocesses == 1 for the moment (eventually: need a loop over processes here#ifdef __CUDACC__
#ifdef __CUDACC__
// *** PART 1a - CUDA (one event per CPU thread) ***
// Running sum of partial amplitudes squared for event by event color selection (#402)
// (for the single event or the single SIMD vector of events processed in calculate_wavefunctions)
fptype_sv jamp2_sv[nParity * ncolor] = { 0 }; // jamp2[nParity][ncolor][neppV] for color choice
fptype MEs_ighel[ncomb] = { 0 }; // sum of MEs for all good helicities up to ighel (for this event)
for( int ighel = 0; ighel < cNGoodHel; ighel++ )
{
Expand Down Expand Up @@ -913,6 +913,9 @@ namespace mg5amcCpu
*/
for( int ipagV2 = 0; ipagV2 < npagV2; ++ipagV2 )
{
// Running sum of partial amplitudes squared for event by event color selection (#402)
// (for the single event or the single SIMD vector of events processed in calculate_wavefunctions)
fptype_sv jamp2_sv[nParity * ncolor] = { 0 }; // jamp2[nParity][ncolor][neppV] for color choice
#if defined MGONGPU_CPPSIMD and defined MGONGPU_FPTYPE_DOUBLE and defined MGONGPU_FPTYPE2_FLOAT
const int ievt00 = ipagV2 * neppV * 2; // loop on two SIMD pages (neppV events) at a time
#else
Expand Down

0 comments on commit 0dd45ac

Please sign in to comment.