Skip to content

Commit 272f6e4

Browse files
committed
Merge branch 'hel' (remove madevent overhead from first cudacpp pass PR madgraph5#960) into cmsdy
2 parents 8392e47 + ed85f3b commit 272f6e4

File tree

190 files changed

+1186
-1002
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

190 files changed

+1186
-1002
lines changed

epochX/cudacpp/CODEGEN/PLUGIN/CUDACPP_SA_OUTPUT/MG5aMC_patches/PROD/patch.P1

Lines changed: 14 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
diff --git b/epochX/cudacpp/gg_tt.mad/SubProcesses/P1_gg_ttx/auto_dsig1.f a/epochX/cudacpp/gg_tt.mad/SubProcesses/P1_gg_ttx/auto_dsig1.f
2-
index 4fbb8e6ba..f9e2335de 100644
2+
index 4fbb8e6ba..d5accb9fb 100644
33
--- b/epochX/cudacpp/gg_tt.mad/SubProcesses/P1_gg_ttx/auto_dsig1.f
44
+++ a/epochX/cudacpp/gg_tt.mad/SubProcesses/P1_gg_ttx/auto_dsig1.f
5-
@@ -484,23 +484,140 @@ C
5+
@@ -484,23 +484,142 @@ C
66
INTEGER VECSIZE_USED
77

88
INTEGER IVEC
@@ -40,7 +40,7 @@ index 4fbb8e6ba..f9e2335de 100644
4040
+
4141
+ IF( FBRIDGE_MODE .LE. 0 ) THEN ! (FortranOnly=0 or BothQuiet=-1 or BothDebug=-2)
4242
+#endif
43-
+ call counters_smatrix1multi_start( -1, VECSIZE_USED ) ! fortran=-1
43+
+ call counters_smatrix1multi_start( -1, VECSIZE_USED ) ! fortranMEs=-1
4444
!$OMP PARALLEL
4545
!$OMP DO
4646
- DO IVEC=1, VECSIZE_USED
@@ -67,7 +67,7 @@ index 4fbb8e6ba..f9e2335de 100644
6767
+ ENDDO
6868
!$OMP END DO
6969
!$OMP END PARALLEL
70-
+ call counters_smatrix1multi_stop( -1 ) ! fortran=-1
70+
+ call counters_smatrix1multi_stop( -1 ) ! fortranMEs=-1
7171
+#ifdef MG5AMC_MEEXPORTER_CUDACPP
7272
+ ENDIF
7373
+
@@ -77,9 +77,10 @@ index 4fbb8e6ba..f9e2335de 100644
7777
+ STOP
7878
+ ENDIF
7979
+ IF ( FIRST ) THEN ! exclude first pass (helicity filtering) from timers (#461)
80+
+ call counters_smatrix1multi_start( 1, VECSIZE_USED ) ! cudacppHEL=1
8081
+ CALL FBRIDGESEQUENCE_NOMULTICHANNEL( FBRIDGE_PBRIDGE, ! multi channel disabled for helicity filtering
8182
+ & P_MULTI, ALL_G, HEL_RAND, COL_RAND, OUT2,
82-
+ & SELECTED_HEL2, SELECTED_COL2 )
83+
+ & SELECTED_HEL2, SELECTED_COL2, .TRUE.) ! quit after computing helicities
8384
+ FIRST = .FALSE.
8485
+c ! This is a workaround for https://github.com/oliviermattelaer/mg5amc_test/issues/22 (see PR #486)
8586
+ IF( FBRIDGE_MODE .EQ. 1 ) THEN ! (CppOnly=1 : SMATRIX1 is not called at all)
@@ -93,22 +94,23 @@ index 4fbb8e6ba..f9e2335de 100644
9394
+ ENDIF
9495
+ WRITE (6,*) 'NGOODHEL =', NGOODHEL
9596
+ WRITE (6,*) 'NCOMB =', NCOMB
97+
+ call counters_smatrix1multi_stop( 1 ) ! cudacppHEL=1
9698
+ ENDIF
97-
+ call counters_smatrix1multi_start( 0, VECSIZE_USED ) ! cudacpp=0
99+
+ call counters_smatrix1multi_start( 0, VECSIZE_USED ) ! cudacppMEs=0
98100
+ IF ( .NOT. MULTI_CHANNEL ) THEN
99101
+ CALL FBRIDGESEQUENCE_NOMULTICHANNEL( FBRIDGE_PBRIDGE, ! multi channel disabled
100102
+ & P_MULTI, ALL_G, HEL_RAND, COL_RAND, OUT2,
101-
+ & SELECTED_HEL2, SELECTED_COL2 )
103+
+ & SELECTED_HEL2, SELECTED_COL2, .FALSE.) ! do not quit after computing helicities
102104
+ ELSE
103105
+ IF( SDE_STRAT.NE.1 ) THEN
104106
+ WRITE(6,*) 'ERROR! The cudacpp bridge requires SDE=1' ! multi channel single-diagram enhancement strategy
105107
+ STOP
106108
+ ENDIF
107-
+ CALL FBRIDGESEQUENCE(FBRIDGE_PBRIDGE, P_MULTI, ALL_G,
109+
+ CALL FBRIDGESEQUENCE(FBRIDGE_PBRIDGE, P_MULTI, ALL_G, ! multi channel enabled
108110
+ & HEL_RAND, COL_RAND, CHANNEL, OUT2,
109-
+ & SELECTED_HEL2, SELECTED_COL2 ) ! 1-N: multi channel enabled
111+
+ & SELECTED_HEL2, SELECTED_COL2, .FALSE.) ! do not quit after computing helicities
110112
+ ENDIF
111-
+ call counters_smatrix1multi_stop( 0 ) ! cudacpp=0
113+
+ call counters_smatrix1multi_stop( 0 ) ! cudacppMEs=0
112114
+ ENDIF
113115
+
114116
+ IF( FBRIDGE_MODE .LT. 0 ) THEN ! (BothQuiet=-1 or BothDebug=-2)
@@ -284,7 +286,7 @@ index 1124a9164..27a6e4674 100644
284286
open(unit=lun,file=tempname,status='old',ERR=20)
285287
fopened=.true.
286288
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
287-
index e73e654d4..27fbe7302 100644
289+
index e73e654d4..3072054f2 100644
288290
--- b/epochX/cudacpp/gg_tt.mad/SubProcesses/P1_gg_ttx/matrix1.f
289291
+++ a/epochX/cudacpp/gg_tt.mad/SubProcesses/P1_gg_ttx/matrix1.f
290292
@@ -72,7 +72,10 @@ C
@@ -299,15 +301,7 @@ index e73e654d4..27fbe7302 100644
299301
C
300302
C This is just to temporarily store the reference grid for
301303
C helicity of the DiscreteSampler so as to obtain its number of
302-
@@ -140,6 +143,7 @@ C ----------
303-
C BEGIN CODE
304-
C ----------
305-
306-
+ call counters_smatrix1_start()
307-
NTRY(IMIRROR)=NTRY(IMIRROR)+1
308-
THIS_NTRY(IMIRROR) = THIS_NTRY(IMIRROR)+1
309-
DO I=1,NEXTERNAL
310-
@@ -217,6 +221,17 @@ C ----------
304+
@@ -217,6 +220,17 @@ C ----------
311305
ENDIF
312306
IF(NTRY(IMIRROR).EQ.MAXTRIES)THEN
313307
ISHEL(IMIRROR)=MIN(ISUM_HEL,NGOOD(IMIRROR))
@@ -325,22 +319,3 @@ index e73e654d4..27fbe7302 100644
325319
ENDIF
326320
ENDIF
327321
ELSE IF (.NOT.INIT_MODE) THEN ! random helicity
328-
@@ -234,6 +249,7 @@ C Include the Jacobian from helicity sampling
329-
IHEL = HEL_PICKED
330-
ELSE
331-
ANS = 1D0
332-
+ call counters_smatrix1_stop()
333-
RETURN
334-
ENDIF
335-
IF (ANS.NE.0D0.AND.(ISUM_HEL .NE. 1.OR.HEL_PICKED.EQ.-1)) THEN
336-
@@ -278,9 +294,8 @@ C Set right sign for ANS, based on sign of chosen helicity
337-
ENDIF
338-
ENDIF
339-
ANS=ANS/DBLE(IDEN)
340-
-
341-
CALL SELECT_COLOR(RCOL, JAMP2, ICONFIG,1, ICOL)
342-
-
343-
+ call counters_smatrix1_stop()
344-
END
345-
346-

epochX/cudacpp/CODEGEN/PLUGIN/CUDACPP_SA_OUTPUT/madgraph/iolibs/template_files/gpu/Bridge.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,9 +109,9 @@ namespace mg5amcCpu
109109
* @param rndcol the pointer to the input random numbers for color selection
110110
* @param channelId the Feynman diagram to enhance in multi-channel mode if 1 to n (disable multi-channel if 0)
111111
* @param mes the pointer to the output matrix elements
112-
* @param goodHelOnly quit after computing good helicities?
113112
* @param selhel the pointer to the output selected helicities
114113
* @param selcol the pointer to the output selected colors
114+
* @param goodHelOnly quit after computing good helicities?
115115
*/
116116
void gpu_sequence( const FORTRANFPTYPE* momenta,
117117
const FORTRANFPTYPE* gs,

epochX/cudacpp/CODEGEN/PLUGIN/CUDACPP_SA_OUTPUT/madgraph/iolibs/template_files/gpu/counters.cc

Lines changed: 20 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -21,26 +21,24 @@ extern "C"
2121
{
2222
// Now: fortran=-1, cudacpp=0
2323
// Eventually: fortran=-1, cuda=0, cpp/none=1, cpp/sse4=2, etc...
24-
constexpr unsigned int nimplC = 2;
24+
constexpr unsigned int nimplC = 3;
2525
constexpr unsigned int iimplF2C( int iimplF ) { return iimplF + 1; }
2626
const char* iimplC2TXT( int iimplC )
2727
{
2828
const int iimplF = iimplC - 1;
2929
switch( iimplF )
3030
{
31-
case -1: return "Fortran"; break;
32-
case +0: return "CudaCpp"; break;
31+
case -1: return "Fortran MEs"; break;
32+
case +0: return "CudaCpp MEs"; break;
33+
case +1: return "CudaCpp HEL"; break;
3334
default: assert( false ); break;
3435
}
3536
}
3637

3738
static mgOnGpu::Timer<TIMERTYPE> program_timer;
3839
static float program_totaltime = 0;
39-
static mgOnGpu::Timer<TIMERTYPE> smatrix1_timer;
40-
static float smatrix1_totaltime = 0;
4140
static mgOnGpu::Timer<TIMERTYPE> smatrix1multi_timer[nimplC];
4241
static float smatrix1multi_totaltime[nimplC] = { 0 };
43-
static int smatrix1_counter = 0;
4442
static int smatrix1multi_counter[nimplC] = { 0 };
4543

4644
void counters_initialise_()
@@ -49,19 +47,6 @@ extern "C"
4947
return;
5048
}
5149

52-
void counters_smatrix1_start_()
53-
{
54-
smatrix1_counter++;
55-
smatrix1_timer.Start();
56-
return;
57-
}
58-
59-
void counters_smatrix1_stop_()
60-
{
61-
smatrix1_totaltime += smatrix1_timer.GetDuration();
62-
return;
63-
}
64-
6550
void counters_smatrix1multi_start_( const int* iimplF, const int* pnevt )
6651
{
6752
const unsigned int iimplC = iimplF2C( *iimplF );
@@ -86,13 +71,23 @@ extern "C"
8671
printf( " [COUNTERS] PROGRAM TOTAL : %9.4fs\n", program_totaltime );
8772
printf( " [COUNTERS] Fortran Overhead ( 0 ) : %9.4fs\n", overhead_totaltime );
8873
for( unsigned int iimplC = 0; iimplC < nimplC; iimplC++ )
74+
{
8975
if( smatrix1multi_counter[iimplC] > 0 )
90-
printf( " [COUNTERS] %7s MEs ( %1d ) : %9.4fs for %8d events => throughput is %8.2E events/s\n",
91-
iimplC2TXT( iimplC ),
92-
iimplC + 1,
93-
smatrix1multi_totaltime[iimplC],
94-
smatrix1multi_counter[iimplC],
95-
smatrix1multi_counter[iimplC] / smatrix1multi_totaltime[iimplC] );
76+
{
77+
if( iimplC < nimplC - 1 ) // MEs
78+
printf( " [COUNTERS] %11s ( %1d ) : %9.4fs for %8d events => throughput is %8.2E events/s\n",
79+
iimplC2TXT( iimplC ),
80+
iimplC + 1,
81+
smatrix1multi_totaltime[iimplC],
82+
smatrix1multi_counter[iimplC],
83+
smatrix1multi_counter[iimplC] / smatrix1multi_totaltime[iimplC] );
84+
else
85+
printf( " [COUNTERS] %11s ( %1d ) : %9.4fs\n",
86+
iimplC2TXT( iimplC ),
87+
iimplC + 1,
88+
smatrix1multi_totaltime[iimplC] );
89+
}
90+
}
9691
return;
9792
}
9893
}

epochX/cudacpp/CODEGEN/PLUGIN/CUDACPP_SA_OUTPUT/madgraph/iolibs/template_files/gpu/fbridge.cc

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,7 @@ extern "C"
8383
* @param mes the pointer to the output matrix elements
8484
* @param selhel the pointer to the output selected helicities
8585
* @param selcol the pointer to the output selected colors
86+
* @param goodHelOnly quit after computing good helicities?
8687
*/
8788
void fbridgesequence_( CppObjectInFortran** ppbridge,
8889
const FORTRANFPTYPE* momenta,
@@ -92,18 +93,20 @@ extern "C"
9293
const unsigned int* pchannelId,
9394
FORTRANFPTYPE* mes,
9495
int* selhel,
95-
int* selcol )
96+
int* selcol,
97+
const bool* pgoodHelOnly )
9698
{
9799
Bridge<FORTRANFPTYPE>* pbridge = dynamic_cast<Bridge<FORTRANFPTYPE>*>( *ppbridge );
100+
//printf("fbridgesequence_ goodHelOnly=%d\n", ( *pgoodHelOnly ? 1 : 0 ) );
98101
if( pbridge == 0 ) throw std::runtime_error( "fbridgesequence_: invalid Bridge address" );
99102
#ifdef MGONGPUCPP_GPUIMPL
100103
// Use the device/GPU implementation in the CUDA library
101104
// (there is also a host implementation in this library)
102-
pbridge->gpu_sequence( momenta, gs, rndhel, rndcol, ( pchannelId ? *pchannelId : 0 ), mes, selhel, selcol );
105+
pbridge->gpu_sequence( momenta, gs, rndhel, rndcol, ( pchannelId ? *pchannelId : 0 ), mes, selhel, selcol, *pgoodHelOnly );
103106
#else
104107
// Use the host/CPU implementation in the C++ library
105108
// (there is no device implementation in this library)
106-
pbridge->cpu_sequence( momenta, gs, rndhel, rndcol, ( pchannelId ? *pchannelId : 0 ), mes, selhel, selcol );
109+
pbridge->cpu_sequence( momenta, gs, rndhel, rndcol, ( pchannelId ? *pchannelId : 0 ), mes, selhel, selcol, *pgoodHelOnly );
107110
#endif
108111
}
109112

@@ -119,6 +122,7 @@ extern "C"
119122
* @param mes the pointer to the output matrix elements
120123
* @param selhel the pointer to the output selected helicities
121124
* @param selcol the pointer to the output selected colors
125+
* @param goodHelOnly quit after computing good helicities?
122126
*/
123127
void fbridgesequence_nomultichannel_( CppObjectInFortran** ppbridge,
124128
const FORTRANFPTYPE* momenta,
@@ -127,9 +131,11 @@ extern "C"
127131
const FORTRANFPTYPE* rndcol,
128132
FORTRANFPTYPE* mes,
129133
int* selhel,
130-
int* selcol )
134+
int* selcol,
135+
const bool* pgoodHelOnly )
131136
{
132-
fbridgesequence_( ppbridge, momenta, gs, rndhel, rndcol, nullptr, mes, selhel, selcol );
137+
//printf("fbridgesequence_nomultichannel_ goodHelOnly=%d\n", ( *pgoodHelOnly ? 1 : 0 ) );
138+
fbridgesequence_( ppbridge, momenta, gs, rndhel, rndcol, nullptr, mes, selhel, selcol, pgoodHelOnly );
133139
}
134140

135141
/**

epochX/cudacpp/CODEGEN/PLUGIN/CUDACPP_SA_OUTPUT/madgraph/iolibs/template_files/gpu/fbridge.inc

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,10 +40,11 @@ C - CHANID: the input Feynman diagram to enhance in multi-channel mode if 1 to
4040
C - MES: the output matrix element Fortran array
4141
C - SELHEL: the output selected helicity Fortran array
4242
C - SELCOL: the output selected color Fortran array
43+
C - HELONLY: input flag, quit after computing good helicities?
4344
C
4445
INTERFACE
4546
SUBROUTINE FBRIDGESEQUENCE(PBRIDGE, MOMENTA, GS,
46-
& RNDHEL, RNDCOL, CHANID, MES, SELHEL, SELCOL)
47+
& RNDHEL, RNDCOL, CHANID, MES, SELHEL, SELCOL, HELONLY)
4748
INTEGER*8 PBRIDGE
4849
DOUBLE PRECISION MOMENTA(*)
4950
DOUBLE PRECISION GS(*)
@@ -53,6 +54,7 @@ C
5354
DOUBLE PRECISION MES(*)
5455
INTEGER*4 SELHEL(*)
5556
INTEGER*4 SELCOL(*)
57+
LOGICAL HELONLY
5658
END SUBROUTINE FBRIDGESEQUENCE
5759
END INTERFACE
5860

@@ -66,10 +68,11 @@ C - RNDCOL: the input random number Fortran array for color selection
6668
C - MES: the output matrix element Fortran array
6769
C - SELHEL: the output selected helicity Fortran array
6870
C - SELCOL: the output selected color Fortran array
71+
C - HELONLY: input flag, quit after computing good helicities?
6972
C
7073
INTERFACE
7174
SUBROUTINE FBRIDGESEQUENCE_NOMULTICHANNEL(PBRIDGE, MOMENTA, GS,
72-
& RNDHEL, RNDCOL, MES, SELHEL, SELCOL)
75+
& RNDHEL, RNDCOL, MES, SELHEL, SELCOL, HELONLY)
7376
INTEGER*8 PBRIDGE
7477
DOUBLE PRECISION MOMENTA(*)
7578
DOUBLE PRECISION GS(*)
@@ -78,6 +81,7 @@ C
7881
DOUBLE PRECISION MES(*)
7982
INTEGER*4 SELHEL(*)
8083
INTEGER*4 SELCOL(*)
84+
LOGICAL HELONLY
8185
END SUBROUTINE FBRIDGESEQUENCE_NOMULTICHANNEL
8286
END INTERFACE
8387

epochX/cudacpp/CODEGEN/PLUGIN/CUDACPP_SA_OUTPUT/madgraph/iolibs/template_files/gpu/fcheck_sa.f

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ PROGRAM FCHECK_SA
6363
GS(IEVT) = 1.2177157847767195 ! fixed G for aS=0.118 (hardcoded for now in check_sa.cc, fcheck_sa.f, runTest.cc)
6464
END DO
6565
CALL FBRIDGESEQUENCE_NOMULTICHANNEL(BRIDGE, MOMENTA, GS, ! TEMPORARY? disable multi-channel in fcheck.exe and fgcheck.exe #466
66-
& RNDHEL, RNDCOL, MES, SELHEL, SELCOL)
66+
& RNDHEL, RNDCOL, MES, SELHEL, SELCOL, .FALSE.) ! do not quit after computing helicities
6767
DO IEVT = 1, NEVT
6868
c DO IEXTERNAL = 1, NEXTERNAL
6969
c WRITE(6,*) 'MOMENTA', IEVT, IEXTERNAL,

epochX/cudacpp/CODEGEN/generateAndCompare.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -353,6 +353,7 @@ function codeGenAndDiff()
353353
| awk -vdate="D:20240301000000+01'00'" '{print gensub("(^/ModDate\\().*(\\)>>endobj$)","\\1"date"\\2","g")}' \
354354
| awk -vdate="D:20240301000000+01'00'" '{print gensub("(^/CreationDate\\().*(\\)$)","\\1"date"\\2","g")}' \
355355
| awk -vid="0123456789abcdef0123456789abcdef" '{print gensub("(^/ID \\[<).*><.*(>\\]$)","\\1"id"><"id"\\2","g")}' \
356+
| awk -vid="0123456789abcdef0123456789abcdef" '{print gensub("(^/ID \\[\\().*\\)\\(.*(\\)\\]$)","\\1"id")("id"\\2","g")}' \
356357
| awk -vdate="2024-03-01T00:00:00+01:00" '{print gensub("(<xmp:ModifyDate>).*(</xmp:ModifyDate>)","\\1"date"\\2","g")}' \
357358
| awk -vdate="2024-03-01T00:00:00+01:00" '{print gensub("(<xmp:CreateDate>).*(</xmp:CreateDate>)","\\1"date"\\2","g")}' \
358359
| awk -vuuid="'uuid=01234567-89ab-cdef-0123-456789abcdef'" '{print gensub("(xapMM:DocumentID=).*(/>$)","\\1"uuid"\\2","g")}' \

epochX/cudacpp/ee_mumu.mad/SubProcesses/Bridge.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,9 +109,9 @@ namespace mg5amcCpu
109109
* @param rndcol the pointer to the input random numbers for color selection
110110
* @param channelId the Feynman diagram to enhance in multi-channel mode if 1 to n (disable multi-channel if 0)
111111
* @param mes the pointer to the output matrix elements
112-
* @param goodHelOnly quit after computing good helicities?
113112
* @param selhel the pointer to the output selected helicities
114113
* @param selcol the pointer to the output selected colors
114+
* @param goodHelOnly quit after computing good helicities?
115115
*/
116116
void gpu_sequence( const FORTRANFPTYPE* momenta,
117117
const FORTRANFPTYPE* gs,

epochX/cudacpp/ee_mumu.mad/SubProcesses/P1_epem_mupmum/auto_dsig1.f

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -528,7 +528,7 @@ SUBROUTINE SMATRIX1_MULTI(P_MULTI, HEL_RAND, COL_RAND, CHANNEL,
528528

529529
IF( FBRIDGE_MODE .LE. 0 ) THEN ! (FortranOnly=0 or BothQuiet=-1 or BothDebug=-2)
530530
#endif
531-
call counters_smatrix1multi_start( -1, VECSIZE_USED ) ! fortran=-1
531+
call counters_smatrix1multi_start( -1, VECSIZE_USED ) ! fortranMEs=-1
532532
!$OMP PARALLEL
533533
!$OMP DO
534534
DO IVEC=1, VECSIZE_USED
@@ -544,7 +544,7 @@ SUBROUTINE SMATRIX1_MULTI(P_MULTI, HEL_RAND, COL_RAND, CHANNEL,
544544
ENDDO
545545
!$OMP END DO
546546
!$OMP END PARALLEL
547-
call counters_smatrix1multi_stop( -1 ) ! fortran=-1
547+
call counters_smatrix1multi_stop( -1 ) ! fortranMEs=-1
548548
#ifdef MG5AMC_MEEXPORTER_CUDACPP
549549
ENDIF
550550

@@ -554,9 +554,10 @@ SUBROUTINE SMATRIX1_MULTI(P_MULTI, HEL_RAND, COL_RAND, CHANNEL,
554554
STOP
555555
ENDIF
556556
IF ( FIRST ) THEN ! exclude first pass (helicity filtering) from timers (#461)
557+
call counters_smatrix1multi_start( 1, VECSIZE_USED ) ! cudacppHEL=1
557558
CALL FBRIDGESEQUENCE_NOMULTICHANNEL( FBRIDGE_PBRIDGE, ! multi channel disabled for helicity filtering
558559
& P_MULTI, ALL_G, HEL_RAND, COL_RAND, OUT2,
559-
& SELECTED_HEL2, SELECTED_COL2 )
560+
& SELECTED_HEL2, SELECTED_COL2, .TRUE.) ! quit after computing helicities
560561
FIRST = .FALSE.
561562
c ! This is a workaround for https://github.com/oliviermattelaer/mg5amc_test/issues/22 (see PR #486)
562563
IF( FBRIDGE_MODE .EQ. 1 ) THEN ! (CppOnly=1 : SMATRIX1 is not called at all)
@@ -570,22 +571,23 @@ SUBROUTINE SMATRIX1_MULTI(P_MULTI, HEL_RAND, COL_RAND, CHANNEL,
570571
ENDIF
571572
WRITE (6,*) 'NGOODHEL =', NGOODHEL
572573
WRITE (6,*) 'NCOMB =', NCOMB
574+
call counters_smatrix1multi_stop( 1 ) ! cudacppHEL=1
573575
ENDIF
574-
call counters_smatrix1multi_start( 0, VECSIZE_USED ) ! cudacpp=0
576+
call counters_smatrix1multi_start( 0, VECSIZE_USED ) ! cudacppMEs=0
575577
IF ( .NOT. MULTI_CHANNEL ) THEN
576578
CALL FBRIDGESEQUENCE_NOMULTICHANNEL( FBRIDGE_PBRIDGE, ! multi channel disabled
577579
& P_MULTI, ALL_G, HEL_RAND, COL_RAND, OUT2,
578-
& SELECTED_HEL2, SELECTED_COL2 )
580+
& SELECTED_HEL2, SELECTED_COL2, .FALSE.) ! do not quit after computing helicities
579581
ELSE
580582
IF( SDE_STRAT.NE.1 ) THEN
581583
WRITE(6,*) 'ERROR! The cudacpp bridge requires SDE=1' ! multi channel single-diagram enhancement strategy
582584
STOP
583585
ENDIF
584-
CALL FBRIDGESEQUENCE(FBRIDGE_PBRIDGE, P_MULTI, ALL_G,
586+
CALL FBRIDGESEQUENCE(FBRIDGE_PBRIDGE, P_MULTI, ALL_G, ! multi channel enabled
585587
& HEL_RAND, COL_RAND, CHANNEL, OUT2,
586-
& SELECTED_HEL2, SELECTED_COL2 ) ! 1-N: multi channel enabled
588+
& SELECTED_HEL2, SELECTED_COL2, .FALSE.) ! do not quit after computing helicities
587589
ENDIF
588-
call counters_smatrix1multi_stop( 0 ) ! cudacpp=0
590+
call counters_smatrix1multi_stop( 0 ) ! cudacppMEs=0
589591
ENDIF
590592

591593
IF( FBRIDGE_MODE .LT. 0 ) THEN ! (BothQuiet=-1 or BothDebug=-2)

0 commit comments

Comments
 (0)