Skip to content
Snippets Groups Projects
Commit 523c55c1 authored by Matthieu Schaller's avatar Matthieu Schaller Committed by Matthieu Schaller
Browse files

Throw errors if self/pair are found in the ghosts

parent e71ace11
No related branches found
No related tags found
1 merge request!1353Draft: Subtask speedup - Still requires work
......@@ -472,13 +472,20 @@ void runner_do_stars_ghost(struct runner *r, struct cell *c, int timer) {
#endif
/* Self-interaction? */
if (l->t->type == task_type_self)
if (l->t->type == task_type_self) {
#ifdef ONLY_SUBTASKS
error("Found some self tasks!");
#else
runner_doself_subset_branch_stars_density(r, finger, sparts, sid,
scount);
#endif
}
/* Otherwise, pair interaction? */
else if (l->t->type == task_type_pair) {
#ifdef ONLY_SUBTASKS
error("Found some pair tasks!");
#else
/* Left or right? */
if (l->t->ci == finger)
runner_dopair_subset_branch_stars_density(
......@@ -486,6 +493,7 @@ void runner_do_stars_ghost(struct runner *r, struct cell *c, int timer) {
else
runner_dopair_subset_branch_stars_density(
r, finger, sparts, sid, scount, l->t->ci);
#endif
}
/* Otherwise, sub-self interaction? */
......@@ -802,13 +810,21 @@ void runner_do_black_holes_density_ghost(struct runner *r, struct cell *c,
#endif
/* Self-interaction? */
if (l->t->type == task_type_self)
if (l->t->type == task_type_self){
#ifdef ONLY_SUBTASKS
error("Found some self tasks!");
#else
runner_doself_subset_branch_bh_density(r, finger, bparts, sid,
bcount);
#endif
}
/* Otherwise, pair interaction? */
else if (l->t->type == task_type_pair) {
#ifdef ONLY_SUBTASKS
error("Found some pair tasks!");
#else
/* Left or right? */
if (l->t->ci == finger)
runner_dopair_subset_branch_bh_density(r, finger, bparts, sid,
......@@ -816,6 +832,7 @@ void runner_do_black_holes_density_ghost(struct runner *r, struct cell *c,
else
runner_dopair_subset_branch_bh_density(r, finger, bparts, sid,
bcount, l->t->ci);
#endif
}
/* Otherwise, sub-self interaction? */
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment