Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
D
dune-codegen
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD 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
This is an archived project. Repository and other project resources are read-only.
Show more breadcrumbs
Christian Heinigk
dune-codegen
Commits
a701ab4b
Commit
a701ab4b
authored
6 years ago
by
Dominic Kempf
Browse files
Options
Downloads
Patches
Plain Diff
Change call to benchmark programs and donkey wrapper
parent
e4a56e90
No related branches found
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
bin/donkey_benchmark_wrapper.py
+19
-0
19 additions, 0 deletions
bin/donkey_benchmark_wrapper.py
bin/donkey_benchmark_wrapper.sh
+0
-6
0 additions, 6 deletions
bin/donkey_benchmark_wrapper.sh
python/dune/perftool/sumfact/autotune.py
+4
-3
4 additions, 3 deletions
python/dune/perftool/sumfact/autotune.py
with
23 additions
and
9 deletions
bin/donkey_benchmark_wrapper.py
0 → 100644
+
19
−
0
View file @
a701ab4b
#!/usr/bin/env python
import
time
import
sys
import
os
# Run the actual command
command
=
"
srun -p haswell10c -n 20 -c 2 --cpu_bin=verbose,core
"
.
split
()
command
.
append
(
sys
.
argv
[
1
])
ret
=
subprocess
.
call
(
command
)
# If that failed - fail!
if
ret
!=
0
:
sys
.
exit
(
ret
)
# If that was succesful, wait for the output file to be available on the filesystem
# This step is necessary because the NFS synchronization is too slow for our workflow.
while
not
os
.
path
.
isfile
(
sys
.
argv
[
2
]):
time
.
sleep
(
0.1
)
This diff is collapsed.
Click to expand it.
bin/donkey_benchmark_wrapper.sh
deleted
100755 → 0
+
0
−
6
View file @
e4a56e90
#!/bin/bash
srun
-p
haswell10c
-n
20
-c
2
--cpu_bin
=
verbose,core
$1
# Give the file system some time to get our results file handled
sleep
0.1s
This diff is collapsed.
Click to expand it.
python/dune/perftool/sumfact/autotune.py
+
4
−
3
View file @
a701ab4b
...
@@ -63,7 +63,7 @@ def compiler_invocation(name, filename):
...
@@ -63,7 +63,7 @@ def compiler_invocation(name, filename):
return
compile_flags
return
compile_flags
def
generate_standalone_code
(
sf
,
filename
,
logname
):
def
generate_standalone_code
(
sf
,
filename
):
delete_cache_items
(
"
kernel_default
"
)
delete_cache_items
(
"
kernel_default
"
)
with
open
(
filename
,
"
w
"
)
as
f
:
with
open
(
filename
,
"
w
"
)
as
f
:
...
@@ -174,7 +174,7 @@ def generate_standalone_code(sf, filename, logname):
...
@@ -174,7 +174,7 @@ def generate_standalone_code(sf, filename, logname):
# Stop the TSC timer and write the result to a file
# Stop the TSC timer and write the result to a file
f
.
writelines
([
"
auto stop = Dune::PDELab::TSC::stop();
\n
"
,
f
.
writelines
([
"
auto stop = Dune::PDELab::TSC::stop();
\n
"
,
"
std::ofstream file;
\n
"
,
"
std::ofstream file;
\n
"
,
"
file.open(
\"
{}
\"
);
\n
"
.
format
(
logname
)
,
"
file.open(
argv[1]);
\n
"
,
"
file << Dune::PDELab::TSC::elapsed(start, stop) << std::endl;
\n
"
,
"
file << Dune::PDELab::TSC::elapsed(start, stop) << std::endl;
\n
"
,
"
file.close();
\n
"
,
"
file.close();
\n
"
,
"
accum += output[dis(rng)];
\n
"
,
"
accum += output[dis(rng)];
\n
"
,
...
@@ -200,7 +200,7 @@ def autotune_realization(sf):
...
@@ -200,7 +200,7 @@ def autotune_realization(sf):
with
cache_restoring
():
with
cache_restoring
():
with
filelock
.
FileLock
(
lock
):
with
filelock
.
FileLock
(
lock
):
if
not
os
.
path
.
isfile
(
logname
):
if
not
os
.
path
.
isfile
(
logname
):
generate_standalone_code
(
sf
,
filename
,
logname
)
generate_standalone_code
(
sf
,
filename
)
ret
=
subprocess
.
call
(
compiler_invocation
(
name
,
filename
))
ret
=
subprocess
.
call
(
compiler_invocation
(
name
,
filename
))
assert
ret
==
0
assert
ret
==
0
...
@@ -213,6 +213,7 @@ def autotune_realization(sf):
...
@@ -213,6 +213,7 @@ def autotune_realization(sf):
# Run the benchmark program
# Run the benchmark program
call
.
append
(
name
)
call
.
append
(
name
)
call
.
append
(
logname
)
devnull
=
open
(
os
.
devnull
,
'
w
'
)
devnull
=
open
(
os
.
devnull
,
'
w
'
)
ret
=
subprocess
.
call
(
call
,
stdout
=
devnull
,
stderr
=
subprocess
.
STDOUT
)
ret
=
subprocess
.
call
(
call
,
stdout
=
devnull
,
stderr
=
subprocess
.
STDOUT
)
assert
ret
==
0
assert
ret
==
0
...
...
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