Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
E
Expetator
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
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
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
Show more breadcrumbs
sepia-pub
Expetator
Commits
0dc93920
Commit
0dc93920
authored
3 years ago
by
Georges Da Costa
Browse files
Options
Downloads
Patches
Plain Diff
Improves NPB
parent
e9b18375
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
expetator/benchmarks/npbbench.py
+37
-2
37 additions, 2 deletions
expetator/benchmarks/npbbench.py
expetator/experiment.py
+1
-1
1 addition, 1 deletion
expetator/experiment.py
setup.py
+1
-1
1 addition, 1 deletion
setup.py
with
39 additions
and
4 deletions
expetator/benchmarks/npbbench.py
+
37
−
2
View file @
0dc93920
import
os
import
re
import
math
def
standard_parameters
(
nbproc
):
if
nbproc
<
16
:
...
...
@@ -16,6 +17,38 @@ def standard_parameters(nbproc):
'
is
'
:
'
E
'
,
'
ft
'
:
'
E
'
,
'
lu
'
:
'
D
'
,
'
mg
'
:
'
D
'
}
def
test_lu
(
nb
):
xdim
=
int
(
math
.
sqrt
(
nb
))
ydim
=
nb
//
xdim
while
(
xdim
*
ydim
!=
nb
and
2
*
ydim
>=
xdim
):
xdim
+=
1
ydim
=
nb
//
xdim
return
xdim
*
ydim
==
nb
and
2
*
ydim
>=
xdim
def
get_lu
(
nb
):
val
=
max
(
nb
,
1
)
while
(
not
test_lu
(
val
)):
val
-=
1
return
val
def
get_square
(
nb
):
tmp
=
int
(
math
.
sqrt
(
nb
))
return
tmp
*
tmp
def
get_power_of_2
(
i
):
return
2
**
int
(
math
.
log2
(
i
))
def
npb_constraints
(
name
,
nbproc
):
if
name
in
[
'
cg
'
,
'
is
'
]:
return
get_power_of_2
(
nbproc
)
if
name
in
[
'
lu
'
]:
return
get_lu
(
nbproc
)
return
nbproc
# for 'ep', 'bt', 'sp', 'ft', 'mg'
class
NpbBench
:
'
Nas Parallel Benchmark
'
def
__init__
(
self
,
names
=
{
'
ep
'
,
'
bt
'
,
'
sp
'
,
'
cg
'
,
'
is
'
,
'
ft
'
,
'
lu
'
,
'
mg
'
},
...
...
@@ -42,13 +75,15 @@ class NpbBench:
executor
.
local
(
'
cp /tmp/NPB3.4-MPI/bin/* /tmp/bin/
'
)
for
key
in
self
.
params
:
self
.
params
[
key
]
=
[(
self
.
params
[
key
],
nbproc
)]
self
.
params
[
key
]
=
[(
self
.
params
[
key
],
npb_constraints
(
key
,
nbproc
)
)
]
return
self
.
params
def
run
(
self
,
bench
,
params
,
executor
):
"""
Runner for NPB benchmarks
"""
classtype
,
nbproc
=
params
output
=
executor
.
cores
(
'
/tmp/bin/%s.%s.x
'
%
(
bench
,
classtype
))
output
=
executor
.
mpi
(
'
/tmp/bin/%s.%s.x
'
%
(
bench
,
classtype
),
executor
.
mpi_core_file
,
nbproc
)
execution_time
=
float
(
re
.
search
(
'
Time in seconds = *(.*)
'
,
output
).
group
(
1
))
benchname
=
bench
+
'
-
'
+
classtype
+
'
-
'
+
str
(
nbproc
)
return
execution_time
,
benchname
This diff is collapsed.
Click to expand it.
expetator/experiment.py
+
1
−
1
View file @
0dc93920
...
...
@@ -30,7 +30,7 @@ class Executor:
self
.
hostnames
=
reduce
(
lambda
l
,
x
:
l
if
x
in
l
else
l
+
[
x
],
content
,
[])
self
.
nbcores
=
len
(
content
)
self
.
nbhosts
=
len
(
self
.
hostnames
)
self
.
mpi_options
=
'
--mca orte_rsh_agent oarsh
'
self
.
mpi_options
=
'
--map-by node
--mca orte_rsh_agent oarsh
'
self
.
sudo
=
'
sudo-g5k
'
self
.
ssh
=
'
oarsh
'
...
...
This diff is collapsed.
Click to expand it.
setup.py
+
1
−
1
View file @
0dc93920
...
...
@@ -5,7 +5,7 @@ with open("README.md", "r") as fh:
setuptools
.
setup
(
name
=
"
expetator
"
,
version
=
"
0.2.
7
"
,
version
=
"
0.2.
8
"
,
author
=
"
Georges Da Costa
"
,
author_email
=
"
georges.da-costa@irit.fr
"
,
description
=
"
A framework for monitoring HPC applications using DVFS
"
,
...
...
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