diff --git a/src/runner.c b/src/runner.c index 3926dd98ded1a6c2cba0f8543a5dff21749f2c81..b2f5eae0ffa39588ff7028c07b81a326e8061dde 100644 --- a/src/runner.c +++ b/src/runner.c @@ -311,20 +311,7 @@ void runner_dosort(struct runner *r, struct cell *c, int flags, int clock) { } } */ -#ifdef TIMER_VERBOSE - message( - "runner %02i: %i parts at depth %i (flags = %i%i%i%i%i%i%i%i%i%i%i%i%i) " - "took %.3f ms.", - r->id, count, c->depth, (flags & 0x1000) >> 12, (flags & 0x800) >> 11, - (flags & 0x400) >> 10, (flags & 0x200) >> 9, (flags & 0x100) >> 8, - (flags & 0x80) >> 7, (flags & 0x40) >> 6, (flags & 0x20) >> 5, - (flags & 0x10) >> 4, (flags & 0x8) >> 3, (flags & 0x4) >> 2, - (flags & 0x2) >> 1, (flags & 0x1) >> 0, - clocks_from_ticks(TIMER_TOC(timer_dosort))); - fflush(stdout); -#else if (clock) TIMER_TOC(timer_dosort); -#endif } void runner_dogsort(struct runner *r, struct cell *c, int flags, int clock) { @@ -469,20 +456,7 @@ void runner_dogsort(struct runner *r, struct cell *c, int flags, int clock) { } } */ -#ifdef TIMER_VERBOSE - message( - "runner %02i: %i parts at depth %i (flags = %i%i%i%i%i%i%i%i%i%i%i%i%i) " - "took %.3f ms.", - r->id, count, c->depth, (flags & 0x1000) >> 12, (flags & 0x800) >> 11, - (flags & 0x400) >> 10, (flags & 0x200) >> 9, (flags & 0x100) >> 8, - (flags & 0x80) >> 7, (flags & 0x40) >> 6, (flags & 0x20) >> 5, - (flags & 0x10) >> 4, (flags & 0x8) >> 3, (flags & 0x4) >> 2, - (flags & 0x2) >> 1, (flags & 0x1) >> 0, - clocks_from_ticks(TIMER_TOC(timer_dosort))); - fflush(stdout); -#else if (clock) TIMER_TOC(timer_dosort); -#endif } /** @@ -522,15 +496,7 @@ void runner_doinit(struct runner *r, struct cell *c, int timer) { } } - if (timer) { -#ifdef TIMER_VERBOSE - message("runner %02i: %i parts at depth %i took %.3f ms.", r->id, c->count, - c->depth, clocks_from_ticks(TIMER_TOC(timer_init))); - fflush(stdout); -#else - TIMER_TOC(timer_init); -#endif - } + if (timer) TIMER_TOC(timer_init); } /** @@ -679,13 +645,7 @@ void runner_doghost(struct runner *r, struct cell *c) { if (count) message("Smoothing length failed to converge on %i particles.", count); -#ifdef TIMER_VERBOSE - message("runner %02i: %i parts at depth %i took %.3f ms.", r->id, c->count, - c->depth, clocks_from_ticks(TIMER_TOC(timer_doghost))); - fflush(stdout); -#else TIMER_TOC(timer_doghost); -#endif } /** @@ -779,15 +739,7 @@ void runner_dodrift(struct runner *r, struct cell *c, int timer) { c->h_max = h_max; c->dx_max = dx_max; - if (timer) { -#ifdef TIMER_VERBOSE - message("runner %02i: %i parts at depth %i took %.3f ms.", r->id, c->count, - c->depth, clocks_from_ticks(TIMER_TOC(timer_drift))); - fflush(stdout); -#else - TIMER_TOC(timer_drift); -#endif - } + if (timer) TIMER_TOC(timer_drift); } /** @@ -991,15 +943,7 @@ void runner_dokick(struct runner *r, struct cell *c, int timer) { c->ti_end_min = ti_end_min; c->ti_end_max = ti_end_max; - if (timer) { -#ifdef TIMER_VERBOSE - message("runner %02i: %i parts at depth %i took %.3f ms.", r->id, c->count, - c->depth, clocks_from_ticks(TIMER_TOC(timer_kick))); - fflush(stdout); -#else - TIMER_TOC(timer_kick); -#endif - } + if (timer) TIMER_TOC(timer_kick); } /** diff --git a/src/runner_doiact.h b/src/runner_doiact.h index 8df47b3ff4c8191c5feedbff5e7b6a8778ed17d6..08a9896fffa1463eab38480817bc196a5a3a3b6e 100644 --- a/src/runner_doiact.h +++ b/src/runner_doiact.h @@ -202,15 +202,7 @@ void DOPAIR_NAIVE(struct runner *r, struct cell *restrict ci, IACT(r2q[k], &dxq[3 * k], hiq[k], hjq[k], piq[k], pjq[k]); #endif -#ifdef TIMER_VERBOSE - printf( - "runner_dopair_naive[%02i]: %i/%i parts at depth %i (r_max=%.3f/%.3f) " - "took %.3f ms.\n", - r->id, count_i, count_j, ci->depth, ci->h_max, cj->h_max, - clocks_from_ticks(TIMER_TOC(TIMER_DOPAIR))); -#else TIMER_TOC(TIMER_DOPAIR); -#endif } void DOSELF_NAIVE(struct runner *r, struct cell *restrict c) { @@ -305,12 +297,7 @@ void DOSELF_NAIVE(struct runner *r, struct cell *restrict c) { IACT(r2q[k], &dxq[3 * k], hiq[k], hjq[k], piq[k], pjq[k]); #endif -#ifdef TIMER_VERBOSE - printf("runner_doself[%02i]: %i parts at depth %i took %.3f ms.\n", r->id, - count, c->depth, clocks_from_ticks(TIMER_TOC(TIMER_DOSELF))); -#else TIMER_TOC(TIMER_DOSELF); -#endif } /** @@ -510,15 +497,7 @@ void DOPAIR_SUBSET(struct runner *r, struct cell *restrict ci, IACT_NONSYM(r2q[k], &dxq[3 * k], hiq[k], hjq[k], piq[k], pjq[k]); #endif -#ifdef TIMER_VERBOSE - printf( - "runner_dopair_subset[%02i]: %i/%i parts at depth %i (r_max=%.3f/%.3f) " - "took %.3f ms.\n", - r->id, count, count_j, ci->depth, ci->h_max, cj->h_max, - clocks_from_ticks(TIMER_TOC(TIMER_DOPAIR))); -#else TIMER_TOC(timer_dopair_subset); -#endif } /** @@ -630,15 +609,7 @@ void DOPAIR_SUBSET_NAIVE(struct runner *r, struct cell *restrict ci, IACT_NONSYM(r2q[k], &dxq[3 * k], hiq[k], hjq[k], piq[k], pjq[k]); #endif -#ifdef TIMER_VERBOSE - printf( - "runner_dopair_subset[%02i]: %i/%i parts at depth %i (r_max=%.3f/%.3f) " - "took %.3f ms.\n", - r->id, count, count_j, ci->depth, ci->h_max, cj->h_max, - clocks_from_ticks(TIMER_TOC(TIMER_DOPAIR))); -#else TIMER_TOC(timer_dopair_subset); -#endif } /** @@ -741,13 +712,7 @@ void DOSELF_SUBSET(struct runner *r, struct cell *restrict ci, IACT_NONSYM(r2q[k], &dxq[3 * k], hiq[k], hjq[k], piq[k], pjq[k]); #endif -#ifdef TIMER_VERBOSE - printf("runner_doself_subset[%02i]: %i/%i parts at depth %i took %.3f ms.\n", - r->id, count, ci->count, ci->depth, - clocks_from_ticks(TIMER_TOC(TIMER_DOSELF))); -#else TIMER_TOC(timer_dopair_subset); -#endif } /** @@ -941,16 +906,7 @@ void DOPAIR1(struct runner *r, struct cell *ci, struct cell *cj) { IACT_NONSYM(r2q[k], &dxq[3 * k], hiq[k], hjq[k], piq[k], pjq[k]); #endif -#ifdef TIMER_VERBOSE - printf( - "runner_dopair[%02i]: %i/%i parts at depth %i (r_max=%.3f/%.3f, h=%.3f) " - "took %.3f ms.\n", - r->id, count_i, count_j, ci->depth, ci->h_max, cj->h_max, - fmax(ci->h[0], fmax(ci->h[1], ci->h[2])), - clocks_from_ticks(TIMER_TOC(TIMER_DOPAIR))); -#else TIMER_TOC(TIMER_DOPAIR); -#endif } void DOPAIR2(struct runner *r, struct cell *ci, struct cell *cj) { @@ -1336,16 +1292,7 @@ void DOPAIR2(struct runner *r, struct cell *ci, struct cell *cj) { IACT(r2q2[k], &dxq2[3 * k], hiq2[k], hjq2[k], piq2[k], pjq2[k]); #endif -#ifdef TIMER_VERBOSE - printf( - "runner_dopair[%02i]: %i/%i parts at depth %i (r_max=%.3f/%.3f, h=%.3f) " - "took %.3f ms.\n", - r->id, count_i, count_j, ci->depth, ci->h_max, cj->h_max, - fmax(ci->h[0], fmax(ci->h[1], ci->h[2])), - clocks_from_ticks(TIMER_TOC(TIMER_DOPAIR))); -#else TIMER_TOC(TIMER_DOPAIR); -#endif } /** @@ -1570,12 +1517,7 @@ void DOSELF1(struct runner *r, struct cell *restrict c) { IACT(r2q2[k], &dxq2[3 * k], hiq2[k], hjq2[k], piq2[k], pjq2[k]); #endif -#ifdef TIMER_VERBOSE - printf("runner_doself1[%02i]: %i parts at depth %i took %.3f ms.\n", r->id, - count, c->depth, clocks_from_ticks(TIMER_TOC(TIMER_DOSELF))); -#else TIMER_TOC(TIMER_DOSELF); -#endif } void DOSELF2(struct runner *r, struct cell *restrict c) { @@ -1767,12 +1709,7 @@ void DOSELF2(struct runner *r, struct cell *restrict c) { IACT(r2q2[k], &dxq2[3 * k], hiq2[k], hjq2[k], piq2[k], pjq2[k]); #endif -#ifdef TIMER_VERBOSE - printf("runner_doself2[%02i]: %i parts at depth %i took %.3f ms.\n", r->id, - count, c->depth, clocks_from_ticks(TIMER_TOC(TIMER_DOSELF))); -#else TIMER_TOC(TIMER_DOSELF); -#endif } /** @@ -2054,13 +1991,7 @@ void DOSUB1(struct runner *r, struct cell *ci, struct cell *cj, int sid, } /* otherwise, pair interaction. */ - if (gettimer) -#ifdef TIMER_VERBOSE - printf("runner_dosub1[%02i]: flags=%i at depth %i took %.3f ms.\n", r->id, - sid, ci->depth, clocks_from_ticks(TIMER_TOC(TIMER_DOSUB))); -#else - TIMER_TOC(TIMER_DOSUB); -#endif + if (gettimer) TIMER_TOC(TIMER_DOSUB); } void DOSUB2(struct runner *r, struct cell *ci, struct cell *cj, int sid, @@ -2329,13 +2260,7 @@ void DOSUB2(struct runner *r, struct cell *ci, struct cell *cj, int sid, } /* otherwise, pair interaction. */ - if (gettimer) -#ifdef TIMER_VERBOSE - printf("runner_dosub2[%02i]: flags=%i at depth %i took %.3f ms.\n", r->id, - sid, ci->depth, clocks_from_ticks(TIMER_TOC(TIMER_DOSUB))); -#else - TIMER_TOC(TIMER_DOSUB); -#endif + if (gettimer) TIMER_TOC(TIMER_DOSUB); } void DOSUB_SUBSET(struct runner *r, struct cell *ci, struct part *parts, @@ -2933,11 +2858,5 @@ void DOSUB_SUBSET(struct runner *r, struct cell *ci, struct part *parts, } /* otherwise, pair interaction. */ - if (gettimer) -#ifdef TIMER_VERBOSE - printf("runner_dosub[%02i]: flags=%i at depth %i took %.3f ms.\n", r->id, - sid, ci->depth, clocks_from_ticks(TIMER_TOC(TIMER_DOSUB))); -#else - TIMER_TOC(TIMER_DOSUB); -#endif + if (gettimer) TIMER_TOC(TIMER_DOSUB); } diff --git a/src/runner_doiact_grav.h b/src/runner_doiact_grav.h index 9d4b440bf679de30d75ce7e2c0e0d46db1ddad8f..f374339da75e31b39a5295fcd8bbc23c34d8d67d 100644 --- a/src/runner_doiact_grav.h +++ b/src/runner_doiact_grav.h @@ -193,16 +193,7 @@ void runner_dopair_grav_new(struct runner *r, struct cell *ci, } /* loop over the parts in cj and interact with the multipole. */ -#ifdef TIMER_VERBOSE - printf( - "runner_dopair[%02i]: %i/%i parts at depth %i (r_max=%.3f/%.3f, h=%.3f) " - "took %.3f ms.\n", - r->id, count_i, count_j, ci->depth, ci->h_max, cj->h_max, - fmax(ci->h[0], fmax(ci->h[1], ci->h[2])), - clocks_from_ticks(TIMER_TOC(TIMER_DOPAIR))); -#else TIMER_TOC(TIMER_DOPAIR); -#endif } /** @@ -430,15 +421,7 @@ void runner_dopair_grav(struct runner *r, struct cell *restrict ci, runner_iact_grav(r2q[k], &dxq[3 * k], piq[k], pjq[k]); #endif -#ifdef TIMER_VERBOSE - printf( - "runner_dopair_naive_grav[%02i]: %i/%i parts at depth %i " - "(r_max=%.3f/%.3f) took %.3f ms.\n", - r->id, count_i, count_j, ci->depth, ci->h_max, cj->h_max, - clocks_from_ticks(TIMER_TOC(TIMER_DOPAIR))); -#else TIMER_TOC(timer_dopair_grav); -#endif } /** @@ -526,15 +509,7 @@ void runner_doself_grav(struct runner *r, struct cell *restrict c) { runner_iact_grav(r2q[k], &dxq[3 * k], piq[k], pjq[k]); #endif -#ifdef TIMER_VERBOSE - printf( - "runner_doself_grav[%02i]: %i/%i parts at depth %i (r_max=%.3f/%.3f) " - "took %.3f ms.\n", - r->id, count_i, count_j, ci->depth, ci->h_max, cj->h_max, - clocks_from_ticks(TIMER_TOC(TIMER_DOPAIR))); -#else TIMER_TOC(timer_doself_grav); -#endif } /** @@ -617,13 +592,7 @@ void runner_dosub_grav(struct runner *r, struct cell *ci, struct cell *cj, runner_dograv_mm(r, ci, cj); } - if (gettimer) -#ifdef TIMER_VERBOSE - printf("runner_dosub_grav[%02i]: at depth %i took %.3f ms.\n", r->id, - ci->depth, clocks_from_ticks(TIMER_TOC(TIMER_DOSUB))); -#else - TIMER_TOC(timer_dosub_grav); -#endif + if (gettimer) TIMER_TOC(timer_dosub_grav); } #endif /* SWIFT_RUNNER_DOIACT_GRAV_H */ diff --git a/src/timers.h b/src/timers.h index 95db02c5b8ea055e4b8264a7055c678460c29fdf..de2d9edb9ed54717472e5ae1222dfb33235c3e95 100644 --- a/src/timers.h +++ b/src/timers.h @@ -57,11 +57,6 @@ extern ticks timers[timer_count]; #define timers_mask_all ((1 << timer_count) - 1) /* Define the timer macros. */ -#ifdef TIMER_VERBOSE -#ifndef TIMER -#define TIMER -#endif -#endif #ifdef TIMER #define TIMER_TIC_ND tic = getticks(); #define TIMER_TIC2_ND ticks tic2 = getticks();