diff --git a/src/cpu/VirtualFluidsCore/LBM/CumulantK17LBMKernelUnified.cpp b/src/cpu/VirtualFluidsCore/LBM/CumulantK17LBMKernelUnified.cpp index 841ade937217a4dcc34797e21fb1ed7f54351a03..2dfa947f91172c6d79104e7cb8190b58927ffc87 100644 --- a/src/cpu/VirtualFluidsCore/LBM/CumulantK17LBMKernelUnified.cpp +++ b/src/cpu/VirtualFluidsCore/LBM/CumulantK17LBMKernelUnified.cpp @@ -39,10 +39,10 @@ #include "Block3D.h" #include "BCArray3D.h" -#include <lbm/Chimera.h> -#include <lbm/CumulantChimera.h> +//#include <lbm/CumulantChimera.h> +#include <lbm/CumulantChimeraPreCompiled.h> -#define PROOF_CORRECTNESS +//#define PROOF_CORRECTNESS using namespace UbMath; diff --git a/src/gpu/VirtualFluids_GPU/CMakeLists.txt b/src/gpu/VirtualFluids_GPU/CMakeLists.txt index bda2861873bdd0577c1437f138eedb02da910564..88233e74643313b1bf3a29c0ace915a37405142c 100644 --- a/src/gpu/VirtualFluids_GPU/CMakeLists.txt +++ b/src/gpu/VirtualFluids_GPU/CMakeLists.txt @@ -5,7 +5,7 @@ if(MSVC) set(additional_libraries ws2_32 Traffic) # ws_32 throws an error on Phoenix endif() -vf_add_library(PRIVATE_LINK ${additional_libraries} GridGenerator basics MPI::MPI_CXX lbm) +vf_add_library(PRIVATE_LINK ${additional_libraries} GridGenerator basics MPI::MPI_CXX lbmCuda) linkBoost(COMPONENTS "serialization") diff --git a/src/lbm/CMakeLists.txt b/src/lbm/CMakeLists.txt index 6331a0fe718d578bf61ee261748ff6193e3f2fff..9efa44b728c9552a96ea8c1ad1414518ed00c047 100644 --- a/src/lbm/CMakeLists.txt +++ b/src/lbm/CMakeLists.txt @@ -1,7 +1,12 @@ -project(lbm LANGUAGES CXX CUDA) +project(lbm LANGUAGES CXX) vf_add_library(NAME lbm PUBLIC_LINK basics) +if(BUILD_VF_GPU) + add_subdirectory(cuda) +endif() + + vf_add_tests() -set_target_properties(lbm PROPERTIES CUDA_SEPARABLE_COMPILATION ON) +#set_target_properties(lbm PROPERTIES CUDA_SEPARABLE_COMPILATION ON) diff --git a/src/lbm/CumulantChimeraPreCompiled.cu b/src/lbm/CumulantChimeraPreCompiled.cpp similarity index 100% rename from src/lbm/CumulantChimeraPreCompiled.cu rename to src/lbm/CumulantChimeraPreCompiled.cpp diff --git a/src/lbm/cuda/CMakeLists.txt b/src/lbm/cuda/CMakeLists.txt new file mode 100644 index 0000000000000000000000000000000000000000..78433784b6e6326be2a7443ece4ff12dc03651c7 --- /dev/null +++ b/src/lbm/cuda/CMakeLists.txt @@ -0,0 +1,11 @@ +project(lbmCuda LANGUAGES CUDA CXX) + + +vf_add_library(NAME lbmCuda BUILDTYPE static PUBLIC_LINK basics FOLDER ../../lbm) + + +set_target_properties(lbmCuda PROPERTIES CUDA_SEPARABLE_COMPILATION ON) + + +set_source_files_properties(../CumulantChimeraPreCompiled.cpp PROPERTIES LANGUAGE CUDA) +#set_source_files_properties(../BackwardChimera.cpp PROPERTIES LANGUAGE CUDA)