From 9d16bb46c887df26624897ef566e0029f7e47a85 Mon Sep 17 00:00:00 2001 From: Rafael Ravedutti Date: Wed, 20 Oct 2021 22:43:08 +0200 Subject: [PATCH] Include average neighbors and SIMD iterations per atom on stats Signed-off-by: Rafael Ravedutti --- src/stats.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/stats.c b/src/stats.c index b31b35b..71f7a00 100644 --- a/src/stats.c +++ b/src/stats.c @@ -14,11 +14,15 @@ void displayStatistics(Atom *atom, Parameter *param, Stats *stats, double *timer #ifdef COMPUTE_STATS double force_useful_volume = 1e-9 * ( (double)(atom->Nlocal * (param->ntimes + 1)) * (sizeof(MD_FLOAT) * 6 + sizeof(int)) + (double)(stats->total_force_neighs) * (sizeof(MD_FLOAT) * 3 + sizeof(int)) ); + double avg_neigh = stats->total_force_neighs / (double)(atom->Nlocal * (param->ntimes + 1)); + double avg_simd = stats->total_force_iters / (double)(atom->Nlocal * (param->ntimes + 1)); #ifdef EXPLICIT_TYPES force_useful_volume += 1e-9 * (double)((atom.Nlocal * (param.ntimes + 1)) + stats.total_force_neighs) * sizeof(int); #endif printf("Statistics:\n"); printf("\tVector width: %d, Processor frequency: %.4f GHz\n", VECTOR_WIDTH, param->proc_freq); + printf("\tAverage neighbors per atom: %.4f\n", avg_neigh); + printf("\tAverage SIMD iterations per atom: %.4f\n", avg_simd); printf("\tTotal number of computed pair interactions: %lld\n", stats->total_force_neighs); printf("\tTotal number of SIMD iterations: %lld\n", stats->total_force_iters); printf("\tUseful read data volume for force computation: %.2fGB\n", force_useful_volume);