From 607a25a197c64bb35c84fa1e5e893da2ce64ecb2 Mon Sep 17 00:00:00 2001
From: Sebastian Eibl <sebastian.eibl@fau.de>
Date: Fri, 30 Aug 2019 15:31:42 +0200
Subject: [PATCH] added kernel measurement AssocToBlock

---
 .../GranularGas/MESA_PD_KernelLoadBalancing.cpp  | 16 ++++++++++++++++
 1 file changed, 16 insertions(+)

diff --git a/apps/benchmarks/GranularGas/MESA_PD_KernelLoadBalancing.cpp b/apps/benchmarks/GranularGas/MESA_PD_KernelLoadBalancing.cpp
index ae6867e7..e542bac6 100644
--- a/apps/benchmarks/GranularGas/MESA_PD_KernelLoadBalancing.cpp
+++ b/apps/benchmarks/GranularGas/MESA_PD_KernelLoadBalancing.cpp
@@ -258,6 +258,14 @@ int main( int argc, char ** argv )
    WcTimingPool tpImbalanced;
    WcTimingPool tpBalanced;
 
+   WALBERLA_MPI_BARRIER();
+   tpImbalanced["AssocToBlock"].start();
+   for (int64_t i=0; i < params.simulationSteps; ++i)
+   {
+      ps->forEachParticle(true, kernel::SelectLocal(), accessor, assoc, accessor);
+   }
+   tpImbalanced["AssocToBlock"].end();
+
    WALBERLA_MPI_BARRIER();
    tpImbalanced["GenerateLinkedCells"].start();
    for (int64_t i=0; i < params.simulationSteps; ++i)
@@ -358,6 +366,14 @@ int main( int argc, char ** argv )
       sortParticleStorage(*ps, params.sorting, lc->domain_, uint_c(lc->numCellsPerDim_[0]));
    }
 
+   WALBERLA_MPI_BARRIER();
+   tpBalanced["AssocToBlock"].start();
+   for (int64_t i=0; i < params.simulationSteps; ++i)
+   {
+      ps->forEachParticle(true, kernel::SelectLocal(), accessor, assoc, accessor);
+   }
+   tpBalanced["AssocToBlock"].end();
+
    WALBERLA_MPI_BARRIER();
    tpBalanced["GenerateLinkedCells"].start();
    for (int64_t i=0; i < params.simulationSteps; ++i)
-- 
GitLab