Skip to content

Commit

Permalink
Merge pull request madgraph5#706 from valassi/nobm
Browse files Browse the repository at this point in the history
fix FPEs and debug nobm_pp_ttW for ATLAS
  • Loading branch information
valassi authored Dec 16, 2023
2 parents b9f16e9 + e84a7b8 commit 80ff716
Show file tree
Hide file tree
Showing 163 changed files with 43,842 additions and 6,956 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/testsuite_allprocesses.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ jobs:
fail-fast: false # important to see all results even if one fails (fail-fast is true by default)
matrix:
# FIXME? Can the list of supported processes be specified only once in oneprocess.yml or allprocesses.yml?
process: [ee_mumu, gg_tt, gg_ttg, gg_ttgg, gg_ttggg, gg_tt01g, gq_ttq, pp_tt012j]
process: [ee_mumu, gg_tt, gg_ttg, gg_ttgg, gg_ttggg, gg_tt01g, gq_ttq, pp_tt012j, nobm_pp_ttW]
suffix: [mad, sa]
uses: ./.github/workflows/testsuite_oneprocess.yml
with:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/testsuite_oneprocess.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ on:
###type: string
type: choice
# FIXME? Can the list of supported processes be specified only once in oneprocess.yml or allprocesses.yml?
options: [gg_tt.mad, gg_ttg.mad, gg_ttgg.mad, gg_ttggg.mad, ee_mumu.mad]
options: [gg_tt.mad, gg_ttg.mad, gg_ttgg.mad, gg_ttggg.mad, ee_mumu.mad, nobm_pp_ttW.mad]

#----------------------------------------------------------------------------------------------------------------------------------

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,23 +67,26 @@
}
#ifdef MGONGPU_SUPPORTS_MULTICHANNEL
// Event-by-event random choice of color #402
const int channelIdC = channelId - 1; // coloramps.h uses the C array indexing starting at 0
fptype targetamp[ncolor] = { 0 };
for( int icolC = 0; icolC < ncolor; icolC++ )
if( channelId != 0 ) // no event-by-event choice of color if channelId == 0 (fix FPE #783)
{
if( icolC == 0 )
targetamp[icolC] = 0;
else
targetamp[icolC] = targetamp[icolC - 1];
if( mgOnGpu::icolamp[channelIdC][icolC] ) targetamp[icolC] += jamp2_sv[icolC];
}
//printf( "sigmaKin: ievt=%%4d rndcol=%%f\n", ievt, allrndcol[ievt] );
for( int icolC = 0; icolC < ncolor; icolC++ )
{
if( allrndcol[ievt] < ( targetamp[icolC] / targetamp[ncolor - 1] ) )
const unsigned int channelIdC = channelId - 1; // coloramps.h uses the C array indexing starting at 0
fptype targetamp[ncolor] = { 0 };
for( int icolC = 0; icolC < ncolor; icolC++ )
{
allselcol[ievt] = icolC + 1; // NB Fortran [1,ncolor], cudacpp [0,ncolor-1]
break;
if( icolC == 0 )
targetamp[icolC] = 0;
else
targetamp[icolC] = targetamp[icolC - 1];
if( mgOnGpu::icolamp[channelIdC][icolC] ) targetamp[icolC] += jamp2_sv[icolC];
}
//printf( "sigmaKin: ievt=%%4d rndcol=%%f\n", ievt, allrndcol[ievt] );
for( int icolC = 0; icolC < ncolor; icolC++ )
{
if( allrndcol[ievt] < ( targetamp[icolC] / targetamp[ncolor - 1] ) )
{
allselcol[ievt] = icolC + 1; // NB Fortran [1,ncolor], cudacpp [0,ncolor-1]
break;
}
}
}
#endif
Expand Down Expand Up @@ -178,57 +181,60 @@
#endif
}
#ifdef MGONGPU_SUPPORTS_MULTICHANNEL // multichannel enabled (random color choice)
const int channelIdC = channelId - 1; // coloramps.h uses the C array indexing starting at 0
// Event-by-event random choice of color #402
fptype_sv targetamp[ncolor] = { 0 };
for( int icolC = 0; icolC < ncolor; icolC++ )
if( channelId != 0 ) // no event-by-event choice of color if channelId == 0 (fix FPE #783)
{
if( icolC == 0 )
targetamp[icolC] = fptype_sv{ 0 };
else
targetamp[icolC] = targetamp[icolC - 1];
if( mgOnGpu::icolamp[channelIdC][icolC] ) targetamp[icolC] += jamp2_sv[icolC];
}
const unsigned int channelIdC = channelId - 1; // coloramps.h uses the C array indexing starting at 0
fptype_sv targetamp[ncolor] = { 0 };
for( int icolC = 0; icolC < ncolor; icolC++ )
{
if( icolC == 0 )
targetamp[icolC] = fptype_sv{ 0 };
else
targetamp[icolC] = targetamp[icolC - 1];
if( mgOnGpu::icolamp[channelIdC][icolC] ) targetamp[icolC] += jamp2_sv[icolC];
}
#if defined MGONGPU_CPPSIMD and defined MGONGPU_FPTYPE_DOUBLE and defined MGONGPU_FPTYPE2_FLOAT
fptype_sv targetamp2[ncolor] = { 0 };
for( int icolC = 0; icolC < ncolor; icolC++ )
{
if( icolC == 0 )
targetamp2[icolC] = fptype_sv{ 0 };
else
targetamp2[icolC] = targetamp2[icolC - 1];
if( mgOnGpu::icolamp[channelIdC][icolC] ) targetamp2[icolC] += jamp2_sv[ncolor + icolC];
}
#endif
for( int ieppV = 0; ieppV < neppV; ++ieppV )
{
const int ievt = ievt00 + ieppV;
//printf( "sigmaKin: ievt=%%4d rndcol=%%f\n", ievt, allrndcol[ievt] );
fptype_sv targetamp2[ncolor] = { 0 };
for( int icolC = 0; icolC < ncolor; icolC++ )
{
if( icolC == 0 )
targetamp2[icolC] = fptype_sv{ 0 };
else
targetamp2[icolC] = targetamp2[icolC - 1];
if( mgOnGpu::icolamp[channelIdC][icolC] ) targetamp2[icolC] += jamp2_sv[ncolor + icolC];
}
#endif
for( int ieppV = 0; ieppV < neppV; ++ieppV )
{
const int ievt = ievt00 + ieppV;
//printf( "sigmaKin: ievt=%%4d rndcol=%%f\n", ievt, allrndcol[ievt] );
for( int icolC = 0; icolC < ncolor; icolC++ )
{
#if defined MGONGPU_CPPSIMD
const bool okcol = allrndcol[ievt] < ( targetamp[icolC][ieppV] / targetamp[ncolor - 1][ieppV] );
const bool okcol = allrndcol[ievt] < ( targetamp[icolC][ieppV] / targetamp[ncolor - 1][ieppV] );
#else
const bool okcol = allrndcol[ievt] < ( targetamp[icolC] / targetamp[ncolor - 1] );
const bool okcol = allrndcol[ievt] < ( targetamp[icolC] / targetamp[ncolor - 1] );
#endif
if( okcol )
{
allselcol[ievt] = icolC + 1; // NB Fortran [1,ncolor], cudacpp [0,ncolor-1]
break;
if( okcol )
{
allselcol[ievt] = icolC + 1; // NB Fortran [1,ncolor], cudacpp [0,ncolor-1]
break;
}
}
}
#if defined MGONGPU_CPPSIMD and defined MGONGPU_FPTYPE_DOUBLE and defined MGONGPU_FPTYPE2_FLOAT
const int ievt2 = ievt00 + ieppV + neppV;
//printf( "sigmaKin: ievt=%%4d rndcol=%%f\n", ievt2, allrndcol[ievt2] );
for( int icolC = 0; icolC < ncolor; icolC++ )
{
if( allrndcol[ievt2] < ( targetamp2[icolC][ieppV] / targetamp2[ncolor - 1][ieppV] ) )
const int ievt2 = ievt00 + ieppV + neppV;
//printf( "sigmaKin: ievt=%%4d rndcol=%%f\n", ievt2, allrndcol[ievt2] );
for( int icolC = 0; icolC < ncolor; icolC++ )
{
allselcol[ievt2] = icolC + 1; // NB Fortran [1,ncolor], cudacpp [0,ncolor-1]
break;
if( allrndcol[ievt2] < ( targetamp2[icolC][ieppV] / targetamp2[ncolor - 1][ieppV] ) )
{
allselcol[ievt2] = icolC + 1; // NB Fortran [1,ncolor], cudacpp [0,ncolor-1]
break;
}
}
}
#endif
}
}
#endif // multichannel enabled (random color choice)
}
Expand Down
Loading

0 comments on commit 80ff716

Please sign in to comment.