Skip to content

Commit

Permalink
Merge pull request #59 from sumiya11/update-benchmarks
Browse files Browse the repository at this point in the history
Refactor benchmarks & increment version to 0.3.3
  • Loading branch information
sumiya11 authored Apr 17, 2023
2 parents 4d9ae0e + f1adf05 commit 4e93ca5
Show file tree
Hide file tree
Showing 38 changed files with 1,216 additions and 943 deletions.
11 changes: 11 additions & 0 deletions CITATION.bib
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
## Citation
If you use Groebner.jl, please [cite this paper](https://arxiv.org/abs/2304.06935)
@misc{groebnerjl2023,
title = {Groebner.jl: A package for Gr\"obner bases computations in Julia},
author = {Alexander Demin and Shashi Gowda},
year = {2023},
eprint = {2304.06935},
url = {https://arxiv.org/abs/2304.06935}
}
2 changes: 1 addition & 1 deletion Project.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name = "Groebner"
uuid = "0b43b601-686d-58a3-8a1c-6623616c7cd4"
authors = ["sumiya11"]
version = "0.3.2"
version = "0.3.3"

[deps]
AbstractAlgebra = "c3fe647b-3220-5bb0-a1ea-a7954cac585d"
Expand Down
14 changes: 14 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -68,3 +68,17 @@ This library is maintained by Alexander Demin (<[email protected]>)
We would like to acknowledge Jérémy Berthomieu, Christian Eder and Mohab Safey El Din as this Library is inspired by their work ["msolve: A Library for Solving Polynomial Systems"](https://arxiv.org/abs/2104.03572). We are also grateful to Max-Planck-Institut für Informatik for assistance in producing benchmarks.

Special thanks goes to Vladimir Kuznetsov for providing the sources of his F4 implementation.

## Citing Groebner.jl

If you find Groebner.jl useful in your work, you can cite the following preprint

```
@misc{groebnerjl2023,
title = {Groebner.jl: A package for Gr\"obner bases computations in Julia},
author = {Alexander Demin and Shashi Gowda},
year = {2023},
eprint = {2304.06935},
url = {https://arxiv.org/abs/2304.06935}
}
```
43 changes: 43 additions & 0 deletions benchmark/arxiv.preprint/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@

The directory is used to run benchmarks for `Groebner.jl`, `Singular`, and `Maple` for the arxiv preprint https://arxiv.org/abs/2304.06935.

*running OpenF4 benchmarks is not possible at the moment, work in progress*

#### For `Groebner.jl` and `Singular` benchmarks, you will need:

1. A Julia client v1.6+ installed. See the official installation guide at https://julialang.org/downloads/platform/


#### To run `Groebner.jl` benchmarks

1. Execute the following command in your favorite terminal from this directory

```
> julia run_groebner.jl
```

#### To run `Singular` benchmarks

1. Execute the following command in your favorite terminal from this directory

```
> julia run_singular.jl
```

*Running Singular benchmarks on Windows platforms is currently not possible.*

---

#### For `Maple` benchmarks, you will need:

1. A Maple client v2021+ installed. See the official installation guide at https://www.maplesoft.com/support/install/2021/Maple/Install.html


#### To run `Maple` benchmarks

1. Execute the following command in your favorite terminal from this directory

```
> maple run_maple.mpl
```

Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@

function benchmark_systems(ground)
function benchmark_systems_ff(ground)
[
("cyclic 7", Groebner.cyclicn(7, ground=ground)),
("cyclic 8", Groebner.cyclicn(8, ground=ground)),
# ("cyclic 9", Groebner.cyclicn(9, ground=ground)),
("cyclic 9", Groebner.cyclicn(9, ground=ground)),
("katsura 10",Groebner.katsuran(10, ground=ground)),
("katsura 11",Groebner.katsuran(11, ground=ground)),
("katsura 12",Groebner.katsuran(12, ground=ground)),
Expand All @@ -21,3 +21,17 @@ function benchmark_systems(ground)
("reimer 8", Groebner.reimern(8, ground=ground)),
]
end

function benchmark_systems_qq(ground)
[
("cyclic 7", Groebner.cyclicn(7, ground=ground)),
("cyclic 8", Groebner.cyclicn(8, ground=ground)),
("katsura 9",Groebner.katsuran(9, ground=ground)),
("katsura 10",Groebner.katsuran(10, ground=ground)),
("eco 10", Groebner.eco10(ground=ground)),
("eco 11", Groebner.eco11(ground=ground)),
("noon 8", Groebner.noonn(8, ground=ground)),
("noon 9", Groebner.noonn(9, ground=ground)),
("henrion 6", Groebner.henrion6(ground=ground)),
]
end
52 changes: 52 additions & 0 deletions benchmark/arxiv.preprint/generate/export_to_maple.jl
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
using Groebner
using AbstractAlgebra

include((@__DIR__)*"/benchmark_systems.jl")

header = """
with(Groebner):
with(PolynomialIdeals):
"""

template = """
J := PolynomialIdeal({(1)}, charactesistic=(3)):
print("Running (4)");
st := time[real]():
Groebner[Basis](J, tdeg((2)), method=direct):
print("(4): ", time[real]() - st);
"""

function export_maple(io, name, system)
global ground
R = parent(first(system))
t1 = join(map(string, system), ", ")
t2 = join(map(string, gens(R)), ", ")
t3 = string(characteristic(base_ring(R)))
t4 = name
s = replace(template, "(1)"=>t1,"(2)"=>t2,"(3)"=>t3,"(4)"=>t4)
println(io, s)
end

function generate(flag)
if flag
ground = GF(2^31-1)
systems = benchmark_systems_ff(ground)
else
ground = QQ
systems = benchmark_systems_qq(ground)
end

io = open((@__DIR__)*"/generated_maple_$(flag ? "ff" : "qq").mpl", "w")

println(io, header)

for (name, system) in systems
export_maple(io, name, system)
end

close(io)
end

generate(true)
generate(false)
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@

using AbstractAlgebra
using Groebner

include("/home/ademin/gr/Groebner.jl/src/Groebner.jl")
include((@__DIR__)*"/benchmark_systems.jl")

template = "
int (5)F4(bool magma)
Expand Down Expand Up @@ -45,30 +46,12 @@ function export_openf4(io, name, system)
end

ground = GF(2^31-1)
systems = benchmark_systems_ff(ground)

systems = [
("henrion5", Groebner.henrion5(ground=ground)),
("henrion6", Groebner.henrion6(ground=ground)),
("henrion7", Groebner.henrion7(ground=ground)),
("katsura10", Groebner.katsuran(10, ground=ground)),
("katsura11", Groebner.katsuran(11, ground=ground)),
("katsura12", Groebner.katsuran(12, ground=ground)),
("eco11", Groebner.eco11(ground=ground)),
("eco12", Groebner.eco12(ground=ground)),
("eco13", Groebner.eco13(ground=ground)),
("noon7", Groebner.noonn(7, ground=ground)),
("noon8", Groebner.noonn(8, ground=ground)),
("noon9", Groebner.noonn(9, ground=ground)),
("reimer6", Groebner.reimern(6, ground=ground)),
("reimer7", Groebner.reimern(7, ground=ground)),
("reimer8", Groebner.reimern(8, ground=ground)),

]

io = open("/home/ademin/gr/Groebner.jl/benchmark/paper/openf4_systems.txt", "w")
io = open((@__DIR__)*"/../openf4_systems.txt", "w")

for (name, system) in systems
export_openf4(io, name, system)
end

close(io)
close(io)
Loading

2 comments on commit 4e93ca5

@sumiya11
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@JuliaRegistrator register()

@JuliaRegistrator
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Registration pull request created: JuliaRegistries/General/81717

After the above pull request is merged, it is recommended that a tag is created on this repository for the registered package version.

This will be done automatically if the Julia TagBot GitHub Action is installed, or can be done manually through the github interface, or via:

git tag -a v0.3.3 -m "<description of version>" 4e93ca5bfbe1b5ff68517de9e942a2933f3816f7
git push origin v0.3.3

Please sign in to comment.