diff --git a/.buildkite/pipeline.yml b/.buildkite/pipeline.yml index ab6155fb4..120f1f736 100644 --- a/.buildkite/pipeline.yml +++ b/.buildkite/pipeline.yml @@ -2,7 +2,7 @@ steps: - label: "Nvidia GPUs -- CUDA.jl" plugins: - JuliaCI/julia#v1: - version: 1.9 + version: "1.10" agents: queue: "juliagpu" cuda: "*" @@ -22,7 +22,7 @@ steps: - label: "AMD GPUs -- AMDGPU.jl" plugins: - JuliaCI/julia#v1: - version: 1.9 + version: "1.10" agents: queue: "juliagpu" rocm: "*" @@ -43,7 +43,7 @@ steps: - label: "Intel GPUs -- oneAPI.jl" plugins: - JuliaCI/julia#v1: - version: 1.9 + version: "1.10" agents: queue: "juliagpu" intel: "*" @@ -58,7 +58,7 @@ steps: - label: "Apple M1 GPUs -- Metal.jl" plugins: - JuliaCI/julia#v1: - version: 1.9 + version: "1.10" agents: queue: "juliaecosystem" os: "macos" @@ -74,7 +74,7 @@ steps: - label: "CPUs -- StaticArrays.jl" plugins: - JuliaCI/julia#v1: - version: 1.9 + version: "1.10" agents: queue: "juliaecosystem" command: | @@ -82,5 +82,19 @@ steps: using Pkg Pkg.add("StaticArrays") Pkg.instantiate() - include("test/test_extensions.jl")' + include("test/cpu/static_arrays.jl")' + timeout_in_minutes: 30 + + - label: "CPUs -- ComponentArrays.jl" + plugins: + - JuliaCI/julia#v1: + version: "1.10" + agents: + queue: "juliaecosystem" + command: | + julia --color=yes --project -e ' + using Pkg + Pkg.add("ComponentArrays") + Pkg.instantiate() + include("test/cpu/component_arrays.jl")' timeout_in_minutes: 30 diff --git a/.cirrus.yml b/.cirrus.yml index ae9052092..71a6f32bd 100644 --- a/.cirrus.yml +++ b/.cirrus.yml @@ -14,7 +14,7 @@ task: - JULIA_VERSION: 1 - name: MacOS M1 macos_instance: - image: ghcr.io/cirruslabs/macos-monterey-base:latest + image: ghcr.io/cirruslabs/macos-ventura-base:latest env: - JULIA_VERSION: 1 install_script: | diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index e1d0d0541..1bef6b76e 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -14,7 +14,7 @@ jobs: fail-fast: false matrix: version: ['1.6', '1'] - os: [ubuntu-latest, macOS-latest, windows-latest] + os: [ubuntu-latest, macos-13, windows-latest] arch: [x64] allow_failure: [false] include: @@ -23,7 +23,7 @@ jobs: arch: x64 allow_failure: true - version: 'nightly' - os: macOS-latest + os: macos-13 arch: x64 allow_failure: true - version: 'nightly' @@ -31,7 +31,7 @@ jobs: arch: x64 allow_failure: true steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - uses: julia-actions/setup-julia@v2 with: version: ${{ matrix.version }} diff --git a/src/krylov_utils.jl b/src/krylov_utils.jl index 826e5eaeb..ca73bc121 100644 --- a/src/krylov_utils.jl +++ b/src/krylov_utils.jl @@ -206,7 +206,12 @@ Return the most relevant storage type `S` based on the type of `v`. function ktypeof end function ktypeof(v::S) where S <: DenseVector - return S + if S.name.name == :ComponentArray + T = eltype(S) + return Vector{T} + else + return S + end end function ktypeof(v::S) where S <: DenseMatrix @@ -214,9 +219,9 @@ function ktypeof(v::S) where S <: DenseMatrix end function ktypeof(v::S) where S <: AbstractVector - if S.name.name == :Zeros || S.name.name == :Ones || S.name.name == :SArray || S.name.name == :MArray || S.name.name == :SizedArray || S.name.name == :FieldArray || S.name.name == :ComponentArray + if S.name.name == :Zeros || S.name.name == :Ones || S.name.name == :SArray || S.name.name == :MArray || S.name.name == :SizedArray || S.name.name == :FieldArray T = eltype(S) - return Vector{T} # FillArrays, StaticArrays, ComponentArrays + return Vector{T} # FillArrays, StaticArrays else return S # BlockArrays, PartitionedArrays, etc... end diff --git a/test/cpu/component_arrays.jl b/test/cpu/component_arrays.jl new file mode 100644 index 000000000..4f51a2005 --- /dev/null +++ b/test/cpu/component_arrays.jl @@ -0,0 +1,15 @@ +using LinearAlgebra, SparseArrays, Test +using Krylov, ComponentArrays + +@testset "ComponentArrays" begin + n = 5 + + for T in (Float32, Float64) + A = rand(T, n, n) + + b = ComponentVector{T}(a=[1, 2, 3], b=[4, 5]) + @test Krylov.ktypeof(b) == Vector{T} + x, stats = gmres(A, b) + @test stats.solved + end +end diff --git a/test/test_extensions.jl b/test/cpu/static_arrays.jl similarity index 100% rename from test/test_extensions.jl rename to test/cpu/static_arrays.jl