From 2ad061e873c2b5da6a37d7ad771e8c6b5ed56a5f Mon Sep 17 00:00:00 2001
From: Martin Bauer <martin.bauer@fau.de>
Date: Mon, 24 Jun 2019 11:03:03 +0200
Subject: [PATCH] GPU benchmark: added LB storage pattern to python callback

---
 apps/benchmarks/UniformGridGPU/UniformGridGPU.cpp             | 2 ++
 apps/benchmarks/UniformGridGPU/UniformGridGPU_AA.cpp          | 2 ++
 .../UniformGridGPU/simulation_setup/overlap_benchmark.py      | 4 +---
 3 files changed, 5 insertions(+), 3 deletions(-)

diff --git a/apps/benchmarks/UniformGridGPU/UniformGridGPU.cpp b/apps/benchmarks/UniformGridGPU/UniformGridGPU.cpp
index 9e95c73dd..0af7c1360 100644
--- a/apps/benchmarks/UniformGridGPU/UniformGridGPU.cpp
+++ b/apps/benchmarks/UniformGridGPU/UniformGridGPU.cpp
@@ -332,9 +332,11 @@ int main( int argc, char **argv )
                   python_coupling::PythonCallback pythonCallbackResults( "results_callback" );
                   if ( pythonCallbackResults.isCallable())
                   {
+                      const char * storagePattern = "twofield";
                       pythonCallbackResults.data().exposeValue( "mlupsPerProcess", mlupsPerProcess );
                       pythonCallbackResults.data().exposeValue( "stencil", infoStencil );
                       pythonCallbackResults.data().exposeValue( "configName", infoConfigName );
+                      pythonCallbackResults.data().exposeValue( "storagePattern", storagePattern );
                       pythonCallbackResults.data().exposeValue( "cse_global", infoCseGlobal );
                       pythonCallbackResults.data().exposeValue( "cse_pdfs", infoCsePdfs );
                       // Call Python function to report results
diff --git a/apps/benchmarks/UniformGridGPU/UniformGridGPU_AA.cpp b/apps/benchmarks/UniformGridGPU/UniformGridGPU_AA.cpp
index e19413a25..fdf1c1bf7 100644
--- a/apps/benchmarks/UniformGridGPU/UniformGridGPU_AA.cpp
+++ b/apps/benchmarks/UniformGridGPU/UniformGridGPU_AA.cpp
@@ -267,9 +267,11 @@ int main( int argc, char **argv )
                     python_coupling::PythonCallback pythonCallbackResults( "results_callback" );
                     if ( pythonCallbackResults.isCallable())
                     {
+                        const char * storagePattern = "aa";
                         pythonCallbackResults.data().exposeValue( "mlupsPerProcess", mlupsPerProcess );
                         pythonCallbackResults.data().exposeValue( "stencil", infoStencil );
                         pythonCallbackResults.data().exposeValue( "configName", infoConfigName );
+                        pythonCallbackResults.data().exposeValue( "storagePattern", storagePattern );
                         pythonCallbackResults.data().exposeValue( "cse_global", infoCseGlobal );
                         pythonCallbackResults.data().exposeValue( "cse_pdfs", infoCsePdfs );
                         // Call Python function to report results
diff --git a/apps/benchmarks/UniformGridGPU/simulation_setup/overlap_benchmark.py b/apps/benchmarks/UniformGridGPU/simulation_setup/overlap_benchmark.py
index 1beacb005..6d64d4d89 100755
--- a/apps/benchmarks/UniformGridGPU/simulation_setup/overlap_benchmark.py
+++ b/apps/benchmarks/UniformGridGPU/simulation_setup/overlap_benchmark.py
@@ -121,9 +121,7 @@ def generate_jobscripts(machine='pizdaint_hybrid',
                                  output_file='overlap_bench_{:04d}_%j.txt'.format(node_count),
                                  error_file='overlap_bench_{:04d}_%j.txt'.format(node_count),
                                  initial_dir=getcwd(),
-                                 #exe_name='UniformGridBenchmarkGPU',
-                                 #parameter_files=['overlap_benchmark.py'],
-                                 commands=list((exe, 'overlap_benchmark.py') for exe in exe_names),
+                                 commands=list(("./" + exe, 'overlap_benchmark.py') for exe in exe_names),
                                  wall_time=timedelta(minutes=25),
                                  machine=machine,
                                  account='d105',
-- 
GitLab