Skip to content

Commit

Permalink
remove verbosity from pardiso tests
Browse files Browse the repository at this point in the history
Otherwise Panua Pardiso may segfault during iteration for complex system
  • Loading branch information
j-fu committed Jun 4, 2024
1 parent d843f01 commit a339509
Showing 1 changed file with 9 additions and 18 deletions.
27 changes: 9 additions & 18 deletions test/pardiso/pardiso.jl
Original file line number Diff line number Diff line change
Expand Up @@ -13,30 +13,21 @@ n = 4
e = ones(n)
e2 = ones(n - 1)
A2 = spdiagm(-1 => im * e2, 0 => lambda * e, 1 => -im * e2)

b2 = rand(n) + im * zeros(n)
cache_kwargs = (; verbose = true, abstol = 1e-8, reltol = 1e-8, maxiter = 30)

prob2 = LinearProblem(A2, b2)

for alg in (PardisoJL(), MKLPardisoFactorize())
u = solve(prob1, alg; cache_kwargs...).u
@test A1 * u b1

u = solve(prob2, alg; cache_kwargs...).u
@test eltype(u) <: Complex
@test A2 * u b2
end
cache_kwargs = (; abstol = 1e-8, reltol = 1e-8, maxiter = 30)

for alg in (MKLPardisoIterate(),)
u = solve(prob1, alg; cache_kwargs...).u
@test A1 * u b1
for alg in (PardisoJL(), MKLPardisoFactorize(), MKLPardisoIterate())
u = solve(prob1, alg; cache_kwargs...).u
@test A1 * u b1

u = solve(prob2, alg; cache_kwargs...).u
@test eltype(u) <: Complex
@test A2 * u b2
u = solve(prob2, alg; cache_kwargs...).u
@test eltype(u) <: Complex
@test A2 * u b2
end

return


Random.seed!(10)
Expand Down Expand Up @@ -79,7 +70,7 @@ end
A=makeA()
u0=fill(0.1,size(A,2))
linprob = LinearProblem(A, A*u0)
u = LinearSolve.solve(linprob, PardisoJL(),verbose=true)
u = LinearSolve.solve(linprob, PardisoJL())
@test norm(u-u0) < 1.0e-14


Expand Down

0 comments on commit a339509

Please sign in to comment.