Mentions légales du service
Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
R
reference-repository
Manage
Activity
Members
Labels
Plan
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
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
grid5000
reference-repository
Commits
2fc5e562
Commit
2fc5e562
authored
4 years ago
by
Simon Delamare
Browse files
Options
Downloads
Patches
Plain Diff
[lib] Compute theorical flops from node characteristics
parent
d4975939
No related branches found
Branches containing commit
No related tags found
Tags containing commit
1 merge request
!123
theorical flops
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
lib/refrepo/input_loader.rb
+39
-0
39 additions, 0 deletions
lib/refrepo/input_loader.rb
with
39 additions
and
0 deletions
lib/refrepo/input_loader.rb
+
39
−
0
View file @
2fc5e562
...
@@ -64,6 +64,9 @@ def load_yaml_file_hierarchy(directory = File.expand_path("../../input/grid5000/
...
@@ -64,6 +64,9 @@ def load_yaml_file_hierarchy(directory = File.expand_path("../../input/grid5000/
# populate each cluster with metrics network information
# populate each cluster with metrics network information
add_network_metrics
(
global_hash
)
add_network_metrics
(
global_hash
)
# populate each node with theorical flops
add_theorical_flops
(
global_hash
)
return
global_hash
return
global_hash
end
end
...
@@ -257,3 +260,39 @@ def add_network_metrics(h)
...
@@ -257,3 +260,39 @@ def add_network_metrics(h)
end
end
end
end
end
end
def
get_flops_per_cycle
(
microarch
,
cpu_name
)
# Double precision operations each cycle, sources:
# https://en.wikipedia.org/wiki/FLOPS
# https://en.wikichip.org/wiki/WikiChip
# https://ark.intel.com/
case
microarch
when
"K8"
return
2
when
"Clovertown"
,
"Nehalem"
,
"Westmere"
,
"K10"
return
4
when
"Sandy Bridge"
,
"Zen"
,
"Vulcan"
return
8
when
"Haswell"
,
"Broadwell"
return
16
when
"Cascade Lake-SP"
,
"Skylake"
case
cpu_name
when
/Silver 4110/
,
/Gold 5218/
,
/Gold 5220/
return
16
when
/Gold 6126/
,
/Gold 6130/
return
32
end
end
raise
"Error: Unknown CPU architecture, cannot compute flops"
end
def
add_theorical_flops
(
h
)
h
[
'sites'
].
each_pair
do
|
site_uid
,
site
|
site
[
'clusters'
].
each_pair
do
|
cluster_uid
,
cluster
|
cluster
[
'nodes'
].
select
{
|
k
,
v
|
v
[
'status'
]
!=
'retired'
}.
each_pair
do
|
node_uid
,
node
|
node
[
'performance'
][
'core_flops'
]
=
node
[
'processor'
][
'clock_speed'
]
*
get_flops_per_cycle
(
node
[
'processor'
][
'microarchitecture'
],
node
[
'processor'
][
'other_description'
])
node
[
'performance'
][
'node_flops'
]
=
node
[
'architecture'
][
'nb_cores'
]
*
node
[
'performance'
][
'core_flops'
]
end
end
end
end
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