Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test again with Pardiso.jl #31

Closed
wants to merge 4 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions test/Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ IterativeSolvers = "42fd0dbc-a981-5370-80f2-aaf504508153"
LinearAlgebra = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e"
LinearSolve = "7ed4a6bd-45f5-4d41-b270-4a48e9bafcae"
MultiFloats = "bdf0d083-296b-4888-a5b6-7498122e68a5"
Pardiso = "46dd5b70-b6fb-5a00-ae2d-e8fea33afaf2"
Printf = "de0858da-6303-5e67-8744-51eddeeeb8d7"
Random = "9a3f8284-a2c9-5f02-9a11-845980a1fd5c"
SparseArrays = "2f01184e-e22b-5df5-ae63-d93ebab69eaf"
Expand Down
25 changes: 16 additions & 9 deletions test/runtests.jl
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,15 @@ using SparseArrays
using ExtendableSparse
using Printf
using BenchmarkTools

using MultiFloats
using ForwardDiff
using Random


function Random.rand(rng::AbstractRNG,
::Random.SamplerType{ForwardDiff.Dual{T, V, N}}) where {T, V, N}
ForwardDiff.Dual{T, V, N}(rand(rng, T))
end

@testset "Constructors" begin include("test_constructors.jl") end

Expand Down Expand Up @@ -44,12 +50,13 @@ end

#@testset "parilu0" begin include("test_parilu0.jl") end

#=
if !Sys.isapple()
using Pardiso
@testset "mkl-pardiso" begin include("test_mklpardiso.jl") end

# @testset "mkl-pardiso" begin if !Sys.isapple()
# include("test_mklpardiso.jl")
# end end


# if Pardiso.PARDISO_LOADED[]
# @testset "pardiso" begin include("test_pardiso.jl") end
# end
if Pardiso.PARDISO_LOADED[]
@testset "pardiso" begin include("test_pardiso.jl") end
end
end
=#
7 changes: 5 additions & 2 deletions test/test_block.jl
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ using ILUZero, AlgebraicMultigrid
using IterativeSolvers
using LinearAlgebra
using Sparspak

using AMGCLWrap

ExtendableSparse.allow_views(::typeof(ilu0))=true

Expand Down Expand Up @@ -36,7 +36,10 @@ function main(;n=100)
@test sol≈sol0


sol=cg(A,b,Pl=BlockPreconditioner(A;partitioning, factorization=AMGPreconditioner))
sol=cg(A,b,Pl=BlockPreconditioner(A;partitioning, factorization=RS_AMGPreconditioner))
@test sol≈sol0

sol=cg(A,b,Pl=BlockPreconditioner(A;partitioning, factorization=AMGCL_AMGPreconditioner))
@test sol≈sol0

sol=cg(A,b,Pl=BlockPreconditioner(A;partitioning, factorization=sparspaklu))
Expand Down
4 changes: 0 additions & 4 deletions test/test_constructors.jl
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,6 @@ using MultiFloats
using ForwardDiff

const Dual64 = ForwardDiff.Dual{Float64, Float64, 1}
function Random.rand(rng::AbstractRNG,
::Random.SamplerType{ForwardDiff.Dual{T, V, N}}) where {T, V, N}
ForwardDiff.Dual{T, V, N}(rand(rng, T))
end

function test_construct(T)
m = ExtendableSparseMatrix(T, 10, 10)
Expand Down
4 changes: 0 additions & 4 deletions test/test_copymethods.jl
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,6 @@ using MultiFloats
using ForwardDiff

const Dual64 = ForwardDiff.Dual{Float64, Float64, 1}
function Random.rand(rng::AbstractRNG,
::Random.SamplerType{ForwardDiff.Dual{T, V, N}}) where {T, V, N}
ForwardDiff.Dual{T, V, N}(rand(rng, T))
end

function test(T)
Xcsc = sprand(T, 10_000, 10_000, 0.01)
Expand Down
Loading