From 45c865f589f2c2385c4df2fedbe63f318fe83267 Mon Sep 17 00:00:00 2001 From: Henry <henry.korb@geo.uu.se> Date: Fri, 7 Oct 2022 11:24:52 +0200 Subject: [PATCH] fix unit test compilation --- src/gpu/VirtualFluids_GPU/CMakeLists.txt | 3 +++ .../Parameter/EdgeNodeFinderTest.cpp | 24 +++++++++---------- 2 files changed, 15 insertions(+), 12 deletions(-) diff --git a/src/gpu/VirtualFluids_GPU/CMakeLists.txt b/src/gpu/VirtualFluids_GPU/CMakeLists.txt index 40496abc6..02330beb7 100644 --- a/src/gpu/VirtualFluids_GPU/CMakeLists.txt +++ b/src/gpu/VirtualFluids_GPU/CMakeLists.txt @@ -22,5 +22,8 @@ if(BUILD_VF_UNIT_TESTS) set_source_files_properties(DataStructureInitializer/GridReaderGenerator/IndexRearrangementForStreamsTest.cpp PROPERTIES LANGUAGE CUDA) set_source_files_properties(Communication/ExchangeData27Test.cpp PROPERTIES LANGUAGE CUDA) set_source_files_properties(BoundaryConditions/BoundaryConditionFactoryTest.cpp PROPERTIES LANGUAGE CUDA) + set_source_files_properties(KernelManager/BCKernelManagerTest.cpp PROPERTIES LANGUAGE CUDA) + set_source_files_properties(Parameter/ParameterTest.cpp PROPERTIES LANGUAGE CUDA) + set_source_files_properties(Parameter/EdgeNodeFinderTest.cpp PROPERTIES LANGUAGE CUDA) target_include_directories(VirtualFluids_GPUTests PRIVATE "${VF_THIRD_DIR}/cuda_samples/") endif() diff --git a/src/gpu/VirtualFluids_GPU/Parameter/EdgeNodeFinderTest.cpp b/src/gpu/VirtualFluids_GPU/Parameter/EdgeNodeFinderTest.cpp index c63c1620a..8e9919e3f 100644 --- a/src/gpu/VirtualFluids_GPU/Parameter/EdgeNodeFinderTest.cpp +++ b/src/gpu/VirtualFluids_GPU/Parameter/EdgeNodeFinderTest.cpp @@ -70,13 +70,13 @@ TEST_F(EdgeNodeFinderTest_findEdgeNodes, shouldReturnCorrectVectorForXY) vf::gpu::findEdgeNodesCommMultiGPU(*para); - const std::vector<std::pair<int, int>> expectedEdgeNodesXtoYRecv = { std::pair(numRecvNeighbor, 0), - std::pair(numRecvNeighbor, 4), - std::pair(numRecvNeighbor, 5) }; + const std::vector<std::pair<int, int>> expectedEdgeNodesXtoYRecv = { std::pair<int, int>(numRecvNeighbor, 0), + std::pair<int, int>(numRecvNeighbor, 4), + std::pair<int, int>(numRecvNeighbor, 5) }; - const std::vector<std::pair<int, int>> expectedEdgeNodesXtoYSend = { std::pair(numSendNeighbor, 1), - std::pair(numSendNeighbor, 6), - std::pair(numSendNeighbor, 4) }; + const std::vector<std::pair<int, int>> expectedEdgeNodesXtoYSend = { std::pair<int, int>(numSendNeighbor, 1), + std::pair<int, int>(numSendNeighbor, 6), + std::pair<int, int>(numSendNeighbor, 4) }; EXPECT_THAT(para->parH[level]->edgeNodesXtoY.size(), testing::Eq(expectedEdgeNodesXtoYRecv.size())); EXPECT_TRUE(compareEdgeNodesRecv(para->parH[level]->edgeNodesXtoY, expectedEdgeNodesXtoYRecv)) @@ -107,12 +107,12 @@ TEST_F(EdgeNodeFinderTest_findEdgeNodes, shouldReturnCorrectVectorForXZ) vf::gpu::findEdgeNodesCommMultiGPU(*para); - const std::vector<std::pair<int, int>> expectedEdgeNodesXtoZRecv = { std::pair(numRecvNeighbor, 1), - std::pair(numRecvNeighbor, 4), - std::pair(numRecvNeighbor, 6) }; - const std::vector<std::pair<int, int>> expectedEdgeNodesXtoZSend = { std::pair(numSendNeighbor, 0), - std::pair(numSendNeighbor, 5), - std::pair(numSendNeighbor, 4) }; + const std::vector<std::pair<int, int>> expectedEdgeNodesXtoZRecv = { std::pair<int, int>(numRecvNeighbor, 1), + std::pair<int, int>(numRecvNeighbor, 4), + std::pair<int, int>(numRecvNeighbor, 6) }; + const std::vector<std::pair<int, int>> expectedEdgeNodesXtoZSend = { std::pair<int, int>(numSendNeighbor, 0), + std::pair<int, int>(numSendNeighbor, 5), + std::pair<int, int>(numSendNeighbor, 4) }; EXPECT_THAT(para->parH[level]->edgeNodesXtoZ.size(), testing::Eq(expectedEdgeNodesXtoZRecv.size())); EXPECT_TRUE(compareEdgeNodesRecv(para->parH[level]->edgeNodesXtoZ, expectedEdgeNodesXtoZRecv)) -- GitLab