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

Allow the user to speficy the maximal size of the matrix in F4 #64

Merged
merged 2 commits into from
May 24, 2023
Merged
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
65 changes: 32 additions & 33 deletions benchmark/experiments/standalone_f4_large.jl
Original file line number Diff line number Diff line change
@@ -1,18 +1,12 @@

include("../src/Groebner.jl")


if !isdefined(Main, :Groebner)
import Groebner
end
using Groebner

import AbstractAlgebra
using BenchmarkTools
using Logging
global_logger(ConsoleLogger(stderr, Logging.Error))
# global_logger(ConsoleLogger(stderr, Logging.Error))

# BenchmarkTools.DEFAULT_PARAMETERS.seconds = 6
BenchmarkTools.DEFAULT_PARAMETERS.samples = 5


function benchmark_system_my(system)
Expand All @@ -22,26 +16,24 @@ function benchmark_system_my(system)
# gb = Groebner.groebner(system)
# println("length = $(length(gb))")
# println("degree = $(maximum(AbstractAlgebra.total_degree, gb))")
Groebner.groebner(system, linalg=:prob)

@btime Groebner.groebner($system, reduced=false)
@time Groebner.groebner(system, linalg=:prob)
end

function run_f4_ff_degrevlex_benchmarks(ground)
systems = [
("cyclic 7", Groebner.cyclicn(7, ground=ground)),
("cyclic 8", Groebner.cyclicn(8, ground=ground)),
("root 13", Groebner.rootn(13, ground=ground)),
("root 14", Groebner.rootn(14, ground=ground)),
("root 15", Groebner.rootn(15, ground=ground)),
("katsura 9", Groebner.katsuran(9, ground=ground)),
("katsura 10", Groebner.katsuran(10, ground=ground)),
("katsura 11", Groebner.katsuran(11, ground=ground)),
("noon 7" ,Groebner.noonn(7, ground=ground)),
("noon 8" ,Groebner.noonn(8, ground=ground)),
("noon 9" ,Groebner.noonn(9, ground=ground)),
("eco 10" ,Groebner.eco10(ground=ground)),
("eco 11" ,Groebner.eco11(ground=ground)),
("eco 12" ,Groebner.eco12(ground=ground))
("katsura 9", Groebner.katsuran(9, ground=ground)),
("katsura 10", Groebner.katsuran(10, ground=ground)),
("katsura 11", Groebner.katsuran(11, ground=ground)),
("noon 7" ,Groebner.noonn(7, ground=ground)),
("noon 8" ,Groebner.noonn(8, ground=ground)),
("noon 9" ,Groebner.noonn(9, ground=ground)),
("eco 10" ,Groebner.eco10(ground=ground)),
("eco 11" ,Groebner.eco11(ground=ground)),
("eco 12" ,Groebner.eco12(ground=ground))
]

for (name, system) in systems
Expand All @@ -51,26 +43,33 @@ function run_f4_ff_degrevlex_benchmarks(ground)
end

println()

Groebner._min_pairs[] = 1000

ground = AbstractAlgebra.GF(2^31 - 1)
run_f4_ff_degrevlex_benchmarks(ground)

#=
cyclic 7
212.187 ms (229506 allocations: 79.33 MiB)
0.163683 seconds (91.60 k allocations: 55.431 MiB, 5.30% gc time, 31.38% compilation time)
cyclic 8
4.631 s (1362066 allocations: 455.37 MiB)
root 12
73.354 ms (179930 allocations: 32.39 MiB)
root 13
248.371 ms (451378 allocations: 67.86 MiB)
root 14
726.063 ms (1144701 allocations: 176.53 MiB)
1.690214 seconds (267.60 k allocations: 292.095 MiB, 8.76% gc time, 0.23% compilation time)
katsura 9
882.256 ms (149540 allocations: 59.57 MiB)
0.208915 seconds (74.23 k allocations: 53.478 MiB)
katsura 10
1.492179 seconds (195.74 k allocations: 176.967 MiB, 11.31% gc time)
katsura 11
7.061800 seconds (515.75 k allocations: 617.090 MiB, 1.46% gc time)
noon 7
249.928 ms (419411 allocations: 91.51 MiB)
0.307783 seconds (209.98 k allocations: 77.458 MiB, 41.56% gc time)
noon 8
1.681 s (2074539 allocations: 492.01 MiB)
1.665348 seconds (945.53 k allocations: 353.220 MiB, 14.79% gc time)
noon 9
13.829567 seconds (4.30 M allocations: 2.044 GiB, 3.35% gc time)
eco 10
179.106 ms (137529 allocations: 41.41 MiB)
0.115604 seconds (72.95 k allocations: 41.181 MiB)
eco 11
0.538119 seconds (188.62 k allocations: 111.055 MiB)
eco 12
2.762637 seconds (553.62 k allocations: 381.915 MiB)
=#
51 changes: 51 additions & 0 deletions experimental/runge-kutta/RK-6-6.mpl

Large diffs are not rendered by default.

12 changes: 12 additions & 0 deletions experimental/runge-kutta/aa-runge-kutta-4-4.jl
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
R, (a_21, a_31, a_32, a_41, a_42, a_43, b_1, b_2, b_3, b_4) = PolynomialRing(QQ, ["a_21", "a_31", "a_32", "a_41", "a_42", "a_43", "b_1", "b_2", "b_3", "b_4"])

system = [
b_1 + b_2 + b_3 + b_4 - 1,
2*a_21*b_2 + 2*a_31*b_3 + 2*a_32*b_3 + 2*a_41*b_4 + 2*a_42*b_4 + 2*a_43*b_4 - 1,
6*a_21*a_32*b_3 + 6*a_21*a_42*b_4 + 6*a_31*a_43*b_4 + 6*a_32*a_43*b_4 - 1,
3*a_21^2*b_2 + 3*a_31^2*b_3 + 6*a_31*a_32*b_3 + 3*a_32^2*b_3 + 3*a_41^2*b_4 + 6*a_41*a_42*b_4 + 6*a_41*a_43*b_4 + 3*a_42^2*b_4 + 6*a_42*a_43*b_4 + 3*a_43^2*b_4 - 1,
24*a_21*a_32*a_43*b_4 - 1,
12*a_21^2*a_32*b_3 + 12*a_21^2*a_42*b_4 + 12*a_31^2*a_43*b_4 + 24*a_31*a_32*a_43*b_4 + 12*a_32^2*a_43*b_4 - 1,
8*a_21*a_31*a_32*b_3 + 8*a_21*a_32^2*b_3 + 8*a_21*a_41*a_42*b_4 + 8*a_21*a_42^2*b_4 + 8*a_21*a_42*a_43*b_4 + 8*a_31*a_41*a_43*b_4 + 8*a_31*a_42*a_43*b_4 + 8*a_31*a_43^2*b_4 + 8*a_32*a_41*a_43*b_4 + 8*a_32*a_42*a_43*b_4 + 8*a_32*a_43^2*b_4 - 1,
4*a_21^3*b_2 + 4*a_31^3*b_3 + 12*a_31^2*a_32*b_3 + 12*a_31*a_32^2*b_3 + 4*a_32^3*b_3 + 4*a_41^3*b_4 + 12*a_41^2*a_42*b_4 + 12*a_41^2*a_43*b_4 + 12*a_41*a_42^2*b_4 + 24*a_41*a_42*a_43*b_4 + 12*a_41*a_43^2*b_4 + 4*a_42^3*b_4 + 12*a_42^2*a_43*b_4 + 12*a_42*a_43^2*b_4 + 4*a_43^3*b_4 - 1,
]
Loading