Skip to content

Commit

Permalink
Merge branch 'unsafe-assume'
Browse files Browse the repository at this point in the history
  • Loading branch information
Sasha Demin committed Jan 26, 2024
2 parents c124cf9 + badde74 commit 1e0fd5d
Show file tree
Hide file tree
Showing 24 changed files with 738 additions and 452 deletions.
48 changes: 32 additions & 16 deletions benchmark/README.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
## Benchmarks

Benchmarks for `Groebner.jl`, `Singular`, `Maple`, `OpenF4`, and `msolve`.
Benchmarks for `Groebner.jl`, `Maple`, `msolve`, `OpenF4`, `Singular`.

The definitions of benchmark systems can be found in `benchmark_systems.jl`.

Computed Groebner bases will be verified against short certificates that are
assumed to be correct.
Computed bases will be verified against short certificates that are assumed to
be correct.

For running the benchmarks, you will need a Julia client v1.6+ installed.
See the official installation guide at
Expand All @@ -19,23 +19,32 @@ To benchmark all available software at once, execute this command in your favori
julia one_script_to_run_them_all.jl ALL
```

Also see below for software-specific instructions.
See below for software-specific instructions.

It is possible to specify command-line options.
These are available for all software benchmarked here.
These options are available for all software benchmarked here.
For example, the following command

```
julia one_script_to_run_them_all.jl ALL --timeout=600 --nworkers=20 --nruns=3 --validate=yes --suite=3
julia one_script_to_run_them_all.jl ALL --timeout=600 --nworkers=16 --nruns=3 --validate=no --suite=1 --bmaple=/path/to/maple/binary --lopenf4=/path/to/openf4/lib --bmsolve=/path/to/msolve/binary
```

runs benchmarks under the following conditions:

- Timeout `600 s` for each benchmark.
- Distribute benchmarks over `20` worker processes.
- Re-run each benchmark `3` times and aggregate timings.
- Validate the correctness of resulting Groebner bases (may be slower).
- Use the `3`-rd benchmark suite (see `benchmark_systems.jl` for details).
- Timeout `600 s` for each benchmark system.
- Distribute benchmarks over `16` worker processes.
- Re-run each benchmark `3` times and average the timings.
- Do not validate the correctness of resulting Groebner bases.
- Use the `1`-st benchmark suite (see `benchmark_systems.jl` for details).
- Use Maple binary from `/path/to/maple/binary`.
- Use OpenF4 library installation from `/path/to/openf4/lib/`.
- Use msolve binary from `/path/to/msolve/binary`.

You can still run the command even if you do not have some of these software.
For example, if you do not have `msolve` and `OpenF4`, omit the `--bmsolve` and `--lopenf4` options, and the script will benchmark only `Groebner.jl`, `Maple`, and `Singular`.
We use `Singular.jl`, thus the only necessary thing to run Singular benchmarks is a Julia client.

It is advisable to run the benchmarks with no other maple/msolve tasks running in background in parallel. This is because the benchmark script eagerly cleans up the processes and may accidentally kill an innocent maple/msolve process.

## Groebner.jl

Expand All @@ -47,7 +56,7 @@ runs benchmarks under the following conditions:
julia one_script_to_run_them_all.jl groebner
```

We compute the bases using the function `Groebner.groebner` with the option `threaded=:no`.
We compute the bases using the function `Groebner.groebner` with the option `threaded=:no` and other options with default values.

## Singular

Expand Down Expand Up @@ -81,7 +90,7 @@ Internally, this will use the `Groebner[Basis]` command with `method=fgb`.

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

1. OpenF4 lib installed. See the official installation guide at http://nauotit.github.io/openf4
1. OpenF4 library installed. See the official installation guide at http://nauotit.github.io/openf4

#### To run only `OpenF4` benchmarks

Expand All @@ -91,13 +100,13 @@ Internally, this will use the `Groebner[Basis]` command with `method=fgb`.
julia one_script_to_run_them_all.jl openf4 --lopenf4=/path/to/openf4/lib
```

where `/path/to/openf4/lib` is the path to the directory where openf4 library is installed.
where `/path/to/openf4/lib` is the path to the directory where the `OpenF4` library is installed.

## msolve

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

1. `msolve` installed. See the official installation guide at https://msolve.lip6.fr/ and https://github.com/algebraic-solving/msolve/blob/master/INSTALL
1. `msolve` client installed. See the official installation guide at https://msolve.lip6.fr/ and https://github.com/algebraic-solving/msolve/blob/master/INSTALL

#### To run only `msolve` benchmarks

Expand All @@ -107,4 +116,11 @@ where `/path/to/openf4/lib` is the path to the directory where openf4 library is
julia one_script_to_run_them_all.jl msolve --bmsolve=/path/to/msolve/binary
```

Internally, this will run `msolve -g 2 -l 44 -c 0 -f system.in -o /dev/null` for each benchmark system over finite fields and `msolve -g 2 -c 0 -f system.in -o /dev/null` for each benchmark system over the rationals.
Internally, this will run

```
msolve -g 2 -l 44 -c 0 -f system.in -o /dev/null
```

for each benchmark system over finite fields, where `msolve` is equal to `/path/to/msolve/binary`.
For benchmarks over the rationals, we do not specify the linear algebra option `-l`.
2 changes: 1 addition & 1 deletion benchmark/generate/benchmark_generators.jl
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ function generate_benchmark_source_for_maple(
vars_repr = join(map(string, gens(ring)), ", ")
println(buf, "")
println(buf, "runtime := 2^1000:")
println(buf, "for i from 1 by 1 to $nruns do")
println(buf, "for i from 1 by 1 to 1 do")
println(buf, "\tJ := [\n$system_repr\n\t]:")
println(buf, "\tprint(\"Running $name\");")
println(buf, "\tst := time[real]():")
Expand Down
251 changes: 251 additions & 0 deletions benchmark/generate/maple/Manifest.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,251 @@
# This file is machine-generated - editing it directly is not advised

julia_version = "1.9.2"
manifest_format = "2.0"
project_hash = "623d5d4f83b54da08b7ad95e49fa725c6b1f466a"

[[deps.AbstractAlgebra]]
deps = ["InteractiveUtils", "LinearAlgebra", "MacroTools", "Preferences", "Random", "RandomExtensions", "SparseArrays", "Test"]
git-tree-sha1 = "e37973a51ece7abe0aac9d9c8c0e8e6e1ddbfd83"
uuid = "c3fe647b-3220-5bb0-a1ea-a7954cac585d"
version = "0.36.5"

[[deps.ArgParse]]
deps = ["Logging", "TextWrap"]
git-tree-sha1 = "3102bce13da501c9104df33549f511cd25264d7d"
uuid = "c7e460c6-2fb9-53a9-8c5b-16f535851c63"
version = "1.1.4"

[[deps.ArgTools]]
uuid = "0dad84c5-d112-42e6-8d28-ef12dabb789f"
version = "1.1.1"

[[deps.Artifacts]]
uuid = "56f22d72-fd6d-98f1-02f0-08ddc0907c33"

[[deps.Base64]]
uuid = "2a0f44e3-6c83-55bd-87e4-b1978d98bd5f"

[[deps.BenchmarkTools]]
deps = ["JSON", "Logging", "Printf", "Profile", "Statistics", "UUIDs"]
git-tree-sha1 = "f1f03a9fa24271160ed7e73051fba3c1a759b53f"
uuid = "6e4b80f9-dd63-53aa-95a3-0cdb28fa8baf"
version = "1.4.0"

[[deps.CompilerSupportLibraries_jll]]
deps = ["Artifacts", "Libdl"]
uuid = "e66e0078-7015-5450-92f7-15fbd957f2ae"
version = "1.0.5+0"

[[deps.CpuId]]
deps = ["Markdown"]
git-tree-sha1 = "fcbb72b032692610bfbdb15018ac16a36cf2e406"
uuid = "adafc99b-e345-5852-983c-f28acb93d879"
version = "0.3.1"

[[deps.Dates]]
deps = ["Printf"]
uuid = "ade2ca70-3891-5945-98fb-dc099432e06a"

[[deps.Distributed]]
deps = ["Random", "Serialization", "Sockets"]
uuid = "8ba89e20-285c-5b6f-9357-94700520ee1b"

[[deps.Downloads]]
deps = ["ArgTools", "FileWatching", "LibCURL", "NetworkOptions"]
uuid = "f43a241f-c20a-4ad4-852c-f6b1247861c6"
version = "1.6.0"

[[deps.FileWatching]]
uuid = "7b1f6079-737a-58dc-b8bc-7a2ca5c1b5ee"

[[deps.InteractiveUtils]]
deps = ["Markdown"]
uuid = "b77e0a4c-d291-57a0-90e8-8db25a27a240"

[[deps.JSON]]
deps = ["Dates", "Mmap", "Parsers", "Unicode"]
git-tree-sha1 = "31e996f0a15c7b280ba9f76636b3ff9e2ae58c9a"
uuid = "682c06a0-de6a-54ab-a142-c8b1cf79cde6"
version = "0.21.4"

[[deps.LibCURL]]
deps = ["LibCURL_jll", "MozillaCACerts_jll"]
uuid = "b27032c2-a3e7-50c8-80cd-2d36dbcbfd21"
version = "0.6.3"

[[deps.LibCURL_jll]]
deps = ["Artifacts", "LibSSH2_jll", "Libdl", "MbedTLS_jll", "Zlib_jll", "nghttp2_jll"]
uuid = "deac9b47-8bc7-5906-a0fe-35ac56dc84c0"
version = "7.84.0+0"

[[deps.LibGit2]]
deps = ["Base64", "NetworkOptions", "Printf", "SHA"]
uuid = "76f85450-5226-5b5a-8eaa-529ad045b433"

[[deps.LibSSH2_jll]]
deps = ["Artifacts", "Libdl", "MbedTLS_jll"]
uuid = "29816b5a-b9ab-546f-933c-edad1886dfa8"
version = "1.10.2+0"

[[deps.Libdl]]
uuid = "8f399da3-3557-5675-b5ff-fb832c97cbdb"

[[deps.LinearAlgebra]]
deps = ["Libdl", "OpenBLAS_jll", "libblastrampoline_jll"]
uuid = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e"

[[deps.Logging]]
uuid = "56ddb016-857b-54e1-b83d-db4d58db5568"

[[deps.MacroTools]]
deps = ["Markdown", "Random"]
git-tree-sha1 = "2fa9ee3e63fd3a4f7a9a4f4744a52f4856de82df"
uuid = "1914dd2f-81c6-5fcd-8719-6d5c9610ff09"
version = "0.5.13"

[[deps.Markdown]]
deps = ["Base64"]
uuid = "d6f4376e-aef5-505a-96c1-9c027394607a"

[[deps.MbedTLS_jll]]
deps = ["Artifacts", "Libdl"]
uuid = "c8ffd9c3-330d-5841-b78e-0817d7145fa1"
version = "2.28.2+0"

[[deps.Mmap]]
uuid = "a63ad114-7e13-5084-954f-fe012c677804"

[[deps.MozillaCACerts_jll]]
uuid = "14a3606d-f60d-562e-9121-12d972cd8159"
version = "2022.10.11"

[[deps.NetworkOptions]]
uuid = "ca575930-c2e3-43a9-ace4-1e988b2c1908"
version = "1.2.0"

[[deps.OpenBLAS_jll]]
deps = ["Artifacts", "CompilerSupportLibraries_jll", "Libdl"]
uuid = "4536629a-c528-5b80-bd46-f80d51c5b363"
version = "0.3.21+4"

[[deps.Parsers]]
deps = ["Dates", "PrecompileTools", "UUIDs"]
git-tree-sha1 = "8489905bcdbcfac64d1daa51ca07c0d8f0283821"
uuid = "69de0a69-1ddd-5017-9359-2bf0b02dc9f0"
version = "2.8.1"

[[deps.Pkg]]
deps = ["Artifacts", "Dates", "Downloads", "FileWatching", "LibGit2", "Libdl", "Logging", "Markdown", "Printf", "REPL", "Random", "SHA", "Serialization", "TOML", "Tar", "UUIDs", "p7zip_jll"]
uuid = "44cfe95a-1eb2-52ea-b672-e2afdf69b78f"
version = "1.9.2"

[[deps.PrecompileTools]]
deps = ["Preferences"]
git-tree-sha1 = "03b4c25b43cb84cee5c90aa9b5ea0a78fd848d2f"
uuid = "aea7be01-6a6a-4083-8856-8a6e6704d82a"
version = "1.2.0"

[[deps.Preferences]]
deps = ["TOML"]
git-tree-sha1 = "00805cd429dcb4870060ff49ef443486c262e38e"
uuid = "21216c6a-2e73-6563-6e65-726566657250"
version = "1.4.1"

[[deps.Printf]]
deps = ["Unicode"]
uuid = "de0858da-6303-5e67-8744-51eddeeeb8d7"

[[deps.Profile]]
deps = ["Printf"]
uuid = "9abbd945-dff8-562f-b5e8-e1ebf5ef1b79"

[[deps.ProgressMeter]]
deps = ["Distributed", "Printf"]
git-tree-sha1 = "00099623ffee15972c16111bcf84c58a0051257c"
uuid = "92933f4c-e287-5a05-a399-4b506db050ca"
version = "1.9.0"

[[deps.REPL]]
deps = ["InteractiveUtils", "Markdown", "Sockets", "Unicode"]
uuid = "3fa0cd96-eef1-5676-8a61-b3b8758bbffb"

[[deps.Random]]
deps = ["SHA", "Serialization"]
uuid = "9a3f8284-a2c9-5f02-9a11-845980a1fd5c"

[[deps.RandomExtensions]]
deps = ["Random", "SparseArrays"]
git-tree-sha1 = "b8a399e95663485820000f26b6a43c794e166a49"
uuid = "fb686558-2515-59ef-acaa-46db3789a887"
version = "0.4.4"

[[deps.SHA]]
uuid = "ea8e919c-243c-51af-8825-aaa63cd721ce"
version = "0.7.0"

[[deps.Serialization]]
uuid = "9e88b42a-f829-5b0c-bbe9-9e923198166b"

[[deps.Sockets]]
uuid = "6462fe0b-24de-5631-8697-dd941f90decc"

[[deps.SparseArrays]]
deps = ["Libdl", "LinearAlgebra", "Random", "Serialization", "SuiteSparse_jll"]
uuid = "2f01184e-e22b-5df5-ae63-d93ebab69eaf"

[[deps.Statistics]]
deps = ["LinearAlgebra", "SparseArrays"]
uuid = "10745b16-79ce-11e8-11f9-7d13ad32a3b2"
version = "1.9.0"

[[deps.SuiteSparse_jll]]
deps = ["Artifacts", "Libdl", "Pkg", "libblastrampoline_jll"]
uuid = "bea87d4a-7f5b-5778-9afe-8cc45184846c"
version = "5.10.1+6"

[[deps.TOML]]
deps = ["Dates"]
uuid = "fa267f1f-6049-4f14-aa54-33bafae1ed76"
version = "1.0.3"

[[deps.Tar]]
deps = ["ArgTools", "SHA"]
uuid = "a4e569a6-e804-4fa4-b0f3-eef7a1d5b13e"
version = "1.10.0"

[[deps.Test]]
deps = ["InteractiveUtils", "Logging", "Random", "Serialization"]
uuid = "8dfed614-e22c-5e08-85e1-65c5234f0b40"

[[deps.TextWrap]]
git-tree-sha1 = "9250ef9b01b66667380cf3275b3f7488d0e25faf"
uuid = "b718987f-49a8-5099-9789-dcd902bef87d"
version = "1.0.1"

[[deps.UUIDs]]
deps = ["Random", "SHA"]
uuid = "cf7118a7-6976-5b1a-9a39-7adc72f591a4"

[[deps.Unicode]]
uuid = "4ec0a83e-493e-50e2-b9ac-8f72acf5a8f5"

[[deps.Zlib_jll]]
deps = ["Libdl"]
uuid = "83775a58-1f1d-513f-b197-d71354ab007a"
version = "1.2.13+0"

[[deps.libblastrampoline_jll]]
deps = ["Artifacts", "Libdl"]
uuid = "8e850b90-86db-534c-a0d3-1478176c7d93"
version = "5.8.0+0"

[[deps.nghttp2_jll]]
deps = ["Artifacts", "Libdl"]
uuid = "8e850ede-7688-5339-a07c-302acd2aaf8d"
version = "1.48.0+0"

[[deps.p7zip_jll]]
deps = ["Artifacts", "Libdl"]
uuid = "3f19e933-33d8-53b3-aaab-bd5110c3b7a0"
version = "17.4.0+0"
12 changes: 12 additions & 0 deletions benchmark/generate/maple/Project.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
[deps]
AbstractAlgebra = "c3fe647b-3220-5bb0-a1ea-a7954cac585d"
ArgParse = "c7e460c6-2fb9-53a9-8c5b-16f535851c63"
BenchmarkTools = "6e4b80f9-dd63-53aa-95a3-0cdb28fa8baf"
CpuId = "adafc99b-e345-5852-983c-f28acb93d879"
Dates = "ade2ca70-3891-5945-98fb-dc099432e06a"
Distributed = "8ba89e20-285c-5b6f-9357-94700520ee1b"
Logging = "56ddb016-857b-54e1-b83d-db4d58db5568"
Printf = "de0858da-6303-5e67-8744-51eddeeeb8d7"
ProgressMeter = "92933f4c-e287-5a05-a399-4b506db050ca"
Random = "9a3f8284-a2c9-5f02-9a11-845980a1fd5c"
Statistics = "10745b16-79ce-11e8-11f9-7d13ad32a3b2"
Loading

0 comments on commit 1e0fd5d

Please sign in to comment.