Skip to content

Commit

Permalink
[clang] in gg_tt.mad and CODEGEN EventStatistics.h, work around FPE c…
Browse files Browse the repository at this point in the history
…rash madgraph5#1005 on clang16 by disabling optimizations for operator+=

This extends to any clang the previous workaround for madgraph5#1003 which had been defined only for HIP clang
  • Loading branch information
valassi committed Sep 18, 2024
1 parent 70f40cc commit a3b6ab4
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -106,8 +106,9 @@ namespace mg5amcCpu
, sqsWGdiff( 0 )
, tag( "" ) {}
// Combine two EventStatistics
#if __HIP_CLANG_ONLY__
// Disable optimizations for this function in HIPCC (work around FPE crash #1003)
#ifdef __clang__
// Disable optimizations for this function in HIP (work around FPE crash #1003: originally using #if __HIP_CLANG_ONLY__)
// Disable optimizations for this function in clang tout court (work around FPE crash #1005: now using #ifdef __clang__)
// See https://clang.llvm.org/docs/LanguageExtensions.html#extensions-for-selectively-disabling-optimization
__attribute__( ( optnone ) )
#endif
Expand Down
5 changes: 3 additions & 2 deletions epochX/cudacpp/gg_tt.mad/SubProcesses/EventStatistics.h
Original file line number Diff line number Diff line change
Expand Up @@ -106,8 +106,9 @@ namespace mg5amcCpu
, sqsWGdiff( 0 )
, tag( "" ) {}
// Combine two EventStatistics
#if __HIP_CLANG_ONLY__
// Disable optimizations for this function in HIPCC (work around FPE crash #1003)
#ifdef __clang__
// Disable optimizations for this function in HIP (work around FPE crash #1003: originally using #if __HIP_CLANG_ONLY__)
// Disable optimizations for this function in clang tout court (work around FPE crash #1005: now using #ifdef __clang__)
// See https://clang.llvm.org/docs/LanguageExtensions.html#extensions-for-selectively-disabling-optimization
__attribute__( ( optnone ) )
#endif
Expand Down

0 comments on commit a3b6ab4

Please sign in to comment.