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

Error messages in the task_acts_on() function only when using debugging checks.

parent a3505366
No related branches found
No related tags found
2 merge requests!745Rewrite of MPI loops - Add stellar feedback loops,!744Mpi stars2 matthieu
...@@ -151,6 +151,7 @@ __attribute__((always_inline)) INLINE static enum task_actions task_acts_on( ...@@ -151,6 +151,7 @@ __attribute__((always_inline)) INLINE static enum task_actions task_acts_on(
case task_type_star_formation: case task_type_star_formation:
return task_action_all; return task_action_all;
case task_type_drift_spart:
case task_type_stars_ghost: case task_type_stars_ghost:
case task_type_stars_sort: case task_type_stars_sort:
return task_action_spart; return task_action_spart;
...@@ -180,7 +181,10 @@ __attribute__((always_inline)) INLINE static enum task_actions task_acts_on( ...@@ -180,7 +181,10 @@ __attribute__((always_inline)) INLINE static enum task_actions task_acts_on(
break; break;
default: default:
error("Unknow task_action for task"); #ifdef SWIFT_DEBUG_CHECKS
error("Unknown task_action for task %s/%s", taskID_names[t->type],
subtaskID_names[t->subtype]);
#endif
return task_action_none; return task_action_none;
break; break;
} }
...@@ -199,8 +203,11 @@ __attribute__((always_inline)) INLINE static enum task_actions task_acts_on( ...@@ -199,8 +203,11 @@ __attribute__((always_inline)) INLINE static enum task_actions task_acts_on(
return task_action_part; return task_action_part;
else if (t->ci->grav.count > 0) else if (t->ci->grav.count > 0)
return task_action_gpart; return task_action_gpart;
else else {
#ifdef SWIFT_DEBUG_CHECKS
error("Task without particles"); error("Task without particles");
#endif
}
break; break;
case task_type_init_grav: case task_type_init_grav:
...@@ -216,13 +223,19 @@ __attribute__((always_inline)) INLINE static enum task_actions task_acts_on( ...@@ -216,13 +223,19 @@ __attribute__((always_inline)) INLINE static enum task_actions task_acts_on(
break; break;
default: default:
error("Unknown task_action for task"); #ifdef SWIFT_DEBUG_CHECKS
error("Unknown task_action for task %s/%s", taskID_names[t->type],
subtaskID_names[t->subtype]);
#endif
return task_action_none; return task_action_none;
break; break;
} }
/* Silence compiler warnings */ #ifdef SWIFT_DEBUG_CHECKS
error("Unknown task_action for task"); error("Unknown task_action for task %s/%s", taskID_names[t->type],
subtaskID_names[t->subtype]);
#endif
/* Silence compiler warnings. We should never get here. */
return task_action_none; return task_action_none;
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment