From 3c23b77a5e6212cc997be256814377a11abbd4a6 Mon Sep 17 00:00:00 2001 From: Fredrik Ekre Date: Wed, 9 Oct 2024 22:58:58 +0200 Subject: [PATCH] Drop support for Julia < 1.10. --- .github/workflows/{ci.yml => Test.yml} | 6 +++--- Project.toml | 7 ++----- ext/HYPREPartitionedArrays.jl | 23 ++--------------------- src/HYPRE.jl | 7 ------- 4 files changed, 7 insertions(+), 36 deletions(-) rename .github/workflows/{ci.yml => Test.yml} (96%) diff --git a/.github/workflows/ci.yml b/.github/workflows/Test.yml similarity index 96% rename from .github/workflows/ci.yml rename to .github/workflows/Test.yml index 56b321e..12a7b81 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/Test.yml @@ -1,11 +1,11 @@ -name: CI +name: Test on: push: branches: - 'master' - 'release-' - tags: '*' + tags: ['*'] pull_request: jobs: @@ -15,7 +15,7 @@ jobs: strategy: matrix: version: - - '1.6' + - '1.10' - '1' - 'nightly' os: diff --git a/Project.toml b/Project.toml index a90e1e8..09c9c05 100644 --- a/Project.toml +++ b/Project.toml @@ -1,15 +1,12 @@ name = "HYPRE" uuid = "b5ffcf37-a2bd-41ab-a3da-4bd9bc8ad771" -version = "1.6.0" +version = "1.7.0" [deps] CEnum = "fa961155-64e5-5f13-b03f-caf6b980ea82" HYPRE_jll = "0a602bbd-b08b-5d75-8d32-0de6eef44785" Libdl = "8f399da3-3557-5675-b5ff-fb832c97cbdb" MPI = "da04e1cc-30fd-572f-bb4f-1f8673147195" -PartitionedArrays = "5a9dfac6-5c52-46f7-8278-5e2210713be9" -SparseArrays = "2f01184e-e22b-5df5-ae63-d93ebab69eaf" -SparseMatricesCSR = "a0a7dd2c-ebf4-11e9-1f05-cf50bc540ca1" [weakdeps] PartitionedArrays = "5a9dfac6-5c52-46f7-8278-5e2210713be9" @@ -26,7 +23,7 @@ CEnum = "0.4, 0.5" MPI = "0.19, 0.20" PartitionedArrays = "0.5" SparseMatricesCSR = "0.6" -julia = "1.6" +julia = "1.10" [extras] LinearAlgebra = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e" diff --git a/ext/HYPREPartitionedArrays.jl b/ext/HYPREPartitionedArrays.jl index c9b35a4..e4e1033 100644 --- a/ext/HYPREPartitionedArrays.jl +++ b/ext/HYPREPartitionedArrays.jl @@ -14,14 +14,6 @@ using SparseMatricesCSR: SparseMatrixCSR, colvals # PartitionedArrays.PSparseMatrix -> HYPREMatrix # ################################################## -function subarray_unsafe_supported() - # Wrapping of SubArrays as raw pointers may or may not be supported - # depending on the Julia version. If this is not supported, we have to fall - # back to allocation of an intermediate buffer. This logic can be removed if - # HYPRE.jl drops support for Julia < 1.9. - return VERSION >= v"1.9.0" -end - function Internals.to_hypre_data( A::SplitMatrix{<:SparseMatrixCSC}, r::AbstractLocalIndices, c::AbstractLocalIndices ) @@ -261,15 +253,8 @@ function Base.copy!(dst::PVector{<:AbstractVector{HYPRE_Complex}}, src::HYPREVec iu_src_part = o_to_g[end] nvalues = HYPRE_Int(iu_src_part - il_src_part + 1) indices = collect(HYPRE_BigInt, il_src_part:iu_src_part) - if subarray_unsafe_supported() - values = ov - else - values = collect(HYPRE_Complex, ov) - end + values = ov @check HYPRE_IJVectorGetValues(src, nvalues, indices, values) - if !subarray_unsafe_supported() - @. ov = values - end end return dst end @@ -284,11 +269,7 @@ function Base.copy!(dst::HYPREVector, src::PVector{<:AbstractVector{HYPRE_Comple iupper_src_part = o_to_g[end] nvalues = HYPRE_Int(iupper_src_part - ilower_src_part + 1) indices = collect(HYPRE_BigInt, ilower_src_part:iupper_src_part) - if subarray_unsafe_supported() - values = ov - else - values = collect(HYPRE_Complex, ov) - end + values = ov @check HYPRE_IJVectorSetValues(dst, nvalues, indices, values) end # TODO: It shouldn't be necessary to assemble here since we only set owned rows (?) diff --git a/src/HYPRE.jl b/src/HYPRE.jl index 07f376b..eeec380 100644 --- a/src/HYPRE.jl +++ b/src/HYPRE.jl @@ -415,11 +415,4 @@ end include("solvers.jl") include("solver_options.jl") -# Compatibility for Julias that doesn't support package extensions -if !(isdefined(Base, :get_extension)) - include("../ext/HYPREPartitionedArrays.jl") - include("../ext/HYPRESparseArrays.jl") - include("../ext/HYPRESparseMatricesCSR.jl") -end - end # module HYPRE