Commit 910721b2 authored by Matthieu Schaller's avatar Matthieu Schaller
Browse files

Only report succesful linkage when we are in verbose mode.

parent 5712c587
......@@ -689,7 +689,7 @@ void engine_redistribute(struct engine *e) {
/* Verify that the links are correct */
part_verify_links(parts_new, gparts_new, sparts_new, nr_parts, nr_gparts,
nr_sparts);
nr_sparts, e->verbose);
#endif
/* Set the new part data, free the old. */
......@@ -2910,7 +2910,7 @@ void engine_init_particles(struct engine *e, int flag_entropy_ICs) {
#ifdef SWIFT_DEBUG_CHECKS
space_check_timesteps(e->s);
part_verify_links(e->s->parts, e->s->gparts, e->s->sparts, e->s->nr_parts,
e->s->nr_gparts, e->s->nr_sparts);
e->s->nr_gparts, e->s->nr_sparts, e->verbose);
#endif
/* Ready to go */
......@@ -3245,7 +3245,7 @@ void engine_split(struct engine *e, struct partition *initial_partition) {
/* Verify that the links are correct */
part_verify_links(s->parts, s->gparts, s->sparts, s->nr_parts, s->nr_gparts,
s->nr_sparts);
s->nr_sparts, e->verbose);
#endif
#else
......
......@@ -106,10 +106,11 @@ void part_relink_sparts_to_gparts(struct gpart *gparts, size_t N,
* @param nr_parts The number of #part in the array.
* @param nr_gparts The number of #gpart in the array.
* @param nr_sparts The number of #spart in the array.
* @param verbose Do we report verbosely in case of success ?
*/
void part_verify_links(struct part *parts, struct gpart *gparts,
struct spart *sparts, size_t nr_parts, size_t nr_gparts,
size_t nr_sparts) {
size_t nr_sparts, int verbose) {
for (size_t k = 0; k < nr_gparts; ++k) {
......@@ -223,7 +224,7 @@ void part_verify_links(struct part *parts, struct gpart *gparts,
}
}
message("All links OK");
if(verbose) message("All links OK");
}
#ifdef WITH_MPI
......
......@@ -78,7 +78,7 @@ void part_relink_sparts_to_gparts(struct gpart *gparts, size_t N,
struct spart *sparts);
void part_verify_links(struct part *parts, struct gpart *gparts,
struct spart *sparts, size_t nr_parts, size_t nr_gparts,
size_t nr_sparts);
size_t nr_sparts, int verbose);
#ifdef WITH_MPI
/* MPI data type for the particle transfers */
......
......@@ -816,7 +816,7 @@ void space_rebuild(struct space *s, int verbose) {
#ifdef SWIFT_DEBUG_CHECKS
/* Verify that the links are correct */
part_verify_links(s->parts, s->gparts, s->sparts, nr_parts, nr_gparts,
nr_sparts);
nr_sparts, verbose);
#endif
/* Hook the cells up to the parts. */
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment