diff --git a/src/debug.c b/src/debug.c index b8938346f7dc253f92795db1d170e421684ae5c0..b1e2cb08bc7fa99330da3d9c9382dbef81b3215a 100644 --- a/src/debug.c +++ b/src/debug.c @@ -305,8 +305,8 @@ static void dumpCells_map(struct cell *c, void *data) { /* Only cells with particles are dumped. */ if (c->count > 0 || c->gcount > 0 || c->scount > 0) { -/* In MPI mode we may only output cells with foreign partners. - * These define the edges of the partitions. */ + /* In MPI mode we may only output cells with foreign partners. + * These define the edges of the partitions. */ int ismpiactive = 0; #if WITH_MPI ismpiactive = (c->send_xv != NULL); @@ -326,7 +326,8 @@ static void dumpCells_map(struct cell *c, void *data) { /* So output local super cells that are active and have MPI * tasks as requested. */ - if (c->nodeID == e->nodeID && (!super ||(super && c->super == c)) && active && mpiactive) { + if (c->nodeID == e->nodeID && (!super || (super && c->super == c)) && + active && mpiactive) { /* If requested we work out how many particles are active in this cell. */ int pactcount = 0; @@ -370,8 +371,8 @@ static void dumpCells_map(struct cell *c, void *data) { * @param rank node ID of MPI rank, or 0 if not relevant. * @param step the current engine step, or some unique integer. */ -void dumpCells(const char *prefix, int super, int active, int mpiactive, int pactive, - struct space *s, int rank, int step) { +void dumpCells(const char *prefix, int super, int active, int mpiactive, + int pactive, struct space *s, int rank, int step) { FILE *file = NULL; diff --git a/src/engine.c b/src/engine.c index 0684ecd61987c44f78c3f633a21810d794cafe72..47c96abab226eb4199f8b531be7b6ad6f237fce8 100644 --- a/src/engine.c +++ b/src/engine.c @@ -4431,8 +4431,8 @@ void engine_step(struct engine *e) { /* Print the number of active tasks ? */ if (e->verbose) engine_print_task_counts(e); - /* Dump local cells and active particle counts. */ - /* dumpCells("cells", 0, 0, 0, 0, e->s, e->nodeID, e->step); */ +/* Dump local cells and active particle counts. */ +/* dumpCells("cells", 0, 0, 0, 0, e->s, e->nodeID, e->step); */ #ifdef SWIFT_DEBUG_CHECKS /* Check that we have the correct total mass in the top-level multipoles */ diff --git a/src/gravity.c b/src/gravity.c index 36f3cc4ae56c3b7ae2f6a6c995bba7aab209562a..1642d37f7a6e543c6e2f263253aebc213ad4b19f 100644 --- a/src/gravity.c +++ b/src/gravity.c @@ -410,7 +410,7 @@ void gravity_exact_force_compute_mapper(void *map_data, int nr_gparts, struct gpart *gpi = &gparts[i]; - long long id; + long long id = 0; if (gpi->type == swift_type_gas) id = parts[-gpi->id_or_neg_offset].id; else if (gpi->type == swift_type_star) @@ -597,7 +597,7 @@ void gravity_exact_force_check(struct space *s, const struct engine *e, struct gpart *gpi = &s->gparts[i]; - long long id; + long long id = 0; if (gpi->type == swift_type_gas) id = parts[-gpi->id_or_neg_offset].id; else if (gpi->type == swift_type_star) @@ -648,7 +648,7 @@ void gravity_exact_force_check(struct space *s, const struct engine *e, struct gpart *gpi = &s->gparts[i]; - long long id; + long long id = 0; if (gpi->type == swift_type_gas) id = parts[-gpi->id_or_neg_offset].id; else if (gpi->type == swift_type_star)