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

Make sure the self tasks get a drift even when we don't need to split them at the top level.

parent 297b1a65
No related branches found
No related tags found
1 merge request!327Rebuild criteria
...@@ -173,6 +173,13 @@ static void scheduler_splittask(struct task *t, struct scheduler *s) { ...@@ -173,6 +173,13 @@ static void scheduler_splittask(struct task *t, struct scheduler *s) {
/* convert to a self-subtask. */ /* convert to a self-subtask. */
t->type = task_type_sub_self; t->type = task_type_sub_self;
/* Make sure we have a drift task */
lock_lock(&ci->lock);
if (ci->drift == NULL)
ci->drift = scheduler_addtask(s, task_type_drift, task_subtype_none,
0, 0, ci, NULL, 0);
lock_unlock_blind(&ci->lock);
/* Depend on local sorts on this cell. */ /* Depend on local sorts on this cell. */
if (ci->sorts != NULL) scheduler_addunlock(s, ci->sorts, t); if (ci->sorts != NULL) scheduler_addunlock(s, ci->sorts, t);
......
  • Developer

    Why do the sub-cell self tasks need the drift to be there? They don't depend on it (at least they shouldn't), as they drift the particles on the fly.

  • Owner

    At the moment my gravity tasks don't trigger a drift of the particles. They need a drift task to exist.

  • Owner

    I will need to look back at splittask and very likely make an independent version for the gravity tasks. I did not want to break functionalities for now. Let me make that drift task creation only for gravity sub-types.

  • Developer

    OK, good for me then!

0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment