Commit d84a2bd5 authored by Matthieu Schaller's avatar Matthieu Schaller
Browse files

Only add the extra tasks to the scheduler mask if they exist. Better be safe than sorry.

parent ce6b6c58
......@@ -2723,12 +2723,14 @@ void engine_step(struct engine *e) {
mask |= 1 << task_type_sub_self;
mask |= 1 << task_type_sub_pair;
mask |= 1 << task_type_ghost;
mask |= 1 << task_type_extra_ghost; /* Adding unnecessary things to the mask
does not harm */
submask |= 1 << task_subtype_density;
submask |= 1 << task_subtype_gradient;
submask |= 1 << task_subtype_force;
#ifdef EXTRA_HYDRO_LOOP
mask |= 1 << task_type_extra_ghost;
submask |= 1 << task_subtype_gradient;
#endif
}
/* Add the tasks corresponding to self-gravity to the masks */
......
......@@ -1136,8 +1136,7 @@ void *runner_main(void *data) {
/* Different types of tasks... */
switch (t->type) {
case task_type_self:
if (t->subtype == task_subtype_density)
runner_doself1_density(r, ci);
if (t->subtype == task_subtype_density) runner_doself1_density(r, ci);
#ifdef EXTRA_HYDRO_LOOP
else if (t->subtype == task_subtype_gradient)
runner_doself1_gradient(r, ci);
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment