Skip to content
Snippets Groups Projects
Commit 68b26f5d authored by Matthieu Schaller's avatar Matthieu Schaller
Browse files

Fix FPE arising from the Intel compiler vectorising a loop but not masking the...

Fix FPE arising from the Intel compiler vectorising a loop but not masking the elements beyond the loop count and hence triggering the checks switched on by -e
parent 000eb27c
No related branches found
No related tags found
No related merge requests found
...@@ -963,7 +963,13 @@ void space_collect_mean_masses(struct space *s, int verbose) { ...@@ -963,7 +963,13 @@ void space_collect_mean_masses(struct space *s, int verbose) {
MPI_LONG_LONG, MPI_SUM, MPI_COMM_WORLD); MPI_LONG_LONG, MPI_SUM, MPI_COMM_WORLD);
#endif #endif
/* Get means */ /* Get means
*
* Note: the Intel compiler vectorizes this loop and creates FPEs from
* the masked bit of the vector... Silly ICC... */
#if defined(__ICC)
#pragma novector
#endif
for (int i = 0; i < swift_type_count; ++i) for (int i = 0; i < swift_type_count; ++i)
if (s->initial_count_particles[i] > 0) if (s->initial_count_particles[i] > 0)
s->initial_mean_mass_particles[i] /= s->initial_mean_mass_particles[i] /=
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment