Skip to content

Commit

Permalink
Add tests with LinearOperators.jl
Browse files Browse the repository at this point in the history
  • Loading branch information
amontoison committed May 20, 2024
1 parent 5516c2a commit 00c0c94
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 0 deletions.
14 changes: 14 additions & 0 deletions .buildkite/pipeline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
16 changes: 16 additions & 0 deletions test/cpu/linear_operators.jl
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit 00c0c94

Please sign in to comment.