From 2b6192a0f03ab9de265645c5ae284630a18e49e3 Mon Sep 17 00:00:00 2001
From: Markus Holzer <markus.holzer@fau.de>
Date: Wed, 12 Aug 2020 08:05:45 +0200
Subject: [PATCH] Activated Poission GPU test case

---
 apps/benchmarks/CMakeLists.txt                              | 5 ++---
 tests/cuda/CMakeLists.txt                                   | 4 ++++
 tests/cuda/codegen/CodegenPoissonGPU.cpp                    | 5 -----
 tests/field/CMakeLists.txt                                  | 6 +++---
 .../codegen/{CodegenPoisson.cpp => CodegenPoissonCPU.cpp}   | 0
 5 files changed, 9 insertions(+), 11 deletions(-)
 rename tests/field/codegen/{CodegenPoisson.cpp => CodegenPoissonCPU.cpp} (100%)

diff --git a/apps/benchmarks/CMakeLists.txt b/apps/benchmarks/CMakeLists.txt
index 5d3923892..01d574401 100644
--- a/apps/benchmarks/CMakeLists.txt
+++ b/apps/benchmarks/CMakeLists.txt
@@ -14,11 +14,10 @@ add_subdirectory( PoiseuilleChannel )
 add_subdirectory( ProbeVsExtraMessage )
 add_subdirectory( SchaeferTurek )
 add_subdirectory( UniformGrid )
-if ( WALBERLA_BUILD_WITH_CODEGEN AND NOT WALBERLA_BUILD_WITH_CUDA )
+if ( WALBERLA_BUILD_WITH_CODEGEN )
 add_subdirectory( UniformGridGenerated )
 add_subdirectory( PhaseFieldAllenCahn )
 endif()
-if ( WALBERLA_BUILD_WITH_CUDA )
+if ( WALBERLA_BUILD_WITH_CODEGEN AND WALBERLA_BUILD_WITH_CUDA )
 add_subdirectory( UniformGridGPU )
-add_subdirectory( PhaseFieldAllenCahn )
 endif()
diff --git a/tests/cuda/CMakeLists.txt b/tests/cuda/CMakeLists.txt
index fb00acf95..b16464064 100644
--- a/tests/cuda/CMakeLists.txt
+++ b/tests/cuda/CMakeLists.txt
@@ -29,6 +29,10 @@ waLBerla_compile_test( FILES codegen/CodegenJacobiGPU.cpp
                        DEPENDS blockforest timeloop gui CodegenJacobiGPUGeneratedCudaJacobiKernel )
 waLBerla_execute_test( NAME CodegenJacobiGPU )
 
+waLBerla_generate_target_from_python(NAME CodegenPoissonGPUGeneratedKernel FILE codegen/CudaPoisson.py
+        OUT_FILES PoissonGPU.cu PoissonGPU.h )
+waLBerla_compile_test( FILES codegen/CodegenPoissonGPU.cpp DEPENDS gui cuda timeloop CodegenPoissonGPUGeneratedKernel)
+waLBerla_execute_test( NAME CodegenPoissonGPU )
 
 # The following tests work only for CUDA enabled MPI
 waLBerla_compile_test( FILES communication/CommTest )
diff --git a/tests/cuda/codegen/CodegenPoissonGPU.cpp b/tests/cuda/codegen/CodegenPoissonGPU.cpp
index fd88bf1fb..d160f7999 100644
--- a/tests/cuda/codegen/CodegenPoissonGPU.cpp
+++ b/tests/cuda/codegen/CodegenPoissonGPU.cpp
@@ -20,7 +20,6 @@
 
 #include "PoissonGPU.h"
 
-#include "cuda/HostFieldAllocator.h"
 #include "blockforest/Initialization.h"
 #include "blockforest/communication/UniformDirectScheme.h"
 #include "blockforest/communication/UniformBufferedScheme.h"
@@ -29,10 +28,8 @@
 #include "core/debug/TestSubsystem.h"
 #include "core/math/Constants.h"
 
-#include "cuda/HostFieldAllocator.h"
 #include "cuda/FieldCopy.h"
 #include "cuda/GPUField.h"
-#include "cuda/Kernel.h"
 #include "cuda/AddGPUFieldToStorage.h"
 #include "cuda/communication/GPUPackInfo.h"
 #include "cuda/FieldIndexing.h"
@@ -43,8 +40,6 @@
 
 #include "geometry/initializer/ScalarFieldFromGrayScaleImage.h"
 
-#include "gui/Gui.h"
-
 #include "stencil/D2Q9.h"
 
 #include "timeloop/SweepTimeloop.h"
diff --git a/tests/field/CMakeLists.txt b/tests/field/CMakeLists.txt
index 3c2cd3244..992dc4298 100644
--- a/tests/field/CMakeLists.txt
+++ b/tests/field/CMakeLists.txt
@@ -68,10 +68,10 @@ waLBerla_generate_target_from_python(NAME CodegenJacobiCPUGeneratedJacobiKernel
 waLBerla_compile_test( FILES codegen/CodegenJacobiCPU.cpp DEPENDS gui timeloop CodegenJacobiCPUGeneratedJacobiKernel)
 waLBerla_execute_test( NAME CodegenJacobiCPU )
 
-waLBerla_generate_target_from_python(NAME CodegenPoissonGeneratedKernel FILE codegen/Poisson.py
+waLBerla_generate_target_from_python(NAME CodegenPoissonCPUGeneratedKernel FILE codegen/Poisson.py
       OUT_FILES Poisson.cpp Poisson.h )
-waLBerla_compile_test( FILES codegen/CodegenPoisson.cpp DEPENDS gui timeloop CodegenPoissonGeneratedKernel)
-waLBerla_execute_test( NAME CodegenPoisson )
+waLBerla_compile_test( FILES codegen/CodegenPoissonCPU.cpp DEPENDS gui timeloop CodegenPoissonCPUGeneratedKernel)
+waLBerla_execute_test( NAME CodegenPoissonCPU )
 
 waLBerla_generate_target_from_python(NAME CodeGenMultipleFieldSwaps FILE codegen/MultipleFieldSwaps.py
         OUT_FILES MultipleFieldSwaps.cpp MultipleFieldSwaps.h )
diff --git a/tests/field/codegen/CodegenPoisson.cpp b/tests/field/codegen/CodegenPoissonCPU.cpp
similarity index 100%
rename from tests/field/codegen/CodegenPoisson.cpp
rename to tests/field/codegen/CodegenPoissonCPU.cpp
-- 
GitLab