From 544725f0fb541427c6f007a329f5e55f8428c550 Mon Sep 17 00:00:00 2001 From: Kjetil Olsen Lye Date: Wed, 12 Feb 2025 21:46:06 +0100 Subject: [PATCH] Added barebones test for dynamic fluid system --- CMakeLists.txt | 1 + CMakeLists_files.cmake | 3 +++ tests/gpuistl/test_blackoilfluidsystemgpu.cu | 28 ++++++++++++++++++++ 3 files changed, 32 insertions(+) create mode 100644 tests/gpuistl/test_blackoilfluidsystemgpu.cu diff --git a/CMakeLists.txt b/CMakeLists.txt index 65eea1ad0..80f56cd21 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -740,6 +740,7 @@ if(CUDA_FOUND) gpu_resources gpu_smart_pointers is_gpu_pointer + blackoilfluidsystemgpu PROPERTIES LABELS ${gpu_label}) endif() diff --git a/CMakeLists_files.cmake b/CMakeLists_files.cmake index 51372468d..0c0e29c5d 100644 --- a/CMakeLists_files.cmake +++ b/CMakeLists_files.cmake @@ -482,6 +482,8 @@ if (HAVE_CUDA) ADD_CUDA_OR_HIP_FILE(TEST_SOURCE_FILES tests test_gpu_smart_pointers.cu) ADD_CUDA_OR_HIP_FILE(TEST_SOURCE_FILES tests test_gpu_resources.cu) ADD_CUDA_OR_HIP_FILE(TEST_SOURCE_FILES tests test_is_gpu_pointer.cpp) + ADD_CUDA_OR_HIP_FILE(TEST_SOURCE_FILES tests test_blackoilfluidsystemgpu.cu) + # for loop providing the flag --expt-relaxed-constexpr to fix some cuda issues with constexpr if(NOT CONVERT_CUDA_TO_HIP) @@ -489,6 +491,7 @@ if (HAVE_CUDA) tests/gpuistl/test_gpu_ad.cu tests/gpuistl/test_gpu_linear_two_phase_material.cu tests/gpuistl/test_gpuPvt.cu + tests/gpuistl/test_blackoilfluidsystemgpu.cu ) foreach(file ${CU_FILES_NEEDING_RELAXED_CONSTEXPR}) diff --git a/tests/gpuistl/test_blackoilfluidsystemgpu.cu b/tests/gpuistl/test_blackoilfluidsystemgpu.cu new file mode 100644 index 000000000..8e7f3b1ea --- /dev/null +++ b/tests/gpuistl/test_blackoilfluidsystemgpu.cu @@ -0,0 +1,28 @@ +/* + Copyright 2025 Equinor ASA + + This file is part of the Open Porous Media project (OPM). + OPM 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. + OPM 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 OPM. If not, see . +*/ + +#define BOOST_TEST_MODULE TestBlackOilFluidSystemGPU +#include + +#include + +#include + + +BOOST_AUTO_TEST_CASE(TestDynamicCreationCPU) { + Opm::BlackOilFluidSystemDynamic fluidSystem; +} +