Skip to content

Commit

Permalink
[fpe] in gq_ttq.mad, fix the SIGFPE crash for FPTYPE=f 512z builds (m…
Browse files Browse the repository at this point in the history
…adgraph5#845) by adding 'volatile', again

This no longer crashes

gdb ./madevent_cpp -ex 'set pagination off' -ex 'set confirm off' -ex 'set trace-commands on' \
  -ex 'run < /tmp/avalassi/input_gqttq_x1_cudacpp' -ex where -ex l -ex 'p okcol' -ex quit
  • Loading branch information
valassi committed Jun 28, 2024
1 parent 4df870b commit d5a9d09
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -1190,7 +1190,8 @@ namespace mg5amcCpu
for( int icolC = 0; icolC < ncolor; icolC++ )
{
#if defined MGONGPU_CPPSIMD
const bool okcol = allrndcol[ievt] < ( targetamp[icolC][ieppV] / targetamp[ncolor - 1][ieppV] );
// Add volatile here to avoid SIGFPE crashes in FPTYPE=f cpp512z builds (#845)
volatile const bool okcol = allrndcol[ievt] < ( targetamp[icolC][ieppV] / targetamp[ncolor - 1][ieppV] );
#else
const bool okcol = allrndcol[ievt] < ( targetamp[icolC] / targetamp[ncolor - 1] );
#endif
Expand Down

0 comments on commit d5a9d09

Please sign in to comment.