Mentions légales du service
Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
A
algpath bench
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Package registry
Model registry
Operate
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Admin message
GitLab upgrade completed. Current version is 17.11.3.
Show more breadcrumbs
Numerical algebraic geometry
algpath bench
Commits
0938eae6
Commit
0938eae6
authored
4 months ago
by
GUILLEMOT Alexandre
Browse files
Options
Downloads
Patches
Plain Diff
add run_entries.py
parent
06190f1c
Branches
Branches containing commit
No related tags found
No related merge requests found
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
run_entries.py
+46
-0
46 additions, 0 deletions
run_entries.py
runtest.py
+5
-2
5 additions, 2 deletions
runtest.py
tables/all/entries.json
+95
-32
95 additions, 32 deletions
tables/all/entries.json
tables/katsura_20_all_paths/entries.json
+4
-0
4 additions, 0 deletions
tables/katsura_20_all_paths/entries.json
with
150 additions
and
34 deletions
run_entries.py
0 → 100644
+
46
−
0
View file @
0938eae6
import
argparse
import
subprocess
import
os
import
glob
import
json
from
pathlib
import
Path
parser
=
argparse
.
ArgumentParser
()
parser
.
add_argument
(
"
entries
"
,
help
=
"
The entry files that specifies what should be benchmarked
"
)
parser
.
add_argument
(
"
-p
"
,
"
--perf
"
,
action
=
'
store_true
'
,
default
=
False
,
help
=
"
perf stat the benchmark and put the result in perflog.txt
"
)
parser
.
add_argument
(
"
-t
"
,
"
--timeout
"
,
nargs
=
"
?
"
,
const
=
300
,
help
=
"
To run the benchmark with a timeout. Should be written as <number><unit> where <unit> may be nothing (this implicitely means seconds), s, m or h, e.g. 1h
"
)
parser
.
add_argument
(
"
-m
"
,
"
--mem
"
,
nargs
=
"
?
"
,
const
=
8
,
help
=
"
Maximum amount of memory used for the different tests. Should be written as <number><unit> where <unit> may be nothing, K, M or G, e.g. 100M
"
)
parser
.
add_argument
(
"
-n
"
,
action
=
'
store_true
'
,
help
=
"
To only run benchmarks not previously done
"
)
args
=
parser
.
parse_args
()
# Recovering data
assert
Path
(
args
.
entries
),
"
Specify valid path
"
entries_file
=
open
(
args
.
entries
,
"
r
"
)
try
:
entries
=
json
.
load
(
entries_file
)
data_list
=
entries
[
"
data_list
"
]
pkg_list
=
entries
[
"
packages
"
]
except
:
entries_file
.
close
()
print
(
"
Wrong file format
"
)
exit
(
1
)
for
i
,
pkg_name
in
enumerate
(
pkg_list
):
print
(
f
"
Package
{
i
+
1
}
/
{
len
(
pkg_list
)
}
"
)
for
j
,
data_path
in
enumerate
(
data_list
):
print
(
f
"
Data
{
j
+
1
}
/
{
len
(
data_list
)
}
"
)
pkg_path
=
(
Path
(
"
packages
"
)
/
Path
(
f
"
{
pkg_name
}
"
)).
with_suffix
(
"
.py
"
)
data_name
=
Path
(
data_path
)
print
(
data_name
)
print
(
pkg_path
)
print
(
data_name
/
pkg_name
)
print
(
str
((
"
data
"
/
Path
(
data_path
)).
with_suffix
(
"
.json
"
)))
if
not
((
data_name
/
pkg_name
).
exists
()
and
args
.
n
):
subprocess
.
run
([
"
python3
"
,
"
runtest.py
"
,
str
(
pkg_path
),
str
((
"
data
"
/
Path
(
data_path
)).
with_suffix
(
"
.json
"
))]
+
[
"
--timeout
"
,
str
(
args
.
timeout
)]
*
(
args
.
timeout
!=
None
)
+
[
"
--mem
"
,
str
(
args
.
mem
)]
*
(
args
.
mem
!=
None
)
+
[
"
--perf
"
]
*
args
.
perf
)
This diff is collapsed.
Click to expand it.
runtest.py
+
5
−
2
View file @
0938eae6
...
...
@@ -18,8 +18,11 @@ args = parser.parse_args()
pkg_path
=
Path
(
args
.
pkg
)
data_path
=
Path
(
args
.
data
)
tmp_data_str
=
f
"
file
{
data_path
}
does not exist
"
tmp_pkg_str
=
f
"
file
{
pkg_path
}
does not exist
"
assert
data_path
.
exists
()
and
pkg_path
.
exists
(),
"
Specify correct data and pkg file.
"
assert
data_path
.
exists
(),
tmp_data_str
assert
pkg_path
.
exists
(),
tmp_pkg_str
data
=
data_path
.
stem
pkg
=
pkg_path
.
stem
...
...
@@ -27,7 +30,7 @@ pkg = pkg_path.stem
print
(
f
"
Benchmarking
{
pkg
}
on
{
data_path
}
"
+
args
.
perf
*
"
(with perf stat)
"
)
print
(
"
Creating benchmark folder...
"
)
bench_path
=
(
Path
(
"
benchmarks
"
).
joinpath
(
*
data_path
.
with_suffix
(
""
).
parts
[
1
:])
/
pkg
_path
.
with_suffix
(
""
)
)
bench_path
=
(
Path
(
"
benchmarks
"
).
joinpath
(
*
data_path
.
with_suffix
(
""
).
parts
[
1
:])
/
pkg
)
bench_path
.
mkdir
(
parents
=
True
,
exist_ok
=
True
)
print
(
"
Generating script and command...
"
)
...
...
This diff is collapsed.
Click to expand it.
tables/all/entries.json
+
95
−
32
View file @
0938eae6
...
...
@@ -42,55 +42,118 @@
"newton/sumpowlin-6-3-5/1"
,
"newton/sumpowlin-8-3-5/1"
],
"packages"
:
[
"homotopycontinuation"
,
"algpath"
,
"macaulay2"
],
"header"
:
{
"val"
:
"root"
,
"children"
:
[
{
"val"
:
"name"
,
"children"
:
[]},
{
"val"
:
"dimension"
,
"children"
:
[]},
{
"val"
:
"max deg"
,
"children"
:
[]},
{
"val"
:
"paths"
,
"children"
:
[]},
"children"
:
[
{
"val"
:
"name"
,
"children"
:
[]
},
{
"val"
:
"dimension"
,
"children"
:
[]
},
{
"val"
:
"max deg"
,
"children"
:
[]
},
{
"val"
:
"paths"
,
"children"
:
[]
},
{
"val"
:
"instructions"
,
"children"
:
[
{
"val"
:
"f"
,
"children"
:
[]},
{
"val"
:
"df"
,
"children"
:
[]}
"children"
:
[
{
"val"
:
"f"
,
"children"
:
[]
},
{
"val"
:
"df"
,
"children"
:
[]
}
]
},
{
"val"
:
"homotopycontinuation"
,
"children"
:
[
{
"val"
:
"failures"
,
"children"
:
[]},
{
"val"
:
"medsteps"
,
"children"
:
[]},
{
"val"
:
"maxsteps"
,
"children"
:
[]},
{
"val"
:
"stepspersec"
,
"children"
:
[]},
{
"val"
:
"tottime"
,
"children"
:
[]}
"children"
:
[
{
"val"
:
"failures"
,
"children"
:
[]
},
{
"val"
:
"medsteps"
,
"children"
:
[]
},
{
"val"
:
"maxsteps"
,
"children"
:
[]
},
{
"val"
:
"stepspersec"
,
"children"
:
[]
},
{
"val"
:
"tottime"
,
"children"
:
[]
}
]
},
{
"val"
:
"algpath"
,
"children"
:
[
{
"val"
:
"failures"
,
"children"
:
[]},
{
"val"
:
"medsteps"
,
"children"
:
[]},
{
"val"
:
"maxsteps"
,
"children"
:
[]},
{
"val"
:
"stepspersec"
,
"children"
:
[]},
{
"val"
:
"tottime"
,
"children"
:
[]}
"children"
:
[
{
"val"
:
"failures"
,
"children"
:
[]
},
{
"val"
:
"medsteps"
,
"children"
:
[]
},
{
"val"
:
"maxsteps"
,
"children"
:
[]
},
{
"val"
:
"stepspersec"
,
"children"
:
[]
},
{
"val"
:
"tottime"
,
"children"
:
[]
}
]
},
{
"val"
:
"macaulay2"
,
"children"
:
[
{
"val"
:
"failures"
,
"children"
:
[]},
{
"val"
:
"medsteps"
,
"children"
:
[]},
{
"val"
:
"maxsteps"
,
"children"
:
[]},
{
"val"
:
"stepspersec"
,
"children"
:
[]},
{
"val"
:
"tottime"
,
"children"
:
[]}
"children"
:
[
{
"val"
:
"failures"
,
"children"
:
[]
},
{
"val"
:
"medsteps"
,
"children"
:
[]
},
{
"val"
:
"maxsteps"
,
"children"
:
[]
},
{
"val"
:
"stepspersec"
,
"children"
:
[]
},
{
"val"
:
"tottime"
,
"children"
:
[]
}
]
}
]
}
}
}
\ No newline at end of file
This diff is collapsed.
Click to expand it.
tables/katsura_20_all_paths/entries.json
+
4
−
0
View file @
0938eae6
...
...
@@ -2,6 +2,10 @@
"data_list"
:
[
"linear/katsura-20/all/1"
],
"packages"
:
[
"homotopycontinuation"
,
"algpath"
],
"header"
:
{
"val"
:
"root"
,
"children"
:
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment