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

Prevent FPE in in task_overlap(). But that FPE should not be there in the first place...

parent db0dc02c
No related branches found
No related tags found
2 merge requests!745Rewrite of MPI loops - Add stellar feedback loops,!744Mpi stars2 matthieu
...@@ -266,6 +266,9 @@ float task_overlap(const struct task *restrict ta, ...@@ -266,6 +266,9 @@ float task_overlap(const struct task *restrict ta,
if (tb->ci != NULL) size_union += tb->ci->hydro.count; if (tb->ci != NULL) size_union += tb->ci->hydro.count;
if (tb->cj != NULL) size_union += tb->cj->hydro.count; if (tb->cj != NULL) size_union += tb->cj->hydro.count;
// MATTHIEU: This should not be necessary
if (size_union == 0) return 0.f;
/* Compute the intersection of the cell data. */ /* Compute the intersection of the cell data. */
const size_t size_intersect = task_cell_overlap_part(ta->ci, tb->ci) + const size_t size_intersect = task_cell_overlap_part(ta->ci, tb->ci) +
task_cell_overlap_part(ta->ci, tb->cj) + task_cell_overlap_part(ta->ci, tb->cj) +
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment