From e003152e0b73156adb4a059f13f5b55084b4afbb Mon Sep 17 00:00:00 2001 From: "TESLA03\\Master" <a.wellmann@tu-bs.de> Date: Mon, 31 May 2021 11:10:51 +0200 Subject: [PATCH] remove kernel mapper from app gridGeneratorTest --- apps/gpu/LBM/gridGeneratorTest/CMakeLists.txt | 8 +++----- .../LBM/gridGeneratorTest/gridGenerator.cpp | 19 ++++++++----------- 2 files changed, 11 insertions(+), 16 deletions(-) diff --git a/apps/gpu/LBM/gridGeneratorTest/CMakeLists.txt b/apps/gpu/LBM/gridGeneratorTest/CMakeLists.txt index b05d36ee5..6493b72cf 100644 --- a/apps/gpu/LBM/gridGeneratorTest/CMakeLists.txt +++ b/apps/gpu/LBM/gridGeneratorTest/CMakeLists.txt @@ -1,7 +1,5 @@ -PROJECT(GridGeneratorTest) +PROJECT(GridGeneratorTest LANGUAGES CUDA CXX) -vf_add_library(BUILDTYPE binary PRIVATE_LINK basics VirtualFluids_GPU GridGenerator FILES gridGenerator.cpp) +vf_add_library(BUILDTYPE binary PRIVATE_LINK basics VirtualFluids_GPU GridGenerator MPI::MPI_CXX FILES gridGenerator.cpp) -set_source_files_properties(gridGenerator.cpp PROPERTIES LANGUAGE CUDA) - -linkCUDA() +set_source_files_properties(DrivenCavity.cpp PROPERTIES LANGUAGE CUDA) diff --git a/apps/gpu/LBM/gridGeneratorTest/gridGenerator.cpp b/apps/gpu/LBM/gridGeneratorTest/gridGenerator.cpp index 401ffc1ef..7034220c9 100644 --- a/apps/gpu/LBM/gridGeneratorTest/gridGenerator.cpp +++ b/apps/gpu/LBM/gridGeneratorTest/gridGenerator.cpp @@ -31,7 +31,6 @@ #include "VirtualFluids_GPU/PreProcessor/PreProcessorFactory/PreProcessorFactoryImp.h" #include "VirtualFluids_GPU/GPU/CudaMemoryManager.h" -#include "VirtualFluids_GPU/Kernel/Utilities/Mapper/KernelMapper/KernelMapper.h" #include "global.h" @@ -79,11 +78,9 @@ void multipleLevel(const std::string& configPath) auto gridBuilder = MultipleGridBuilder::makeShared(gridFactory); - Communicator* comm = Communicator::getInstanz(); + vf::gpu::Communicator *comm = vf::gpu::Communicator::getInstanz(); SPtr<ConfigFileReader> configReader = ConfigFileReader::getNewInstance(); - SPtr<ConfigData> configData = configReader->readConfigFile(configPath); - - std::shared_ptr<KernelMapper> kernelMapper = KernelMapper::getInstance(); + SPtr<ConfigData> configData = configReader->readConfigFile(configPath.c_str()); SPtr<Parameter> para = Parameter::make(configData, comm); @@ -208,7 +205,7 @@ void multipleLevel(const std::string& configPath) para->setUseWale(false); - para->setMainKernel(kernelMapper->getEnum("CumulantK15Comp")); + para->setMainKernel("CumulantK15Comp"); ////////////////////////////////////////////////////////////////////////// @@ -291,7 +288,7 @@ void multipleLevel(const std::string& configPath) para->setUseWale(false); - para->setMainKernel(kernelMapper->getEnum("CumulantK20Comp")); + para->setMainKernel("CumulantK20Comp"); //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// @@ -392,7 +389,7 @@ void multipleLevel(const std::string& configPath) para->setUseWale(false); - para->setMainKernel(kernelMapper->getEnum("CumulantAA2016CompSP27")); + para->setMainKernel("CumulantAA2016CompSP27"); //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// @@ -468,7 +465,7 @@ void multipleLevel(const std::string& configPath) para->setUseWale(false); - para->setMainKernel(kernelMapper->getEnum("CumulantAA2016CompSP27")); + para->setMainKernel("CumulantAA2016CompSP27"); //para->setMainKernel(kernelMapper->getEnum("CumulantOneCompSP27")); //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// @@ -659,13 +656,13 @@ void multipleLevel(const std::string& configPath) para->setUseWale(false); - para->setMainKernel(kernelMapper->getEnum("CumulantK15Comp")); + para->setMainKernel("CumulantK15Comp"); para->setDevices( { 0, 1 } ); para->setMaxDev(2); //const uint generatePart = 1; - const uint generatePart = Communicator::getInstanz()->getPID(); + const uint generatePart = vf::gpu::Communicator::getInstanz()->getPID(); std::ofstream logFile2; -- GitLab