Browse Source

Drop support for Julia < 1.10.

pull/27/head
Fredrik Ekre 1 year ago
parent
commit
3c23b77a5e
No known key found for this signature in database
GPG Key ID: DE82E6D5E364C0A2
  1. 6
      .github/workflows/Test.yml
  2. 7
      Project.toml
  3. 19
      ext/HYPREPartitionedArrays.jl
  4. 7
      src/HYPRE.jl

6
.github/workflows/ci.yml → .github/workflows/Test.yml

@ -1,11 +1,11 @@ @@ -1,11 +1,11 @@
name: CI
name: Test
on:
push:
branches:
- 'master'
- 'release-'
tags: '*'
tags: ['*']
pull_request:
jobs:
@ -15,7 +15,7 @@ jobs: @@ -15,7 +15,7 @@ jobs:
strategy:
matrix:
version:
- '1.6'
- '1.10'
- '1'
- 'nightly'
os:

7
Project.toml

@ -1,15 +1,12 @@ @@ -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" @@ -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"

19
ext/HYPREPartitionedArrays.jl

@ -14,14 +14,6 @@ using SparseMatricesCSR: SparseMatrixCSR, colvals @@ -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 @@ -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
@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 @@ -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
@check HYPRE_IJVectorSetValues(dst, nvalues, indices, values)
end
# TODO: It shouldn't be necessary to assemble here since we only set owned rows (?)

7
src/HYPRE.jl

@ -415,11 +415,4 @@ end @@ -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

Loading…
Cancel
Save