From 00c0c94a68d89af9c53960730f278ffa0103a5cc Mon Sep 17 00:00:00 2001 From: Alexis Montoison Date: Mon, 20 May 2024 16:06:44 -0400 Subject: [PATCH] Add tests with LinearOperators.jl --- .buildkite/pipeline.yml | 14 ++++++++++++++ test/cpu/linear_operators.jl | 16 ++++++++++++++++ 2 files changed, 30 insertions(+) create mode 100644 test/cpu/linear_operators.jl diff --git a/.buildkite/pipeline.yml b/.buildkite/pipeline.yml index 120f1f736..358eb9cac 100644 --- a/.buildkite/pipeline.yml +++ b/.buildkite/pipeline.yml @@ -98,3 +98,17 @@ steps: Pkg.instantiate() include("test/cpu/component_arrays.jl")' timeout_in_minutes: 30 + + - label: "CPUs -- LinearOperators.jl" + plugins: + - JuliaCI/julia#v1: + version: "1.10" + agents: + queue: "juliaecosystem" + command: | + julia --color=yes --project -e ' + using Pkg + Pkg.add("LinearOperators") + Pkg.instantiate() + include("test/cpu/linear_operators.jl")' + timeout_in_minutes: 30 diff --git a/test/cpu/linear_operators.jl b/test/cpu/linear_operators.jl new file mode 100644 index 000000000..3a58c5d20 --- /dev/null +++ b/test/cpu/linear_operators.jl @@ -0,0 +1,16 @@ +using LinearAlgebra, SparseArrays, Test +using Krylov, LinearOperators + +@testset "LinearOperators" begin + n = 50 + p = 5 + + for T in (Float64, ComplexF64) + A = rand(T, n, n) + B = rand(T, n, p) + + opA = LinearOperator(A) + x, stats = block_gmres(opA, B) + @test stats.solved + end +end