From ad9c95d5b312425d6f0cf526dd2cf01d2452c29e Mon Sep 17 00:00:00 2001
From: Martin Bauer <martin.bauer@fau.de>
Date: Thu, 25 Apr 2019 12:01:56 +0200
Subject: [PATCH] UniformGridGPU small changes

- MPI barrier between runs
- bugfix in overlap_benchmark config
---
 .../UniformGridGPU/UniformGridGPU.cpp           |  2 ++
 .../simulation_setup/overlap_benchmark.py       | 17 ++++++++---------
 2 files changed, 10 insertions(+), 9 deletions(-)

diff --git a/apps/benchmarks/UniformGridGPU/UniformGridGPU.cpp b/apps/benchmarks/UniformGridGPU/UniformGridGPU.cpp
index 58a4d0356..e1b183d85 100644
--- a/apps/benchmarks/UniformGridGPU/UniformGridGPU.cpp
+++ b/apps/benchmarks/UniformGridGPU/UniformGridGPU.cpp
@@ -56,6 +56,8 @@ int main( int argc, char **argv )
 
    for( auto cfg = python_coupling::configBegin( argc, argv ); cfg != python_coupling::configEnd(); ++cfg )
    {
+      WALBERLA_MPI_WORLD_BARRIER();
+
       auto config = *cfg;
       logging::configureLogging( config );
       auto blocks = blockforest::createUniformBlockGridFromConfig( config );
diff --git a/apps/benchmarks/UniformGridGPU/simulation_setup/overlap_benchmark.py b/apps/benchmarks/UniformGridGPU/simulation_setup/overlap_benchmark.py
index 65ad0b5bf..123b95381 100644
--- a/apps/benchmarks/UniformGridGPU/simulation_setup/overlap_benchmark.py
+++ b/apps/benchmarks/UniformGridGPU/simulation_setup/overlap_benchmark.py
@@ -8,13 +8,13 @@ from waLBerla.tools.sqlitedb import sequenceValuesToScalars
 from os import getcwd
 from waLBerla.tools.jobscripts import createJobscript
 from datetime import timedelta
-
+from copy import deepcopy
 
 CSV_FILE = "overlap_benchmark.csv"
 
 BASE_CONFIG = {
     'DomainSetup': {
-        'cellsPerBlock': (256, 256, 256),
+        'cellsPerBlock': (256, 128, 128),
         'periodic': (1, 1, 1),
     },
     'Parameters': {
@@ -29,7 +29,7 @@ BASE_CONFIG = {
 
 class Scenario:
     def __init__(self, **kwargs):
-        self.config_dict = BASE_CONFIG.copy()
+        self.config_dict = deepcopy(BASE_CONFIG)
         self.config_dict['Parameters'].update(kwargs)
         self.config_dict['DomainSetup']['blocks'] = block_decomposition(wlb.mpi.numProcesses())
 
@@ -56,14 +56,13 @@ class Scenario:
 
 def overlap_benchmark():
     scenarios = wlb.ScenarioManager()
-    inner_outer_splits = [(1, 1, 1), (4, 1, 1), (8, 1, 1), (16, 1, 1), (32, 1, 1), (64, 1, 1),
-                          (4, 4, 1), (8, 8, 1), (16, 16, 1), (32, 32, 1), (64, 64, 1),
-                          (4, 4, 4), (8, 8, 8), (16, 16, 16), (32, 32, 32), (64, 64, 64)]
+    inner_outer_splits = [(1, 1, 1), (4, 1, 1), (8, 1, 1), (16, 1, 1), (32, 1, 1),
+                          (4, 4, 1), (8, 8, 1), (16, 16, 1), (32, 32, 1),
+                          (4, 4, 4), (8, 8, 8), (16, 16, 16), (32, 32, 32)]
 
-    for strategy in ['simpleOverlap', 'complexOverlap', 'noOverlap']:
+    scenarios.add(Scenario(timeStepStrategy='noOverlap'))
+    for strategy in ['simpleOverlap', 'complexOverlap']:
         for inner_outer_split in inner_outer_splits:
-            if strategy == 'noOverlap' and inner_outer_split != (1, 1, 1):
-                continue
             scenario = Scenario(timeStepStrategy=strategy, innerOuterSplit=inner_outer_split)
             scenarios.add(scenario)
 
-- 
GitLab