Skip to content

Commit

Permalink
[clang] regenerate all processes with fixes for clang16 FPE madgraph5…
Browse files Browse the repository at this point in the history
…#1005 and for gcc142 cxtype_ref madgraph5#1003
  • Loading branch information
valassi committed Sep 18, 2024
1 parent a3b6ab4 commit da50539
Show file tree
Hide file tree
Showing 89 changed files with 425 additions and 359 deletions.
12 changes: 6 additions & 6 deletions epochX/cudacpp/ee_mumu.mad/CODEGEN_mad_ee_mumu_log.txt
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ generate e+ e- > mu+ mu-
No model currently active, so we import the Standard Model
INFO: load particles
INFO: load vertices
DEBUG: model prefixing takes 0.005580425262451172 
DEBUG: model prefixing takes 0.005605936050415039 
INFO: Restrict model sm with file models/sm/restrict_default.dat .
DEBUG: Simplifying conditional expressions 
DEBUG: remove interactions: u s w+ at order: QED=1 
Expand Down Expand Up @@ -182,7 +182,7 @@ INFO: Finding symmetric diagrams for subprocess group epem_mupmum
DEBUG: iconfig_to_diag =  {1: 1, 2: 2} [model_handling.py at line 1547] 
DEBUG: diag_to_iconfig =  {1: 1, 2: 2} [model_handling.py at line 1548] 
Generated helas calls for 1 subprocesses (2 diagrams) in 0.004 s
Wrote files for 8 helas calls in 0.072 s
Wrote files for 8 helas calls in 0.071 s
DEBUG: self.vector_size =  32 [export_v4.py at line 7023] 
ALOHA: aloha starts to compute helicity amplitudes
ALOHA: aloha creates FFV1 routines
Expand All @@ -194,7 +194,7 @@ ALOHA: aloha creates FFV1 routines
ALOHA: aloha creates FFV2 routines
ALOHA: aloha creates FFV4 routines
ALOHA: aloha creates FFV2_4 routines
ALOHA: aloha creates 7 routines in 0.262 s
ALOHA: aloha creates 7 routines in 0.260 s
<class 'aloha.create_aloha.AbstractRoutine'> FFV1
<class 'aloha.create_aloha.AbstractRoutine'> FFV1
<class 'aloha.create_aloha.AbstractRoutine'> FFV2
Expand Down Expand Up @@ -234,9 +234,9 @@ Type "launch" to generate events from this process, or see
Run "open index.html" to see more information about this process.
quit

real 0m2.122s
user 0m1.803s
sys 0m0.276s
real 0m2.087s
user 0m1.815s
sys 0m0.264s
Code generation completed in 2 seconds
************************************************************
* *
Expand Down
5 changes: 3 additions & 2 deletions epochX/cudacpp/ee_mumu.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
11 changes: 6 additions & 5 deletions epochX/cudacpp/ee_mumu.mad/src/mgOnGpuCxtypes.h
Original file line number Diff line number Diff line change
Expand Up @@ -704,28 +704,29 @@ namespace mg5amcGpu
namespace mg5amcCpu
#endif
{
// The cxtype_ref class (a non-const reference to two fp variables) was originally designed for cxtype_v::operator[]
// The cxtype_ref class (a const reference to two non-const fp variables) was originally designed for cxtype_v::operator[]
// It used to be included in the code only when MGONGPU_HAS_CPPCXTYPEV_BRK (originally MGONGPU_HAS_CPPCXTYPE_REF) is defined
// It is now always included in the code because it is needed also to access an fptype wavefunction buffer as a cxtype
class cxtype_ref
{
public:
cxtype_ref() = delete;
cxtype_ref( const cxtype_ref& ) = delete;
cxtype_ref( cxtype_ref&& ) = default; // copy refs
cxtype_ref( cxtype_ref&& ) = default; // copy const refs
__host__ __device__ cxtype_ref( fptype& r, fptype& i )
: m_preal( &r ), m_pimag( &i ) {} // copy refs
: m_preal( &r ), m_pimag( &i ) {} // copy (create from) const refs
cxtype_ref& operator=( const cxtype_ref& ) = delete;
//__host__ __device__ cxtype_ref& operator=( cxtype_ref&& c ) {...} // REMOVED! Should copy refs or copy values? No longer needed in cxternary
__host__ __device__ cxtype_ref& operator=( const cxtype& c )
{
*m_preal = cxreal( c );
*m_pimag = cximag( c );
return *this;
} // copy values
} // copy (assign) non-const values
__host__ __device__ operator cxtype() const { return cxmake( *m_preal, *m_pimag ); }
private:
fptype *m_preal, *m_pimag; // RI
fptype* const m_preal; // const pointer to non-const fptype R
fptype* const m_pimag; // const pointer to non-const fptype I
};

// Printout to stream for user defined types
Expand Down
5 changes: 3 additions & 2 deletions epochX/cudacpp/ee_mumu.mad/src/mgOnGpuVectors.h
Original file line number Diff line number Diff line change
Expand Up @@ -104,8 +104,9 @@ namespace mg5amcCpu
#ifdef MGONGPU_HAS_CPPCXTYPEV_BRK
// NB: THIS IS THE FUNDAMENTAL DIFFERENCE BETWEEN MGONGPU_HAS_CPPCXTYPEV_BRK DEFINED AND NOT DEFINED
// NB: the alternative "clang" implementation is simpler: it simply does not have any bracket operator[]
// NB: ** do NOT implement operator[] to return a value: it does not fail the build (why?) and gives unexpected results! **
cxtype_ref operator[]( size_t i ) const { return cxtype_ref( m_real[i], m_imag[i] ); }
//cxtype_ref operator[]( size_t i ) const { return cxtype_ref( m_real[i], m_imag[i] ); } // gcc14.2 build fails #1004
cxtype_ref operator[]( size_t i ) { return cxtype_ref( m_real[i], m_imag[i] ); }
cxtype operator[]( size_t i ) const { return cxtype( m_real[i], m_imag[i] ); }
#endif
const fptype_v& real() const
{
Expand Down
12 changes: 6 additions & 6 deletions epochX/cudacpp/ee_mumu.sa/CODEGEN_cudacpp_ee_mumu_log.txt
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ generate e+ e- > mu+ mu-
No model currently active, so we import the Standard Model
INFO: load particles
INFO: load vertices
DEBUG: model prefixing takes 0.005712270736694336 
DEBUG: model prefixing takes 0.005640983581542969 
INFO: Restrict model sm with file models/sm/restrict_default.dat .
DEBUG: Simplifying conditional expressions 
DEBUG: remove interactions: u s w+ at order: QED=1 
Expand Down Expand Up @@ -177,7 +177,7 @@ ALOHA: aloha creates FFV1 routines
ALOHA: aloha creates FFV2 routines
ALOHA: aloha creates FFV4 routines
ALOHA: aloha creates FFV2_4 routines
ALOHA: aloha creates 4 routines in 0.281 s
ALOHA: aloha creates 4 routines in 0.282 s
<class 'aloha.create_aloha.AbstractRoutine'> FFV1
<class 'aloha.create_aloha.AbstractRoutine'> FFV1
<class 'aloha.create_aloha.AbstractRoutine'> FFV2
Expand All @@ -196,7 +196,7 @@ INFO: Created files Parameters_sm.h and Parameters_sm.cc in directory
INFO: /data/avalassi/GPU2023/madgraph4gpuX/MG5aMC/TMPOUT/CODEGEN_cudacpp_ee_mumu/src/. and /data/avalassi/GPU2023/madgraph4gpuX/MG5aMC/TMPOUT/CODEGEN_cudacpp_ee_mumu/src/.
quit

real 0m0.674s
user 0m0.618s
sys 0m0.051s
Code generation completed in 0 seconds
real 0m0.764s
user 0m0.619s
sys 0m0.055s
Code generation completed in 1 seconds
5 changes: 3 additions & 2 deletions epochX/cudacpp/ee_mumu.sa/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
11 changes: 6 additions & 5 deletions epochX/cudacpp/ee_mumu.sa/src/mgOnGpuCxtypes.h
Original file line number Diff line number Diff line change
Expand Up @@ -704,28 +704,29 @@ namespace mg5amcGpu
namespace mg5amcCpu
#endif
{
// The cxtype_ref class (a non-const reference to two fp variables) was originally designed for cxtype_v::operator[]
// The cxtype_ref class (a const reference to two non-const fp variables) was originally designed for cxtype_v::operator[]
// It used to be included in the code only when MGONGPU_HAS_CPPCXTYPEV_BRK (originally MGONGPU_HAS_CPPCXTYPE_REF) is defined
// It is now always included in the code because it is needed also to access an fptype wavefunction buffer as a cxtype
class cxtype_ref
{
public:
cxtype_ref() = delete;
cxtype_ref( const cxtype_ref& ) = delete;
cxtype_ref( cxtype_ref&& ) = default; // copy refs
cxtype_ref( cxtype_ref&& ) = default; // copy const refs
__host__ __device__ cxtype_ref( fptype& r, fptype& i )
: m_preal( &r ), m_pimag( &i ) {} // copy refs
: m_preal( &r ), m_pimag( &i ) {} // copy (create from) const refs
cxtype_ref& operator=( const cxtype_ref& ) = delete;
//__host__ __device__ cxtype_ref& operator=( cxtype_ref&& c ) {...} // REMOVED! Should copy refs or copy values? No longer needed in cxternary
__host__ __device__ cxtype_ref& operator=( const cxtype& c )
{
*m_preal = cxreal( c );
*m_pimag = cximag( c );
return *this;
} // copy values
} // copy (assign) non-const values
__host__ __device__ operator cxtype() const { return cxmake( *m_preal, *m_pimag ); }
private:
fptype *m_preal, *m_pimag; // RI
fptype* const m_preal; // const pointer to non-const fptype R
fptype* const m_pimag; // const pointer to non-const fptype I
};

// Printout to stream for user defined types
Expand Down
5 changes: 3 additions & 2 deletions epochX/cudacpp/ee_mumu.sa/src/mgOnGpuVectors.h
Original file line number Diff line number Diff line change
Expand Up @@ -104,8 +104,9 @@ namespace mg5amcCpu
#ifdef MGONGPU_HAS_CPPCXTYPEV_BRK
// NB: THIS IS THE FUNDAMENTAL DIFFERENCE BETWEEN MGONGPU_HAS_CPPCXTYPEV_BRK DEFINED AND NOT DEFINED
// NB: the alternative "clang" implementation is simpler: it simply does not have any bracket operator[]
// NB: ** do NOT implement operator[] to return a value: it does not fail the build (why?) and gives unexpected results! **
cxtype_ref operator[]( size_t i ) const { return cxtype_ref( m_real[i], m_imag[i] ); }
//cxtype_ref operator[]( size_t i ) const { return cxtype_ref( m_real[i], m_imag[i] ); } // gcc14.2 build fails #1004
cxtype_ref operator[]( size_t i ) { return cxtype_ref( m_real[i], m_imag[i] ); }
cxtype operator[]( size_t i ) const { return cxtype( m_real[i], m_imag[i] ); }
#endif
const fptype_v& real() const
{
Expand Down
12 changes: 6 additions & 6 deletions epochX/cudacpp/gg_tt.mad/CODEGEN_mad_gg_tt_log.txt
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ generate g g > t t~
No model currently active, so we import the Standard Model
INFO: load particles
INFO: load vertices
DEBUG: model prefixing takes 0.005618095397949219 
DEBUG: model prefixing takes 0.005740642547607422 
INFO: Restrict model sm with file models/sm/restrict_default.dat .
DEBUG: Simplifying conditional expressions 
DEBUG: remove interactions: u s w+ at order: QED=1 
Expand Down Expand Up @@ -188,11 +188,11 @@ Wrote files for 10 helas calls in 0.073 s
ALOHA: aloha starts to compute helicity amplitudes
ALOHA: aloha creates VVV1 set of routines with options: P0
ALOHA: aloha creates FFV1 routines
ALOHA: aloha creates 2 routines in 0.151 s
ALOHA: aloha creates 2 routines in 0.152 s
ALOHA: aloha starts to compute helicity amplitudes
ALOHA: aloha creates VVV1 set of routines with options: P0
ALOHA: aloha creates FFV1 routines
ALOHA: aloha creates 4 routines in 0.138 s
ALOHA: aloha creates 4 routines in 0.137 s
<class 'aloha.create_aloha.AbstractRoutine'> VVV1
<class 'aloha.create_aloha.AbstractRoutine'> FFV1
<class 'aloha.create_aloha.AbstractRoutine'> FFV1
Expand Down Expand Up @@ -228,9 +228,9 @@ Type "launch" to generate events from this process, or see
Run "open index.html" to see more information about this process.
quit

real 0m1.928s
user 0m1.656s
sys 0m0.269s
real 0m1.933s
user 0m1.680s
sys 0m0.251s
Code generation completed in 2 seconds
************************************************************
* *
Expand Down
6 changes: 3 additions & 3 deletions epochX/cudacpp/gg_tt.sa/CODEGEN_cudacpp_gg_tt_log.txt
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ generate g g > t t~
No model currently active, so we import the Standard Model
INFO: load particles
INFO: load vertices
DEBUG: model prefixing takes 0.005679607391357422 
DEBUG: model prefixing takes 0.005649089813232422 
INFO: Restrict model sm with file models/sm/restrict_default.dat .
DEBUG: Simplifying conditional expressions 
DEBUG: remove interactions: u s w+ at order: QED=1 
Expand Down Expand Up @@ -176,7 +176,7 @@ Generated helas calls for 1 subprocesses (3 diagrams) in 0.006 s
ALOHA: aloha starts to compute helicity amplitudes
ALOHA: aloha creates VVV1 set of routines with options: P0
ALOHA: aloha creates FFV1 routines
ALOHA: aloha creates 2 routines in 0.149 s
ALOHA: aloha creates 2 routines in 0.147 s
<class 'aloha.create_aloha.AbstractRoutine'> VVV1
<class 'aloha.create_aloha.AbstractRoutine'> FFV1
<class 'aloha.create_aloha.AbstractRoutine'> FFV1
Expand All @@ -191,7 +191,7 @@ INFO: Created files Parameters_sm.h and Parameters_sm.cc in directory
INFO: /data/avalassi/GPU2023/madgraph4gpuX/MG5aMC/TMPOUT/CODEGEN_cudacpp_gg_tt/src/. and /data/avalassi/GPU2023/madgraph4gpuX/MG5aMC/TMPOUT/CODEGEN_cudacpp_gg_tt/src/.
quit

real 0m0.548s
real 0m0.547s
user 0m0.489s
sys 0m0.049s
Code generation completed in 1 seconds
5 changes: 3 additions & 2 deletions epochX/cudacpp/gg_tt.sa/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
11 changes: 6 additions & 5 deletions epochX/cudacpp/gg_tt.sa/src/mgOnGpuCxtypes.h
Original file line number Diff line number Diff line change
Expand Up @@ -704,28 +704,29 @@ namespace mg5amcGpu
namespace mg5amcCpu
#endif
{
// The cxtype_ref class (a non-const reference to two fp variables) was originally designed for cxtype_v::operator[]
// The cxtype_ref class (a const reference to two non-const fp variables) was originally designed for cxtype_v::operator[]
// It used to be included in the code only when MGONGPU_HAS_CPPCXTYPEV_BRK (originally MGONGPU_HAS_CPPCXTYPE_REF) is defined
// It is now always included in the code because it is needed also to access an fptype wavefunction buffer as a cxtype
class cxtype_ref
{
public:
cxtype_ref() = delete;
cxtype_ref( const cxtype_ref& ) = delete;
cxtype_ref( cxtype_ref&& ) = default; // copy refs
cxtype_ref( cxtype_ref&& ) = default; // copy const refs
__host__ __device__ cxtype_ref( fptype& r, fptype& i )
: m_preal( &r ), m_pimag( &i ) {} // copy refs
: m_preal( &r ), m_pimag( &i ) {} // copy (create from) const refs
cxtype_ref& operator=( const cxtype_ref& ) = delete;
//__host__ __device__ cxtype_ref& operator=( cxtype_ref&& c ) {...} // REMOVED! Should copy refs or copy values? No longer needed in cxternary
__host__ __device__ cxtype_ref& operator=( const cxtype& c )
{
*m_preal = cxreal( c );
*m_pimag = cximag( c );
return *this;
} // copy values
} // copy (assign) non-const values
__host__ __device__ operator cxtype() const { return cxmake( *m_preal, *m_pimag ); }
private:
fptype *m_preal, *m_pimag; // RI
fptype* const m_preal; // const pointer to non-const fptype R
fptype* const m_pimag; // const pointer to non-const fptype I
};

// Printout to stream for user defined types
Expand Down
5 changes: 3 additions & 2 deletions epochX/cudacpp/gg_tt.sa/src/mgOnGpuVectors.h
Original file line number Diff line number Diff line change
Expand Up @@ -104,8 +104,9 @@ namespace mg5amcCpu
#ifdef MGONGPU_HAS_CPPCXTYPEV_BRK
// NB: THIS IS THE FUNDAMENTAL DIFFERENCE BETWEEN MGONGPU_HAS_CPPCXTYPEV_BRK DEFINED AND NOT DEFINED
// NB: the alternative "clang" implementation is simpler: it simply does not have any bracket operator[]
// NB: ** do NOT implement operator[] to return a value: it does not fail the build (why?) and gives unexpected results! **
cxtype_ref operator[]( size_t i ) const { return cxtype_ref( m_real[i], m_imag[i] ); }
//cxtype_ref operator[]( size_t i ) const { return cxtype_ref( m_real[i], m_imag[i] ); } // gcc14.2 build fails #1004
cxtype_ref operator[]( size_t i ) { return cxtype_ref( m_real[i], m_imag[i] ); }
cxtype operator[]( size_t i ) const { return cxtype( m_real[i], m_imag[i] ); }
#endif
const fptype_v& real() const
{
Expand Down
16 changes: 8 additions & 8 deletions epochX/cudacpp/gg_tt01g.mad/CODEGEN_mad_gg_tt01g_log.txt
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ generate g g > t t~
No model currently active, so we import the Standard Model
INFO: load particles
INFO: load vertices
DEBUG: model prefixing takes 0.005785465240478516 
DEBUG: model prefixing takes 0.0056819915771484375 
INFO: Restrict model sm with file models/sm/restrict_default.dat .
DEBUG: Simplifying conditional expressions 
DEBUG: remove interactions: u s w+ at order: QED=1 
Expand Down Expand Up @@ -204,22 +204,22 @@ INFO: Finding symmetric diagrams for subprocess group gg_ttx
DEBUG: iconfig_to_diag =  {1: 1, 2: 2, 3: 3} [model_handling.py at line 1547] 
DEBUG: diag_to_iconfig =  {1: 1, 2: 2, 3: 3} [model_handling.py at line 1548] 
Generated helas calls for 2 subprocesses (19 diagrams) in 0.044 s
Wrote files for 46 helas calls in 0.194 s
Wrote files for 46 helas calls in 0.191 s
DEBUG: self.vector_size =  32 [export_v4.py at line 7023] 
ALOHA: aloha starts to compute helicity amplitudes
ALOHA: aloha creates VVV1 routines
ALOHA: aloha creates FFV1 routines
ALOHA: aloha creates VVVV1 set of routines with options: P0
ALOHA: aloha creates VVVV3 set of routines with options: P0
ALOHA: aloha creates VVVV4 set of routines with options: P0
ALOHA: aloha creates 5 routines in 0.342 s
ALOHA: aloha creates 5 routines in 0.337 s
ALOHA: aloha starts to compute helicity amplitudes
ALOHA: aloha creates VVV1 routines
ALOHA: aloha creates FFV1 routines
ALOHA: aloha creates VVVV1 set of routines with options: P0
ALOHA: aloha creates VVVV3 set of routines with options: P0
ALOHA: aloha creates VVVV4 set of routines with options: P0
ALOHA: aloha creates 10 routines in 0.323 s
ALOHA: aloha creates 10 routines in 0.318 s
<class 'aloha.create_aloha.AbstractRoutine'> VVV1
<class 'aloha.create_aloha.AbstractRoutine'> VVV1
<class 'aloha.create_aloha.AbstractRoutine'> FFV1
Expand Down Expand Up @@ -267,10 +267,10 @@ Type "launch" to generate events from this process, or see
Run "open index.html" to see more information about this process.
quit

real 0m2.663s
user 0m2.360s
sys 0m0.300s
Code generation completed in 3 seconds
real 0m2.650s
user 0m2.337s
sys 0m0.308s
Code generation completed in 2 seconds
************************************************************
* *
* W E L C O M E to *
Expand Down
5 changes: 3 additions & 2 deletions epochX/cudacpp/gg_tt01g.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
Loading

0 comments on commit da50539

Please sign in to comment.