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

Corrected initialisation mistake in MPI mode.

parent 631e2891
Branches
Tags
2 merge requests!136Master,!86Corrected initialisation mistake in MPI mode.
...@@ -162,8 +162,8 @@ int cell_pack(struct cell *c, struct pcell *pc) { ...@@ -162,8 +162,8 @@ int cell_pack(struct cell *c, struct pcell *pc) {
/* Start by packing the data of the current cell. */ /* Start by packing the data of the current cell. */
pc->h_max = c->h_max; pc->h_max = c->h_max;
c->t_end_min = pc->t_end_min; pc->t_end_min = c->t_end_min;
c->t_end_max = pc->t_end_max; pc->t_end_max = c->t_end_max;
pc->count = c->count; pc->count = c->count;
c->tag = pc->tag = atomic_inc(&cell_next_tag) % cell_max_tag; c->tag = pc->tag = atomic_inc(&cell_next_tag) % cell_max_tag;
......
...@@ -1706,15 +1706,16 @@ void engine_init_particles(struct engine *e) { ...@@ -1706,15 +1706,16 @@ void engine_init_particles(struct engine *e) {
struct space *s = e->s; struct space *s = e->s;
engine_prepare(e); message("Initialising particles");
engine_marktasks(e);
/* Make sure all particles are ready to go */ /* Make sure all particles are ready to go */
/* i.e. clean-up any stupid state in the ICs */ /* i.e. clean-up any stupid state in the ICs */
message("Initialising particles");
space_map_cells_pre(s, 1, cell_init_parts, NULL); 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, 1000, e->s->nr_parts);
// printParticle(e->s->parts, 515050, e->s->nr_parts); // printParticle(e->s->parts, 515050, e->s->nr_parts);
...@@ -1846,9 +1847,11 @@ if ( e->nodeID == 0 ) ...@@ -1846,9 +1847,11 @@ if ( e->nodeID == 0 )
TIMER_TOC2(timer_step); TIMER_TOC2(timer_step);
if (e->nodeID == 0) {
printf("%d %f %f %d %.3f\n", e->step, e->time, e->timeStep, updates, printf("%d %f %f %d %.3f\n", e->step, e->time, e->timeStep, updates,
((double)timers[timer_count - 1]) / CPU_TPS * 1000); ((double)timers[timer_count - 1]) / CPU_TPS * 1000);
fflush(stdout); fflush(stdout);
}
// printParticle(e->s->parts, e->s->xparts,1000, e->s->nr_parts); // printParticle(e->s->parts, e->s->xparts,1000, e->s->nr_parts);
// printParticle(e->s->parts, e->s->xparts,515050, e->s->nr_parts); // printParticle(e->s->parts, e->s->xparts,515050, e->s->nr_parts);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment