Skip to content
Snippets Groups Projects
Commit d7f941c5 authored by Cristian Lalescu's avatar Cristian Lalescu
Browse files

[bug] code throws FPE with intel 19.1.1

parent fc459114
No related branches found
No related tags found
No related merge requests found
...@@ -148,8 +148,11 @@ kspace<be, dt>::kspace( ...@@ -148,8 +148,11 @@ kspace<be, dt>::kspace(
this->nshells, this->nshells,
MPI_DOUBLE, MPI_SUM, this->layout->comm); MPI_DOUBLE, MPI_SUM, this->layout->comm);
for (int n=0; n<this->nshells; n++){ for (int n=0; n<this->nshells; n++){
volatile double nnshell = std::max(double(this->nshell[n]), 1.0); // using the `volatile` line instead of the if gets the code to work
this->kshell[n] /= nnshell; //volatile double nnshell = std::max(double(this->nshell[n]), 1.0);
if (this->nshell[n] > 0)
//this->kshell[n] /= nnshell;
this->kshell[n] /= this->nshell[n];
} }
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment