From 437b209a748f2d5373dc08fbe5dfd66c72531896 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=BCrgen=20Fuhrmann?= Date: Sat, 27 Jan 2024 19:00:12 +0100 Subject: [PATCH 1/4] test again with Pardiso.jl - local tests failed due to wrong local mkl setting --- test/Project.toml | 1 + test/runtests.jl | 15 +++++++-------- test/test_block.jl | 8 +++++++- 3 files changed, 15 insertions(+), 9 deletions(-) diff --git a/test/Project.toml b/test/Project.toml index e195dd2..dc64217 100644 --- a/test/Project.toml +++ b/test/Project.toml @@ -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" diff --git a/test/runtests.jl b/test/runtests.jl index 4d7ae07..7bfa30e 100644 --- a/test/runtests.jl +++ b/test/runtests.jl @@ -4,6 +4,7 @@ using SparseArrays using ExtendableSparse using Printf using BenchmarkTools +using Pardiso using MultiFloats using ForwardDiff @@ -44,12 +45,10 @@ end #@testset "parilu0" begin include("test_parilu0.jl") end +if !Sys.isapple() + @testset "mkl-pardiso" begin include("test_mklpardiso.jl") end +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 diff --git a/test/test_block.jl b/test/test_block.jl index 1a055a1..a5a3d6d 100644 --- a/test/test_block.jl +++ b/test/test_block.jl @@ -5,7 +5,7 @@ using ILUZero, AlgebraicMultigrid using IterativeSolvers using LinearAlgebra using Sparspak - +using AMGCLWrap ExtendableSparse.allow_views(::typeof(ilu0))=true @@ -36,6 +36,12 @@ function main(;n=100) @test sol≈sol0 + 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=AMGPreconditioner)) @test sol≈sol0 From ee9335d96198f903de67d1a3613eaab4ea6d7938 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=BCrgen=20Fuhrmann?= Date: Sat, 27 Jan 2024 20:22:46 +0100 Subject: [PATCH 2/4] problems with two omp libs on mac --- test/runtests.jl | 15 +++++++++++---- test/test_block.jl | 3 --- test/test_constructors.jl | 4 ---- test/test_copymethods.jl | 4 ---- 4 files changed, 11 insertions(+), 15 deletions(-) diff --git a/test/runtests.jl b/test/runtests.jl index 7bfa30e..fa6d187 100644 --- a/test/runtests.jl +++ b/test/runtests.jl @@ -4,10 +4,15 @@ using SparseArrays using ExtendableSparse using Printf using BenchmarkTools -using Pardiso - 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 @@ -46,9 +51,11 @@ end #@testset "parilu0" begin include("test_parilu0.jl") end if !Sys.isapple() + using Pardiso @testset "mkl-pardiso" begin include("test_mklpardiso.jl") end -end -if Pardiso.PARDISO_LOADED[] + if Pardiso.PARDISO_LOADED[] @testset "pardiso" begin include("test_pardiso.jl") end + end end + diff --git a/test/test_block.jl b/test/test_block.jl index a5a3d6d..a338357 100644 --- a/test/test_block.jl +++ b/test/test_block.jl @@ -42,9 +42,6 @@ function main(;n=100) sol=cg(A,b,Pl=BlockPreconditioner(A;partitioning, factorization=AMGCL_AMGPreconditioner)) @test sol≈sol0 - sol=cg(A,b,Pl=BlockPreconditioner(A;partitioning, factorization=AMGPreconditioner)) - @test sol≈sol0 - sol=cg(A,b,Pl=BlockPreconditioner(A;partitioning, factorization=sparspaklu)) @test sol≈sol0 diff --git a/test/test_constructors.jl b/test/test_constructors.jl index 693309d..8b72267 100644 --- a/test/test_constructors.jl +++ b/test/test_constructors.jl @@ -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) diff --git a/test/test_copymethods.jl b/test/test_copymethods.jl index af0c2bf..9acb541 100644 --- a/test/test_copymethods.jl +++ b/test/test_copymethods.jl @@ -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) From 5eca13488d9c1140b1e5af288b9471bbb78a77c5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=BCrgen=20Fuhrmann?= Date: Sat, 27 Jan 2024 21:25:11 +0100 Subject: [PATCH 3/4] try without pardiso --- test/Project.toml | 1 - test/runtests.jl | 3 ++- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/test/Project.toml b/test/Project.toml index dc64217..e195dd2 100644 --- a/test/Project.toml +++ b/test/Project.toml @@ -9,7 +9,6 @@ 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" diff --git a/test/runtests.jl b/test/runtests.jl index fa6d187..694c593 100644 --- a/test/runtests.jl +++ b/test/runtests.jl @@ -50,6 +50,7 @@ end #@testset "parilu0" begin include("test_parilu0.jl") end +#= if !Sys.isapple() using Pardiso @testset "mkl-pardiso" begin include("test_mklpardiso.jl") end @@ -58,4 +59,4 @@ if !Sys.isapple() @testset "pardiso" begin include("test_pardiso.jl") end end end - +=# From c34a3b5118bcd1a9ee7a7774fea75d27f2701bea Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=BCrgen=20Fuhrmann?= Date: Sat, 27 Jan 2024 22:45:06 +0100 Subject: [PATCH 4/4] test env with Pardiso --- test/Project.toml | 1 + 1 file changed, 1 insertion(+) diff --git a/test/Project.toml b/test/Project.toml index e195dd2..dc64217 100644 --- a/test/Project.toml +++ b/test/Project.toml @@ -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"