Skip to content

Commit

Permalink
Test block_minres on GPUs
Browse files Browse the repository at this point in the history
  • Loading branch information
amontoison committed Nov 4, 2024
1 parent 60ffac6 commit 1ab7105
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 1 deletion.
9 changes: 9 additions & 0 deletions test/gpu/amd.jl
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,15 @@ include("gpu.jl")
@test norm(b - A * x) atol + rtol * norm(b)
end

@testset "block-MINRES -- $FC" begin
A, b = symmetric_indefinite(FC=FC)
B = hcat(b, -b)
A = M(A)
B = M(B)
X, stats = block_minres(A, B)
@test norm(B - A * X) atol + rtol * norm(B)
end

@testset "block-GMRES -- $FC" begin
A, b = nonsymmetric_indefinite(FC=FC)
B = hcat(b, -b)
Expand Down
11 changes: 10 additions & 1 deletion test/gpu/intel.jl
Original file line number Diff line number Diff line change
Expand Up @@ -86,8 +86,17 @@ include("gpu.jl")
@test norm(b - A * x) atol + rtol * norm(b)
end

@testset "block-MINRES -- $FC" begin
A, b = symmetric_indefinite(FC=FC)
B = hcat(b, -b)
A = M(A)
B = M(B)
X, stats = block_minres(A, B)
@test norm(B - A * X) atol + rtol * norm(B)
end

@testset "block-GMRES -- $FC" begin
A, b = symmetric_definite(FC=FC)
A, b = nonsymmetric_definite(FC=FC)
B = hcat(b, -b)
A = M(A)
B = M(B)
Expand Down
9 changes: 9 additions & 0 deletions test/gpu/nvidia.jl
Original file line number Diff line number Diff line change
Expand Up @@ -186,6 +186,15 @@ include("gpu.jl")
@test norm(b - A * x) atol + rtol * norm(b)
end

@testset "block-MINRES -- $FC" begin
A, b = symmetric_indefinite(FC=FC)
B = hcat(b, -b)
A = M(A)
B = M(B)
X, stats = block_minres(A, B)
@test norm(B - A * X) atol + rtol * norm(B)
end

@testset "block-GMRES -- $FC" begin
A, b = nonsymmetric_indefinite(FC=FC)
B = hcat(b, -b)
Expand Down

0 comments on commit 1ab7105

Please sign in to comment.