Mentions légales du service

Skip to content
Snippets Groups Projects
Commit 2fc5e562 authored by Simon Delamare's avatar Simon Delamare
Browse files

[lib] Compute theorical flops from node characteristics

parent d4975939
No related branches found
No related tags found
1 merge request!123theorical flops
...@@ -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
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment