diff --git a/src/active.h b/src/active.h index edb276c5e9d7f420e8bcaa9cb9d15dae0ad4a880..8eec56a774607a6677d59772c14f39548db92598 100644 --- a/src/active.h +++ b/src/active.h @@ -41,9 +41,10 @@ __attribute__((always_inline)) INLINE static int cell_is_drifted( #ifdef SWIFT_DEBUG_CHECKS if (c->ti_old > e->ti_current) error( - "Cell has been drifted too far forward in time! c->ti_old=%lld " - "e->ti_current=%lld", - c->ti_old, e->ti_current); + "Cell has been drifted too far forward in time! c->ti_old=%lld (t=%e) " + "and e->ti_current=%lld (t=%e)", + c->ti_old, c->ti_old * e->timeBase, e->ti_current, + e->ti_current * e->timeBase); #endif return (c->ti_old == e->ti_current); @@ -60,11 +61,12 @@ __attribute__((always_inline)) INLINE static int cell_is_active( const struct cell *c, const struct engine *e) { #ifdef SWIFT_DEBUG_CHECKS - if (c->ti_end_min < e->ti_current) + if (c->ti_end_min < e->ti_current && c->nodeID != e->nodeID) error( - "cell in an impossible time-zone! c->ti_end_min=%lld " - "e->ti_current=%lld", - c->ti_end_min, e->ti_current); + "cell in an impossible time-zone! c->ti_end_min=%lld (t=%e) and " + "e->ti_current=%lld (t=%e)", + c->ti_end_min, c->ti_end_min * e->timeBase, e->ti_current, + e->ti_current * e->timeBase); #endif return (c->ti_end_min == e->ti_current); diff --git a/src/cell.c b/src/cell.c index b881ea3a78e6fd64e4222324ee35891a220e9b33..4b7c59527e09c2db8c5640ab0263eaa31d617f53 100644 --- a/src/cell.c +++ b/src/cell.c @@ -1140,18 +1140,18 @@ void cell_drift(struct cell *c, const struct engine *e) { void cell_check_timesteps(struct cell *c) { #ifdef SWIFT_DEBUG_CHECKS - if(c->nodeID != engine_rank) return; - - if(c->ti_end_min == 0) error("Cell without assigned time-step"); + if(c->ti_end_min == 0 && c->nr_tasks > 0) + error("Cell without assigned time-step"); if(c->split) { for(int k=0; k<8; ++k) if(c->progeny[k] != NULL) cell_check_timesteps(c->progeny[k]); } else { - for(int i=0; i<c->count; ++i) - if(c->parts[i].time_bin == 0) - error("Particle without assigned time-bin"); + if(c->nodeID == engine_rank) + for(int i=0; i<c->count; ++i) + if(c->parts[i].time_bin == 0) + error("Particle without assigned time-bin"); } #endif diff --git a/src/space.h b/src/space.h index acfa0c4c2b11c47795aace974db0ec07f530cd1e..a28b76fe2770a12770c4ca5e426ef0edd6fedfe1 100644 --- a/src/space.h +++ b/src/space.h @@ -189,5 +189,4 @@ void space_check_drift_point(struct space *s, integertime_t ti_current); void space_check_timesteps(struct space *s); void space_clean(struct space *s); - #endif /* SWIFT_SPACE_H */