diff --git a/CMake/FileUtilities.cmake b/CMake/FileUtilities.cmake index 151000a681795923d4e31ed8c5f06dfd1e7af7fd..13057ef832b5aa2d7ce303fe55e95a91284f5f56 100644 --- a/CMake/FileUtilities.cmake +++ b/CMake/FileUtilities.cmake @@ -5,7 +5,7 @@ ## After function call the files are stored in: MY_SRCS ################################################################################# -macro(includeAllFiles targetName file_path) +macro(includeAllFiles folderName targetName file_path) if(NOT DEFINED collectTestFiles) set(collectTestFiles ON) endif() @@ -14,11 +14,11 @@ macro(includeAllFiles targetName file_path) set(collectProductionFiles ON) endif() - includeFiles(${targetName} "${file_path}") + includeFiles(${folderName} ${targetName} "${file_path}") endmacro(includeAllFiles) -macro(includeProductionFiles targetName file_path) +macro(includeProductionFiles folderName targetName file_path) if(NOT DEFINED collectTestFiles) set(collectTestFiles OFF) endif() @@ -27,12 +27,12 @@ macro(includeProductionFiles targetName file_path) set(collectProductionFiles ON) endif() - includeFiles(${targetName} "${file_path}") + includeFiles(${folderName} ${targetName} "${file_path}") endmacro(includeProductionFiles) -macro(includeTestFiles targetName file_paths) +macro(includeTestFiles folderName file_paths) if(NOT DEFINED collectTestFiles) set(collectTestFiles ON) endif() @@ -41,13 +41,13 @@ macro(includeTestFiles targetName file_paths) set(collectProductionFiles OFF) endif() - includeFiles(${targetName} "${file_paths}") + includeFiles(${folderName} ${folderName} "${file_paths}") endmacro(includeTestFiles) -macro(includeFiles targetName file_paths) +macro(includeFiles folderName targetName file_paths) foreach(file ${file_paths}) @@ -57,7 +57,7 @@ macro(includeFiles targetName file_paths) collectFilesFrom(${file}) if (package_dir) - setSourceGroupForFilesIn(${file} ${package_dir} ${targetName}) + setSourceGroupForFilesIn(${file} ${package_dir} ${targetName} ${folderName}) endif() endforeach() @@ -90,9 +90,9 @@ endmacro() -macro(setSourceGroupForFilesIn file package_dir targetName) +macro(setSourceGroupForFilesIn file package_dir targetName folderName) #input: target_name PACKAGE_SRCS - buildSourceGroup(${targetName} ${package_dir}) + buildSourceGroup(${folderName} ${package_dir}) if(isAllTestSuite) source_group(${targetName}\\${SOURCE_GROUP} FILES ${file}) @@ -105,20 +105,20 @@ endmacro(setSourceGroupForFilesIn) -macro(buildSourceGroup targetName path) -#input: targetName (e.g. lib name, exe name) +macro(buildSourceGroup folderName path) +#input: folderName (e.g. name of folder after src/) unset(SOURCE_GROUP) string(REPLACE "/" ";" folderListFromPath ${path}) - set(findTargetName 0) + set(findFolderName 0) foreach(folder ${folderListFromPath}) - if(findTargetName) + if(findFolderName) set(SOURCE_GROUP ${SOURCE_GROUP}\\${folder}) endif() - if(${folder} STREQUAL ${targetName}) - SET(findTargetName 1) + if(${folder} STREQUAL ${folderName}) + SET(findFolderName 1) endif() endforeach() diff --git a/CMake/VirtualFluidsMacros.cmake b/CMake/VirtualFluidsMacros.cmake index 63503f5f14221bb8cec7670dbdda6aa92497d327..81ff1015e2682895637ab741cd91dac99ea83759 100644 --- a/CMake/VirtualFluidsMacros.cmake +++ b/CMake/VirtualFluidsMacros.cmake @@ -105,14 +105,15 @@ function(vf_add_library) set( options ) set( oneValueArgs NAME BUILDTYPE) - set( multiValueArgs PUBLIC_LINK PRIVATE_LINK FILES FOLDER EXCLUDE) + set( multiValueArgs PUBLIC_LINK PRIVATE_LINK FILES FOLDER EXCLUDE MODULEFOLDER) cmake_parse_arguments( ARG "${options}" "${oneValueArgs}" "${multiValueArgs}" ${ARGN} ) - if(DEFINED ARG_NAME) + if(DEFINED ARG_NAME) set(library_name ${ARG_NAME}) else() vf_get_library_name (library_name) endif() + vf_get_library_name (folder_name) # folder_name is not equal to library_name when ARG_NAME was set if(NOT DEFINED ARG_BUILDTYPE) if(BUILD_SHARED_LIBS) @@ -122,12 +123,21 @@ function(vf_add_library) endif() endif() + if(DEFINED ARG_MODULEFOLDER) + set(folder_name ${ARG_MODULEFOLDER}) + endif() + status("Configuring the target: ${library_name} (type=${ARG_BUILDTYPE})...") collectFiles(sourceFiles "${ARG_FILES}" "${ARG_FOLDER}" "${ARG_EXCLUDE}") - includeProductionFiles (${library_name} "${sourceFiles}") + message(STATUS "library_name=${library_name}") + message(STATUS "folder_name=${folder_name}") + message(STATUS "sourceFiles=${sourceFiles}") + + + includeProductionFiles (${folder_name} ${library_name} "${sourceFiles}") ################################################################# ### ADD TARGET ### diff --git a/apps/gpu/LBM/DrivenCavityUniform/CMakeLists.txt b/apps/gpu/LBM/DrivenCavityUniform/CMakeLists.txt new file mode 100644 index 0000000000000000000000000000000000000000..8384e1bc6fcfa3fd2514434b620b266e96b3626a --- /dev/null +++ b/apps/gpu/LBM/DrivenCavityUniform/CMakeLists.txt @@ -0,0 +1,9 @@ +PROJECT(DrivenCavity LANGUAGES CUDA CXX) + +#LIST(APPEND CS_COMPILER_FLAGS_CXX "-DOMPI_SKIP_MPICXX" ) + +vf_add_library(BUILDTYPE binary PRIVATE_LINK basics VirtualFluids_GPU GridGenerator MPI::MPI_CXX FILES DrivenCavity.cpp) + +set_source_files_properties(DrivenCavity.cpp PROPERTIES LANGUAGE CUDA) + +set_target_properties(DrivenCavity PROPERTIES CUDA_SEPARABLE_COMPILATION ON) diff --git a/apps/gpu/LBM/DrivenCavityUniform/DrivenCavity.cpp b/apps/gpu/LBM/DrivenCavityUniform/DrivenCavity.cpp new file mode 100644 index 0000000000000000000000000000000000000000..958ef4714118aac34b8cfb0bec3aab97b108b01d --- /dev/null +++ b/apps/gpu/LBM/DrivenCavityUniform/DrivenCavity.cpp @@ -0,0 +1,231 @@ +//======================================================================================= +// ____ ____ __ ______ __________ __ __ __ __ +// \ \ | | | | | _ \ |___ ___| | | | | / \ | | +// \ \ | | | | | |_) | | | | | | | / \ | | +// \ \ | | | | | _ / | | | | | | / /\ \ | | +// \ \ | | | | | | \ \ | | | \__/ | / ____ \ | |____ +// \ \ | | |__| |__| \__\ |__| \________/ /__/ \__\ |_______| +// \ \ | | ________________________________________________________________ +// \ \ | | | ______________________________________________________________| +// \ \| | | | __ __ __ __ ______ _______ +// \ | | |_____ | | | | | | | | | _ \ / _____) +// \ | | _____| | | | | | | | | | | \ \ \_______ +// \ | | | | |_____ | \_/ | | | | |_/ / _____ | +// \ _____| |__| |________| \_______/ |__| |______/ (_______/ +// +// This file is part of VirtualFluids. VirtualFluids is free software: you can +// redistribute it and/or modify it under the terms of the GNU General Public +// License as published by the Free Software Foundation, either version 3 of +// the License, or (at your option) any later version. +// +// VirtualFluids is distributed in the hope that it will be useful, but WITHOUT +// ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or +// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License +// for more details. +// +// You should have received a copy of the GNU General Public License along +// with VirtualFluids (see COPYING.txt). If not, see <http://www.gnu.org/licenses/>. +// +//! \file LidDrivenCavity.cpp +//! \ingroup Applications +//! \author Martin Schoenherr, Stephan Lenz +//======================================================================================= +#define _USE_MATH_DEFINES +#include <exception> +#include <fstream> +#include <iostream> +#include <memory> +#include <sstream> +#include <stdexcept> +#include <string> + +////////////////////////////////////////////////////////////////////////// + +#include "Core/DataTypes.h" +#include "Core/LbmOrGks.h" +#include "Core/Logger/Logger.h" +#include "Core/VectorTypes.h" +#include "PointerDefinitions.h" + +#include <logger/Logger.h> + +////////////////////////////////////////////////////////////////////////// + +#include "GridGenerator/grid/BoundaryConditions/Side.h" +#include "GridGenerator/grid/GridBuilder/LevelGridBuilder.h" +#include "GridGenerator/grid/GridBuilder/MultipleGridBuilder.h" +#include "GridGenerator/grid/GridFactory.h" +#include "GridGenerator/geometries/Cuboid/Cuboid.h" + +////////////////////////////////////////////////////////////////////////// + +#include "VirtualFluids_GPU/Factories/BoundaryConditionFactory.h" +#include "VirtualFluids_GPU/Factories/GridScalingFactory.h" +#include "VirtualFluids_GPU/Communication/Communicator.h" +#include "VirtualFluids_GPU/DataStructureInitializer/GridProvider.h" +#include "VirtualFluids_GPU/DataStructureInitializer/GridReaderGenerator/GridGenerator.h" +#include "VirtualFluids_GPU/GPU/CudaMemoryManager.h" +#include "VirtualFluids_GPU/LBM/Simulation.h" +#include "VirtualFluids_GPU/Output/FileWriter.h" +#include "VirtualFluids_GPU/Parameter/Parameter.h" +#include "VirtualFluids_GPU/Factories/GridScalingFactory.h" + +////////////////////////////////////////////////////////////////////////// + +int main() +{ + try { + vf::logging::Logger::initalizeLogger(); + ////////////////////////////////////////////////////////////////////////// + // Simulation parameters + ////////////////////////////////////////////////////////////////////////// + std::string path("./output/DrivenCavity_uniform"); + std::string simulationName("LidDrivenCavity"); + + const real L = 1.0; + const real Re = 1000.0; + const real velocity = 1.0; + const real dt = (real)0.5e-3; + const uint nx = 64; + + const uint timeStepOut = 1000; + const uint timeStepEnd = 10000; + + ////////////////////////////////////////////////////////////////////////// + // setup logger + ////////////////////////////////////////////////////////////////////////// + + logging::Logger::addStream(&std::cout); + logging::Logger::setDebugLevel(logging::Logger::Level::INFO_LOW); + logging::Logger::timeStamp(logging::Logger::ENABLE); + logging::Logger::enablePrintedRankNumbers(logging::Logger::ENABLE); + + ////////////////////////////////////////////////////////////////////////// + // setup gridGenerator + ////////////////////////////////////////////////////////////////////////// + + auto gridFactory = GridFactory::make(); + gridFactory->setTriangularMeshDiscretizationMethod(TriangularMeshDiscretizationMethod::POINT_IN_OBJECT); + auto gridBuilder = MultipleGridBuilder::makeShared(gridFactory); + + ////////////////////////////////////////////////////////////////////////// + // create grid + ////////////////////////////////////////////////////////////////////////// + + real dx = L / real(nx); + + gridBuilder->addCoarseGrid(-0.5 * L, -0.5 * L, -0.5 * L, 0.5 * L, 0.5 * L, 0.5 * L, dx); + + // gridBuilder->addGrid(new Cuboid(-0.25, -0.25, -0.25, 0.25, 0.25, 0.25), 1); // add fine grid + GridScalingFactory scalingFactory = GridScalingFactory(); + scalingFactory.setScalingFactory(GridScalingFactory::GridScaling::ScaleCompressible); + + gridBuilder->setPeriodicBoundaryCondition(false, false, false); + + gridBuilder->buildGrids(LbmOrGks::LBM, false); + + ////////////////////////////////////////////////////////////////////////// + // compute parameters in lattice units + ////////////////////////////////////////////////////////////////////////// + + const real velocityLB = velocity * dt / dx; // LB units + + const real vxLB = velocityLB / sqrt(2.0); // LB units + const real vyLB = velocityLB / sqrt(2.0); // LB units + + const real viscosityLB = nx * velocityLB / Re; // LB units + + ////////////////////////////////////////////////////////////////////////// + // set parameters + ////////////////////////////////////////////////////////////////////////// + SPtr<Parameter> para = std::make_shared<Parameter>(); + + para->setOutputPath(path); + para->setOutputPrefix(simulationName); + + para->setPrintFiles(true); + + para->setVelocityLB(velocityLB); + para->setViscosityLB(viscosityLB); + + para->setVelocityRatio(velocity / velocityLB); + para->setDensityRatio(1.0); + + para->setTimestepOut(timeStepOut); + para->setTimestepEnd(timeStepEnd); + + para->setMainKernel("CumulantK17"); + + ////////////////////////////////////////////////////////////////////////// + // set boundary conditions + ////////////////////////////////////////////////////////////////////////// + + gridBuilder->setNoSlipBoundaryCondition(SideType::PX); + gridBuilder->setNoSlipBoundaryCondition(SideType::MX); + gridBuilder->setNoSlipBoundaryCondition(SideType::PY); + gridBuilder->setNoSlipBoundaryCondition(SideType::MY); + gridBuilder->setVelocityBoundaryCondition(SideType::PZ, vxLB, vyLB, 0.0); + gridBuilder->setNoSlipBoundaryCondition(SideType::MZ); + + BoundaryConditionFactory bcFactory; + + bcFactory.setNoSlipBoundaryCondition(BoundaryConditionFactory::NoSlipBC::NoSlipBounceBack); + bcFactory.setVelocityBoundaryCondition(BoundaryConditionFactory::VelocityBC::VelocitySimpleBounceBackCompressible); + + ////////////////////////////////////////////////////////////////////////// + // set copy mesh to simulation + ////////////////////////////////////////////////////////////////////////// + + vf::gpu::Communicator &communicator = vf::gpu::Communicator::getInstance(); + + auto cudaMemoryManager = std::make_shared<CudaMemoryManager>(para); + SPtr<GridProvider> gridGenerator = + GridProvider::makeGridGenerator(gridBuilder, para, cudaMemoryManager, communicator); + + + ////////////////////////////////////////////////////////////////////////// + // run simulation + ////////////////////////////////////////////////////////////////////////// + + VF_LOG_INFO("Start Running DrivenCavity Showcase..."); + printf("\n"); + VF_LOG_INFO("world parameter:"); + VF_LOG_INFO("--------------"); + VF_LOG_INFO("dt [s] = {}", dt); + VF_LOG_INFO("world_length [m] = {}", L); + VF_LOG_INFO("world_velocity [m/s] = {}", velocity); + VF_LOG_INFO("dx [m] = {}", dx); + printf("\n"); + VF_LOG_INFO("LB parameter:"); + VF_LOG_INFO("--------------"); + VF_LOG_INFO("Re = {}", Re); + VF_LOG_INFO("lb_velocity [dx/dt] = {}", velocityLB); + VF_LOG_INFO("lb_viscosity [dx^2/dt] = {}", viscosityLB); + VF_LOG_INFO("lb_vx [dx/dt] (lb_velocity/sqrt(2)) = {}", vxLB); + VF_LOG_INFO("lb_vy [dx/dt] (lb_velocity/sqrt(2)) = {}", vyLB); + printf("\n"); + VF_LOG_INFO("simulation parameter:"); + VF_LOG_INFO("--------------"); + VF_LOG_INFO("nx = {}", nx); + VF_LOG_INFO("ny = {}", nx); + VF_LOG_INFO("nz = {}", nx); + VF_LOG_INFO("number of nodes = {}", nx * nx * nx); + VF_LOG_INFO("n timesteps = {}", timeStepOut); + VF_LOG_INFO("write_nth_timestep = {}", timeStepEnd); + VF_LOG_INFO("output_path = {}", path); + + Simulation sim(para, cudaMemoryManager, communicator, *gridGenerator, &bcFactory, &scalingFactory); + sim.run(); + + } catch (const spdlog::spdlog_ex &ex) { + std::cout << "Log initialization failed: " << ex.what() << std::endl; + } catch (const std::bad_alloc &e) { + VF_LOG_CRITICAL("Bad Alloc: {}", e.what()); + } catch (const std::exception &e) { + VF_LOG_CRITICAL("exception: {}", e.what()); + } catch (...) { + VF_LOG_CRITICAL("Unknown exception!"); + } + + return 0; +} diff --git a/apps/gpu/LBM/DrivenCavityUniform/configDrivenCavity.txt b/apps/gpu/LBM/DrivenCavityUniform/configDrivenCavity.txt new file mode 100644 index 0000000000000000000000000000000000000000..458346a67c7f001580494af1dc9262034613be68 --- /dev/null +++ b/apps/gpu/LBM/DrivenCavityUniform/configDrivenCavity.txt @@ -0,0 +1,34 @@ +################################################## +#GPU Mapping +################################################## +#Devices="0 1 2 3" +#NumberOfDevices=4 + +################################################## +#informations for Writing +################################################## +#Path = "output/" +#Prefix="DrivenCavity" +#WriteGrid=true +################################################## +#informations for reading +################################################## +#GridPath="grid/" + +################################################## +#number of grid levels +################################################## +#NOGL=1 + +################################################## +#LBM Version +################################################## +#D3Qxx=27 +#MainKernelName=CumulantAA2016CompSP27 + +################################################## +#simulation parameter +################################################## +#TimeEnd=100000 +#TimeOut=1000 +#TimeStartOut=0 \ No newline at end of file diff --git a/pythonbindings/CMakeLists.txt b/pythonbindings/CMakeLists.txt index 945dcd08b3bf13fb2e7c569aea811a16fd71f9f0..4eb8634788a29c637948c400195a3479d7383f75 100644 --- a/pythonbindings/CMakeLists.txt +++ b/pythonbindings/CMakeLists.txt @@ -20,7 +20,7 @@ IF(BUILD_VF_GPU) target_include_directories(python_bindings PRIVATE ${VF_THIRD_DIR}/cuda_samples/) target_compile_definitions(python_bindings PRIVATE VF_GPU_PYTHONBINDINGS) - target_link_libraries(python_bindings PRIVATE GridGenerator VirtualFluids_GPU lbmCuda) + target_link_libraries(python_bindings PRIVATE GridGenerator VirtualFluids_GPU lbm_cuda) ENDIF() IF(BUILD_VF_CPU) diff --git a/regression-tests/driven_cavity_test.sh b/regression-tests/driven_cavity_test.sh index 96490eb3e5c1f8d0e9c44d18d883d7dafcde77ed..a00e550f0d00181d6e6ab00fc97a619ad8301c38 100755 --- a/regression-tests/driven_cavity_test.sh +++ b/regression-tests/driven_cavity_test.sh @@ -8,7 +8,7 @@ # in this case adding -DUSER_APPS="apps/gpu/LBM/DrivenCavity to the cmake command is not necessary, because the DrivenCavity is added to VirtualFluids by default. mkdir -p build cmake -B build --preset=release_make_gpu -DCMAKE_CUDA_ARCHITECTURES=75 #-DUSER_APPS="apps/gpu/LBM/DrivenCavity" -cd build && make -j 8 && cd .. +cmake --build build --parallel 8 # execute VirtualFluids ./build/bin/DrivenCavity diff --git a/regression-tests/driven_cavity_uniform_test.sh b/regression-tests/driven_cavity_uniform_test.sh new file mode 100755 index 0000000000000000000000000000000000000000..9337eb7f9e607a88e884728b599e863f5b746a63 --- /dev/null +++ b/regression-tests/driven_cavity_uniform_test.sh @@ -0,0 +1,24 @@ +#!/bin/bash + +################################# +# Driven Cavity Regression Test +################################# + +# build VirtualFluids accordingly to our specific test scenario. +# in this case adding -DUSER_APPS="apps/gpu/LBM/DrivenCavity to the cmake command is not necessary, because the DrivenCavity is added to VirtualFluids by default. +mkdir -p build +cmake -B build --preset=release_make_gpu -DCMAKE_CUDA_ARCHITECTURES=75 -DUSER_APPS="apps/gpu/LBM/DrivenCavityUniform" +cmake --build build --parallel 8 + +# execute VirtualFluids +./build/bin/DrivenCavity + +# set the path to the produced data +PATH_TO_DIR=output/DrivenCavity_uniform + +# set the path to the reference data. +# `regression-tests/reference_data` is fix `regression_tests/gpu/DrivenCavity_uniform_2022_12_16` must match the structure in https://github.com/irmb/test_data: +PATH_TO_REFERENCE_DIR=regression-tests/reference_data/regression_tests/gpu/DrivenCavity_uniform_2022_12_16 + +# execute fieldcompare (A more comprehensive manual can be found here https://gitlab.com/dglaeser/fieldcompare) +fieldcompare dir $PATH_TO_DIR $PATH_TO_REFERENCE_DIR --include-files "*.vtu" diff --git a/regression-tests/regression-tests.sh b/regression-tests/regression-tests.sh index 5b7d227907594b727103be91d2382c05a07b9c6f..9f5dc8cf758b380709fcc9ad8020d1335f760f64 100755 --- a/regression-tests/regression-tests.sh +++ b/regression-tests/regression-tests.sh @@ -13,11 +13,10 @@ git clone https://github.com/irmb/test_data regression-tests/reference_data # by cloning our meshio patch and fieldcompare into a venv python3 -m venv .venv source .venv/bin/activate -pip install rich -pip install git+https://github.com/soerenPeters/meshio@update-pyproject-version -pip install git+https://gitlab.com/dglaeser/fieldcompare +pip install fieldcompare # 3. Running the specific tests +./regression-tests/driven_cavity_uniform_test.sh ./regression-tests/driven_cavity_test.sh diff --git a/src/gpu/GksGpu/CMakeLists.txt b/src/gpu/GksGpu/CMakeLists.txt index 5dbc533cc5f45c006c29a12242350f0433518bbf..fcbb330fc3e27b8f7eda472f9231880a6e824ca9 100644 --- a/src/gpu/GksGpu/CMakeLists.txt +++ b/src/gpu/GksGpu/CMakeLists.txt @@ -1,6 +1,6 @@ project(GksGpu LANGUAGES CUDA CXX) -vf_add_library(PRIVATE_LINK basics lbmCuda GksMeshAdapter OpenMP::OpenMP_CXX MPI::MPI_CXX) +vf_add_library(PRIVATE_LINK basics lbm_cuda GksMeshAdapter OpenMP::OpenMP_CXX MPI::MPI_CXX) target_include_directories(GksGpu PRIVATE "${VF_THIRD_DIR}/cuda_samples/") diff --git a/src/gpu/GksMeshAdapter/CMakeLists.txt b/src/gpu/GksMeshAdapter/CMakeLists.txt index b9a2d12df4d0bee9396a706c6636b5f4056b2d3a..eeeb5821ba7dbc196dcb8e3249d0b2b7aa7ecfcc 100644 --- a/src/gpu/GksMeshAdapter/CMakeLists.txt +++ b/src/gpu/GksMeshAdapter/CMakeLists.txt @@ -1,3 +1,3 @@ project(GksMeshAdapter LANGUAGES CUDA CXX) -vf_add_library(PRIVATE_LINK basics GridGenerator lbmCuda) +vf_add_library(PRIVATE_LINK basics GridGenerator lbm_cuda) diff --git a/src/gpu/VirtualFluids_GPU/CMakeLists.txt b/src/gpu/VirtualFluids_GPU/CMakeLists.txt index 759528e5346ba8d9899cb90eb64503b20a44c4fc..df8b4bf0594c66b342e947a875b3d342dfb6329d 100644 --- a/src/gpu/VirtualFluids_GPU/CMakeLists.txt +++ b/src/gpu/VirtualFluids_GPU/CMakeLists.txt @@ -8,7 +8,7 @@ if(MSVC) set(additional_libraries ws2_32 Traffic) # ws_32 throws an error on Phoenix endif() -vf_add_library(PUBLIC_LINK basics lbmCuda PRIVATE_LINK ${additional_libraries} GridGenerator MPI::MPI_CXX vf_cuda) +vf_add_library(PUBLIC_LINK basics lbm_cuda PRIVATE_LINK ${additional_libraries} GridGenerator MPI::MPI_CXX vf_cuda) #SET(TPN_WIN32 "/EHsc") #https://stackoverflow.com/questions/6832666/lnk2019-when-including-asio-headers-solution-generated-with-cmake diff --git a/src/lbm/cuda/CMakeLists.txt b/src/lbm/cuda/CMakeLists.txt index 4142b7c3b1c46275c3257e3dfd657cc6b30c841d..f49d67e0b8ffc3aa9fb5e47ab1d2ab2770f40dd3 100644 --- a/src/lbm/cuda/CMakeLists.txt +++ b/src/lbm/cuda/CMakeLists.txt @@ -1,11 +1,8 @@ -project(lbmCuda LANGUAGES CUDA CXX) +project(lbm_cuda LANGUAGES CUDA CXX) +vf_add_library(NAME lbm_cuda BUILDTYPE static PUBLIC_LINK basics FOLDER "${CMAKE_SOURCE_DIR}/src/lbm;${CMAKE_SOURCE_DIR}/src/lbm/constants" MODULEFOLDER "lbm") -vf_add_library(NAME lbmCuda BUILDTYPE static PUBLIC_LINK basics FOLDER ../../lbm) - - -set_target_properties(lbmCuda PROPERTIES CUDA_SEPARABLE_COMPILATION ON POSITION_INDEPENDENT_CODE ON) - +set_target_properties(lbm_cuda PROPERTIES CUDA_SEPARABLE_COMPILATION ON POSITION_INDEPENDENT_CODE ON) set_source_files_properties(../KernelParameter.cpp PROPERTIES LANGUAGE CUDA) set_source_files_properties(../CumulantChimera.cpp PROPERTIES LANGUAGE CUDA)