diff --git a/benchmark/Manifest.toml b/benchmark/Manifest.toml index 02eb6659..6e3a3a69 100644 --- a/benchmark/Manifest.toml +++ b/benchmark/Manifest.toml @@ -153,9 +153,9 @@ version = "6.2.1+2" [[deps.Groebner]] deps = ["AbstractAlgebra", "Atomix", "Combinatorics", "ExprTools", "HostCPUFeatures", "Logging", "MultivariatePolynomials", "Nemo", "PrecompileTools", "PrettyTables", "Primes", "Printf", "Random", "TimerOutputs"] -path = ".." +git-tree-sha1 = "5eb13678ae76a60d70090a4c50d1dc3eab0ce180" uuid = "0b43b601-686d-58a3-8a1c-6623616c7cd4" -version = "0.6.3" +version = "0.6.4" [[deps.GroupsCore]] deps = ["Markdown", "Random"] diff --git a/benchmark/README.md b/benchmark/README.md index 4bc65262..34cd9ac3 100644 --- a/benchmark/README.md +++ b/benchmark/README.md @@ -4,10 +4,10 @@ Benchmarks for `Groebner.jl`, `Maple`, `msolve`, `OpenF4`, `Singular`. The definitions of benchmark systems can be found in `benchmark_systems.jl`. -Computed bases will be verified against short certificates that are assumed to +Computed bases will be verified against short SHA certificate, which are assumed to be correct. -For running the benchmarks, you will need a Julia client v1.6+ installed. +For running the benchmarks, you will need a Julia client v1.6+ installed (preferably 1.9). See the official installation guide at https://julialang.org/downloads/platform/. diff --git a/benchmark/benchmark_systems.jl b/benchmark/benchmark_systems.jl index 5a174ad9..10157d4f 100644 --- a/benchmark/benchmark_systems.jl +++ b/benchmark/benchmark_systems.jl @@ -36,10 +36,10 @@ end function benchmark_set_0() ( name="dummy benchmark set", - field=AbstractAlgebra.QQ, + field=AbstractAlgebra.GF(7), systems=[ - dummy_system("dummy 1", AbstractAlgebra.QQ), - dummy_system("dummy 2", AbstractAlgebra.QQ) + dummy_system("dummy 1", AbstractAlgebra.GF(7)), + dummy_system("dummy 2", AbstractAlgebra.GF(7)) ] ) end @@ -52,7 +52,7 @@ function benchmark_set_1() ("cyclic 7", Groebner.cyclicn(7, k=ground_field)), ("cyclic 8", Groebner.cyclicn(8, k=ground_field)), ("cyclic 9", Groebner.cyclicn(9, k=ground_field)), - ("cyclic 10", Groebner.cyclicn(10, k=ground_field)), + # ("cyclic 10", Groebner.cyclicn(10, k=ground_field)), ("katsura 10", Groebner.katsuran(10, k=ground_field)), ("katsura 11", Groebner.katsuran(11, k=ground_field)), ("katsura 12", Groebner.katsuran(12, k=ground_field)), @@ -65,7 +65,7 @@ function benchmark_set_1() ("noon 8", Groebner.noonn(8, k=ground_field)), ("noon 9", Groebner.noonn(9, k=ground_field)), ("noon 10", Groebner.noonn(10, k=ground_field)), - ("noon 11", Groebner.noonn(11, k=ground_field)), + # ("noon 11", Groebner.noonn(11, k=ground_field)), ("henrion 5", Groebner.henrion5(k=ground_field)), ("henrion 6", Groebner.henrion6(k=ground_field)), ("henrion 7", Groebner.henrion7(k=ground_field)), @@ -73,7 +73,7 @@ function benchmark_set_1() ("reimer 6", Groebner.reimern(6, k=ground_field)), ("reimer 7", Groebner.reimern(7, k=ground_field)), ("reimer 8", Groebner.reimern(8, k=ground_field)), - ("reimer 9", Groebner.reimern(9, k=ground_field)), + # ("reimer 9", Groebner.reimern(9, k=ground_field)), ("chandra 11", Groebner.chandran(11, k=ground_field)), ("chandra 12", Groebner.chandran(12, k=ground_field)), ("chandra 13", Groebner.chandran(13, k=ground_field)), @@ -91,7 +91,7 @@ function benchmark_set_2() ("cyclic 7", Groebner.cyclicn(7, k=ground_field)), ("cyclic 8", Groebner.cyclicn(8, k=ground_field)), ("cyclic 9", Groebner.cyclicn(9, k=ground_field)), - ("cyclic 10", Groebner.cyclicn(10, k=ground_field)), + # ("cyclic 10", Groebner.cyclicn(10, k=ground_field)), ("katsura 10", Groebner.katsuran(10, k=ground_field)), ("katsura 11", Groebner.katsuran(11, k=ground_field)), ("katsura 12", Groebner.katsuran(12, k=ground_field)), @@ -104,7 +104,7 @@ function benchmark_set_2() ("noon 8", Groebner.noonn(8, k=ground_field)), ("noon 9", Groebner.noonn(9, k=ground_field)), ("noon 10", Groebner.noonn(10, k=ground_field)), - ("noon 11", Groebner.noonn(11, k=ground_field)), + # ("noon 11", Groebner.noonn(11, k=ground_field)), ("henrion 5", Groebner.henrion5(k=ground_field)), ("henrion 6", Groebner.henrion6(k=ground_field)), ("henrion 7", Groebner.henrion7(k=ground_field)), @@ -112,7 +112,7 @@ function benchmark_set_2() ("reimer 6", Groebner.reimern(6, k=ground_field)), ("reimer 7", Groebner.reimern(7, k=ground_field)), ("reimer 8", Groebner.reimern(8, k=ground_field)), - ("reimer 9", Groebner.reimern(9, k=ground_field)), + # ("reimer 9", Groebner.reimern(9, k=ground_field)), ("chandra 11", Groebner.chandran(11, k=ground_field)), ("chandra 12", Groebner.chandran(12, k=ground_field)), ("chandra 13", Groebner.chandran(13, k=ground_field)), diff --git a/benchmark/generate/benchmark_systems/biomodels/parser.jl b/benchmark/generate/benchmark_systems/biomodels/parser.jl index aff9fad1..e42fdea5 100644 --- a/benchmark/generate/benchmark_systems/biomodels/parser.jl +++ b/benchmark/generate/benchmark_systems/biomodels/parser.jl @@ -4,19 +4,19 @@ import AbstractAlgebra function read_BIOMDs(nspecies) @info "Reading biomodels" systems = [] - for smth in readdir(abspath("benchmark/biomodels")) + for smth in readdir((@__DIR__)) system = [] @info "" smth !(occursin("BIOMD", smth)) && continue - io = open(abspath("benchmark/biomodels/$smth/species_map.txt"), "r") + io = open((@__DIR__) * "/$smth/species_map.txt", "r") vs = map(strip ∘ first, map(split, readlines(io))) close(io) # @info "variables" vs !(length(vs) in nspecies) && continue - io = open(abspath("benchmark/biomodels/$smth/parameters.txt"), "r") + io = open((@__DIR__) * "/$smth/parameters.txt", "r") params = readlines(io) params = map(p -> replace(p, "/" => "//"), params) params = map(params) do p @@ -30,7 +30,7 @@ function read_BIOMDs(nspecies) end close(io) - io = open(abspath("benchmark/biomodels/$smth/odes.txt"), "r") + io = open((@__DIR__) * "/$smth/odes.txt", "r") odes = readlines(io) close(io) diff --git a/benchmark/generate/groebner/Manifest.toml b/benchmark/generate/groebner/Manifest.toml index 83416cb7..ce7eb53f 100644 --- a/benchmark/generate/groebner/Manifest.toml +++ b/benchmark/generate/groebner/Manifest.toml @@ -153,9 +153,9 @@ version = "6.2.1+2" [[deps.Groebner]] deps = ["AbstractAlgebra", "Atomix", "Combinatorics", "ExprTools", "HostCPUFeatures", "Logging", "MultivariatePolynomials", "Nemo", "PrecompileTools", "PrettyTables", "Primes", "Printf", "Random", "TimerOutputs"] -path = "../../.." +git-tree-sha1 = "5eb13678ae76a60d70090a4c50d1dc3eab0ce180" uuid = "0b43b601-686d-58a3-8a1c-6623616c7cd4" -version = "0.6.3" +version = "0.6.4" [[deps.GroupsCore]] deps = ["Markdown", "Random"] diff --git a/benchmark/generate/learn_apply/Manifest.toml b/benchmark/generate/learn_apply/Manifest.toml index da093534..ce7eb53f 100644 --- a/benchmark/generate/learn_apply/Manifest.toml +++ b/benchmark/generate/learn_apply/Manifest.toml @@ -50,6 +50,12 @@ git-tree-sha1 = "f1f03a9fa24271160ed7e73051fba3c1a759b53f" uuid = "6e4b80f9-dd63-53aa-95a3-0cdb28fa8baf" version = "1.4.0" +[[deps.BitTwiddlingConvenienceFunctions]] +deps = ["Static"] +git-tree-sha1 = "0c5f81f47bbbcf4aea7b2959135713459170798b" +uuid = "62783981-4cbd-42fc-bca8-16325de8dc4b" +version = "0.1.5" + [[deps.Calcium_jll]] deps = ["Antic_jll", "Arb_jll", "Artifacts", "FLINT_jll", "GMP_jll", "JLLWrappers", "Libdl", "MPFR_jll", "Pkg"] git-tree-sha1 = "37fd335ecca9bd6ab25a2a4d26b7b2f6fe64c246" @@ -146,10 +152,10 @@ uuid = "781609d7-10c4-51f6-84f2-b8444358ff6d" version = "6.2.1+2" [[deps.Groebner]] -deps = ["AbstractAlgebra", "Atomix", "Combinatorics", "ExprTools", "Logging", "MultivariatePolynomials", "Nemo", "PrecompileTools", "PrettyTables", "Primes", "Printf", "Random", "TimerOutputs"] -path = "../../.." +deps = ["AbstractAlgebra", "Atomix", "Combinatorics", "ExprTools", "HostCPUFeatures", "Logging", "MultivariatePolynomials", "Nemo", "PrecompileTools", "PrettyTables", "Primes", "Printf", "Random", "TimerOutputs"] +git-tree-sha1 = "5eb13678ae76a60d70090a4c50d1dc3eab0ce180" uuid = "0b43b601-686d-58a3-8a1c-6623616c7cd4" -version = "0.6.3" +version = "0.6.4" [[deps.GroupsCore]] deps = ["Markdown", "Random"] @@ -157,6 +163,17 @@ git-tree-sha1 = "6df9cd6ee79fc59feab33f63a1b3c9e95e2461d5" uuid = "d5909c97-4eac-4ecc-a3dc-fdd0858a4120" version = "0.4.2" +[[deps.HostCPUFeatures]] +deps = ["BitTwiddlingConvenienceFunctions", "IfElse", "Libdl", "Static"] +git-tree-sha1 = "eb8fed28f4994600e29beef49744639d985a04b2" +uuid = "3e5b6fbb-0976-4d2c-9146-d79de83f2fb0" +version = "0.1.16" + +[[deps.IfElse]] +git-tree-sha1 = "debdd00ffef04665ccbb3e150747a77560e8fad1" +uuid = "615f187c-cbe4-4ef1-ba3b-2fcf58d6d173" +version = "0.1.1" + [[deps.IntegerMathUtils]] git-tree-sha1 = "b8ffb903da9f7b8cf695a8bead8e01814aa24b30" uuid = "18e54dd8-cb9d-406c-a71d-865a43cbb235" @@ -364,6 +381,12 @@ uuid = "6462fe0b-24de-5631-8697-dd941f90decc" deps = ["Libdl", "LinearAlgebra", "Random", "Serialization", "SuiteSparse_jll"] uuid = "2f01184e-e22b-5df5-ae63-d93ebab69eaf" +[[deps.Static]] +deps = ["IfElse"] +git-tree-sha1 = "f295e0a1da4ca425659c57441bcb59abb035a4bc" +uuid = "aedffcd0-7271-4cad-89d0-dc628f76c6d3" +version = "0.8.8" + [[deps.Statistics]] deps = ["LinearAlgebra", "SparseArrays"] uuid = "10745b16-79ce-11e8-11f9-7d13ad32a3b2" diff --git a/benchmark/generate/learn_apply/run_in_learn_apply.jl b/benchmark/generate/learn_apply/run_in_learn_apply.jl index 703c7445..a1a08afd 100644 --- a/benchmark/generate/learn_apply/run_in_learn_apply.jl +++ b/benchmark/generate/learn_apply/run_in_learn_apply.jl @@ -60,6 +60,12 @@ function process_system() timing3 = @timed flag, _ = groebner_apply!(trace, (system, system, system, system), threaded=:no) @assert flag + timing4 = @timed flag, _ = groebner_apply!( + trace, + (system, system, system, system, system, system, system, system), + threaded=:no + ) + @assert flag @debug "Result is" gb if VALIDATE output_fn = (@__DIR__) * "/$BENCHMARK_DIR/$PROBLEM_NAME/$(output_filename())" @@ -92,6 +98,8 @@ function process_system() min(runtime[PROBLEM_NAME][:total_time_apply], timing2.time) runtime[PROBLEM_NAME][:total_time_apply_4x] = min(runtime[PROBLEM_NAME][:total_time_apply_4x], timing3.time) + runtime[PROBLEM_NAME][:total_time_apply_8x] = + min(runtime[PROBLEM_NAME][:total_time_apply_8x], timing4.time) end # for cat in ID_TIME_CATEGORIES # if haskey(runtime[PROBLEM_NAME], cat) @@ -104,8 +112,13 @@ function dump_timings() timings = "" timings *= "$PROBLEM_NAME\n" for (key, model_runtime) in runtime - for c in - [:total_time_F4, :total_time_learn, :total_time_apply, :total_time_apply_4x] + for c in [ + :total_time_F4, + :total_time_learn, + :total_time_apply, + :total_time_apply_4x, + :total_time_apply_8x + ] timings *= "$c, " timings *= string(model_runtime[c]) * "\n" end diff --git a/benchmark/generate/openf4/Manifest.toml b/benchmark/generate/openf4/Manifest.toml index 2fab36a3..2e5f839b 100644 --- a/benchmark/generate/openf4/Manifest.toml +++ b/benchmark/generate/openf4/Manifest.toml @@ -2,7 +2,7 @@ julia_version = "1.9.2" manifest_format = "2.0" -project_hash = "eb2490cccda0f14cdfe8e2f4733f8e311a7e9319" +project_hash = "623d5d4f83b54da08b7ad95e49fa725c6b1f466a" [[deps.AbstractAlgebra]] deps = ["GroupsCore", "InteractiveUtils", "LinearAlgebra", "MacroTools", "Preferences", "Random", "RandomExtensions", "SparseArrays", "Test"] @@ -32,27 +32,6 @@ git-tree-sha1 = "d9a9701b899b30332bbcb3e1679c41cce81fb0e8" uuid = "6e4b80f9-dd63-53aa-95a3-0cdb28fa8baf" version = "1.3.2" -[[deps.ChainRulesCore]] -deps = ["Compat", "LinearAlgebra", "SparseArrays"] -git-tree-sha1 = "e30f2f4e20f7f186dc36529910beaedc60cfa644" -uuid = "d360d2e6-b24c-11e9-a2a3-2a2ae2dbcce4" -version = "1.16.0" - -[[deps.Combinatorics]] -git-tree-sha1 = "08c8b6831dc00bfea825826be0bc8336fc369860" -uuid = "861a8166-3701-5b0c-9a16-15d98fcdc6aa" -version = "1.0.2" - -[[deps.Compat]] -deps = ["UUIDs"] -git-tree-sha1 = "e460f044ca8b99be31d35fe54fc33a5c33dd8ed7" -uuid = "34da2185-b29b-5c13-b0c7-acf172513d20" -version = "4.9.0" -weakdeps = ["Dates", "LinearAlgebra"] - - [deps.Compat.extensions] - CompatLinearAlgebraExt = "LinearAlgebra" - [[deps.CompilerSupportLibraries_jll]] deps = ["Artifacts", "Libdl"] uuid = "e66e0078-7015-5450-92f7-15fbd957f2ae" @@ -64,12 +43,6 @@ git-tree-sha1 = "fcbb72b032692610bfbdb15018ac16a36cf2e406" uuid = "adafc99b-e345-5852-983c-f28acb93d879" version = "0.3.1" -[[deps.DataStructures]] -deps = ["Compat", "InteractiveUtils", "OrderedCollections"] -git-tree-sha1 = "3dbd312d370723b6bb43ba9d02fc36abade4518d" -uuid = "864edb3b-99cc-5e75-8d2d-829cb0a9cfe8" -version = "0.18.15" - [[deps.Dates]] deps = ["Printf"] uuid = "ade2ca70-3891-5945-98fb-dc099432e06a" @@ -83,31 +56,15 @@ deps = ["ArgTools", "FileWatching", "LibCURL", "NetworkOptions"] uuid = "f43a241f-c20a-4ad4-852c-f6b1247861c6" version = "1.6.0" -[[deps.ExprTools]] -git-tree-sha1 = "27415f162e6028e81c72b82ef756bf321213b6ec" -uuid = "e2ba6199-217a-4e67-a87a-7c52f15ade04" -version = "0.1.10" - [[deps.FileWatching]] uuid = "7b1f6079-737a-58dc-b8bc-7a2ca5c1b5ee" -[[deps.Groebner]] -deps = ["AbstractAlgebra", "Combinatorics", "ExprTools", "Logging", "MultivariatePolynomials", "Primes", "Random", "SIMD", "SnoopPrecompile"] -git-tree-sha1 = "44f595de4f6485ab5ba71fe257b5eadaa3cf161e" -uuid = "0b43b601-686d-58a3-8a1c-6623616c7cd4" -version = "0.4.4" - [[deps.GroupsCore]] deps = ["Markdown", "Random"] git-tree-sha1 = "9e1a5e9f3b81ad6a5c613d181664a0efc6fe6dd7" uuid = "d5909c97-4eac-4ecc-a3dc-fdd0858a4120" version = "0.4.0" -[[deps.IntegerMathUtils]] -git-tree-sha1 = "b8ffb903da9f7b8cf695a8bead8e01814aa24b30" -uuid = "18e54dd8-cb9d-406c-a71d-865a43cbb235" -version = "0.1.2" - [[deps.InteractiveUtils]] deps = ["Markdown"] uuid = "b77e0a4c-d291-57a0-90e8-8db25a27a240" @@ -169,18 +126,6 @@ uuid = "a63ad114-7e13-5084-954f-fe012c677804" uuid = "14a3606d-f60d-562e-9121-12d972cd8159" version = "2022.10.11" -[[deps.MultivariatePolynomials]] -deps = ["ChainRulesCore", "DataStructures", "LinearAlgebra", "MutableArithmetics"] -git-tree-sha1 = "6c2e970692b6f4fed2508865c43a0f67f3820cf4" -uuid = "102ac46a-7ee4-5c85-9060-abc95bfdeaa3" -version = "0.5.2" - -[[deps.MutableArithmetics]] -deps = ["LinearAlgebra", "SparseArrays", "Test"] -git-tree-sha1 = "6985021d02ab8c509c841bb8b2becd3145a7b490" -uuid = "d8a4904e-b15c-11e9-3269-09a3773c0cb0" -version = "1.3.3" - [[deps.NetworkOptions]] uuid = "ca575930-c2e3-43a9-ace4-1e988b2c1908" version = "1.2.0" @@ -190,11 +135,6 @@ deps = ["Artifacts", "CompilerSupportLibraries_jll", "Libdl"] uuid = "4536629a-c528-5b80-bd46-f80d51c5b363" version = "0.3.21+4" -[[deps.OrderedCollections]] -git-tree-sha1 = "2e73fe17cac3c62ad1aebe70d44c963c3cfdc3e3" -uuid = "bac558e1-5e72-5ebc-8fee-abe8a469f55d" -version = "1.6.2" - [[deps.Parsers]] deps = ["Dates", "PrecompileTools", "UUIDs"] git-tree-sha1 = "716e24b21538abc91f6205fd1d8363f39b442851" @@ -218,12 +158,6 @@ git-tree-sha1 = "00805cd429dcb4870060ff49ef443486c262e38e" uuid = "21216c6a-2e73-6563-6e65-726566657250" version = "1.4.1" -[[deps.Primes]] -deps = ["IntegerMathUtils"] -git-tree-sha1 = "4c9f306e5d6603ae203c2000dd460d81a5251489" -uuid = "27ebfcd6-29c5-5fa9-bf4b-fb8fc14df3ae" -version = "0.5.4" - [[deps.Printf]] deps = ["Unicode"] uuid = "de0858da-6303-5e67-8744-51eddeeeb8d7" @@ -256,21 +190,9 @@ version = "0.4.3" uuid = "ea8e919c-243c-51af-8825-aaa63cd721ce" version = "0.7.0" -[[deps.SIMD]] -deps = ["PrecompileTools"] -git-tree-sha1 = "0e270732477b9e551d884e6b07e23bb2ec947790" -uuid = "fdea26ae-647d-5447-a871-4b548cad5224" -version = "3.4.5" - [[deps.Serialization]] uuid = "9e88b42a-f829-5b0c-bbe9-9e923198166b" -[[deps.SnoopPrecompile]] -deps = ["Preferences"] -git-tree-sha1 = "e760a70afdcd461cf01a575947738d359234665c" -uuid = "66db9d55-30c0-4569-8b51-7e840670fc0c" -version = "1.0.3" - [[deps.Sockets]] uuid = "6462fe0b-24de-5631-8697-dd941f90decc" diff --git a/benchmark/generate/openf4/Project.toml b/benchmark/generate/openf4/Project.toml index 9aa0ae60..dbfdb4ed 100644 --- a/benchmark/generate/openf4/Project.toml +++ b/benchmark/generate/openf4/Project.toml @@ -5,7 +5,6 @@ BenchmarkTools = "6e4b80f9-dd63-53aa-95a3-0cdb28fa8baf" CpuId = "adafc99b-e345-5852-983c-f28acb93d879" Dates = "ade2ca70-3891-5945-98fb-dc099432e06a" Distributed = "8ba89e20-285c-5b6f-9357-94700520ee1b" -Groebner = "0b43b601-686d-58a3-8a1c-6623616c7cd4" Logging = "56ddb016-857b-54e1-b83d-db4d58db5568" Printf = "de0858da-6303-5e67-8744-51eddeeeb8d7" ProgressMeter = "92933f4c-e287-5a05-a399-4b506db050ca" diff --git a/benchmark/generate/singular/Manifest.toml b/benchmark/generate/singular/Manifest.toml index 882f1197..2459f9f4 100644 --- a/benchmark/generate/singular/Manifest.toml +++ b/benchmark/generate/singular/Manifest.toml @@ -56,6 +56,12 @@ git-tree-sha1 = "7c08e585f2d50e3c74bc2491474d3f897d2ebec8" uuid = "f01c122e-0ea1-4f85-ad8f-907073ad7a9f" version = "0.1.2" +[[deps.BitTwiddlingConvenienceFunctions]] +deps = ["Static"] +git-tree-sha1 = "0c5f81f47bbbcf4aea7b2959135713459170798b" +uuid = "62783981-4cbd-42fc-bca8-16325de8dc4b" +version = "0.1.5" + [[deps.Calcium_jll]] deps = ["Antic_jll", "Arb_jll", "Artifacts", "FLINT_jll", "GMP_jll", "JLLWrappers", "Libdl", "MPFR_jll", "Pkg"] git-tree-sha1 = "37fd335ecca9bd6ab25a2a4d26b7b2f6fe64c246" @@ -164,10 +170,10 @@ uuid = "781609d7-10c4-51f6-84f2-b8444358ff6d" version = "6.2.1+2" [[deps.Groebner]] -deps = ["AbstractAlgebra", "Atomix", "Combinatorics", "ExprTools", "Logging", "MultivariatePolynomials", "Nemo", "PrecompileTools", "PrettyTables", "Primes", "Printf", "Random", "TimerOutputs"] -path = "../../.." +deps = ["AbstractAlgebra", "Atomix", "Combinatorics", "ExprTools", "HostCPUFeatures", "Logging", "MultivariatePolynomials", "Nemo", "PrecompileTools", "PrettyTables", "Primes", "Printf", "Random", "TimerOutputs"] +git-tree-sha1 = "5eb13678ae76a60d70090a4c50d1dc3eab0ce180" uuid = "0b43b601-686d-58a3-8a1c-6623616c7cd4" -version = "0.6.3" +version = "0.6.4" [[deps.GroupsCore]] deps = ["Markdown", "Random"] @@ -175,6 +181,17 @@ git-tree-sha1 = "6df9cd6ee79fc59feab33f63a1b3c9e95e2461d5" uuid = "d5909c97-4eac-4ecc-a3dc-fdd0858a4120" version = "0.4.2" +[[deps.HostCPUFeatures]] +deps = ["BitTwiddlingConvenienceFunctions", "IfElse", "Libdl", "Static"] +git-tree-sha1 = "eb8fed28f4994600e29beef49744639d985a04b2" +uuid = "3e5b6fbb-0976-4d2c-9146-d79de83f2fb0" +version = "0.1.16" + +[[deps.IfElse]] +git-tree-sha1 = "debdd00ffef04665ccbb3e150747a77560e8fad1" +uuid = "615f187c-cbe4-4ef1-ba3b-2fcf58d6d173" +version = "0.1.1" + [[deps.IntegerMathUtils]] git-tree-sha1 = "b8ffb903da9f7b8cf695a8bead8e01814aa24b30" uuid = "18e54dd8-cb9d-406c-a71d-865a43cbb235" @@ -406,6 +423,12 @@ uuid = "6462fe0b-24de-5631-8697-dd941f90decc" deps = ["Libdl", "LinearAlgebra", "Random", "Serialization", "SuiteSparse_jll"] uuid = "2f01184e-e22b-5df5-ae63-d93ebab69eaf" +[[deps.Static]] +deps = ["IfElse"] +git-tree-sha1 = "f295e0a1da4ca425659c57441bcb59abb035a4bc" +uuid = "aedffcd0-7271-4cad-89d0-dc628f76c6d3" +version = "0.8.8" + [[deps.Statistics]] deps = ["LinearAlgebra", "SparseArrays"] uuid = "10745b16-79ce-11e8-11f9-7d13ad32a3b2" diff --git a/benchmark/generate/utils.jl b/benchmark/generate/utils.jl index d6813a47..ff889f33 100644 --- a/benchmark/generate/utils.jl +++ b/benchmark/generate/utils.jl @@ -23,7 +23,8 @@ const TIME_CATEGORIES = [ :total_time_F4, :total_time_learn, :total_time_apply, - :total_time_apply_4x + :total_time_apply_4x, + :total_time_apply_8x ] const DATA_CATEGORIES = [] const ALL_CATEGORIES = union(TIME_CATEGORIES, DATA_CATEGORIES) @@ -33,6 +34,7 @@ const HUMAN_READABLE_CATEGORIES = Dict( :total_time_learn => "Learn, s", :total_time_apply => "Apply, s", :total_time_apply_4x => "Apply 4x, s", + :total_time_apply_8x => "Apply 8x, s", :total_time_F4 => "F4, s" ) const CATEGORY_FORMAT = Dict() diff --git a/benchmark/one_script_to_run_them_all.jl b/benchmark/one_script_to_run_them_all.jl index bad27974..017de5f2 100644 --- a/benchmark/one_script_to_run_them_all.jl +++ b/benchmark/one_script_to_run_them_all.jl @@ -34,8 +34,8 @@ progressbar_enabled() = const _available_backends = ["groebner", "singular", "maple", "msolve", "openf4"] -const _skip_singular = true -const _skip_openf4 = true +const _skip_singular = false +const _skip_openf4 = false # Parses command-line arguments #! format: off @@ -350,7 +350,7 @@ function run_benchmarks(args) Benchmark systems: $systems_to_benchmark""" - timeout = timeout + 10 # add 10 seconds for compilation time :) + timeout = timeout + added_timeout_time # add 10 seconds for compilation time :) seconds_passed(from_t) = round((time_ns() - from_t) / 1e9, digits=2) queue = [(problem_id=problem,) for problem in indices_to_benchmark] @@ -591,8 +591,13 @@ function collect_timings(args, names) benchmark_name = get_benchmark_suite(benchmark_id).name if backend == "learn_apply" - targets = - [:total_time_F4, :total_time_learn, :total_time_apply, :total_time_apply_4x] + targets = [ + :total_time_F4, + :total_time_learn, + :total_time_apply, + :total_time_apply_4x, + :total_time_apply_8x + ] else targets = [:total_time] end @@ -894,7 +899,8 @@ end function check_args(args) backend = args["backend"] - @assert backend in ("groebner", "singular", "maple", "openf4", "msolve", "ALL") + @assert backend in + ("groebner", "singular", "maple", "openf4", "msolve", "learn_apply", "ALL") if backend == "openf4" && args["suite"] in [3, 7] throw("Running benchmarks over the rationals is not possible for openf4") end diff --git a/benchmark/results/benchmark_result_0.md b/benchmark/results/benchmark_result_0.md index ba8ac69e..4729b9e6 100644 --- a/benchmark/results/benchmark_result_0.md +++ b/benchmark/results/benchmark_result_0.md @@ -1,21 +1,21 @@ ## Benchmark results -2024-01-27T00:31:15.423 +2024-01-27T13:24:45.699 -Benchmarked backends: Any["groebner", "maple", "msolve"] +Benchmarked backends: Any["groebner", "maple", "msolve", "openf4", "singular"] Benchmark suite: dummy benchmark set -- Workers: 16 -- Timeout: 60 s -- Aggregated over: 1 runs +- Workers: 1 +- Timeout: 1800 s +- Aggregated over: 3 runs **All timings in seconds.** -|Model|groebner|maple|msolve| -|:----|---|---|---| -|dummy 1|0.00|0.23|0.03| -|dummy 2|0.00|0.21|0.03| +|Model|groebner|maple|msolve|openf4|singular| +|:----|---|---|---|---|---| +|dummy 1|0.00|0.22|0.01|0.01|0.00| +|dummy 2|0.00|0.21|0.01|0.01|0.00| *Benchmarking environment:* diff --git a/benchmark/results/benchmark_result_1.md b/benchmark/results/benchmark_result_1.md index 2781c028..66a67bb6 100644 --- a/benchmark/results/benchmark_result_1.md +++ b/benchmark/results/benchmark_result_1.md @@ -1,49 +1,46 @@ ## Benchmark results -2024-01-26T15:22:47.295 +2024-01-27T02:48:25.710 Benchmarked backends: Any["groebner", "maple", "msolve"] Benchmark suite: Integers modulo 2^30 + 3 - Workers: 16 -- Timeout: 600 s -- Aggregated over: 3 runs +- Timeout: 60 s +- Aggregated over: 1 runs **All timings in seconds.** |Model|groebner|maple|msolve| |:----|---|---|---| -|chandra 11|0.48|0.76|0.88| -|chandra 12|2.73|2.89|3.84| -|chandra 13|14.95|14.09|20.56| -|chandra 14|98.81|82.15|133.08| -|cyclic 7|0.09|0.24|0.15| -|cyclic 8|1.17|1.38|1.36| -|cyclic 9|120.54|195.46|118.97| -|cyclic 10| - | - | - | +|chandra 11|0.76|0.97|0.96| +|chandra 12|3.69|4.18|4.78| +|chandra 13| - |25.59|30.71| +|chandra 14| - | - | - | +|cyclic 7|0.11|0.30|0.15| +|cyclic 8|1.62|1.66|1.48| +|cyclic 9| - | - | - | |dummy|0.00|0.18|0.01| -|eco 11|0.30|0.53|0.52| -|eco 12|1.98|2.08|2.59| -|eco 13|9.00|10.52|13.42| -|eco 14|93.24|86.25|127.94| -|henrion 5|0.00|0.20|0.02| -|henrion 6|0.03|0.22|0.06| -|henrion 7|1.97|5.31|3.26| +|eco 11|0.33|0.54|0.58| +|eco 12|2.61|2.35|3.92| +|eco 13|17.10|20.51|23.67| +|eco 14| - | - | - | +|henrion 5|0.00|0.19|0.02| +|henrion 6|0.03|0.25|0.08| +|henrion 7|2.70|7.20|3.91| |henrion 8| - | - | - | -|katsura 10|0.75|1.21|1.08| -|katsura 11|5.14|7.51|6.15| -|katsura 12|35.77|49.28|43.52| -|katsura 13| - |634.70| - | -|noon 7|0.17|0.36|0.22| -|noon 8|1.37|1.75|1.88| -|noon 9|13.44|15.72|16.01| -|noon 10| - |225.13| - | -|noon 11| - | - | - | -|reimer 6|0.05|0.23|0.08| -|reimer 7|0.69|1.41|1.21| -|reimer 8|18.28|26.74|30.17| -|reimer 9| - | - | - | +|katsura 10|0.86|1.73|1.19| +|katsura 11| - |15.16|10.34| +|katsura 12| - | - | - | +|katsura 13| - | - | - | +|noon 7|0.18| - |0.23| +|noon 8|1.55|2.09|2.05| +|noon 9| - |19.33|25.39| +|noon 10| - | - | - | +|reimer 6|0.07|0.23| - | +|reimer 7|0.80|1.75|1.32| +|reimer 8| - |54.01|47.06| *Benchmarking environment:* @@ -58,6 +55,7 @@ Versions of the dependencies: * PrecompileTools : 1.2.0 * MultivariatePolynomials : 0.5.3 * Combinatorics : 1.0.2 +* HostCPUFeatures : 0.1.16 * AbstractAlgebra : 0.34.7 * Nemo : 0.38.3 * Atomix : 0.1.0 diff --git a/benchmark/results/benchmark_result_3.md b/benchmark/results/benchmark_result_3.md index 399b1e88..1b65944b 100644 --- a/benchmark/results/benchmark_result_3.md +++ b/benchmark/results/benchmark_result_3.md @@ -1,44 +1,44 @@ ## Benchmark results -2024-01-26T16:58:14.560 +2024-01-27T08:58:45.352 -Benchmarked backends: Any["groebner", "maple", "msolve"] +Benchmarked backends: Any["groebner", "maple", "msolve", "singular"] Benchmark suite: The rationals -- Workers: 16 -- Timeout: 1800 s +- Workers: 8 +- Timeout: 3600 s - Aggregated over: 3 runs **All timings in seconds.** -|Model|groebner|maple|msolve| -|:----|---|---|---| -|chandra 9|1.18|4.84|1.25| -|chandra 10|2.88|21.17|4.53| -|chandra 11|10.28|111.70|19.83| -|chandra 12|82.21|886.62|105.81| -|chandra 13| - | - | - | -|cyclic 7|0.80|1.43|1.20| -|cyclic 8|20.81|20.50|27.28| -|cyclic 9| - | - | - | -|dummy|0.00|0.14|0.02| -|eco 10|0.44|0.93|0.65| -|eco 11|3.04|4.79|4.02| -|eco 12|20.65|31.59|28.25| -|eco 13|320.03|352.97|314.83| -|henrion 6|0.53|2.03|0.65| -|henrion 7| - | - |404.00| -|ipp|61.74|91.40|14.18| -|katsura 9|2.79|7.70|2.21| -|katsura 10|20.30|76.88|17.29| -|katsura 11|297.12|1218.94|206.39| -|noon 7|0.46|1.09|1.53| -|noon 8|3.84|8.15|11.80| -|noon 9|24.66|66.52|100.94| -|reimer 6|0.41|0.77|0.30| -|reimer 7|6.79|24.22|6.14| -|reimer 8| - | - |358.83| +|Model|groebner|maple|msolve|singular| +|:----|---|---|---|---| +|chandra 9|1.28|5.53|1.44|3.10| +|chandra 10|4.20|25.24|5.25|35.13| +|chandra 11|13.27|137.17|21.87|284.97| +|chandra 12|82.00|927.56|115.73| - | +|chandra 13|415.78| - |709.91| - | +|cyclic 7|1.11|1.60|1.11| - | +|cyclic 8|27.19|22.57|27.03| - | +|cyclic 9| - | - | - | - | +|dummy|0.00|0.16|0.03|0.00| +|eco 10|0.47|0.78|0.66|43.90| +|eco 11|3.16|5.30|4.00| - | +|eco 12|26.92|39.84|29.09| - | +|eco 13|281.37|420.79|344.04| - | +|henrion 6|0.63|1.91|0.63|6.16| +|henrion 7|346.59|3205.31|364.54| - | +|ipp|93.93|82.50|16.44|870.29| +|katsura 9|3.49|8.71|2.52|284.81| +|katsura 10|24.64|93.27|19.68| - | +|katsura 11|269.47|1439.72|198.94| - | +|noon 7|0.66|1.18|1.75|1.11| +|noon 8|5.37|9.32|11.94|13.23| +|noon 9|36.32|75.82|102.60|172.35| +|reimer 6|0.55|0.80|0.28| - | +|reimer 7|10.48|31.54|6.43| - | +|reimer 8|661.18|3425.27|296.64| - | *Benchmarking environment:* @@ -53,6 +53,7 @@ Versions of the dependencies: * PrecompileTools : 1.2.0 * MultivariatePolynomials : 0.5.3 * Combinatorics : 1.0.2 +* HostCPUFeatures : 0.1.16 * AbstractAlgebra : 0.34.7 * Nemo : 0.38.3 * Atomix : 0.1.0 diff --git a/benchmark/results/groebner/benchmark_result_0.md b/benchmark/results/groebner/benchmark_result_0.md index fa5e79a4..baecb57c 100644 --- a/benchmark/results/groebner/benchmark_result_0.md +++ b/benchmark/results/groebner/benchmark_result_0.md @@ -1,14 +1,14 @@ ## Benchmark results -2024-01-27T00:30:45.638 +2024-01-27T13:22:27.349 Benchmarked backend: groebner Benchmark suite: dummy benchmark set -- Workers: 16 -- Timeout: 60 s -- Aggregated over: 1 runs +- Workers: 1 +- Timeout: 1800 s +- Aggregated over: 3 runs **All timings in seconds.** diff --git a/benchmark/results/groebner/benchmark_result_1.md b/benchmark/results/groebner/benchmark_result_1.md index cb7b9c9b..9b6e6224 100644 --- a/benchmark/results/groebner/benchmark_result_1.md +++ b/benchmark/results/groebner/benchmark_result_1.md @@ -1,49 +1,46 @@ ## Benchmark results -2024-01-27T00:17:07.455 +2024-01-27T02:44:16.764 Benchmarked backend: groebner Benchmark suite: Integers modulo 2^30 + 3 - Workers: 16 -- Timeout: 1800 s +- Timeout: 60 s - Aggregated over: 1 runs **All timings in seconds.** |Model|Total, s| |:----|---| -|chandra 11| - | -|chandra 12| - | +|chandra 11|0.76| +|chandra 12|3.69| |chandra 13| - | |chandra 14| - | -|cyclic 7|0.09| -|cyclic 8|1.56| -|cyclic 9|255.31| -|cyclic 10| - | +|cyclic 7|0.11| +|cyclic 8|1.62| +|cyclic 9| - | |dummy|0.00| -|eco 11| - | -|eco 12| - | -|eco 13| - | +|eco 11|0.33| +|eco 12|2.61| +|eco 13|17.10| |eco 14| - | -|henrion 5| - | -|henrion 6| - | -|henrion 7| - | +|henrion 5|0.00| +|henrion 6|0.03| +|henrion 7|2.70| |henrion 8| - | -|katsura 10| - | +|katsura 10|0.86| |katsura 11| - | -|katsura 12|101.30| +|katsura 12| - | |katsura 13| - | -|noon 7| - | -|noon 8| - | -|noon 9|16.57| +|noon 7|0.18| +|noon 8|1.55| +|noon 9| - | |noon 10| - | -|noon 11| - | -|reimer 6| - | -|reimer 7| - | +|reimer 6|0.07| +|reimer 7|0.80| |reimer 8| - | -|reimer 9| - | *Benchmarking environment:* diff --git a/benchmark/results/groebner/benchmark_result_2.md b/benchmark/results/groebner/benchmark_result_2.md index 3cd5ac0c..890d1610 100644 --- a/benchmark/results/groebner/benchmark_result_2.md +++ b/benchmark/results/groebner/benchmark_result_2.md @@ -1,30 +1,46 @@ ## Benchmark results -2023-12-29T23:35:20.348 +2024-01-27T02:30:44.878 Benchmarked backend: groebner -Benchmark suite: The rationals -- Workers: 4 -- Timeout: 600 s -- Aggregated over: 1 runs +Benchmark suite: Integers modulo 1031 + +- Workers: 16 +- Timeout: 1800 s +- Aggregated over: 3 runs **All timings in seconds.** -|Model|Total| -|-----|---| -|cyclic 7|1.35| -|cyclic 8|26.73| +|Model|Total, s| +|:----|---| +|chandra 11|0.48| +|chandra 12|2.43| +|chandra 13|20.02| +|chandra 14| - | +|cyclic 7|0.08| +|cyclic 8|1.19| +|cyclic 9| - | |dummy|0.00| -|eco 10|0.64| -|eco 11|3.99| -|eco 12|29.60| -|henrion 6|0.93| -|katsura 10|25.43| -|katsura 11| - | -|katsura 9|4.10| -|noon 8|6.10| -|noon 9|50.79| +|eco 11|0.31| +|eco 12|1.84| +|eco 13|8.61| +|eco 14|163.92| +|henrion 5|0.00| +|henrion 6|0.04| +|henrion 7|2.10| +|henrion 8| - | +|katsura 10|0.77| +|katsura 11|5.15| +|katsura 12|52.61| +|katsura 13| - | +|noon 7|0.18| +|noon 8|1.32| +|noon 9|12.09| +|noon 10| - | +|reimer 6|0.04| +|reimer 7|0.75| +|reimer 8|18.54| *Benchmarking environment:* @@ -39,6 +55,7 @@ Versions of the dependencies: * PrecompileTools : 1.2.0 * MultivariatePolynomials : 0.5.3 * Combinatorics : 1.0.2 +* HostCPUFeatures : 0.1.16 * AbstractAlgebra : 0.34.7 * Nemo : 0.38.3 * Atomix : 0.1.0 diff --git a/benchmark/results/groebner/benchmark_result_3.md b/benchmark/results/groebner/benchmark_result_3.md index b2823a45..3e7ee2f9 100644 --- a/benchmark/results/groebner/benchmark_result_3.md +++ b/benchmark/results/groebner/benchmark_result_3.md @@ -1,44 +1,44 @@ ## Benchmark results -2024-01-26T16:00:02.075 +2024-01-27T04:37:58.855 Benchmarked backend: groebner Benchmark suite: The rationals -- Workers: 16 -- Timeout: 1800 s +- Workers: 8 +- Timeout: 3600 s - Aggregated over: 3 runs **All timings in seconds.** |Model|Total, s| |:----|---| -|chandra 9|1.18| -|chandra 10|2.88| -|chandra 11|10.28| -|chandra 12|82.21| -|chandra 13| - | -|cyclic 7|0.80| -|cyclic 8|20.81| +|chandra 9|1.28| +|chandra 10|4.20| +|chandra 11|13.27| +|chandra 12|82.00| +|chandra 13|415.78| +|cyclic 7|1.11| +|cyclic 8|27.19| |cyclic 9| - | |dummy|0.00| -|eco 10|0.44| -|eco 11|3.04| -|eco 12|20.65| -|eco 13|320.03| -|henrion 6|0.53| -|henrion 7| - | -|ipp|61.74| -|katsura 9|2.79| -|katsura 10|20.30| -|katsura 11|297.12| -|noon 7|0.46| -|noon 8|3.84| -|noon 9|24.66| -|reimer 6|0.41| -|reimer 7|6.79| -|reimer 8| - | +|eco 10|0.47| +|eco 11|3.16| +|eco 12|26.92| +|eco 13|281.37| +|henrion 6|0.63| +|henrion 7|346.59| +|ipp|93.93| +|katsura 9|3.49| +|katsura 10|24.64| +|katsura 11|269.47| +|noon 7|0.66| +|noon 8|5.37| +|noon 9|36.32| +|reimer 6|0.55| +|reimer 7|10.48| +|reimer 8|661.18| *Benchmarking environment:* @@ -53,6 +53,7 @@ Versions of the dependencies: * PrecompileTools : 1.2.0 * MultivariatePolynomials : 0.5.3 * Combinatorics : 1.0.2 +* HostCPUFeatures : 0.1.16 * AbstractAlgebra : 0.34.7 * Nemo : 0.38.3 * Atomix : 0.1.0 diff --git a/benchmark/results/learn_apply/benchmark_result_1.md b/benchmark/results/learn_apply/benchmark_result_1.md index e160dd9d..2048bda6 100644 --- a/benchmark/results/learn_apply/benchmark_result_1.md +++ b/benchmark/results/learn_apply/benchmark_result_1.md @@ -1,45 +1,46 @@ ## Benchmark results -2024-01-12T08:36:22.358 +2024-01-27T03:16:11.080 Benchmarked backend: learn_apply Benchmark suite: Integers modulo 2^30 + 3 -- Workers: 8 -- Timeout: 5400 s -- Aggregated over: 1 runs +- Workers: 16 +- Timeout: 600 s +- Aggregated over: 3 runs **All timings in seconds.** -|Model|F4, s|Learn, s|Apply, s|Apply 4x, s| -|:----|---|---|---|---| -|cyclic 7|0.12|0.19|0.03|0.06| -|cyclic 8|1.44|4.01|0.58|0.75| -|cyclic 9|104.46|643.68|73.29|245.08| -|cyclic 10| - | - | - | - | -|dummy|0.00|0.00|0.00|0.00| -|eco 11|0.37|1.16|0.16|0.28| -|eco 12|2.80|12.76|1.19|1.91| -|eco 13|10.69|133.29|4.89|7.66| -|eco 14|124.62|833.97|66.71|100.08| -|henrion 5|0.00|0.00|0.00|0.00| -|henrion 6|0.07|0.07|0.02|0.05| -|henrion 7|3.08|9.28|1.05|1.98| -|henrion 8| - | - | - | - | -|katsura 10|0.78|5.30|0.31|0.58| -|katsura 11|5.46|74.63|3.36|6.33| -|katsura 12|56.40|592.94|24.49|36.21| -|katsura 13| - | - | - | - | -|noon 7|0.25|0.24|0.04|0.12| -|noon 8|2.05|2.07|0.34|0.74| -|noon 9|15.37|16.85|1.54|2.87| -|noon 10|189.33|194.49|11.82|27.34| -|noon 11| - | - | - | - | -|reimer 6|0.05|0.17|0.01|0.02| -|reimer 7|1.30|1.91|0.18|0.26| -|reimer 8|19.21|58.04|2.55|3.99| -|reimer 9| - | - | - | - | +|Model|F4, s|Learn, s|Apply, s|Apply 4x, s|Apply 8x, s| +|:----|---|---|---|---|---| +|chandra 11|0.48|1.15|0.05|0.12|0.20| +|chandra 12|2.68|7.36|0.18|0.45|0.69| +|chandra 13|15.06|49.39|0.84|2.16|3.31| +|chandra 14| - | - | - | - | - | +|cyclic 7|0.08|0.18|0.03|0.04|0.06| +|cyclic 8|1.17|3.64|0.50|0.72|1.35| +|cyclic 9| - | - | - | - | - | +|dummy|0.00|0.00|0.00|0.00|0.00| +|eco 11|0.32|1.12|0.14|0.21|0.33| +|eco 12|2.08|9.40|0.85|1.28|2.28| +|eco 13|8.84|88.53|3.58|5.68|12.92| +|eco 14| - | - | - | - | - | +|henrion 5|0.00|0.00|0.00|0.00|0.00| +|henrion 6|0.03|0.05|0.01|0.02|0.06| +|henrion 7|1.93|5.29|0.71|1.13|1.79| +|henrion 8| - | - | - | - | - | +|katsura 10|0.76|4.92|0.30|0.51|0.85| +|katsura 11|4.99|46.82|1.99|3.44|6.24| +|katsura 12| - | - | - | - | - | +|katsura 13| - | - | - | - | - | +|noon 7|0.16|0.19|0.03|0.04|0.08| +|noon 8|1.34|1.56|0.19|0.33|0.46| +|noon 9|12.49|13.06|1.32|2.29|4.06| +|noon 10| - | - | - | - | - | +|reimer 6|0.04|0.08|0.01|0.02|0.02| +|reimer 7|0.77|1.32|0.10|0.16|0.21| +|reimer 8|17.86|42.05|1.70|2.69|4.46| *Benchmarking environment:* @@ -54,6 +55,7 @@ Versions of the dependencies: * PrecompileTools : 1.2.0 * MultivariatePolynomials : 0.5.3 * Combinatorics : 1.0.2 +* HostCPUFeatures : 0.1.16 * AbstractAlgebra : 0.34.7 * Nemo : 0.38.3 * Atomix : 0.1.0 diff --git a/benchmark/results/maple/benchmark_result_0.md b/benchmark/results/maple/benchmark_result_0.md index d1c70cb3..d2b89266 100644 --- a/benchmark/results/maple/benchmark_result_0.md +++ b/benchmark/results/maple/benchmark_result_0.md @@ -1,20 +1,20 @@ ## Benchmark results -2024-01-27T00:30:59.875 +2024-01-27T13:23:56.875 Benchmarked backend: maple Benchmark suite: dummy benchmark set -- Workers: 16 -- Timeout: 60 s -- Aggregated over: 1 runs +- Workers: 1 +- Timeout: 1800 s +- Aggregated over: 3 runs **All timings in seconds.** |Model|Total, s| |:----|---| -|dummy 1|0.23| +|dummy 1|0.22| |dummy 2|0.21| *Benchmarking environment:* diff --git a/benchmark/results/maple/benchmark_result_1.md b/benchmark/results/maple/benchmark_result_1.md index 72b5967f..374fc48f 100644 --- a/benchmark/results/maple/benchmark_result_1.md +++ b/benchmark/results/maple/benchmark_result_1.md @@ -1,49 +1,46 @@ ## Benchmark results -2024-01-26T15:11:24.864 +2024-01-27T02:46:22.712 Benchmarked backend: maple Benchmark suite: Integers modulo 2^30 + 3 - Workers: 16 -- Timeout: 600 s -- Aggregated over: 3 runs +- Timeout: 60 s +- Aggregated over: 1 runs **All timings in seconds.** |Model|Total, s| |:----|---| -|chandra 11|0.76| -|chandra 12|2.89| -|chandra 13|14.09| -|chandra 14|82.15| -|cyclic 7|0.24| -|cyclic 8|1.38| -|cyclic 9|195.46| -|cyclic 10| - | +|chandra 11|0.97| +|chandra 12|4.18| +|chandra 13|25.59| +|chandra 14| - | +|cyclic 7|0.30| +|cyclic 8|1.66| +|cyclic 9| - | |dummy|0.18| -|eco 11|0.53| -|eco 12|2.08| -|eco 13|10.52| -|eco 14|86.25| -|henrion 5|0.20| -|henrion 6|0.22| -|henrion 7|5.31| +|eco 11|0.54| +|eco 12|2.35| +|eco 13|20.51| +|eco 14| - | +|henrion 5|0.19| +|henrion 6|0.25| +|henrion 7|7.20| |henrion 8| - | -|katsura 10|1.21| -|katsura 11|7.51| -|katsura 12|49.28| -|katsura 13|634.70| -|noon 7|0.36| -|noon 8|1.75| -|noon 9|15.72| -|noon 10|225.13| -|noon 11| - | +|katsura 10|1.73| +|katsura 11|15.16| +|katsura 12| - | +|katsura 13| - | +|noon 7| - | +|noon 8|2.09| +|noon 9|19.33| +|noon 10| - | |reimer 6|0.23| -|reimer 7|1.41| -|reimer 8|26.74| -|reimer 9| - | +|reimer 7|1.75| +|reimer 8|54.01| *Benchmarking environment:* @@ -58,6 +55,7 @@ Versions of the dependencies: * PrecompileTools : 1.2.0 * MultivariatePolynomials : 0.5.3 * Combinatorics : 1.0.2 +* HostCPUFeatures : 0.1.16 * AbstractAlgebra : 0.34.7 * Nemo : 0.38.3 * Atomix : 0.1.0 diff --git a/benchmark/results/maple/benchmark_result_3.md b/benchmark/results/maple/benchmark_result_3.md index 8a904cb0..ce06d908 100644 --- a/benchmark/results/maple/benchmark_result_3.md +++ b/benchmark/results/maple/benchmark_result_3.md @@ -1,44 +1,44 @@ ## Benchmark results -2024-01-26T16:31:09.203 +2024-01-27T07:56:37.996 Benchmarked backend: maple Benchmark suite: The rationals -- Workers: 16 -- Timeout: 1800 s +- Workers: 8 +- Timeout: 3600 s - Aggregated over: 3 runs **All timings in seconds.** |Model|Total, s| |:----|---| -|chandra 9|4.84| -|chandra 10|21.17| -|chandra 11|111.70| -|chandra 12|886.62| +|chandra 9|5.53| +|chandra 10|25.24| +|chandra 11|137.17| +|chandra 12|927.56| |chandra 13| - | -|cyclic 7|1.43| -|cyclic 8|20.50| +|cyclic 7|1.60| +|cyclic 8|22.57| |cyclic 9| - | -|dummy|0.14| -|eco 10|0.93| -|eco 11|4.79| -|eco 12|31.59| -|eco 13|352.97| -|henrion 6|2.03| -|henrion 7| - | -|ipp|91.40| -|katsura 9|7.70| -|katsura 10|76.88| -|katsura 11|1218.94| -|noon 7|1.09| -|noon 8|8.15| -|noon 9|66.52| -|reimer 6|0.77| -|reimer 7|24.22| -|reimer 8| - | +|dummy|0.16| +|eco 10|0.78| +|eco 11|5.30| +|eco 12|39.84| +|eco 13|420.79| +|henrion 6|1.91| +|henrion 7|3205.31| +|ipp|82.50| +|katsura 9|8.71| +|katsura 10|93.27| +|katsura 11|1439.72| +|noon 7|1.18| +|noon 8|9.32| +|noon 9|75.82| +|reimer 6|0.80| +|reimer 7|31.54| +|reimer 8|3425.27| *Benchmarking environment:* @@ -53,6 +53,7 @@ Versions of the dependencies: * PrecompileTools : 1.2.0 * MultivariatePolynomials : 0.5.3 * Combinatorics : 1.0.2 +* HostCPUFeatures : 0.1.16 * AbstractAlgebra : 0.34.7 * Nemo : 0.38.3 * Atomix : 0.1.0 diff --git a/benchmark/results/msolve/benchmark_result_0.md b/benchmark/results/msolve/benchmark_result_0.md index aed138ce..1e6d8138 100644 --- a/benchmark/results/msolve/benchmark_result_0.md +++ b/benchmark/results/msolve/benchmark_result_0.md @@ -1,21 +1,21 @@ ## Benchmark results -2024-01-27T00:31:13.800 +2024-01-27T13:24:19.795 Benchmarked backend: msolve Benchmark suite: dummy benchmark set -- Workers: 16 -- Timeout: 60 s -- Aggregated over: 1 runs +- Workers: 1 +- Timeout: 1800 s +- Aggregated over: 3 runs **All timings in seconds.** |Model|Total, s| |:----|---| -|dummy 1|0.03| -|dummy 2|0.03| +|dummy 1|0.01| +|dummy 2|0.01| *Benchmarking environment:* diff --git a/benchmark/results/msolve/benchmark_result_1.md b/benchmark/results/msolve/benchmark_result_1.md index b8ed2a8f..8b9624b1 100644 --- a/benchmark/results/msolve/benchmark_result_1.md +++ b/benchmark/results/msolve/benchmark_result_1.md @@ -1,49 +1,46 @@ ## Benchmark results -2024-01-26T15:22:43.818 +2024-01-27T02:48:22.410 Benchmarked backend: msolve Benchmark suite: Integers modulo 2^30 + 3 - Workers: 16 -- Timeout: 600 s -- Aggregated over: 3 runs +- Timeout: 60 s +- Aggregated over: 1 runs **All timings in seconds.** |Model|Total, s| |:----|---| -|chandra 11|0.88| -|chandra 12|3.84| -|chandra 13|20.56| -|chandra 14|133.08| +|chandra 11|0.96| +|chandra 12|4.78| +|chandra 13|30.71| +|chandra 14| - | |cyclic 7|0.15| -|cyclic 8|1.36| -|cyclic 9|118.97| -|cyclic 10| - | +|cyclic 8|1.48| +|cyclic 9| - | |dummy|0.01| -|eco 11|0.52| -|eco 12|2.59| -|eco 13|13.42| -|eco 14|127.94| +|eco 11|0.58| +|eco 12|3.92| +|eco 13|23.67| +|eco 14| - | |henrion 5|0.02| -|henrion 6|0.06| -|henrion 7|3.26| +|henrion 6|0.08| +|henrion 7|3.91| |henrion 8| - | -|katsura 10|1.08| -|katsura 11|6.15| -|katsura 12|43.52| +|katsura 10|1.19| +|katsura 11|10.34| +|katsura 12| - | |katsura 13| - | -|noon 7|0.22| -|noon 8|1.88| -|noon 9|16.01| +|noon 7|0.23| +|noon 8|2.05| +|noon 9|25.39| |noon 10| - | -|noon 11| - | -|reimer 6|0.08| -|reimer 7|1.21| -|reimer 8|30.17| -|reimer 9| - | +|reimer 6| - | +|reimer 7|1.32| +|reimer 8|47.06| *Benchmarking environment:* @@ -58,6 +55,7 @@ Versions of the dependencies: * PrecompileTools : 1.2.0 * MultivariatePolynomials : 0.5.3 * Combinatorics : 1.0.2 +* HostCPUFeatures : 0.1.16 * AbstractAlgebra : 0.34.7 * Nemo : 0.38.3 * Atomix : 0.1.0 diff --git a/benchmark/results/msolve/benchmark_result_3.md b/benchmark/results/msolve/benchmark_result_3.md index b2783a3d..21704d89 100644 --- a/benchmark/results/msolve/benchmark_result_3.md +++ b/benchmark/results/msolve/benchmark_result_3.md @@ -1,44 +1,44 @@ ## Benchmark results -2024-01-26T16:58:11.224 +2024-01-27T08:58:42.262 Benchmarked backend: msolve Benchmark suite: The rationals -- Workers: 16 -- Timeout: 1800 s +- Workers: 8 +- Timeout: 3600 s - Aggregated over: 3 runs **All timings in seconds.** |Model|Total, s| |:----|---| -|chandra 9|1.25| -|chandra 10|4.53| -|chandra 11|19.83| -|chandra 12|105.81| -|chandra 13| - | -|cyclic 7|1.20| -|cyclic 8|27.28| +|chandra 9|1.44| +|chandra 10|5.25| +|chandra 11|21.87| +|chandra 12|115.73| +|chandra 13|709.91| +|cyclic 7|1.11| +|cyclic 8|27.03| |cyclic 9| - | -|dummy|0.02| -|eco 10|0.65| -|eco 11|4.02| -|eco 12|28.25| -|eco 13|314.83| -|henrion 6|0.65| -|henrion 7|404.00| -|ipp|14.18| -|katsura 9|2.21| -|katsura 10|17.29| -|katsura 11|206.39| -|noon 7|1.53| -|noon 8|11.80| -|noon 9|100.94| -|reimer 6|0.30| -|reimer 7|6.14| -|reimer 8|358.83| +|dummy|0.03| +|eco 10|0.66| +|eco 11|4.00| +|eco 12|29.09| +|eco 13|344.04| +|henrion 6|0.63| +|henrion 7|364.54| +|ipp|16.44| +|katsura 9|2.52| +|katsura 10|19.68| +|katsura 11|198.94| +|noon 7|1.75| +|noon 8|11.94| +|noon 9|102.60| +|reimer 6|0.28| +|reimer 7|6.43| +|reimer 8|296.64| *Benchmarking environment:* @@ -53,6 +53,7 @@ Versions of the dependencies: * PrecompileTools : 1.2.0 * MultivariatePolynomials : 0.5.3 * Combinatorics : 1.0.2 +* HostCPUFeatures : 0.1.16 * AbstractAlgebra : 0.34.7 * Nemo : 0.38.3 * Atomix : 0.1.0 diff --git a/benchmark/results/openf4/benchmark_result_0.md b/benchmark/results/openf4/benchmark_result_0.md index 6fb6d195..fb615067 100644 --- a/benchmark/results/openf4/benchmark_result_0.md +++ b/benchmark/results/openf4/benchmark_result_0.md @@ -1,21 +1,21 @@ ## Benchmark results -2024-01-22T20:54:59.328 +2024-01-27T13:24:44.120 Benchmarked backend: openf4 Benchmark suite: dummy benchmark set -- Workers: 8 -- Timeout: 600 s -- Aggregated over: 1 runs +- Workers: 1 +- Timeout: 1800 s +- Aggregated over: 3 runs **All timings in seconds.** |Model|Total, s| |:----|---| -|dummy 1| - | -|dummy 2| - | +|dummy 1|0.01| +|dummy 2|0.01| *Benchmarking environment:* @@ -30,6 +30,7 @@ Versions of the dependencies: * PrecompileTools : 1.2.0 * MultivariatePolynomials : 0.5.3 * Combinatorics : 1.0.2 +* HostCPUFeatures : 0.1.16 * AbstractAlgebra : 0.34.7 * Nemo : 0.38.3 * Atomix : 0.1.0 diff --git a/benchmark/results/singular/benchmark_result_0.md b/benchmark/results/singular/benchmark_result_0.md index d2fef652..3d2d9c61 100644 --- a/benchmark/results/singular/benchmark_result_0.md +++ b/benchmark/results/singular/benchmark_result_0.md @@ -1,20 +1,20 @@ ## Benchmark results -2024-01-11T10:12:01.109 +2024-01-27T13:23:32.554 Benchmarked backend: singular Benchmark suite: dummy benchmark set -- Workers: 4 -- Timeout: 20 s -- Aggregated over: 1 runs +- Workers: 1 +- Timeout: 1800 s +- Aggregated over: 3 runs **All timings in seconds.** |Model|Total, s| -|-----|---| -|dummy 1| - | +|:----|---| +|dummy 1|0.00| |dummy 2|0.00| *Benchmarking environment:* @@ -30,6 +30,7 @@ Versions of the dependencies: * PrecompileTools : 1.2.0 * MultivariatePolynomials : 0.5.3 * Combinatorics : 1.0.2 +* HostCPUFeatures : 0.1.16 * AbstractAlgebra : 0.34.7 * Nemo : 0.38.3 * Atomix : 0.1.0 diff --git a/benchmark/results/singular/benchmark_result_3.md b/benchmark/results/singular/benchmark_result_3.md index 3c34b466..324abc34 100644 --- a/benchmark/results/singular/benchmark_result_3.md +++ b/benchmark/results/singular/benchmark_result_3.md @@ -1,31 +1,44 @@ ## Benchmark results -2023-12-31T02:48:35.724 +2024-01-27T06:50:31.803 Benchmarked backend: singular Benchmark suite: The rationals - Workers: 8 -- Timeout: 100 s -- Aggregated over: 1 runs +- Timeout: 3600 s +- Aggregated over: 3 runs **All timings in seconds.** -|Model|Total| -|-----|---| +|Model|Total, s| +|:----|---| +|chandra 9|3.10| +|chandra 10|35.13| +|chandra 11|284.97| +|chandra 12| - | +|chandra 13| - | |cyclic 7| - | |cyclic 8| - | +|cyclic 9| - | |dummy|0.00| -|eco 10|30.60| +|eco 10|43.90| |eco 11| - | |eco 12| - | -|henrion 6|5.22| -|katsura 9| - | +|eco 13| - | +|henrion 6|6.16| +|henrion 7| - | +|ipp|870.29| +|katsura 9|284.81| |katsura 10| - | |katsura 11| - | -|noon 8|13.60| -|noon 9| - | +|noon 7|1.11| +|noon 8|13.23| +|noon 9|172.35| +|reimer 6| - | +|reimer 7| - | +|reimer 8| - | *Benchmarking environment:* @@ -40,6 +53,7 @@ Versions of the dependencies: * PrecompileTools : 1.2.0 * MultivariatePolynomials : 0.5.3 * Combinatorics : 1.0.2 +* HostCPUFeatures : 0.1.16 * AbstractAlgebra : 0.34.7 * Nemo : 0.38.3 * Atomix : 0.1.0 diff --git a/benchmark/validate/benchmark_0/dummy 1/certificate b/benchmark/validate/benchmark_0/dummy 1/certificate index fcbdc7b4..0e201db6 100644 --- a/benchmark/validate/benchmark_0/dummy 1/certificate +++ b/benchmark/validate/benchmark_0/dummy 1/certificate @@ -1 +1 @@ -c775cf0260d43aea2cb7d42049708525d924fabf56b18b21a12ed756e8af8814 +48f002a952bef07bb2b36ca58d9618e0a063e945be143d9dfd7632169945c01a diff --git a/benchmark/validate/benchmark_0/dummy 2/certificate b/benchmark/validate/benchmark_0/dummy 2/certificate index fcbdc7b4..0e201db6 100644 --- a/benchmark/validate/benchmark_0/dummy 2/certificate +++ b/benchmark/validate/benchmark_0/dummy 2/certificate @@ -1 +1 @@ -c775cf0260d43aea2cb7d42049708525d924fabf56b18b21a12ed756e8af8814 +48f002a952bef07bb2b36ca58d9618e0a063e945be143d9dfd7632169945c01a diff --git a/experimental/sparsedense.jl b/experimental/sparsedense.jl new file mode 100644 index 00000000..8061fc83 --- /dev/null +++ b/experimental/sparsedense.jl @@ -0,0 +1,172 @@ +using BenchmarkTools + +function addmul!( + row::Vector{UInt64}, + indices::Vector{Int64}, + coeffs::Vector{UInt32}, + mul::UInt64 +) + @inbounds for j in 1:length(indices) + idx = indices[j] + a = row[idx] + mul * UInt64(coeffs[j]) + row[idx] = a + end + nothing +end + +function addmul_2!(row, indices, coeffs, mul) + textir = """ + ; row, indices, coeffs, mul, len + define void @entry(i64 %0, i64 %1, i64 %2, i64 %3, i64 %4) #0 { + top: + %row = inttoptr i64 %0 to i64* + %inds = inttoptr i64 %1 to i64* + %coeffs = inttoptr i64 %2 to i32* + %lenm7 = add nsw i64 %4, -3 + %dosimditer = icmp ugt i64 %4, 3 + br i1 %dosimditer, label %L9.lr.ph, label %L32 + + L9.lr.ph: + %len8 = and i64 %4, 9223372036854775804 + br label %L9 + + L9: + %i = phi i64 [ 0, %L9.lr.ph ], [ %vinc, %L30 ] + %indsi = getelementptr inbounds i64, i64* %inds, i64 %i + %idx = load i64, i64* %indsi, align 8 + %coeffsi = getelementptr inbounds i32, i32* %coeffs, i64 %i + %coeff = load i32, i32* %coeffsi, align 8 + %idxm1 = add i64 %idx, -1 + %rowi = getelementptr inbounds i64, i64* %row, i64 %idxm1 + %x = load i64, i64* %rowi, align 8 + %coeff64 = zext i32 %coeff to i64 + %mulcoeff = mul i64 %coeff64, %3 + %newx = add i64 %x, %mulcoeff + store i64 %newx, i64* %rowi, align 8 + ; + %i2 = add i64 %i, 1 + %indsi2 = getelementptr inbounds i64, i64* %inds, i64 %i2 + %idx2 = load i64, i64* %indsi2, align 8 + %coeffsi2 = getelementptr inbounds i32, i32* %coeffs, i64 %i2 + %coeff2 = load i32, i32* %coeffsi2, align 8 + %idxm12 = add i64 %idx2, -1 + %rowi2 = getelementptr inbounds i64, i64* %row, i64 %idxm12 + %x2 = load i64, i64* %rowi2, align 8 + %coeff642 = zext i32 %coeff2 to i64 + %mulcoeff2 = mul i64 %coeff642, %3 + %newx2 = add i64 %x2, %mulcoeff2 + store i64 %newx2, i64* %rowi2, align 8 + ; + %i3 = add i64 %i2, 1 + %indsi3 = getelementptr inbounds i64, i64* %inds, i64 %i3 + %idx3 = load i64, i64* %indsi3, align 8 + %coeffsi3 = getelementptr inbounds i32, i32* %coeffs, i64 %i3 + %coeff3 = load i32, i32* %coeffsi3, align 8 + %idxm13 = add i64 %idx3, -1 + %rowi3 = getelementptr inbounds i64, i64* %row, i64 %idxm13 + %x3 = load i64, i64* %rowi3, align 8 + %coeff643 = zext i32 %coeff3 to i64 + %mulcoeff3 = mul i64 %coeff643, %3 + %newx3 = add i64 %x3, %mulcoeff3 + store i64 %newx3, i64* %rowi3, align 8 + ; + %i4 = add i64 %i3, 1 + %indsi4 = getelementptr inbounds i64, i64* %inds, i64 %i4 + %idx4 = load i64, i64* %indsi4, align 8 + %coeffsi4 = getelementptr inbounds i32, i32* %coeffs, i64 %i4 + %coeff4 = load i32, i32* %coeffsi4, align 8 + %idxm14 = add i64 %idx4, -1 + %rowi4 = getelementptr inbounds i64, i64* %row, i64 %idxm14 + %x4 = load i64, i64* %rowi4, align 8 + %coeff644 = zext i32 %coeff4 to i64 + %mulcoeff4 = mul i64 %coeff644, %3 + %newx4 = add i64 %x4, %mulcoeff4 + store i64 %newx4, i64* %rowi4, align 8 + ; + br label %L30 + + L30: + %vinc = add nuw nsw i64 %i, 4 + %continue = icmp slt i64 %vinc, %lenm7 + br i1 %continue, label %L9, label %L32 + + L32: + %cumi = phi i64 [ 0, %top ], [ %len8, %L30 ] + %done = icmp eq i64 %cumi, %4 + br i1 %done, label %common.ret, label %L51 + + common.ret: + ret void + + L51: + %si = phi i64 [ %inc, %L67 ], [ %cumi, %L32 ] + %sindsi = getelementptr inbounds i64, i64* %inds, i64 %si + %sidx = load i64, i64* %sindsi, align 8 + %scoeffsi = getelementptr inbounds i32, i32* %coeffs, i64 %si + %scoeff = load i32, i32* %scoeffsi, align 8 + %sidxm1 = add i64 %sidx, -1 + %srowi = getelementptr inbounds i64, i64* %row, i64 %sidxm1 + %sx = load i64, i64* %srowi, align 8 + %scoeff64 = zext i32 %scoeff to i64 + %smulcoeff = mul i64 %scoeff64, %3 + %snewx = add i64 %sx, %smulcoeff + store i64 %snewx, i64* %srowi, align 8 + br label %L67 + + L67: + %inc = add i64 %si, 1 + %dobreak = icmp eq i64 %inc, %4 + br i1 %dobreak, label %common.ret, label %L51 + + } + attributes #0 = { alwaysinline } +""" + + GC.@preserve row indices coeffs begin + Base.llvmcall( + (textir, "entry"), + Nothing, + Tuple{Ptr{UInt64}, Ptr{Int64}, Ptr{UInt32}, UInt64, Int64}, + Base.unsafe_convert(Ptr{UInt64}, row), + Base.unsafe_convert(Ptr{Int64}, indices), + Base.unsafe_convert(Ptr{UInt32}, coeffs), + mul, + length(indices) + ) + end +end + +@code_native debuginfo = :none addmul!(UInt[], Int[], UInt32[], UInt(1)) +@code_native debuginfo = :none addmul_2!(UInt[], Int[], UInt32[], UInt(1)) + +n = 10_000 +for k in 1:5:200 + @info "n = $n, k = $k" + for _ in 1:100 + row = rand(UInt.(0:100), n) + indices = sort(unique(rand(1:(n), k))) + coeffs = rand(UInt32.(1:100), length(indices)) + mul = rand(UInt) + crow = copy(row) + # println(row[indices]) + addmul!(row, indices, coeffs, mul) + addmul_2!(crow, indices, coeffs, mul) + # println(row[indices]) + # println(crow[indices]) + # println(indices) + # println(coeffs) + @assert row == crow + end + @btime addmul!(row, indices, coeffs, mul) setup = begin + row = rand(UInt, $n) + indices = sort(unique(rand(1:($n), $k))) + coeffs = rand(UInt32, length(indices)) + mul = rand(UInt) + end + @btime addmul_2!(row, indices, coeffs, mul) setup = begin + row = rand(UInt, $n) + indices = sort(unique(rand(1:($n), $k))) + coeffs = rand(UInt32, length(indices)) + mul = rand(UInt) + end +end