From a15602217baf076bccc135c8047377d298cd529d Mon Sep 17 00:00:00 2001 From: Daniel Runge Date: Wed, 26 Mar 2025 15:20:09 +0100 Subject: [PATCH 1/4] cleaned up testing environment --- Project.toml | 47 +++++++++++++++++++++++++++++++++++++++++++++-- test/Project.toml | 29 ----------------------------- 2 files changed, 45 insertions(+), 31 deletions(-) delete mode 100644 test/Project.toml diff --git a/Project.toml b/Project.toml index 56ccf3a..905ed60 100644 --- a/Project.toml +++ b/Project.toml @@ -4,7 +4,6 @@ authors = ["Juergen Fuhrmann "] version = "1.7.0" [deps] -AMGCLWrap = "4f76b812-4ba5-496d-b042-d70715554288" DocStringExtensions = "ffbed154-4ef7-542d-bbb7-c09d3a79fcae" ILUZero = "88f59080-6952-5380-9ea5-54057fb9a43f" LinearAlgebra = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e" @@ -29,14 +28,58 @@ ExtendableSparseIncompleteLUExt = "IncompleteLU" ExtendableSparsePardisoExt = "Pardiso" ExtendableSparseLinearSolveExt = "LinearSolve" +[extras] +AMGCLWrap = "4f76b812-4ba5-496d-b042-d70715554288" +AlgebraicMultigrid = "2169fc97-5a83-5252-b627-83903c6c433c" +Aqua = "4c88cf16-eb10-579e-8560-4a9242c79595" +BenchmarkTools = "6e4b80f9-dd63-53aa-95a3-0cdb28fa8baf" +ChunkSplitters = "ae650224-84b6-46f8-82ea-d812ca08434e" +ExplicitImports = "7d51a73a-1435-4ff3-83d9-f097790105c7" +ExtendableGrids = "cfc395e8-590f-11e8-1f13-43a2532b2fa8" +ForwardDiff = "f6369f11-7733-5829-9624-2563aa707210" +IncompleteLU = "40713840-3770-5561-ab4c-a76e7d0d7895" +IterativeSolvers = "42fd0dbc-a981-5370-80f2-aaf504508153" +LinearSolve = "7ed4a6bd-45f5-4d41-b270-4a48e9bafcae" +Metis = "2679e427-3c69-5b7f-982b-ece356f1e94b" +MultiFloats = "bdf0d083-296b-4888-a5b6-7498122e68a5" +OhMyThreads = "67456a42-1dca-4109-a031-0a68de7e3ad5" +Pardiso = "46dd5b70-b6fb-5a00-ae2d-e8fea33afaf2" +Random = "9a3f8284-a2c9-5f02-9a11-845980a1fd5c" +RecursiveFactorization = "f2c3362d-daeb-58d1-803e-2bc74f2840b4" +Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40" + [compat] AMGCLWrap = "2" -AlgebraicMultigrid = "0.4, 0.5, 0.6" +AlgebraicMultigrid = "0.4, 0.5, 0.6, 1" DocStringExtensions = "0.8, 0.9" +ExtendableGrids = "1.9" ILUZero = "0.2" IncompleteLU = "^0.2.1" +IterativeSolvers = "0.9" LinearSolve = "2.36.0, 3" Pardiso = "0.5.1, 1" Sparspak = "0.3.6" StaticArrays = "1.5.24" julia = "1.9" + +[targets] +test = [ + "AMGCLWrap", + "AlgebraicMultigrid", + "Aqua", + "BenchmarkTools", + "ChunkSplitters", + "ExplicitImports", + "ExtendableGrids", + "ForwardDiff", + "IncompleteLU", + "IterativeSolvers", + "LinearSolve", + "Metis", + "MultiFloats", + "OhMyThreads", + "Pardiso", + "Random", + "RecursiveFactorization", + "Test", +] \ No newline at end of file diff --git a/test/Project.toml b/test/Project.toml deleted file mode 100644 index e6a6a68..0000000 --- a/test/Project.toml +++ /dev/null @@ -1,29 +0,0 @@ -[deps] -AMGCLWrap = "4f76b812-4ba5-496d-b042-d70715554288" -AlgebraicMultigrid = "2169fc97-5a83-5252-b627-83903c6c433c" -Aqua = "4c88cf16-eb10-579e-8560-4a9242c79595" -BenchmarkTools = "6e4b80f9-dd63-53aa-95a3-0cdb28fa8baf" -ChunkSplitters = "ae650224-84b6-46f8-82ea-d812ca08434e" -ExplicitImports = "7d51a73a-1435-4ff3-83d9-f097790105c7" -ExtendableGrids = "cfc395e8-590f-11e8-1f13-43a2532b2fa8" -ForwardDiff = "f6369f11-7733-5829-9624-2563aa707210" -ILUZero = "88f59080-6952-5380-9ea5-54057fb9a43f" -IncompleteLU = "40713840-3770-5561-ab4c-a76e7d0d7895" -IterativeSolvers = "42fd0dbc-a981-5370-80f2-aaf504508153" -LinearAlgebra = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e" -LinearSolve = "7ed4a6bd-45f5-4d41-b270-4a48e9bafcae" -Metis = "2679e427-3c69-5b7f-982b-ece356f1e94b" -MultiFloats = "bdf0d083-296b-4888-a5b6-7498122e68a5" -OhMyThreads = "67456a42-1dca-4109-a031-0a68de7e3ad5" -Pardiso = "46dd5b70-b6fb-5a00-ae2d-e8fea33afaf2" -Printf = "de0858da-6303-5e67-8744-51eddeeeb8d7" -Random = "9a3f8284-a2c9-5f02-9a11-845980a1fd5c" -RecursiveFactorization = "f2c3362d-daeb-58d1-803e-2bc74f2840b4" -SparseArrays = "2f01184e-e22b-5df5-ae63-d93ebab69eaf" -Sparspak = "e56a9233-b9d6-4f03-8d0f-1825330902ac" -Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40" - -[compat] -ExtendableGrids = "1.9" -IterativeSolvers = "0.9" -LinearSolve = "2.36.0" From 5a99a13e7933cb171e930827fcac08a03c5fe9d9 Mon Sep 17 00:00:00 2001 From: Daniel Runge Date: Wed, 26 Mar 2025 16:11:16 +0100 Subject: [PATCH 2/4] fix code quality for Project.toml --- Project.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Project.toml b/Project.toml index 905ed60..5effe49 100644 --- a/Project.toml +++ b/Project.toml @@ -82,4 +82,4 @@ test = [ "Random", "RecursiveFactorization", "Test", -] \ No newline at end of file +] From 3c8cc754b330f2d1524cdb16de7cd4206a82b8e2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=BCrgen=20Fuhrmann?= Date: Fri, 28 Mar 2025 12:10:29 +0100 Subject: [PATCH 3/4] Refactor tests to allow working with ReTest --- test/ExtendableSparseReTest.jl | 6 ++ test/alltests.jl | 121 ++++++++++++++++++++++++++++++++ test/runtests.jl | 122 +-------------------------------- 3 files changed, 128 insertions(+), 121 deletions(-) create mode 100644 test/ExtendableSparseReTest.jl create mode 100644 test/alltests.jl diff --git a/test/ExtendableSparseReTest.jl b/test/ExtendableSparseReTest.jl new file mode 100644 index 0000000..dcd37c1 --- /dev/null +++ b/test/ExtendableSparseReTest.jl @@ -0,0 +1,6 @@ +# See https://wias-pdelib.github.io/VoronoiFVM.jl/dev/devel/#ReTest + +module ExtendableSparseReTest +using ReTest +include("alltests.jl") +end diff --git a/test/alltests.jl b/test/alltests.jl new file mode 100644 index 0000000..18e076e --- /dev/null +++ b/test/alltests.jl @@ -0,0 +1,121 @@ +using LinearAlgebra +using SparseArrays +using ExtendableSparse +#using ExtendableSparse.Experimental +using Printf +using BenchmarkTools + +using MultiFloats +using ForwardDiff +using ExplicitImports + +@testset "ExplicitImports" begin + @test ExplicitImports.check_no_implicit_imports(ExtendableSparse) === nothing + @test ExplicitImports.check_no_stale_explicit_imports(ExtendableSparse) === nothing +end + +@testset "Parallel" begin + include("test_parallel.jl") + + for Tm in [STExtendableSparseMatrixCSC, MTExtendableSparseMatrixCSC, ExtendableSparseMatrix] + for N in [10000, 20000] + test_parallel.test_correctness_build_seq(N, Tm, dim = 2) + end + end + + for Tm in [MTExtendableSparseMatrixCSC] + for N in [10000, 20000] + test_parallel.test_correctness_update(N, Tm, dim = 2) + test_parallel.test_correctness_build(N, Tm, dim = 2) + test_parallel.test_correctness_mul(N, Tm, dim = 2) + end + end +end + +# @testset "ExperimentalParallel" begin +# include("ExperimentalParallel.jl") +# for d=[1,2,3] +# for N in [10,rand(30:40),50] +# ExperimentalParallel.test_correctness_build(N,d) +# end +# end +# end + + +@testset "Constructors" begin + include("test_constructors.jl") +end + +@testset "Copy-Methods" begin + include("test_copymethods.jl") +end + +@testset "Updates" begin + include("test_updates.jl") +end + +@testset "Assembly" begin + include("test_assembly.jl") +end + +@testset "Construction timings" begin + include("test_timings.jl") +end + +@testset "Operations" begin + include("test_operations.jl") +end + +@testset "fdrand" begin + include("test_fdrand.jl") +end + +@testset "Backslash" begin + include("test_backslash.jl") +end + +@testset "Dirichlet" begin + include("test_dirichlet.jl") +end + +@testset "LinearSolve" begin + include("test_linearsolve.jl") +end + +@testset "Preconditioners" begin + include("test_preconditioners.jl") +end + +@testset "Symmetric" begin + include("test_symmetric.jl") +end + +@testset "ExtendableSparse.LUFactorization" begin + include("test_default_lu.jl") +end + +@testset "Sparspak" begin + include("test_sparspak.jl") +end + +if ExtendableSparse.USE_GPL_LIBS + @testset "Cholesky" begin + include("test_default_cholesky.jl") + end +end + +@testset "block" begin + include("test_block.jl") +end + +#@testset "parilu0" begin include("test_parilu0.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 diff --git a/test/runtests.jl b/test/runtests.jl index d404fe2..b0221b5 100644 --- a/test/runtests.jl +++ b/test/runtests.jl @@ -1,122 +1,2 @@ using Test -using LinearAlgebra -using SparseArrays -using ExtendableSparse -#using ExtendableSparse.Experimental -using Printf -using BenchmarkTools - -using MultiFloats -using ForwardDiff -using ExplicitImports - -@testset "ExplicitImports" begin - @test ExplicitImports.check_no_implicit_imports(ExtendableSparse) === nothing - @test ExplicitImports.check_no_stale_explicit_imports(ExtendableSparse) === nothing -end - -@testset "Parallel" begin - include("test_parallel.jl") - - for Tm in [STExtendableSparseMatrixCSC, MTExtendableSparseMatrixCSC, ExtendableSparseMatrix] - for N in [10000, 20000] - test_parallel.test_correctness_build_seq(N, Tm, dim = 2) - end - end - - for Tm in [MTExtendableSparseMatrixCSC] - for N in [10000, 20000] - test_parallel.test_correctness_update(N, Tm, dim = 2) - test_parallel.test_correctness_build(N, Tm, dim = 2) - test_parallel.test_correctness_mul(N, Tm, dim = 2) - end - end -end - -# @testset "ExperimentalParallel" begin -# include("ExperimentalParallel.jl") -# for d=[1,2,3] -# for N in [10,rand(30:40),50] -# ExperimentalParallel.test_correctness_build(N,d) -# end -# end -# end - - -@testset "Constructors" begin - include("test_constructors.jl") -end - -@testset "Copy-Methods" begin - include("test_copymethods.jl") -end - -@testset "Updates" begin - include("test_updates.jl") -end - -@testset "Assembly" begin - include("test_assembly.jl") -end - -@testset "Construction timings" begin - include("test_timings.jl") -end - -@testset "Operations" begin - include("test_operations.jl") -end - -@testset "fdrand" begin - include("test_fdrand.jl") -end - -@testset "Backslash" begin - include("test_backslash.jl") -end - -@testset "Dirichlet" begin - include("test_dirichlet.jl") -end - -@testset "LinearSolve" begin - include("test_linearsolve.jl") -end - -@testset "Preconditioners" begin - include("test_preconditioners.jl") -end - -@testset "Symmetric" begin - include("test_symmetric.jl") -end - -@testset "ExtendableSparse.LUFactorization" begin - include("test_default_lu.jl") -end - -@testset "Sparspak" begin - include("test_sparspak.jl") -end - -if ExtendableSparse.USE_GPL_LIBS - @testset "Cholesky" begin - include("test_default_cholesky.jl") - end -end - -@testset "block" begin - include("test_block.jl") -end - -#@testset "parilu0" begin include("test_parilu0.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 +include("alltests.jl") From 87fb76339fff0fc31e4fc9c69cd6b1fa62c61684 Mon Sep 17 00:00:00 2001 From: Daniel Runge Date: Fri, 28 Mar 2025 18:30:25 +0100 Subject: [PATCH 4/4] version bump due to compat fix with LinearSolve --- Project.toml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Project.toml b/Project.toml index 5effe49..7003cc9 100644 --- a/Project.toml +++ b/Project.toml @@ -1,7 +1,7 @@ name = "ExtendableSparse" uuid = "95c220a8-a1cf-11e9-0c77-dbfce5f500b3" -authors = ["Juergen Fuhrmann "] -version = "1.7.0" +authors = ["Juergen Fuhrmann ", "Daniel Runge"] +version = "1.7.1" [deps] DocStringExtensions = "ffbed154-4ef7-542d-bbb7-c09d3a79fcae" @@ -56,7 +56,7 @@ ExtendableGrids = "1.9" ILUZero = "0.2" IncompleteLU = "^0.2.1" IterativeSolvers = "0.9" -LinearSolve = "2.36.0, 3" +LinearSolve = "2.36.0, 3.7.1" Pardiso = "0.5.1, 1" Sparspak = "0.3.6" StaticArrays = "1.5.24"