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

Remove the part<->gpart link checks. These can be commented back in when debugging.

parent 7e2d978b
No related branches found
No related tags found
1 merge request!185Remove the part<->gpart link checks. These can be un-commented back in when debugging.
...@@ -481,27 +481,26 @@ void engine_redistribute(struct engine *e) { ...@@ -481,27 +481,26 @@ void engine_redistribute(struct engine *e) {
} */ } */
/* Verify that the links are correct */ /* Verify that the links are correct */
/* MATTHIEU: To be commented out once we are happy */ /* for (size_t k = 0; k < nr_gparts; ++k) { */
for (size_t k = 0; k < nr_gparts; ++k) {
if (gparts_new[k].id > 0) { /* if (gparts_new[k].id > 0) { */
if (gparts_new[k].part->gpart != &gparts_new[k]) /* if (gparts_new[k].part->gpart != &gparts_new[k]) */
error("Linking problem !"); /* error("Linking problem !"); */
if (gparts_new[k].x[0] != gparts_new[k].part->x[0] || /* if (gparts_new[k].x[0] != gparts_new[k].part->x[0] || */
gparts_new[k].x[1] != gparts_new[k].part->x[1] || /* gparts_new[k].x[1] != gparts_new[k].part->x[1] || */
gparts_new[k].x[2] != gparts_new[k].part->x[2]) /* gparts_new[k].x[2] != gparts_new[k].part->x[2]) */
error("Linked particles are not at the same position !"); /* error("Linked particles are not at the same position !"); */
} /* } */
} /* } */
for (size_t k = 0; k < nr_parts; ++k) { /* for (size_t k = 0; k < nr_parts; ++k) { */
if (parts_new[k].gpart != NULL) { /* if (parts_new[k].gpart != NULL) { */
if (parts_new[k].gpart->part != &parts_new[k]) error("Linking problem !"); /* if (parts_new[k].gpart->part != &parts_new[k]) error("Linking problem !"); */
} /* } */
} /* } */
/* Set the new part data, free the old. */ /* Set the new part data, free the old. */
free(parts); free(parts);
...@@ -2447,26 +2446,25 @@ void engine_split(struct engine *e, struct partition *initial_partition) { ...@@ -2447,26 +2446,25 @@ void engine_split(struct engine *e, struct partition *initial_partition) {
if (s->gparts[k].id > 0) s->gparts[k].part->gpart = &s->gparts[k]; if (s->gparts[k].id > 0) s->gparts[k].part->gpart = &s->gparts[k];
/* Verify that the links are correct */ /* Verify that the links are correct */
/* MATTHIEU: To be commented out once we are happy */ /* for (size_t k = 0; k < s->nr_gparts; ++k) { */
for (size_t k = 0; k < s->nr_gparts; ++k) {
if (s->gparts[k].id > 0) { /* if (s->gparts[k].id > 0) { */
if (s->gparts[k].part->gpart != &s->gparts[k]) error("Linking problem !"); /* if (s->gparts[k].part->gpart != &s->gparts[k]) error("Linking problem !"); */
if (s->gparts[k].x[0] != s->gparts[k].part->x[0] || /* if (s->gparts[k].x[0] != s->gparts[k].part->x[0] || */
s->gparts[k].x[1] != s->gparts[k].part->x[1] || /* s->gparts[k].x[1] != s->gparts[k].part->x[1] || */
s->gparts[k].x[2] != s->gparts[k].part->x[2]) /* s->gparts[k].x[2] != s->gparts[k].part->x[2]) */
error("Linked particles are not at the same position !"); /* error("Linked particles are not at the same position !"); */
} /* } */
} /* } */
for (size_t k = 0; k < s->nr_parts; ++k) { /* for (size_t k = 0; k < s->nr_parts; ++k) { */
if (s->parts[k].gpart != NULL) { /* if (s->parts[k].gpart != NULL) { */
if (s->parts[k].gpart->part != &s->parts[k]) error("Linking problem !"); /* if (s->parts[k].gpart->part != &s->parts[k]) error("Linking problem !"); */
} /* } */
} /* } */
#else #else
error("SWIFT was not compiled with MPI support."); error("SWIFT was not compiled with MPI support.");
...@@ -2485,7 +2483,7 @@ void engine_dump_snapshot(struct engine *e) { ...@@ -2485,7 +2483,7 @@ void engine_dump_snapshot(struct engine *e) {
if (e->verbose) message("writing snapshot at t=%f.", e->time); if (e->verbose) message("writing snapshot at t=%f.", e->time);
/* Dump... */ /* Dump... */
#if defined(WITH_MPI) #if defined(WITH_MPI)
#if defined(HAVE_PARALLEL_HDF5) #if defined(HAVE_PARALLEL_HDF5)
write_output_parallel(e, e->snapshotBaseName, e->snapshotUnits, e->nodeID, write_output_parallel(e, e->snapshotBaseName, e->snapshotUnits, e->nodeID,
......
...@@ -597,26 +597,25 @@ void space_rebuild(struct space *s, double cell_max, int verbose) { ...@@ -597,26 +597,25 @@ void space_rebuild(struct space *s, double cell_max, int verbose) {
free(gind); free(gind);
/* Verify that the links are correct */ /* Verify that the links are correct */
/* MATTHIEU: To be commented out once we are happy */ /* for (size_t k = 0; k < nr_gparts; ++k) { */
for (size_t k = 0; k < nr_gparts; ++k) {
if (s->gparts[k].id > 0) { /* if (s->gparts[k].id > 0) { */
if (s->gparts[k].part->gpart != &s->gparts[k]) error("Linking problem !"); /* if (s->gparts[k].part->gpart != &s->gparts[k]) error("Linking problem !"); */
if (s->gparts[k].x[0] != s->gparts[k].part->x[0] || /* if (s->gparts[k].x[0] != s->gparts[k].part->x[0] || */
s->gparts[k].x[1] != s->gparts[k].part->x[1] || /* s->gparts[k].x[1] != s->gparts[k].part->x[1] || */
s->gparts[k].x[2] != s->gparts[k].part->x[2]) /* s->gparts[k].x[2] != s->gparts[k].part->x[2]) */
error("Linked particles are not at the same position !"); /* error("Linked particles are not at the same position !"); */
} /* } */
} /* } */
for (size_t k = 0; k < nr_parts; ++k) { /* for (size_t k = 0; k < nr_parts; ++k) { */
if (s->parts[k].gpart != NULL) { /* if (s->parts[k].gpart != NULL) { */
if (s->parts[k].gpart->part != &s->parts[k]) error("Linking problem !"); /* if (s->parts[k].gpart->part != &s->parts[k]) error("Linking problem !"); */
} /* } */
} /* } */
/* Hook the cells up to the parts. */ /* Hook the cells up to the parts. */
// tic = getticks(); // tic = getticks();
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment