From 65d7d6cf4d041f7a0b9430e45a358088e2d28e3d Mon Sep 17 00:00:00 2001 From: filipovic Date: Sun, 21 Jun 2026 22:26:11 +0200 Subject: [PATCH 01/10] add gpu support to wheel --- .github/workflows/build.yml | 2 +- .github/workflows/docs.yml | 2 +- .github/workflows/format.yml | 2 +- .github/workflows/python.yml | 13 ++++++++----- 4 files changed, 11 insertions(+), 8 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 19162df5..5d24b799 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -41,7 +41,7 @@ jobs: steps: - name: ๐Ÿ“ฅ Checkout - uses: actions/checkout@v5 + uses: actions/checkout@v6 - name: ๐Ÿ–ฅ๏ธ Setup Environment uses: ./.github/actions/setup diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index aa3efba7..e6ed43bf 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -25,7 +25,7 @@ jobs: run: pacman --noconfirm -Syu doxygen git - name: ๐Ÿ“ฅ Checkout - uses: actions/checkout@v5 + uses: actions/checkout@v6 with: submodules: "recursive" diff --git a/.github/workflows/format.yml b/.github/workflows/format.yml index 44963bfb..48b94f4e 100644 --- a/.github/workflows/format.yml +++ b/.github/workflows/format.yml @@ -18,7 +18,7 @@ jobs: steps: - name: ๐Ÿ“ฅ Checkout - uses: actions/checkout@v5 + uses: actions/checkout@v6 with: set-safe-directory: true diff --git a/.github/workflows/python.yml b/.github/workflows/python.yml index 8f2faaac..9df28d54 100644 --- a/.github/workflows/python.yml +++ b/.github/workflows/python.yml @@ -38,7 +38,7 @@ jobs: steps: - name: ๐Ÿ“ฅ Checkout - uses: actions/checkout@v5 + uses: actions/checkout@v6 - name: ๐Ÿ–ฅ๏ธ Setup Environment uses: ./.github/actions/setup @@ -102,7 +102,7 @@ jobs: ./venv/bin/python -c "import viennals; print(viennals.__doc__)" - name: ๐Ÿ“ฆ Upload Artifact - uses: actions/upload-artifact@v6 + uses: actions/upload-artifact@v7 with: name: Pre-Built (${{ matrix.os }}) path: venv @@ -137,7 +137,7 @@ jobs: steps: - name: ๐Ÿ“ฅ Checkout - uses: actions/checkout@v5 + uses: actions/checkout@v6 - name: ๐Ÿ–ฅ๏ธ Setup Environment uses: ./.github/actions/setup @@ -152,6 +152,7 @@ jobs: run: python -m cibuildwheel --output-dir wheelhouse env: CIBW_SKIP: ${{ matrix.skip }} + CIBW_MANYLINUX_X86_64_IMAGE: ghcr.io/viennatools/vienna-builder:cuda-python CIBW_TEST_COMMAND: >- python -c "import viennals; print(viennals.__file__); @@ -161,6 +162,8 @@ jobs: cmake.define.VIENNALS_PACKAGE_PYTHON=ON cmake.define.VIENNALS_IS_CI=ON cmake.define.VIENNALS_VTK_RENDERING=ON + cmake.define.VIENNALS_GPU_BICGSTAB=ON + cmake.define.VIENNACORE_LINK_CUDA_DRIVER=OFF cmake.define.USE_IPO=OFF - name: ๐Ÿ—๏ธ Build Wheels (Other) @@ -228,7 +231,7 @@ jobs: PY - name: ๐Ÿ“ฆ Upload Artifact - uses: actions/upload-artifact@v6 + uses: actions/upload-artifact@v7 with: name: wheels-${{ matrix.os }} path: ./wheelhouse/*.whl @@ -245,7 +248,7 @@ jobs: steps: - name: ๐Ÿ“ฆ Download Wheels - uses: actions/download-artifact@v4 + uses: actions/download-artifact@v8 with: pattern: wheels-* path: dist From 67f2be4d91399ca39656810650a988cd94b69e77 Mon Sep 17 00:00:00 2001 From: filipovic Date: Sun, 21 Jun 2026 23:17:47 +0200 Subject: [PATCH 02/10] add VIENNALS_USE_GPU --- .github/workflows/python.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/python.yml b/.github/workflows/python.yml index 9df28d54..372001c0 100644 --- a/.github/workflows/python.yml +++ b/.github/workflows/python.yml @@ -162,7 +162,7 @@ jobs: cmake.define.VIENNALS_PACKAGE_PYTHON=ON cmake.define.VIENNALS_IS_CI=ON cmake.define.VIENNALS_VTK_RENDERING=ON - cmake.define.VIENNALS_GPU_BICGSTAB=ON + cmake.define.VIENNALS_USE_GPU=ON cmake.define.VIENNACORE_LINK_CUDA_DRIVER=OFF cmake.define.USE_IPO=OFF From 57cf07a67f198b46d3feca59b2aab2ed7c499f05 Mon Sep 17 00:00:00 2001 From: filipovic Date: Mon, 22 Jun 2026 08:55:06 +0200 Subject: [PATCH 03/10] fix missing cuda libs --- .github/workflows/python.yml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/.github/workflows/python.yml b/.github/workflows/python.yml index 372001c0..776996bf 100644 --- a/.github/workflows/python.yml +++ b/.github/workflows/python.yml @@ -153,6 +153,13 @@ jobs: env: CIBW_SKIP: ${{ matrix.skip }} CIBW_MANYLINUX_X86_64_IMAGE: ghcr.io/viennatools/vienna-builder:cuda-python + CIBW_REPAIR_WHEEL_COMMAND_LINUX: >- + auditwheel repair + --exclude libcuda.so.1 + --exclude libcudart.so.12 + --exclude libcusparse.so.12 + --exclude libnvJitLink.so.12 + -w {dest_dir} {wheel} CIBW_TEST_COMMAND: >- python -c "import viennals; print(viennals.__file__); From 298441dc734ed04ddc55b630eee766d7d18e87e0 Mon Sep 17 00:00:00 2001 From: filipovic Date: Mon, 22 Jun 2026 11:42:07 +0200 Subject: [PATCH 04/10] bump version to 5.8.1 --- CMakeLists.txt | 2 +- README.md | 2 +- include/viennals/lsVersion.hpp | 4 ++-- pyproject.toml | 2 +- python/viennals/__init__.pyi | 4 ++-- python/viennals/_core.pyi | 4 ++-- 6 files changed, 9 insertions(+), 9 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 79b008dc..81b1ef62 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -2,7 +2,7 @@ cmake_minimum_required(VERSION 3.20 FATAL_ERROR) project( ViennaLS LANGUAGES CXX - VERSION 5.8.0) + VERSION 5.8.1) # -------------------------------------------------------------------------------------------------------- # Library options diff --git a/README.md b/README.md index 6e167460..dab99516 100644 --- a/README.md +++ b/README.md @@ -175,7 +175,7 @@ We recommend using [CPM.cmake](https://github.com/cpm-cmake/CPM.cmake) to consum * Installation with CPM ```cmake - CPMAddPackage("gh:viennatools/viennals@5.8.0") + CPMAddPackage("gh:viennatools/viennals@5.8.1") ``` * With a local installation diff --git a/include/viennals/lsVersion.hpp b/include/viennals/lsVersion.hpp index 2d6b556d..94ee7d6d 100644 --- a/include/viennals/lsVersion.hpp +++ b/include/viennals/lsVersion.hpp @@ -5,10 +5,10 @@ namespace viennals { // Version information generated by CMake -inline constexpr const char *version = "5.8.0"; +inline constexpr const char *version = "5.8.1"; inline constexpr int versionMajor = 5; inline constexpr int versionMinor = 8; -inline constexpr int versionPatch = 0; +inline constexpr int versionPatch = 1; // Utility functions for version comparison inline constexpr uint32_t versionAsInteger() { diff --git a/pyproject.toml b/pyproject.toml index 4b5cc346..53980be3 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -6,7 +6,7 @@ requires = [ build-backend = "scikit_build_core.build" [project] -version = "5.8.0" +version = "5.8.1" name = "ViennaLS" readme = "README.md" license = {file = "LICENSE"} diff --git a/python/viennals/__init__.pyi b/python/viennals/__init__.pyi index 0ae66518..2b05b0b5 100644 --- a/python/viennals/__init__.pyi +++ b/python/viennals/__init__.pyi @@ -133,7 +133,7 @@ ILU0: _core.GpuPreconditioner # value = Jacobi: _core.GpuPreconditioner # value = PROXY_DIM: int = 2 _SHARED_OXIDATION_TYPES: tuple = ('OxidationParameters', 'OxidationPresets', 'OxidationDeformationParameters', 'OxidationMaskParameters', 'OxidationCouplingParameters') -__version__: str = '5.8.0' +__version__: str = '5.8.1' _name: str = 'OxidationCouplingParameters' -version: str = '5.8.0' +version: str = '5.8.1' _C = _core diff --git a/python/viennals/_core.pyi b/python/viennals/_core.pyi index d085fb85..4049a060 100644 --- a/python/viennals/_core.pyi +++ b/python/viennals/_core.pyi @@ -1063,6 +1063,6 @@ Cpu: GpuMode # value = Gpu: GpuMode # value = ILU0: GpuPreconditioner # value = Jacobi: GpuPreconditioner # value = -__version__: str = '5.8.0' -version: str = '5.8.0' +__version__: str = '5.8.1' +version: str = '5.8.1' IntegrationSchemeEnum = SpatialSchemeEnum From afca63d7e757127769a0dd7526fc5f4be2aebaf4 Mon Sep 17 00:00:00 2001 From: filipovic Date: Mon, 22 Jun 2026 21:47:02 +0200 Subject: [PATCH 05/10] fix: break shared_ptr cycle between OxidationDeformation and OxidationMaskBending --- include/viennals/lsOxidation.hpp | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/include/viennals/lsOxidation.hpp b/include/viennals/lsOxidation.hpp index 436820d3..88a00ff7 100644 --- a/include/viennals/lsOxidation.hpp +++ b/include/viennals/lsOxidation.hpp @@ -196,6 +196,14 @@ template class Oxidation { Oxidation() = default; + ~Oxidation() { + // Break the shared_ptr cycle between OxidationDeformation::maskVelocityField + // and OxidationMaskBending::deformationField so both reach ref-count 0 when + // the SmartPointer members are destroyed in reverse declaration order. + if (deformationField) + deformationField->clearMaskVelocityField(); + } + Oxidation(SmartPointer> passedSiInterface, SmartPointer> passedAmbientInterface, SmartPointer> passedMaskInterface = nullptr) @@ -381,6 +389,12 @@ template class Oxidation { auto stepDeformationParams = deformationParams; stepDeformationParams.stressTimeStep = stressTimeStep; + // Break the shared_ptr cycle (OxidationDeformation โ†” OxidationMaskBending) + // left by the previous solveFields call so the old objects are freed when + // deformationField and maskBendingField are replaced below. + if (deformationField) + deformationField->clearMaskVelocityField(); + // --- Coupled diffusion + deformation solve --- diffusionField = OxidationDiffusion::New( From e96775f31e76165d2ab17c5b9e57071d69f2d608 Mon Sep 17 00:00:00 2001 From: filipovic Date: Mon, 22 Jun 2026 22:54:04 +0200 Subject: [PATCH 06/10] add sanitizer to workflow --- .github/workflows/build.yml | 2 +- include/viennals/lsWriteVisualizationMesh.hpp | 2 +- tests/MultiSurfaceMesh/CMakeLists.txt | 4 ++++ tests/VisualizationMesh/CMakeLists.txt | 4 ++++ tests/lsan_suppressions.txt | 2 ++ 5 files changed, 12 insertions(+), 2 deletions(-) create mode 100644 tests/lsan_suppressions.txt diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 5d24b799..af4d712f 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -89,7 +89,7 @@ jobs: - name: ๐Ÿ—๏ธ Compile (other) if: ${{ matrix.os != 'windows-latest' }} run: | - cmake -DVIENNALS_BUILD_TESTS=ON -B build + cmake -DVIENNALS_BUILD_TESTS=ON -DVIENNALS_ENABLE_SANITIZER=ON -B build cmake --build build --config ${{ matrix.config }} - name: ๐Ÿงช Test diff --git a/include/viennals/lsWriteVisualizationMesh.hpp b/include/viennals/lsWriteVisualizationMesh.hpp index 823e90cc..a8ce7ab4 100644 --- a/include/viennals/lsWriteVisualizationMesh.hpp +++ b/include/viennals/lsWriteVisualizationMesh.hpp @@ -98,7 +98,7 @@ template class WriteVisualizationMesh { vtkSmartPointer newCells = vtkSmartPointer::New(); - vtkSmartPointer cellPoints = vtkIdList::New(); + vtkSmartPointer cellPoints = vtkSmartPointer::New(); oldCells->InitTraversal(); while (oldCells->GetNextCell(cellPoints)) { for (vtkIdType pointId = 0; pointId < cellPoints->GetNumberOfIds(); diff --git a/tests/MultiSurfaceMesh/CMakeLists.txt b/tests/MultiSurfaceMesh/CMakeLists.txt index da7605ca..77804aa8 100644 --- a/tests/MultiSurfaceMesh/CMakeLists.txt +++ b/tests/MultiSurfaceMesh/CMakeLists.txt @@ -5,3 +5,7 @@ target_link_libraries(${PROJECT_NAME} PRIVATE ViennaLS) add_dependencies(ViennaLS_Tests ${PROJECT_NAME}) add_test(NAME ${PROJECT_NAME} COMMAND $) +if(VIENNALS_ENABLE_SANITIZER) + set_tests_properties(${PROJECT_NAME} PROPERTIES + ENVIRONMENT "LSAN_OPTIONS=suppressions=${CMAKE_SOURCE_DIR}/tests/lsan_suppressions.txt") +endif() diff --git a/tests/VisualizationMesh/CMakeLists.txt b/tests/VisualizationMesh/CMakeLists.txt index e971f977..d65c3417 100644 --- a/tests/VisualizationMesh/CMakeLists.txt +++ b/tests/VisualizationMesh/CMakeLists.txt @@ -5,3 +5,7 @@ target_link_libraries(${PROJECT_NAME} PRIVATE ViennaLS) add_dependencies(ViennaLS_Tests ${PROJECT_NAME}) add_test(NAME ${PROJECT_NAME} COMMAND $) +if(VIENNALS_ENABLE_SANITIZER) + set_tests_properties(${PROJECT_NAME} PROPERTIES + ENVIRONMENT "LSAN_OPTIONS=suppressions=${CMAKE_SOURCE_DIR}/tests/lsan_suppressions.txt") +endif() diff --git a/tests/lsan_suppressions.txt b/tests/lsan_suppressions.txt new file mode 100644 index 00000000..4861bc74 --- /dev/null +++ b/tests/lsan_suppressions.txt @@ -0,0 +1,2 @@ +# VTK 9.1 internal leak in geometry filter characterization (unfixed upstream) +leak:vtkGeometryFilterHelper::CharacterizeUnstructuredGrid From c976d00d23ebaa2f6d78b95f8f87b5ce28d509ce Mon Sep 17 00:00:00 2001 From: filipovic Date: Mon, 22 Jun 2026 23:33:00 +0200 Subject: [PATCH 07/10] format --- include/viennals/lsOxidation.hpp | 14 ++++++++------ tests/MultiSurfaceMesh/CMakeLists.txt | 6 ++++-- tests/VisualizationMesh/CMakeLists.txt | 6 ++++-- 3 files changed, 16 insertions(+), 10 deletions(-) diff --git a/include/viennals/lsOxidation.hpp b/include/viennals/lsOxidation.hpp index 88a00ff7..ce29cb45 100644 --- a/include/viennals/lsOxidation.hpp +++ b/include/viennals/lsOxidation.hpp @@ -197,9 +197,10 @@ template class Oxidation { Oxidation() = default; ~Oxidation() { - // Break the shared_ptr cycle between OxidationDeformation::maskVelocityField - // and OxidationMaskBending::deformationField so both reach ref-count 0 when - // the SmartPointer members are destroyed in reverse declaration order. + // Break the shared_ptr cycle between + // OxidationDeformation::maskVelocityField and + // OxidationMaskBending::deformationField so both reach ref-count 0 when the + // SmartPointer members are destroyed in reverse declaration order. if (deformationField) deformationField->clearMaskVelocityField(); } @@ -389,9 +390,10 @@ template class Oxidation { auto stepDeformationParams = deformationParams; stepDeformationParams.stressTimeStep = stressTimeStep; - // Break the shared_ptr cycle (OxidationDeformation โ†” OxidationMaskBending) - // left by the previous solveFields call so the old objects are freed when - // deformationField and maskBendingField are replaced below. + // Break the shared_ptr cycle (OxidationDeformation โ†” + // OxidationMaskBending) left by the previous solveFields call so the old + // objects are freed when deformationField and maskBendingField are + // replaced below. if (deformationField) deformationField->clearMaskVelocityField(); diff --git a/tests/MultiSurfaceMesh/CMakeLists.txt b/tests/MultiSurfaceMesh/CMakeLists.txt index 77804aa8..6664ef06 100644 --- a/tests/MultiSurfaceMesh/CMakeLists.txt +++ b/tests/MultiSurfaceMesh/CMakeLists.txt @@ -6,6 +6,8 @@ target_link_libraries(${PROJECT_NAME} PRIVATE ViennaLS) add_dependencies(ViennaLS_Tests ${PROJECT_NAME}) add_test(NAME ${PROJECT_NAME} COMMAND $) if(VIENNALS_ENABLE_SANITIZER) - set_tests_properties(${PROJECT_NAME} PROPERTIES - ENVIRONMENT "LSAN_OPTIONS=suppressions=${CMAKE_SOURCE_DIR}/tests/lsan_suppressions.txt") + set_tests_properties( + ${PROJECT_NAME} + PROPERTIES ENVIRONMENT + "LSAN_OPTIONS=suppressions=${CMAKE_SOURCE_DIR}/tests/lsan_suppressions.txt") endif() diff --git a/tests/VisualizationMesh/CMakeLists.txt b/tests/VisualizationMesh/CMakeLists.txt index d65c3417..efec6b31 100644 --- a/tests/VisualizationMesh/CMakeLists.txt +++ b/tests/VisualizationMesh/CMakeLists.txt @@ -6,6 +6,8 @@ target_link_libraries(${PROJECT_NAME} PRIVATE ViennaLS) add_dependencies(ViennaLS_Tests ${PROJECT_NAME}) add_test(NAME ${PROJECT_NAME} COMMAND $) if(VIENNALS_ENABLE_SANITIZER) - set_tests_properties(${PROJECT_NAME} PROPERTIES - ENVIRONMENT "LSAN_OPTIONS=suppressions=${CMAKE_SOURCE_DIR}/tests/lsan_suppressions.txt") + set_tests_properties( + ${PROJECT_NAME} + PROPERTIES ENVIRONMENT + "LSAN_OPTIONS=suppressions=${CMAKE_SOURCE_DIR}/tests/lsan_suppressions.txt") endif() From c807db89209345efff79128c1f4693e3c4dc9bee Mon Sep 17 00:00:00 2001 From: filipovic Date: Mon, 22 Jun 2026 23:40:07 +0200 Subject: [PATCH 08/10] format --- tests/MultiSurfaceMesh/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/MultiSurfaceMesh/CMakeLists.txt b/tests/MultiSurfaceMesh/CMakeLists.txt index 6664ef06..166e02ed 100644 --- a/tests/MultiSurfaceMesh/CMakeLists.txt +++ b/tests/MultiSurfaceMesh/CMakeLists.txt @@ -8,6 +8,6 @@ add_test(NAME ${PROJECT_NAME} COMMAND $) if(VIENNALS_ENABLE_SANITIZER) set_tests_properties( ${PROJECT_NAME} - PROPERTIES ENVIRONMENT + PROPERTIES ENVIRONMENT "LSAN_OPTIONS=suppressions=${CMAKE_SOURCE_DIR}/tests/lsan_suppressions.txt") endif() From c489cbbf05c6c6ab07d42c679d675a46c3c1a4b9 Mon Sep 17 00:00:00 2001 From: filipovic Date: Mon, 22 Jun 2026 23:56:44 +0200 Subject: [PATCH 09/10] fix: add libgomp to the suppression file --- tests/CMakeLists.txt | 11 +++++++++++ tests/lsan_suppressions.txt | 2 ++ 2 files changed, 13 insertions(+) diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index 387cdb81..a07a9547 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -6,3 +6,14 @@ if(WIN32) endif() viennacore_add_subdirs(${CMAKE_CURRENT_LIST_DIR}) + +if(VIENNALS_ENABLE_SANITIZER) + get_directory_property(_test_subdirs SUBDIRECTORIES) + foreach(_subdir IN LISTS _test_subdirs) + get_property(_subdir_tests DIRECTORY "${_subdir}" PROPERTY TESTS) + if(_subdir_tests) + set_tests_properties(${_subdir_tests} PROPERTIES + ENVIRONMENT "LSAN_OPTIONS=suppressions=${CMAKE_SOURCE_DIR}/tests/lsan_suppressions.txt") + endif() + endforeach() +endif() diff --git a/tests/lsan_suppressions.txt b/tests/lsan_suppressions.txt index 4861bc74..32ff2e84 100644 --- a/tests/lsan_suppressions.txt +++ b/tests/lsan_suppressions.txt @@ -1,2 +1,4 @@ # VTK 9.1 internal leak in geometry filter characterization (unfixed upstream) leak:vtkGeometryFilterHelper::CharacterizeUnstructuredGrid +# OpenMP thread pool initialization โ€” false positive under musl libc +leak:libgomp From 93293e50bd1832fae25ad6b60faef5595ec7d605 Mon Sep 17 00:00:00 2001 From: filipovic Date: Tue, 23 Jun 2026 06:35:02 +0200 Subject: [PATCH 10/10] remove sanitizer --- .github/workflows/build.yml | 2 +- tests/CMakeLists.txt | 11 ----------- 2 files changed, 1 insertion(+), 12 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index af4d712f..5d24b799 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -89,7 +89,7 @@ jobs: - name: ๐Ÿ—๏ธ Compile (other) if: ${{ matrix.os != 'windows-latest' }} run: | - cmake -DVIENNALS_BUILD_TESTS=ON -DVIENNALS_ENABLE_SANITIZER=ON -B build + cmake -DVIENNALS_BUILD_TESTS=ON -B build cmake --build build --config ${{ matrix.config }} - name: ๐Ÿงช Test diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index a07a9547..387cdb81 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -6,14 +6,3 @@ if(WIN32) endif() viennacore_add_subdirs(${CMAKE_CURRENT_LIST_DIR}) - -if(VIENNALS_ENABLE_SANITIZER) - get_directory_property(_test_subdirs SUBDIRECTORIES) - foreach(_subdir IN LISTS _test_subdirs) - get_property(_subdir_tests DIRECTORY "${_subdir}" PROPERTY TESTS) - if(_subdir_tests) - set_tests_properties(${_subdir_tests} PROPERTIES - ENVIRONMENT "LSAN_OPTIONS=suppressions=${CMAKE_SOURCE_DIR}/tests/lsan_suppressions.txt") - endif() - endforeach() -endif()