diff --git a/src/cell.c b/src/cell.c index cdb41872fa5fbe41eeb5c7b376ed901620dda5e4..f7fe61ba30c7d04362003c495702c9f23a6efbd3 100644 --- a/src/cell.c +++ b/src/cell.c @@ -162,8 +162,8 @@ int cell_pack(struct cell *c, struct pcell *pc) { /* Start by packing the data of the current cell. */ pc->h_max = c->h_max; - c->t_end_min = pc->t_end_min; - c->t_end_max = pc->t_end_max; + pc->t_end_min = c->t_end_min; + pc->t_end_max = c->t_end_max; pc->count = c->count; c->tag = pc->tag = atomic_inc(&cell_next_tag) % cell_max_tag; diff --git a/src/engine.c b/src/engine.c index 879d5a077fd50da5dc32902808d39184ba187fbd..229a3011ae5caf27dad4529df8702dc3f75c5ee0 100644 --- a/src/engine.c +++ b/src/engine.c @@ -1706,15 +1706,16 @@ void engine_init_particles(struct engine *e) { struct space *s = e->s; - engine_prepare(e); - - engine_marktasks(e); + message("Initialising particles"); /* Make sure all particles are ready to go */ /* i.e. clean-up any stupid state in the ICs */ - message("Initialising particles"); space_map_cells_pre(s, 1, cell_init_parts, NULL); + engine_prepare(e); + + engine_marktasks(e); + // printParticle(e->s->parts, 1000, e->s->nr_parts); // printParticle(e->s->parts, 515050, e->s->nr_parts); @@ -1846,9 +1847,11 @@ if ( e->nodeID == 0 ) TIMER_TOC2(timer_step); - printf("%d %f %f %d %.3f\n", e->step, e->time, e->timeStep, updates, - ((double)timers[timer_count - 1]) / CPU_TPS * 1000); - fflush(stdout); + if (e->nodeID == 0) { + printf("%d %f %f %d %.3f\n", e->step, e->time, e->timeStep, updates, + ((double)timers[timer_count - 1]) / CPU_TPS * 1000); + fflush(stdout); + } // printParticle(e->s->parts, e->s->xparts,1000, e->s->nr_parts); // printParticle(e->s->parts, e->s->xparts,515050, e->s->nr_parts);